Update for 2.6.26-rc2-git5.
[releases.git] / deblob-check
index 882e15d50e64a705b3055aebb6c7f8dc5c034cdf..2d84ff41281d1f8ddc5bf86518c6c67840a10f4f 100755 (executable)
 
 # Yeah, lots of stuff to do.  Want to help?
 
+# This makes it much faster, and mostly immune to non-ASCII stuff, as
+# long as a 8-bit-safe sed is used.  Probably a safe assumption these
+# days.
+case ${LANG+set} in set) LANG=C; export LANG;; esac
+
 rm="rm -f"
 case $1 in
 --save-scripts | -S)
@@ -468,38 +473,52 @@ fi
 set_except () {
   # Look for a multi-line definition starting with a line that matches
   # $1 (implicitly anchored to the beginning of the line), and ending
-  # at the first ';'.
+  # at the first ';'.  $2 may optionally name the files in which this
+  # match is to be disregarded as a potential blob.
   initnc () {
-    addx "$1[^;]*;"
+    addx "$1[^;]*;\\?" $2
   }
 
   # Look for a multi-line definition starting with a line that matches
   # $1 (implicitly anchored to the beginning of the line), and ending
   # at the first ';' that's not within comments.
   initc () {
-    addx "$1\\([^;]*\\|$comment\\)*;"
+    addx "$1\\([^;]*\\|$comment\\)*;\\?" $2
   }
 
   # Accept as a non-blob an expression $1 that would have otherwise
   # triggered blob detection.  The expression must end in a way that
   # would trigger the blob detection machinery.
   accept () {
-    addx "$1"
+    addx "$1" $2
   }
 
   # Match up to the end a comment started in $1.
   ocomment () {
-    addx "$1\\([^*]\\|[*][*]*[^*/]\\|[*]*[\\n]\\)*[*]*[*][/]"
+    addx "$1\\([^*]\\|[*][*]*[^*/]\\|[*]*[\\n]\\)*[*]*[*][/]" $2
   }
 
   # Match $1 followed by backslash-terminated lines and a last
   # non-backslash-terminated line.
   oprepline () {
-    addx "$1\\([^\\n]*\\\\[\\n]\\)*[^\\n\\\\]*$eol"
+    addx "$1\\([^\\n]*\\\\[\\n]\\)*[^\\n\\\\]*$eol" $2
+  }
+
+  # Match $1 in $2 as a blob.  Not implemented yet.
+  blob () {
+    :
   }
 
   case /$1 in
-  */linux*.tar* | */kernel*.tar* | */linux-*.*.*/*)
+  /drivers/net/tg3.c)
+    # This file contains firmwares that we deblob with high
+    # sensitivity, so make sure the sequences of numbers that are not
+    # blobs are not deblobbed.  FIXME: we should have patterns to
+    # recognize the blobs instead.
+    initnc '   static const u32 test_pat\[4\]\[6\] ='
+    initnc '   }, mem_tbl_5705\[\] ='
+    ;;
+  */*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]};'
@@ -518,8 +537,7 @@ set_except () {
     initnc '   \.initial_reg_values    = (struct ixp2000_reg_value \[\]) {'
     # drivers/net/ixp2000/ixp2400_rx.ucode -> ixp2400_rx.uc
     initnc '   \.initial_reg_values    = (struct ixp2000_reg_value \[\]) {'
-    # crypto/tcrypt.h
-    initnc '[  ]*\.\(digest\|entries\|input\|key\|output\|plaintext\|result\)[         ]*= {'
+    initnc '[  ]*\.\(digest\|entries\|input\|key\|output\|plaintext\|result\)[         ]*= [{"]' crypto/tcrypt.h
 
     # checked:
 
@@ -591,14 +609,57 @@ 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\[\] ='
+    oprepline '#define INIT_THREAD [{0},]\+[   ]*\\[   ]*[{0},]\+'
+    initnc 'static uint tas300\(1c\|4\)_\(master\|mixer\|treble\|bass\)_tab\[\]='
+    initnc 'static short dmasound_[au]law2dma16\[\] ='
+    initnc 'static const unsigned short DACVolTable\[101\] ='
+
+    # 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[^[]*\[\] ='
+    initnc 'static const \(yytype_u\?int\(8\|16\)\|unsigned \(short\( int\)\?\|char\)\) yy[^[]*\[\] ='
     initnc '\(\|       \)static \(const \|\)\(unsigned \(short\|char\)\|struct SiS_[^ ]*\) SiS[^[]*\(\[[] [*0-9]*\]\)\+ *='
 
     initnc 'static const a3d_Hrtf_t A3dHrirZeros = {'
@@ -719,12 +780,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 +805,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\[\] ='
@@ -776,7 +833,7 @@ set_except () {
     initnc 'static const u32 treble_table\[41\]\[5\] ='
     initnc 'static const u64 [CT][0-7]\[256\] ='
     initnc 'static const u64 sbox[1-4]\[256\] ='
-    initnc 'static const u64 sha512_K\[80\] ='
+    initnc 'static const u64 sha512_K\[80\] =' 'crypto/sha512\(_generic\)\?.c'
     initnc 'static const u8 Tr\[4\]\[8\] ='
     initnc 'static const u8 aes_sbox\[256\] ='
     initnc 'static const u8 calc_sb_tbl\[512\] ='
@@ -806,13 +863,13 @@ set_except () {
     initnc 'static const unsigned char blue\[256\] ='
     initnc 'static const unsigned char chktab[hl]\[256\] ='
     initnc 'static const unsigned char comet_miireg2offset\[32\] ='
-    initnc 'static const unsigned char euc2sjisibm_g3upper_map\[\]\[2\] ='
+    initnc 'static \(const \)\?unsigned char euc2sjisibm_g3upper_map\[\]\[2\] ='
     initnc 'static const unsigned char green\[256\] ='
     initnc 'static const unsigned char hash_table_ops\[64\*4\] ='
     initnc 'static const unsigned char hid_keyboard\[256\] ='
     initnc 'static const unsigned char mts_direction\[256\/8\] ='
     initnc 'static const unsigned char red\[256\] ='
-    initnc 'static const unsigned char sjisibm2euc_map\[\]\[2\] ='
+    initnc 'static \(const \)\?unsigned char sjisibm2euc_map\[\]\[2\] ='
     initnc 'static const unsigned char vol_cvt_datt\[128\] ='
     initnc 'static const unsigned char wm_vol\[256\] ='
     initnc 'static const unsigned int MulIdx\[16\]\[16\] ='
@@ -858,16 +915,16 @@ set_except () {
     initnc 'static struct cipher_testvec xtea_dec_tv_template\[\] ='
     initnc 'static struct cipher_testvec xtea_enc_tv_template\[\] ='
     initnc 'static struct comp_testvec deflate_decomp_tv_template\[\] ='
-    initnc 'static struct hash_testvec aes_xcbc128_tv_template\[\] ='
+    initnc 'static struct hash_testvec aes_xcbc128_tv_template\[\] =' crypto/tcrypt.h
     initnc 'static struct hash_testvec crc32c_tv_template\[\] ='
-    initnc 'static struct hash_testvec hmac_sha256_tv_template\[\] ='
+    initnc 'static struct hash_testvec hmac_sha256_tv_template\[\] =' crypto/tcrypt.h
     initnc 'static struct hash_testvec sha256_tv_template\[\] ='
     initnc 'static struct hash_testvec sha384_tv_template\[\] ='
     initnc 'static struct hash_testvec sha512_tv_template\[\] ='
     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\[\] ='
@@ -899,8 +956,10 @@ set_except () {
     initnc 'static u8 ini_time_value\[\]\[8\] ='
     initnc 'static u8 init_tab \[\] ='
     initnc 'static u8 mac_reader\[\] ='
-    initnc 'static u8 mt2131_config1\[\] ='
-    initnc 'static u8 mt2266_init2\[\] ='
+    initnc 'static u8 mt2131_config1\[\] =' drivers/media/dvb/frontends/mt2131.c # <= 2.6.25
+    initnc 'static u8 mt2131_config1\[\] =' drivers/media/common/tuners/mt2131.c # >= 2.6.26
+    initnc 'static u8 mt2266_init2\[\] =' drivers/media/dvb/frontends/mt2266.c # <= 2.6.25
+    initnc 'static u8 mt2266_init2\[\] =' drivers/media/common/tuners/mt2266.c # >= 2.6.26
     initnc 'static u8 opera1_inittab\[\] ='
     initnc 'static u8 rco_time_value\[\]\[8\] ='
     initnc 'static u8 saa7113_init_regs\[\] ='
@@ -909,6 +968,9 @@ set_except () {
     initnc 'static u8 w1_crc8_table\[\] ='
     initnc 'static u_char const data_sizes_32\[32\] ='
     initnc 'static u_long ident_map\[32\] ='
+    initnc 'static u_short alt_map\[NR_KEYS\] ='
+    initnc 'static u_short altgr_map\[NR_KEYS\] ='
+    initnc 'static u_short ctrl_alt_map\[NR_KEYS\] ='
     initnc 'static u_short ctrl_map\[NR_KEYS\] *='
     initnc 'static u_short shift_ctrl_map\[NR_KEYS\] ='
     initnc 'static u_short shift_map\[NR_KEYS\] *='
@@ -1001,8 +1063,8 @@ set_except () {
     initnc 'u_short shift_ctrl_map\[NR_KEYS\] ='
     initnc 'u_short shift_map\[NR_KEYS\] *='
     initnc 'uint patch_2[0f]00\[\] ='
-    initnc 'uint16_t e1000_igp_cable_length_table\[IGP01E1000_AGC_LENGTH_TABLE_SIZE\] ='
-    initnc 'uint16_t e1000_igp_2_cable_length_table\[IGP02E1000_AGC_LENGTH_TABLE_SIZE\] ='
+    initnc '\(uint16_t\|u16\) e1000_igp_cable_length_table\[IGP01E1000_AGC_LENGTH_TABLE_SIZE\] =' drivers/net/e1000/e1000_hw.c # u16 on 2.6.26
+    initnc '\(uint16_t\|u16\) e1000_igp_2_cable_length_table\[IGP02E1000_AGC_LENGTH_TABLE_SIZE\] =' drivers/net/e1000/e1000_hw.c # u16 on 2.6.26
     initnc '} euc2sjisibm_jisx0212_map\[\] ='
     initnc '} freq\[\] ='
     initnc '} hps_h_coeff_tab \[\] ='
@@ -1011,13 +1073,50 @@ set_except () {
     initnc '} maven_gamma\[\] ='
     initnc '} mem_table\[\] ='
     initnc '} mxb_saa7740_init\[\] ='
-    initnc '} pll_table\[\] ='
+    initnc '} pll_table\[\] =' drivers/video/geode/lxfb_ops.c
     initnc '} qam256_snr_tab\[\] ='
     initnc '} qam64_snr_tab\[\] ='
     initnc '} sil_port\[\] ='
     initnc '} vsb_snr_tab\[\] ='
     initnc '} yss225_registers\[\] __devinitdata ='
     ;;
+  */patch*2.6.26-rc*)
+    initnc 'static u64 vec2off\[68\] =' arch/ia64/kvm/process.c
+    initnc "                   interrupts = <\\(0x\\)\\?3 \\(0x\\)\\?0 \\(0x\\)\\?0  $blobpat*>;" 'arch/powerpc/boot/dts/\(cm5200\|lite5200b\?\|kuroboxHG\|pcm030\|tqm5200\).dts'
+    initnc 'static const u32 crctab32\[\] =' arch/x86/boot/tools/build.c
+    initnc 'static const u64 sha512_K\[80\] =' 'crypto/sha512\(_generic\)\?.c'
+    initnc 'static struct hash_testvec \(hmac_sha\(224\|256\)\|aes_xcbc128\|crc32c\)_tv_template\[\] =' crypto/tcrypt.h
+    initnc 'static struct cipher_testvec \(bf_cbc\|serpent\|tnepres\|aes\(_\(cbc\|ctr\|xts\)\)\?\|x\?tea\|anubis\(_cbc\)\?\|xeta\|camellia_cbc\|cts_mode\)_\(enc\|dec\)_tv_template\[\] =' crypto/tcrypt.h
+    initnc '           \.\(digest\|entries\|input\|key\|output\|plaintext\|result\)[   ]*= [{"]' crypto/tcrypt.h
+    initnc 'static const u8 speedtab \[3\]\[12\] =' drivers/ide/legacy/umc8672.c
+    initnc 'static u8 cvs_time_value\[\]\[XFER_UDMA_6 - XFER_UDMA_0 + 1\] =' drivers/ide/pci/sis5513.c
+    initnc 'static u8 \(ini\|act\|rco\)_time_value\[\]\[8\] =' drivers/ide/pci/sis5513.c
+    initnc 'static u8 mt2131_config1\[\] =' drivers/media/common/tuners/mt2131.c
+    initnc 'static u8 mt2266_init2\[\] =' drivers/media/common/tuners/mt2266.c
+    initnc 'u16 e1000_igp_cable_length_table\[IGP01E1000_AGC_LENGTH_TABLE_SIZE\] =' drivers/net/e1000/e1000_hw.c
+    initnc '\(uint16_t\|u16\) e1000_igp_2_cable_length_table\[IGP02E1000_AGC_LENGTH_TABLE_SIZE\] =' drivers/net/e1000/e1000_hw.c # u16 on 2.6.26
+    oprepline '#define AR5K_RATES_11[ABG] ' drivers/net/wireless/ath5k/ath5k.h
+    oprepline '        { 1, MODULATION_XR, 1000, 2, 139, 1 },  ' drivers/net/wireless/ath5k/ath5k.h
+    initnc 'static const struct ath5k_ini_mode rf\(5413\|24\(13\|25\)\)_ini_mode_end\[\] =' drivers/net/wireless/ath5k/initvals.c
+    initnc ';[/][*]@@ -[0-9]*,[0-9]* +[0-9]*,[0-9]* @@ static const yytype_u\?int\(8\|16\) yy[^\n []*\[\] =[*][/];' scripts/kconfig/zconf.tab.c_shipped
+    initnc 'static const yytype_u\?int\(8\|16\) yy[^\n []*\[\] =' scripts/kconfig/zconf.tab.c_shipped
+    # new in 2.6.26
+    initnc 'static struct mse2snr_tab \(vsb\|qam\(64\|256\)\)_mse2snr_tab\[\] =' drivers/media/dvb/frontends/au8522.c
+    initnc '} \(VSB\|QAM\)_mod_tab\[\] =' drivers/media/dvb/frontends/au8522.c
+    initnc '} itd1000_\(lpf_pga\|fre_values\)\[\] =' drivers/media/dvb/frontends/itd1000.c
+    initnc '} \(vsb\|qam\(64\|256\)\)_snr_tab\[\] =' drivers/media/dvb/frontends/s5h1411.c
+    initnc '} snr_tab\[\] =' drivers/media/dvb/frontends/tda10048.c
+    initnc '   static const u8 biphase_tbl\[\] =' drivers/media/video/cx18/cx18-av-vbi.c
+    initnc '   static const u8 mpeg_hdr_data\[\] =' drivers/media/video/cx18/cx18-vbi.c
+    initnc 'static u32 reg_init_initialize\[\] =' drivers/media/video/saa717x.c
+    initnc '   } vals\[\] =' drivers/media/video/saa717x.c
+    initnc 'static const u32 \(main\|gear\)_seedset\[BACKOFF_SEEDSET_ROWS\]\[BACKOFF_SEEDSET_LFSRS\] =' drivers/net/forcedeth.c
+    blob '^unsigned char \(IDX_ACTIVATE_\(READ\|WRITE\)\|\(CM\|ULP\)_\(ENABLE\|SETUP\)\|DM_ACT\) = '"$blobsep$blobseq*$blobsep;" drivers/s390/net/qeth_core_mpc.c # from drivers/s390/net/qeth_mpc.c in 2.6.25
+    initnc '} pll_table\[\] =' drivers/video/geode/lxfb_ops.c
+    accept "  { 0x00014284,  19688 },[\n]  { 0x00011104,  20400 },[\n]  { $blobpat* }," drivers/video/geode/lxfb_ops.c # won't be necessary in rc3
+    initnc 'static const u16 wm9713_reg\[\] =' sound/soc/codecs/wm9713.c
+    accept 'P[13]\([\n]#[^\n]*\)*[\n]*\([\n][0-9 ]*\)\+' drivers/video/logo/logo_blackfin_clut224.ppm
+    ;;
   */patch*2.6.25-rc*)
     initnc ';[/][*]@@ -[0-9]*,[0-9]* +[0-9]*,[0-9]* @@ static uchar sbox\[8\]\[4\]\[16\] = {[*][/];'
     accept '   \$3 = {{pge = {{ste = {\(\([0-9][0-9a-fx{},\n   ]*\|\(pge\|ste\) =\|<repeats [0-9]\+ times>\)[{},\n     ]*\)*<repeats 11 times>}'"$eol"
@@ -1039,14 +1138,9 @@ set_except () {
     initnc 'static const struct arb_line write_arb_data\[NUM_WR_Q\]\[MAX_WR_ORD + 1\] ='
     initnc 'uint16_t e1000_igp_cable_length_table\[IGP01E1000_AGC_LENGTH_TABLE_SIZE\] ='
     initnc 'uint16_t e1000_igp_2_cable_length_table\[IGP02E1000_AGC_LENGTH_TABLE_SIZE\] ='
-    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 '
+    oprepline '#define AR5K_RATES_11\([ABG]\|TURBO\|XR\) ' drivers/net/wireless/ath5k/ath5k.h
     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\[\] ='
@@ -1059,18 +1153,24 @@ set_except () {
     accept '     \( 49,\)*[\n]\([ 0-9,]*[\n]\)*     \( 49,\)*'"$eol"
     initnc 'static const unsigned char wm_vol\[256\] ='
     accept 'domain<N> <cpumask> 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 +1178,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 +1211,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\[\] =' drivers/net/wireless/ath5k/initvals.c # ?
     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 +1221,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
 }  
 
@@ -1709,8 +1822,10 @@ check () {
   falsepos_name=`mktemp -t deblob-check-falsepos-XXXXXX`
   tempfiles="$falsepos_name"
 
-  # Add $1 to falsepos.  Its usage makes it implicitly anchored to
-  # the beginning of the line.
+
+  # Add $1 to falsepos.  Its usage makes it implicitly anchored to the
+  # beginning of the line.  $2, if present, will some day narrow the
+  # falsepos matches to files that match it.
   addx () {
     if test -n "$1"; then
       echo -n "\\|$1" >> $falsepos_name
@@ -1745,7 +1860,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 +1874,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`