X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=deblob-check;h=3cd3e74904c850017b6eea99efed44a780d42351;hb=35b3102726215ed962b6302753bf9e8d6f75c78a;hp=882e15d50e64a705b3055aebb6c7f8dc5c034cdf;hpb=38625458388eb05434282c7bb3243233b2779a8c;p=releases.git diff --git a/deblob-check b/deblob-check index 882e15d50e64..3cd3e74904c8 100755 --- a/deblob-check +++ b/deblob-check @@ -499,7 +499,7 @@ set_except () { } case /$1 in - */linux*.tar* | */kernel*.tar* | */linux-*.*.*/*) + */*linux*.tar* | */*kernel*.tar* | */*linux-*.*.*/*) # false alarms, contain source # drivers/net/wan/wanxlfw.inc_shipped -> wanxlfw.S accept 'static u8 firmware\[\]={[\n]0x60,\(0x00,\)*0x16,\(0x00,\)*\([\n]\(0x[0-9A-F][0-9A-F],\)*\)*[\n]0x23,0xFC,0x00,0x00,0x00,0x01,0xFF,0xF9,0x00,0xD4,0x61,0x00,0x06,0x74,0x33,0xFC,\([\n]\(0x[0-9A-F][0-9A-F],\)*\)*0x00[\n]};' @@ -591,11 +591,50 @@ set_except () { # drivers/media/video/saa7114.c initc 'static const unsigned char init\[\] = {[^;]*MODE=0 ;.*SAA_7114_NTSC_HSYNC_START' + # in 2.6.23 only + accept " Psize Ipps Tput Rxint Txint Done Ndone[\\n] ---------------------------------------------------------------\\([\\n][ 0-9]\\+\\)\\+$eol" + initnc 'static u_short ataplain_map\[NR_KEYS\] __initdata =' + initnc 'static RegInitializer initData\[\] __initdata =' + initnc ' static const unsigned char invert5\[\] =' + initnc 'static unsigned char alpa2target\[\] =' + initnc 'static unsigned char target2alpa\[\] =' + + # new in 2.6.25 + accept "%canned_values = ([\\n] \\([0-9]\\+ => \\[[ \\n]\\+\\(\\([0-9]\\+\\|'0x[0-9a-f]\\+'\\),[ \\n]*\\)*\\]\\(, \\|[\\n]\\)\\)*);" + + # from 2.6.25-rc* patches + initnc ' int bcomm_irq\[3\*16\] =' + initnc ' static const int8 countLeadingZerosHigh\[\] =' + initnc 'static struct nic_qp_map nic_qp_mapping_[01]\[\] =' + initnc 'static struct regval ov_initvals\[\] =' + initnc 'static struct regval stk1125_initvals\[\] =' + initnc 'static u8 bnx2x_stats_len_arr\[BNX2X_NUM_STATS\] =' + initnc 'static const struct arb_line read_arb_data\[NUM_RD_Q\]\[MAX_RD_ORD + 1\] =' + initnc 'static const struct arb_line write_arb_data\[NUM_WR_Q\]\[MAX_WR_ORD + 1\] =' + oprepline '#define AR5K_RATES_11A ' + oprepline '#define AR5K_RATES_11B ' + oprepline '#define AR5K_RATES_11G ' + oprepline '#define AR5K_RATES_TURBO ' + oprepline '#define AR5K_RATES_XR ' + initnc ' } blinkrates\[\] =' + initnc 'static const struct ath5k_ini ar5212_ini\[\] =' + initnc 'static const struct ath5k_ini_mode rf5413_ini_mode_end\[\] =' + initnc 'static const struct ath5k_ini_rf rfregs_5111\[\] =' + initnc 'static const struct ath5k_ini_rf rfregs_5112\[\] =' + initnc 'static const struct ath5k_ini_rf rfregs_5112a\[\] =' + initnc 'static const struct ath5k_ini_rf rfregs_5413\[\] =' + initnc 'const u\(8\|16\|32\) b43_ntab_\(\(adjustpower\|estimatepowerlt\|gainctl\|iqlt\|loftlt\|noisevar1\|tdi[24]0a\)[01]\|channelest\|frame\(lookup\|struct\)\|mcs\|pilot\|tdtrn\|tmap\)\[\] =' + # quite suspicious # arch/parisc/kernel/perf_images.h initc 'static uint32_t onyx_images\[\]\[PCXU_IMAGE_SIZE\/sizeof(uint32_t)\] __read_mostly =' initc 'static uint32_t cuda_images\[\]\[PCXW_IMAGE_SIZE\/sizeof(uint32_t)\] __read_mostly =' + # These are regarded as ok + initnc 'static const u8 SN9C102_\(Y\|UV\)_QTABLE[01]\[64\] = {' + initnc ' static const u8 jpeg_header\[589\] = {' + accept '[ ]\{1,2\}err = sn9c102_write_const_regs(cam\(,[ \n]\+{0x[0-9a-fA-F][0-9a-fA-F], 0x[0-9a-fA-F][0-9a-fA-F]}\)*);' + # too lax? initnc 'static yyconst flex_int\(16\|32\)_t yy_[^[]*\[[][0-9]*\] =' initnc 'static const yytype_u\?int\(8\|16\) yy[^[]*\[\] =' @@ -719,12 +758,7 @@ set_except () { initnc 'static const int init_seq\[\] =' initnc 'static const int mobile_vid_table\[32\] =' initnc 'static const s16 snd_opl4_pitch_map\[0x600\] =' - initnc 'static const s8 b43_tssi2dbm_b_table\[\] =' - initnc 'static const s8 b43_tssi2dbm_g_table\[\] =' - initnc 'static const s8 b43legacy_tssi2dbm_b_table\[\] =' - initnc 'static const s8 b43legacy_tssi2dbm_g_table\[\] =' - initnc 'static const s8 bcm43xx_tssi2dbm_b_table\[\] =' - initnc 'static const s8 bcm43xx_tssi2dbm_g_table\[\] =' + initnc 'static const s8 \(b43\(\|legacy\)\|bcm43xx\)_tssi2dbm_[bg]_table\[\] =' initnc 'static const s8 budtab\[256\] =' initnc 'static const struct aper_size_info_32 u3_sizes\[8\] =' initnc 'static const struct aper_size_info_8 via_generic_sizes\[9\] =' @@ -749,6 +783,7 @@ set_except () { initnc 'static const struct rf_channel rf_vals_seq\[\] =' initnc 'static const u16 Sbox\[256\] =' initnc 'static const u16 count_lut\[\] =' + # drivers/net/e1000e/phy.c initnc 'static const u16 e1000_igp_2_cable_length_table\[\] =' initnc 'static const u16 rtl8225bcd_rxgain\[\] =' initnc 'static const u16 rtl8225z2_rxgain\[\] =' @@ -867,7 +902,7 @@ set_except () { initnc 'static struct hash_testvec wp256_tv_template\[\] =' initnc 'static struct hash_testvec wp384_tv_template\[\] =' initnc 'static struct hash_testvec wp512_tv_template\[\] =' - initnc 'static struct iwl_tx_power power_gain_table\[2\]\[IWL_MAX_GAIN_ENTRIES\] =' + initnc 'static struct iwl\(3945\)\?_tx_power power_gain_table\[2\]\[IWL_MAX_GAIN_ENTRIES\] =' initnc 'static struct ovcamchip_regvals regvals_init_\(76be\|7[16]20\|7x10\)\[\] =' initnc 'static struct regval_list ov7670_default_regs\[\] =' initnc 'static struct s_c2 SetRate48000\[\] =' @@ -1059,18 +1094,24 @@ set_except () { accept ' \( 49,\)*[\n]\([ 0-9,]*[\n]\)* \( 49,\)*'"$eol" initnc 'static const unsigned char wm_vol\[256\] =' accept 'domain 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36'"$eol" + # drivers/net/e1000e/phy.c initnc 'static const u16 e1000_igp_2_cable_length_table\[\] =' accept ' 24 => \[[\n]\([^\n]*[\n]\)* \]\(, [0-9]\+ => \[\)\?'"$eol" accept ' '"'"'0x[^\n]*[\n]\([^\n]*[\n]\)* \]\(, [0-9]\+ => \[\)\?'"$eol" initnc 'const u\(8\|16\|32\) b43_ntab_\(\(adjustpower\|estimatepowerlt\|gainctl\|iqlt\|loftlt\|noisevar1\|tdi[24]0a\)[01]\|channelest\|frame\(lookup\|struct\)\|mcs\|pilot\|tdtrn\|tmap\)\[\] =' ;; - */nouveau-drm.patch) + */nouveau-drm*.patch) initnc '\(static uint32_t\|}\) nv04_graph_ctx_regs \[\] =' initnc 'static int nv10_graph_ctx_regs \[\] =' - # this is highly suspicious, but it does not look like the - # developers are trying to stop anyone from modifying it, - # they just grabbed these numbers from mmio interactions. - initnc 'static uint32_t nv\(4[013467ace]\|49_4b\|8[46]\)_ctx_voodoo\[\] =' + + # Although the developers of the drivers are not trying to stop + # anyone from modifying it or understanding it, they acknowledge + # these are bits of code, obtained through mmio interactions. + # This means these blobs are not source code, AND original authors + # of the blobs have power to stop others from modifying them. + # Non-Free software, for sure. + + # initnc 'static uint32_t nv\(4[013467ace]\|49_4b\|8[46]\)_ctx_\(voodoo\|prog\)\[\] =' ;; */linux-2.6-lirc.patch) initnc 'const unsigned char map_table\[\] =' @@ -1078,8 +1119,24 @@ set_except () { */linux-2.6-modsign-mpilib.patch) initnc 'const unsigned char __clz_tab\[\] =' ;; - */linux-2.6-wireless.patch) + */linux-2.6-wireless*.patch) initnc 'const u\(8\|16\|32\) b43_ntab_\(\(adjustpower\|estimatepowerlt\|gainctl\|iqlt\|loftlt\|noisevar1\|tdi[24]0a\)[01]\|channelest\|frame\(lookup\|struct\)\|mcs\|pilot\|tdtrn\|tmap\)\[\] =' + initnc 'static const s8 \(b43\(legacy\)\?\|bcm43xx\)_tssi2dbm_[bg]_table\[\] =' + initnc 'static struct iwl\(3945\)\?_tx_power power_gain_table\[2\]\[IWL_MAX_GAIN_ENTRIES\] =' + initnc 'static const struct gain_entry gain_table\[2\]\[108\] =' + initnc 'static const struct rf_channel rf_vals_5222\[\] =' + initnc 'static const struct rf_channel rf_vals_5225_2527\[\] =' + initnc 'static const struct rf_channel rf_vals_5226\[\] =' + initnc 'static const struct rf_channel rf_vals_bg\[\] =' + initnc 'static const struct rf_channel rf_vals_bg_2522\[\] =' + initnc 'static const struct rf_channel rf_vals_bg_2523\[\] =' + initnc 'static const struct rf_channel rf_vals_bg_2524\[\] =' + initnc 'static const struct rf_channel rf_vals_bg_2525\[\] =' + initnc 'static const struct rf_channel rf_vals_bg_2525e\[\] =' + initnc 'static const struct rf_channel rf_vals_bg_2528\[\] =' + initnc 'static const struct rf_channel rf_vals_noseq\[\] =' + initnc 'static const struct rf_channel rf_vals_seq\[\] =' + initnc ' static const u8 t\[\] =' initnc 'static const u16 rtl8225bcd_rxgain\[\] =' initnc 'static const u8 rtl8225_agc\[\] =' initnc 'static const u8 rtl8225_tx_power_cck\[\] =' @@ -1095,16 +1152,9 @@ set_except () { oprepline '#define AR5K_RATES_TURBO ' oprepline '#define AR5K_RATES_XR ' initnc 'static const struct ath5k_ini ar5212_ini\[\] =' - initnc 'static const struct ath5k_ini_mode rf5413_ini_mode_end\[\] =' + initnc 'static const struct ath5k_ini_mode rf\(5413\|24\(13\|25\)\)_ini_mode_end\[\] =' initnc ' } blinkrates\[\] =' - ;; - */linux-2.6-wireless-pending.patch) - oprepline '#define AR5K_RATES_11A ' - oprepline '#define AR5K_RATES_11B ' - oprepline '#define AR5K_RATES_11G ' - oprepline '#define AR5K_RATES_TURBO ' - oprepline '#define AR5K_RATES_XR ' - initnc 'static const struct ath5k_ini_mode rf2413_ini_mode_end\[\] =' + # git logs accept ' sudo modprobe ath5k debug=0x00000400[\n][ ]*[\n]\([ ]*Band[^\n]*[\n]\([ ]*\(\(channels\|rates\):\|[- 0-9a-f]*\|\[\.\.\. etc \]\)[\n]\)\+\)\+ 540 000c 0000 0000' oprepline ' { 1, MODULATION_XR, 3000, 1, 150, 3 },' @@ -1112,6 +1162,10 @@ set_except () { */linux-2.6-drm-i915-modeset.patch) initnc 'static const u32 filter_table\[\] =' ;; + */linux-2.6-netdev-e1000e*.patch) + # drivers/net/e1000e/phy.c + initnc 'static const u16 e1000_igp_2_cable_length_table\[\] =' + ;; esac } @@ -1745,7 +1799,8 @@ check () { # Extract or otherwise munge... case $input in *.tar*) - cmd="tar -xf - --to-command='echo \";/*begin \$TAR_FILENAME*/;\"; cat; echo \";/**/;\"; echo \";/*end \$TAR_FILENAME*/;\"'";; + cmd="tar -xf - --to-command='echo \";/*begin \$TAR_FILENAME*/;\"; cat; echo \";/**/;\"; echo \";/*end \$TAR_FILENAME*/;\"'" + ;; *patch* | *diff*) sedpatch=' /^[-]/d; @@ -1758,13 +1813,22 @@ check () { s/$/*\/;/; }; s/^[ +]//;' - cmd='sed "$sedpatch"' ;; + cmd='sed "$sedpatch"' + ;; *) - cmd='cat' ;; + cmd='cat' + ;; esac cmd="{ echo \";/*begin $input*/;\"; $cmd; echo \";/*end $input*/;\"; }" set "$@" "$cmd" + case $input in + *.tar*) + cmd="{ cat; cat > /dev/null; }" + set "$@" "$cmd" + ;; + esac + # Then run through the selected action. if test "$rm" != "rm -f" || test ! `echo "$sedmain" | wc -c` -lt 1024; then scriptname=`mktemp -t deblob-check-sedmain-XXXXXX`