commit:     12c85964bf5a1b1c0aab230b94c2371004a4b360
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 26 09:11:53 2015 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Mon Oct 26 09:11:53 2015 +0000
URL:        
https://gitweb.gentoo.org/proj/hardened-patchset.git/commit/?id=12c85964

grsecurity-3.1-4.2.4-201510251836

 4.2.4/0000_README                                  |   2 +-
 ...> 4420_grsecurity-3.1-4.2.4-201510251836.patch} | 193 ++++++++++++++++-----
 2 files changed, 153 insertions(+), 42 deletions(-)

diff --git a/4.2.4/0000_README b/4.2.4/0000_README
index ddc5a83..83460c6 100644
--- a/4.2.4/0000_README
+++ b/4.2.4/0000_README
@@ -6,7 +6,7 @@ Patch:  1003_linux-4.2.4.patch
 From:  http://www.kernel.org
 Desc:  Linux 4.2.4
 
-Patch: 4420_grsecurity-3.1-4.2.4-201510240907.patch
+Patch: 4420_grsecurity-3.1-4.2.4-201510251836.patch
 From:  http://www.grsecurity.net
 Desc:  hardened-sources base patch from upstream grsecurity
 

diff --git a/4.2.4/4420_grsecurity-3.1-4.2.4-201510240907.patch 
b/4.2.4/4420_grsecurity-3.1-4.2.4-201510251836.patch
similarity index 99%
rename from 4.2.4/4420_grsecurity-3.1-4.2.4-201510240907.patch
rename to 4.2.4/4420_grsecurity-3.1-4.2.4-201510251836.patch
index c6e64ba..394cd9b 100644
--- a/4.2.4/4420_grsecurity-3.1-4.2.4-201510240907.patch
+++ b/4.2.4/4420_grsecurity-3.1-4.2.4-201510251836.patch
@@ -19232,7 +19232,7 @@ index 1c7eefe..d0e4702 100644
  };
  
 diff --git a/arch/x86/include/asm/fpu/internal.h 
b/arch/x86/include/asm/fpu/internal.h
-index 3c3550c..995858d 100644
+index 3c3550c..33cb41a 100644
 --- a/arch/x86/include/asm/fpu/internal.h
 +++ b/arch/x86/include/asm/fpu/internal.h
 @@ -97,8 +97,11 @@ extern void fpstate_sanitize_xstate(struct fpu *fpu);
@@ -19348,6 +19348,24 @@ index 3c3550c..995858d 100644
        }
  
        __copy_kernel_to_fpregs(fpstate);
+@@ -611,7 +623,7 @@ switch_fpu_prepare(struct fpu *old_fpu, struct fpu 
*new_fpu, int cpu)
+               if (fpu.preload) {
+                       new_fpu->counter++;
+                       __fpregs_activate(new_fpu);
+-                      prefetch(&new_fpu->state);
++                      prefetch(new_fpu->state);
+               } else {
+                       __fpregs_deactivate_hw();
+               }
+@@ -623,7 +635,7 @@ switch_fpu_prepare(struct fpu *old_fpu, struct fpu 
*new_fpu, int cpu)
+                       if (fpu_want_lazy_restore(new_fpu, cpu))
+                               fpu.preload = 0;
+                       else
+-                              prefetch(&new_fpu->state);
++                              prefetch(new_fpu->state);
+                       fpregs_activate(new_fpu);
+               }
+       }
 @@ -643,7 +655,7 @@ switch_fpu_prepare(struct fpu *old_fpu, struct fpu 
*new_fpu, int cpu)
  static inline void switch_fpu_finish(struct fpu *new_fpu, fpu_switch_t 
fpu_switch)
  {
@@ -24998,7 +25016,7 @@ index ce95676..af5c012 100644
  unlock_done:
        mutex_unlock(&espfix_init_mutex);
 diff --git a/arch/x86/kernel/fpu/core.c b/arch/x86/kernel/fpu/core.c
-index d25097c..84b0d51 100644
+index d25097c..e2df353 100644
 --- a/arch/x86/kernel/fpu/core.c
 +++ b/arch/x86/kernel/fpu/core.c
 @@ -127,7 +127,7 @@ void __kernel_fpu_end(void)
@@ -25019,6 +25037,15 @@ index d25097c..84b0d51 100644
  
        /*
         * Save current FPU registers directly into the child
+@@ -258,7 +258,7 @@ static void fpu_copy(struct fpu *dst_fpu, struct fpu 
*src_fpu)
+        */
+       preempt_disable();
+       if (!copy_fpregs_to_fpstate(dst_fpu)) {
+-              memcpy(&src_fpu->state, &dst_fpu->state, xstate_size);
++              memcpy(src_fpu->state, dst_fpu->state, xstate_size);
+               fpregs_deactivate(src_fpu);
+       }
+       preempt_enable();
 @@ -285,7 +285,7 @@ void fpu__activate_curr(struct fpu *fpu)
        WARN_ON_FPU(fpu != &current->thread.fpu);
  
@@ -25087,7 +25114,7 @@ index d25097c..84b0d51 100644
                return MXCSR_DEFAULT;
        }
 diff --git a/arch/x86/kernel/fpu/init.c b/arch/x86/kernel/fpu/init.c
-index d14e9ac..8ca141b 100644
+index d14e9ac..fab0813 100644
 --- a/arch/x86/kernel/fpu/init.c
 +++ b/arch/x86/kernel/fpu/init.c
 @@ -42,7 +42,7 @@ static void fpu__init_cpu_generic(void)
@@ -25099,7 +25126,7 @@ index d14e9ac..8ca141b 100644
        else
  #endif
                asm volatile ("fninit");
-@@ -147,12 +147,14 @@ EXPORT_SYMBOL_GPL(xstate_size);
+@@ -147,37 +147,21 @@ EXPORT_SYMBOL_GPL(xstate_size);
  #define CHECK_MEMBER_AT_END_OF(TYPE, MEMBER) \
        BUILD_BUG_ON(sizeof(TYPE) != offsetofend(TYPE, MEMBER))
  
@@ -25111,12 +25138,19 @@ index d14e9ac..8ca141b 100644
  static void __init fpu__init_task_struct_size(void)
  {
 -      int task_size = sizeof(struct task_struct);
-+      size_t task_size = sizeof(struct task_struct);
- 
-       /*
-        * Subtract off the static size of the register state.
-@@ -168,16 +170,12 @@ static void __init fpu__init_task_struct_size(void)
- 
+-
+-      /*
+-       * Subtract off the static size of the register state.
+-       * It potentially has a bunch of padding.
+-       */
+-      task_size -= sizeof(((struct task_struct *)0)->thread.fpu.state);
+-
+-      /*
+-       * Add back the dynamically-calculated register state
+-       * size.
+-       */
+-      task_size += xstate_size;
+-
        /*
         * We dynamically size 'struct fpu', so we require that
 -       * it be at the end of 'thread_struct' and that
@@ -96808,7 +96842,7 @@ index a76c917..63b52db 100644
  asmlinkage long compat_sys_lookup_dcookie(u32, u32, char __user *, 
compat_size_t);
  /*
 diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
-index dfaa7b3..58cebfb 100644
+index dfaa7b3..115dcfc 100644
 --- a/include/linux/compiler-gcc.h
 +++ b/include/linux/compiler-gcc.h
 @@ -116,8 +116,8 @@
@@ -96861,6 +96895,18 @@ index dfaa7b3..58cebfb 100644
  /*
   * Mark a position in code as unreachable.  This can be used to
   * suppress control flow warnings after asm blocks that transfer
+@@ -237,6 +266,11 @@
+ #define KASAN_ABI_VERSION 3
+ #endif
+ 
++#if GCC_VERSION >= 50000
++// Disable for now as size_overflow doesn't support it
++// #define CC_HAVE_BUILTIN_OVERFLOW
++#endif
++
+ #endif        /* gcc version >= 40000 specific checks */
+ 
+ #if !defined(__noclone)
 diff --git a/include/linux/compiler.h b/include/linux/compiler.h
 index e08a6ae..2e5e776 100644
 --- a/include/linux/compiler.h
@@ -100500,6 +100546,30 @@ index b2a0f15..4d7da32 100644
   
  /** create a directory */
  struct dentry *oprofilefs_mkdir(struct dentry *parent, char const *name);
+diff --git a/include/linux/overflow-arith.h b/include/linux/overflow-arith.h
+new file mode 100644
+index 0000000..e12ccf8
+--- /dev/null
++++ b/include/linux/overflow-arith.h
+@@ -0,0 +1,18 @@
++#pragma once
++
++#include <linux/kernel.h>
++
++#ifdef CC_HAVE_BUILTIN_OVERFLOW
++
++#define overflow_usub __builtin_usub_overflow
++
++#else
++
++static inline bool overflow_usub(unsigned int a, unsigned int b,
++                               unsigned int *res)
++{
++      *res = a - b;
++      return *res > a ? true : false;
++}
++
++#endif
 diff --git a/include/linux/padata.h b/include/linux/padata.h
 index 4386946..f50c615 100644
 --- a/include/linux/padata.h
@@ -101619,7 +101689,7 @@ index ab1e039..ad4229e 100644
  
  static inline void disallow_signal(int sig)
 diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
-index 9b88536..6a15c44 100644
+index 9b88536..db7cc7f 100644
 --- a/include/linux/skbuff.h
 +++ b/include/linux/skbuff.h
 @@ -784,7 +784,7 @@ struct sk_buff *__alloc_skb(unsigned int size, gfp_t 
priority, int flags,
@@ -101631,6 +101701,15 @@ index 9b88536..6a15c44 100644
                                        gfp_t priority)
  {
        return __alloc_skb(size, priority, 0, NUMA_NO_NODE);
+@@ -1964,7 +1964,7 @@ static inline int skb_checksum_start_offset(const struct 
sk_buff *skb)
+       return skb->csum_start - skb_headroom(skb);
+ }
+ 
+-static inline int skb_transport_offset(const struct sk_buff *skb)
++static inline int __intentional_overflow(0) skb_transport_offset(const struct 
sk_buff *skb)
+ {
+       return skb_transport_header(skb) - skb->data;
+ }
 @@ -1979,7 +1979,7 @@ static inline u32 skb_inner_network_header_len(const 
struct sk_buff *skb)
        return skb->inner_transport_header - skb->inner_network_header;
  }
@@ -120550,6 +120629,30 @@ index 69f4f68..1f97524 100644
        .kind           = "ip6gretap",
        .maxtype        = IFLA_GRE_MAX,
        .policy         = ip6gre_policy,
+diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
+index d5f7716..b4b3821 100644
+--- a/net/ipv6/ip6_output.c
++++ b/net/ipv6/ip6_output.c
+@@ -28,6 +28,7 @@
+ 
+ #include <linux/errno.h>
+ #include <linux/kernel.h>
++#include <linux/overflow-arith.h>
+ #include <linux/string.h>
+ #include <linux/socket.h>
+ #include <linux/net.h>
+@@ -581,7 +582,10 @@ int ip6_fragment(struct sock *sk, struct sk_buff *skb,
+               if (np->frag_size)
+                       mtu = np->frag_size;
+       }
+-      mtu -= hlen + sizeof(struct frag_hdr);
++
++      if (overflow_usub(mtu, hlen + sizeof(struct frag_hdr), &mtu) ||
++          mtu <= 7)
++              goto fail_toobig;
+ 
+       frag_id = ipv6_select_ident(net, &ipv6_hdr(skb)->daddr,
+                                   &ipv6_hdr(skb)->saddr);
 diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
 index 2e67b66..b816b34 100644
 --- a/net/ipv6/ip6_tunnel.c
@@ -124953,7 +125056,7 @@ index 88dbf23..d1b4291 100755
  mkdir -p "$destdir"
  (cd $srctree; tar -c -f - -T -) < "$objtree/debian/hdrsrcfiles" | (cd 
$destdir; tar -xf -)
 diff --git a/scripts/package/mkspec b/scripts/package/mkspec
-index d9ab94b..66414bc 100755
+index d9ab94b..827332f 100755
 --- a/scripts/package/mkspec
 +++ b/scripts/package/mkspec
 @@ -122,30 +122,41 @@ echo 'rm -f 
$RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE/{build,source}"
@@ -125019,8 +125122,8 @@ index d9ab94b..66414bc 100755
  echo "/usr/src/kernels/$KERNELRELEASE"
 -echo "/lib/modules/$KERNELRELEASE/build"
 -echo "/lib/modules/$KERNELRELEASE/source"
-+echo "%attr (500, root, root) 
/usr/src/kernels/$KERNELRELEASE/scripts/mod/recordmcount"
-+echo "%attr (500, root, root) 
/usr/src/kernels/$KERNELRELEASE/scripts/mod/basic/fixdep"
++echo "%attr (500, root, root) 
/usr/src/kernels/$KERNELRELEASE/scripts/recordmcount"
++echo "%attr (500, root, root) 
/usr/src/kernels/$KERNELRELEASE/scripts/basic/fixdep"
 +echo "%attr (500, root, root) 
/usr/src/kernels/$KERNELRELEASE/scripts/mod/modpost"
  echo ""
  fi
@@ -131733,10 +131836,10 @@ index 0000000..4c7f7c6
 +targets += size_overflow_hash.h size_overflow_hash_aux.h 
disable_size_overflow_hash.h
 diff --git a/tools/gcc/size_overflow_plugin/disable_size_overflow_hash.data 
b/tools/gcc/size_overflow_plugin/disable_size_overflow_hash.data
 new file mode 100644
-index 0000000..a9f4b69
+index 0000000..776e6ad
 --- /dev/null
 +++ b/tools/gcc/size_overflow_plugin/disable_size_overflow_hash.data
-@@ -0,0 +1,12401 @@
+@@ -0,0 +1,12411 @@
 +disable_so_interrupt_pnode_gru_message_queue_desc_4 interrupt_pnode 
gru_message_queue_desc 0 4 NULL
 +disable_so_bch_btree_insert_fndecl_12 bch_btree_insert fndecl 0 12 NULL
 +disable_so_macvlan_sync_address_fndecl_22 macvlan_sync_address fndecl 0 22 
NULL nohasharray
@@ -144138,6 +144241,16 @@ index 0000000..a9f4b69
 +enable_so_value_acpi_object_integer_44755 value acpi_object_integer 0 44755 
NULL
 +enable_so_idx_ieee80211_tx_rate_64646 idx ieee80211_tx_rate 0 64646 NULL
 +enable_so_rs_get_adjacent_rate_fndecl_28334 rs_get_adjacent_rate fndecl 0-2 
28334 NULL
++enable_so_index_rs_rate_53 index rs_rate 0 53 NULL
++enable_so_l1_xfs_bmbt_rec_host_22094 l1 xfs_bmbt_rec_host 0 22094 NULL
++enable_so_l0_xfs_bmbt_rec_host_34805 l0 xfs_bmbt_rec_host 0 34805 NULL
++enable_so_max_scsi_cmds_megasas_instance_35835 max_scsi_cmds megasas_instance 
0 35835 NULL
++enable_so_throttlequeuedepth_megasas_instance_42316 throttlequeuedepth 
megasas_instance 0 42316 NULL
++enable_so_max_fw_cmds_megasas_instance_53309 max_fw_cmds megasas_instance 0 
53309 NULL
++enable_so_max_num_sge_megasas_instance_55755 max_num_sge megasas_instance 0 
55755 NULL
++enable_so_max_sectors_per_req_megasas_instance_56408 max_sectors_per_req 
megasas_instance 0 56408 NULL
++enable_so_max_mfi_cmds_megasas_instance_19731 max_mfi_cmds megasas_instance 0 
19731 NULL
++enable_so_read_fw_status_reg_megasas_instance_template_13572 
read_fw_status_reg megasas_instance_template 0 13572 NULL
 diff --git a/tools/gcc/size_overflow_plugin/generate_size_overflow_hash.sh 
b/tools/gcc/size_overflow_plugin/generate_size_overflow_hash.sh
 new file mode 100644
 index 0000000..be9724d
@@ -144671,10 +144784,10 @@ index 0000000..37e2e91
 +#endif
 diff --git a/tools/gcc/size_overflow_plugin/intentional_overflow.c 
b/tools/gcc/size_overflow_plugin/intentional_overflow.c
 new file mode 100644
-index 0000000..3f67add
+index 0000000..f888be6
 --- /dev/null
 +++ b/tools/gcc/size_overflow_plugin/intentional_overflow.c
-@@ -0,0 +1,941 @@
+@@ -0,0 +1,944 @@
 +/*
 + * Copyright 2011-2015 by Emese Revfy <re.em...@gmail.com>
 + * Licensed under the GPL v2, or (at your option) v3
@@ -144911,6 +145024,9 @@ index 0000000..3f67add
 +      }
 +      case FIELD_DECL:
 +      case VAR_DECL:
++              // !!! temporarily ignore bitfield types
++              if (DECL_BIT_FIELD_TYPE(node))
++                      return MARK_YES;
 +              if (is_end_intentional_intentional_attr(node))
 +                      return MARK_END_INTENTIONAL;
 +              if (is_turn_off_intentional_attr(node))
@@ -146289,10 +146405,10 @@ index 0000000..ab2d25a
 +}
 diff --git a/tools/gcc/size_overflow_plugin/size_overflow_hash.data 
b/tools/gcc/size_overflow_plugin/size_overflow_hash.data
 new file mode 100644
-index 0000000..efb5acd
+index 0000000..70b78f9
 --- /dev/null
 +++ b/tools/gcc/size_overflow_plugin/size_overflow_hash.data
-@@ -0,0 +1,20756 @@
+@@ -0,0 +1,20746 @@
 +enable_so_recv_ctrl_pipe_us_data_0 recv_ctrl_pipe us_data 0 0 NULL
 +enable_so___earlyonly_bootmem_alloc_fndecl_3 __earlyonly_bootmem_alloc fndecl 
2-3-4 3 NULL
 +enable_so_size_ttm_mem_reg_8 size ttm_mem_reg 0 8 NULL
@@ -146313,7 +146429,6 @@ index 0000000..efb5acd
 +enable_so_total_drm_buf_35 total drm_buf 0 35 NULL
 +enable_so_sis5595_device_add_fndecl_39 sis5595_device_add fndecl 1 39 NULL
 +enable_so_mc_vram_size_amdgpu_mc_45 mc_vram_size amdgpu_mc 0 45 NULL
-+enable_so_index_rs_rate_53 index rs_rate 0 53 NULL
 +enable_so_iwl_dbgfs_nvm_read_fndecl_54 iwl_dbgfs_nvm_read fndecl 3 54 NULL
 +enable_so_pattern_len_tcf_em_text_57 pattern_len tcf_em_text 0 57 NULL 
nohasharray
 +enable_so_p54_init_common_fndecl_57 p54_init_common fndecl 1 57 
&enable_so_pattern_len_tcf_em_text_57
@@ -150548,7 +150663,6 @@ index 0000000..efb5acd
 +enable_so_buf_len_vp702x_device_state_13562 buf_len vp702x_device_state 0 
13562 NULL
 +enable_so_capture_periodsize_rme96_13564 capture_periodsize rme96 0 13564 NULL
 +enable_so_edt_ft5x06_ts_readwrite_fndecl_13570 edt_ft5x06_ts_readwrite fndecl 
2-4-0 13570 NULL
-+enable_so_read_fw_status_reg_megasas_instance_template_13572 
read_fw_status_reg megasas_instance_template 0 13572 NULL
 +enable_so_amdtp_stream_get_max_payload_fndecl_13574 
amdtp_stream_get_max_payload fndecl 0 13574 NULL
 +enable_so_irq_alloc_generic_chip_fndecl_13577 irq_alloc_generic_chip fndecl 2 
13577 NULL
 +enable_so_fd_do_prot_fill_fndecl_13583 fd_do_prot_fill fndecl 5-3 13583 NULL
@@ -152475,7 +152589,6 @@ index 0000000..efb5acd
 +enable_so_LastFreeEUN_NFTLrecord_19717 LastFreeEUN NFTLrecord 0 19717 NULL
 +enable_so_slots_end_qxl_rom_19718 slots_end qxl_rom 0 19718 NULL
 +enable_so_fat32_info_sector_fat_bios_param_block_19727 fat32_info_sector 
fat_bios_param_block 0 19727 NULL
-+enable_so_max_mfi_cmds_megasas_instance_19731 max_mfi_cmds megasas_instance 0 
19731 NULL
 +enable_so_max_active_conns_bnx2i_hba_19740 max_active_conns bnx2i_hba 0 19740 
NULL
 +enable_so_bytesperline_v4l2_pix_format_19741 bytesperline v4l2_pix_format 0 
19741 NULL
 +enable_so_writelen_iuu_private_19742 writelen iuu_private 0 19742 NULL
@@ -153222,8 +153335,7 @@ index 0000000..efb5acd
 +enable_so_absent_pages_in_range_fndecl_22083 absent_pages_in_range fndecl 
0-1-2 22083 NULL nohasharray
 +enable_so_rx_ring_size_mlx4_en_port_profile_22083 rx_ring_size 
mlx4_en_port_profile 0 22083 &enable_so_absent_pages_in_range_fndecl_22083 
nohasharray
 +enable_so_cmm_write_fndecl_22083 cmm_write fndecl 3 22083 
&enable_so_rx_ring_size_mlx4_en_port_profile_22083
-+enable_so_mgt_response_to_str_fndecl_22094 mgt_response_to_str fndecl 0 22094 
NULL nohasharray
-+enable_so_l1_xfs_bmbt_rec_host_22094 l1 xfs_bmbt_rec_host 0 22094 
&enable_so_mgt_response_to_str_fndecl_22094
++enable_so_mgt_response_to_str_fndecl_22094 mgt_response_to_str fndecl 0 22094 
NULL
 +enable_so_size_drm_i915_gem_pread_22096 size drm_i915_gem_pread 0 22096 NULL 
nohasharray
 +enable_so_len_setup_data_node_22096 len setup_data_node 0 22096 
&enable_so_size_drm_i915_gem_pread_22096 nohasharray
 +enable_so_frame_seq_number_osst_tape_22096 frame_seq_number osst_tape 0 22096 
&enable_so_len_setup_data_node_22096
@@ -157298,7 +157410,6 @@ index 0000000..efb5acd
 +enable_so_addrlen_svc_deferred_req_34794 addrlen svc_deferred_req 0 34794 
&enable_so_sizeimage_soc_camera_device_34794
 +enable_so_rq_count_st_card_info_34798 rq_count st_card_info 0 34798 NULL
 +enable_so_nfs_write_end_fndecl_34801 nfs_write_end fndecl 3-5 34801 NULL
-+enable_so_l0_xfs_bmbt_rec_host_34805 l0 xfs_bmbt_rec_host 0 34805 NULL
 +enable_so_num_q_vectors_ixgbe_adapter_34808 num_q_vectors ixgbe_adapter 0 
34808 NULL
 +enable_so_page_size_flash_info_34810 page_size flash_info 0 34810 NULL
 +enable_so_blk_cnt_os_dat_entry_s_34817 blk_cnt os_dat_entry_s 0 34817 NULL
@@ -157677,7 +157788,6 @@ index 0000000..efb5acd
 +enable_so_num_pmkids_ndis_80211_capability_35831 num_pmkids 
ndis_80211_capability 0 35831 &enable_so_twl_load_sgl_fndecl_35831
 +enable_so_srq_size_srpt_device_35833 srq_size srpt_device 0 35833 NULL
 +enable_so_request_sz_MPT3SAS_ADAPTER_35834 request_sz MPT3SAS_ADAPTER 0 35834 
NULL
-+enable_so_max_scsi_cmds_megasas_instance_35835 max_scsi_cmds megasas_instance 
0 35835 NULL
 +enable_so_paging32_get_level1_sp_gpa_fndecl_35837 paging32_get_level1_sp_gpa 
fndecl 0 35837 NULL
 +enable_so_size_mvneta_tx_queue_35842 size mvneta_tx_queue 0 35842 NULL
 +enable_so_clk_core_enable_fndecl_35844 clk_core_enable fndecl 0 35844 NULL
@@ -159715,7 +159825,6 @@ index 0000000..efb5acd
 +enable_so_iwch_reg_user_mr_fndecl_42308 iwch_reg_user_mr fndecl 2-3 42308 
&enable_so_dcache_dir_lseek_fndecl_42308
 +enable_so_deh_offset_reiserfs_de_head_42314 deh_offset reiserfs_de_head 0 
42314 NULL nohasharray
 +enable_so_rproc_alloc_fndecl_42314 rproc_alloc fndecl 5 42314 
&enable_so_deh_offset_reiserfs_de_head_42314
-+enable_so_throttlequeuedepth_megasas_instance_42316 throttlequeuedepth 
megasas_instance 0 42316 NULL
 +enable_so_kvm_write_guest_page_fndecl_42320 kvm_write_guest_page fndecl 2-5 
42320 NULL nohasharray
 +enable_so_pg_test_nfs_pageio_ops_42320 pg_test nfs_pageio_ops 0 42320 
&enable_so_kvm_write_guest_page_fndecl_42320 nohasharray
 +enable_so_dbg_leb_write_fndecl_42320 dbg_leb_write fndecl 5-4 42320 
&enable_so_pg_test_nfs_pageio_ops_42320
@@ -163218,7 +163327,6 @@ index 0000000..efb5acd
 +enable_so_fuse_ioctl_common_fndecl_53305 fuse_ioctl_common fndecl 2 53305 NULL
 +enable_so_dma_size_cx23885_audio_dev_53307 dma_size cx23885_audio_dev 0 53307 
NULL nohasharray
 +enable_so_gtt_start_radeon_mc_53307 gtt_start radeon_mc 0 53307 
&enable_so_dma_size_cx23885_audio_dev_53307
-+enable_so_max_fw_cmds_megasas_instance_53309 max_fw_cmds megasas_instance 0 
53309 NULL
 +enable_so_isoc_in_usbatm_driver_53310 isoc_in usbatm_driver 0 53310 NULL 
nohasharray
 +enable_so___gfs2_free_blocks_fndecl_53310 __gfs2_free_blocks fndecl 2 53310 
&enable_so_isoc_in_usbatm_driver_53310
 +enable_so___sync_dirty_buffer_fndecl_53315 __sync_dirty_buffer fndecl 0 53315 
NULL
@@ -163992,7 +164100,6 @@ index 0000000..efb5acd
 +enable_so_max_eq_mlx4_func_55747 max_eq mlx4_func 0 55747 NULL
 +enable_so_nilfs_mdt_set_entry_size_fndecl_55751 nilfs_mdt_set_entry_size 
fndecl 2-3 55751 NULL nohasharray
 +enable_so_pad_len_ubifs_pad_node_55751 pad_len ubifs_pad_node 0 55751 
&enable_so_nilfs_mdt_set_entry_size_fndecl_55751
-+enable_so_max_num_sge_megasas_instance_55755 max_num_sge megasas_instance 0 
55755 NULL
 +enable_so_nilfs_cpfile_read_fndecl_55758 nilfs_cpfile_read fndecl 2 55758 NULL
 +enable_so_vga_switcheroo_debugfs_write_fndecl_55763 
vga_switcheroo_debugfs_write fndecl 3 55763 NULL
 +enable_so_offset_xfs_bmalloca_55767 offset xfs_bmalloca 0 55767 NULL
@@ -164186,8 +164293,7 @@ index 0000000..efb5acd
 +enable_so_ieee80211_fragment_fndecl_56395 ieee80211_fragment fndecl 4-3 56395 
NULL
 +enable_so_lost_out_tcp_sock_56397 lost_out tcp_sock 0 56397 NULL
 +enable_so_buf_count_drm_device_dma_56399 buf_count drm_device_dma 0 56399 NULL
-+enable_so_ccw_clear_fndecl_56408 ccw_clear fndecl 3-5-6-4 56408 NULL 
nohasharray
-+enable_so_max_sectors_per_req_megasas_instance_56408 max_sectors_per_req 
megasas_instance 0 56408 &enable_so_ccw_clear_fndecl_56408
++enable_so_ccw_clear_fndecl_56408 ccw_clear fndecl 3-5-6-4 56408 NULL
 +enable_so_f2fs_llseek_fndecl_56409 f2fs_llseek fndecl 2 56409 NULL
 +enable_so_ieee80211_auth_challenge_fndecl_56418 ieee80211_auth_challenge 
fndecl 3 56418 NULL
 +enable_so_notify_change_fndecl_56420 notify_change fndecl 0 56420 NULL
@@ -168891,7 +168997,7 @@ index 0000000..6075e8f
 +
 diff --git a/tools/gcc/size_overflow_plugin/size_overflow_plugin.c 
b/tools/gcc/size_overflow_plugin/size_overflow_plugin.c
 new file mode 100644
-index 0000000..2fef709
+index 0000000..9beb012
 --- /dev/null
 +++ b/tools/gcc/size_overflow_plugin/size_overflow_plugin.c
 @@ -0,0 +1,318 @@
@@ -168926,7 +169032,7 @@ index 0000000..2fef709
 +tree size_overflow_type_TI;
 +
 +static struct plugin_info size_overflow_plugin_info = {
-+      .version        = "20151021",
++      .version        = "20151025",
 +      .help           = "no-size-overflow\tturn off size overflow checking\n",
 +};
 +
@@ -169573,10 +169679,10 @@ index 0000000..317cd6c
 +
 diff --git a/tools/gcc/size_overflow_plugin/size_overflow_transform.c 
b/tools/gcc/size_overflow_plugin/size_overflow_transform.c
 new file mode 100644
-index 0000000..0395a48
+index 0000000..78e16db
 --- /dev/null
 +++ b/tools/gcc/size_overflow_plugin/size_overflow_transform.c
-@@ -0,0 +1,739 @@
+@@ -0,0 +1,746 @@
 +/*
 + * Copyright 2011-2015 by Emese Revfy <re.em...@gmail.com>
 + * Licensed under the GPL v2, or (at your option) v3
@@ -169762,6 +169868,9 @@ index 0000000..0395a48
 +
 +      if (skip_types(orig_node))
 +              return head;
++      // !!! temporarily ignore bitfield types
++      if (DECL_BIT_FIELD_TYPE(orig_node))
++              return head;
 +
 +      // find a defining marked caller argument or struct field for arg
 +      if (check_intentional_size_overflow_asm_and_attribute(orig_node) != 
MARK_NO)
@@ -170117,6 +170226,10 @@ index 0000000..0395a48
 +      if (DECL_NAME(decl) == NULL_TREE)
 +              return head;
 +
++      // !!! temporarily ignore bitfield types
++      if (DECL_BIT_FIELD_TYPE(decl))
++              return head;
++
 +      next_node = get_interesting_function_next_node(decl, 0);
 +      if (!next_node)
 +              return head;
@@ -170318,10 +170431,10 @@ index 0000000..0395a48
 +}
 diff --git a/tools/gcc/size_overflow_plugin/size_overflow_transform_core.c 
b/tools/gcc/size_overflow_plugin/size_overflow_transform_core.c
 new file mode 100644
-index 0000000..4ac2d6e
+index 0000000..460c047
 --- /dev/null
 +++ b/tools/gcc/size_overflow_plugin/size_overflow_transform_core.c
-@@ -0,0 +1,1010 @@
+@@ -0,0 +1,1008 @@
 +/*
 + * Copyright 2011-2015 by Emese Revfy <re.em...@gmail.com>
 + * Licensed under the GPL v2, or (at your option) v3
@@ -170362,8 +170475,6 @@ index 0000000..4ac2d6e
 +
 +      switch (TYPE_MODE(type)) {
 +      case QImode:
-+              new_type = size_overflow_type_HI;
-+              break;
 +      case HImode:
 +              new_type = size_overflow_type_SI;
 +              break;

Reply via email to