[gentoo-commits] proj/hardened-patchset:master commit in: 4.2.4/

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

grsecurity-3.1-4.2.4-201510251836

 4.2.4/_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/_README b/4.2.4/_README
index ddc5a83..83460c6 100644
--- a/4.2.4/_README
+++ b/4.2.4/_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 != ¤t->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)
- 
+-
+-  /*
+-   * Subtrac

[gentoo-commits] proj/hardened-patchset:master commit in: 4.2.4/

2015-10-25 Thread Anthony G. Basile
commit: 340b9aeb395704db9dea3b8738fe645bf41ce879
Author: Anthony G. Basile  gentoo  org>
AuthorDate: Sun Oct 25 14:56:07 2015 +
Commit: Anthony G. Basile  gentoo  org>
CommitDate: Sun Oct 25 14:56:07 2015 +
URL:
https://gitweb.gentoo.org/proj/hardened-patchset.git/commit/?id=340b9aeb

grsecurity-3.1-4.2.4-201510240907

 4.2.4/_README  |  2 +-
 ...> 4420_grsecurity-3.1-4.2.4-201510240907.patch} | 48 +-
 2 files changed, 39 insertions(+), 11 deletions(-)

diff --git a/4.2.4/_README b/4.2.4/_README
index a7f6aae..ddc5a83 100644
--- a/4.2.4/_README
+++ b/4.2.4/_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-201510222059.patch
+Patch: 4420_grsecurity-3.1-4.2.4-201510240907.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-201510222059.patch 
b/4.2.4/4420_grsecurity-3.1-4.2.4-201510240907.patch
similarity index 99%
rename from 4.2.4/4420_grsecurity-3.1-4.2.4-201510222059.patch
rename to 4.2.4/4420_grsecurity-3.1-4.2.4-201510240907.patch
index c3d3682..c6e64ba 100644
--- a/4.2.4/4420_grsecurity-3.1-4.2.4-201510222059.patch
+++ b/4.2.4/4420_grsecurity-3.1-4.2.4-201510240907.patch
@@ -57404,6 +57404,19 @@ index db322d9..f0f4bc1 100644
  
if (!left--) {
if (instance->disconnected)
+diff --git a/drivers/usb/class/cdc-acm.h b/drivers/usb/class/cdc-acm.h
+index dd9af38..75b53e3 100644
+--- a/drivers/usb/class/cdc-acm.h
 b/drivers/usb/class/cdc-acm.h
+@@ -95,7 +95,7 @@ struct acm {
+   struct urb *read_urbs[ACM_NR];
+   struct acm_rb read_buffers[ACM_NR];
+   int rx_buflimit;
+-  int rx_endpoint;
++  unsigned int rx_endpoint;
+   spinlock_t read_lock;
+   int write_used; /* number of non-empty 
write buffers */
+   int transmitting;
 diff --git a/drivers/usb/core/devices.c b/drivers/usb/core/devices.c
 index 2a3bbdf..91d72cf 100644
 --- a/drivers/usb/core/devices.c
@@ -102375,7 +102388,7 @@ index 99c1b4d..562e6f3 100644
  
  static inline void put_unaligned_le16(u16 val, void *p)
 diff --git a/include/linux/usb.h b/include/linux/usb.h
-index 447fe29..fc8bf1e 100644
+index 447fe29..07a9cf0 100644
 --- a/include/linux/usb.h
 +++ b/include/linux/usb.h
 @@ -363,7 +363,7 @@ struct usb_bus {
@@ -102396,6 +102409,21 @@ index 447fe29..fc8bf1e 100644
  
unsigned long active_duration;
  
+@@ -1785,10 +1785,10 @@ void usb_sg_wait(struct usb_sg_request *io);
+ 
+ /* NOTE:  these are not the standard USB_ENDPOINT_XFER_* values!! */
+ /* (yet ... they're the values used by usbfs) */
+-#define PIPE_ISOCHRONOUS  0
+-#define PIPE_INTERRUPT1
+-#define PIPE_CONTROL  2
+-#define PIPE_BULK 3
++#define PIPE_ISOCHRONOUS  0U
++#define PIPE_INTERRUPT1U
++#define PIPE_CONTROL  2U
++#define PIPE_BULK 3U
+ 
+ #define usb_pipein(pipe)  ((pipe) & USB_DIR_IN)
+ #define usb_pipeout(pipe) (!usb_pipein(pipe))
 diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h
 index c9aa779..46d6f69 100644
 --- a/include/linux/usb/hcd.h
@@ -131705,10 +131733,10 @@ index 000..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 000..3baef37
+index 000..a9f4b69
 --- /dev/null
 +++ b/tools/gcc/size_overflow_plugin/disable_size_overflow_hash.data
-@@ -0,0 +1,12398 @@
+@@ -0,0 +1,12401 @@
 +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
@@ -137755,7 +137783,8 @@ index 000..3baef37
 +disable_so_tfmsize_crypto_type_32129 tfmsize crypto_type 0 32129 
&disable_so_prandom_bytes_fndecl_32129
 +disable_so_freq_ar9170_calibration_target_power_legacy_32133 freq 
ar9170_calibration_target_power_legacy 0 32133 NULL nohasharray
 +disable_so_addr_buffer_state_32133 addr buffer_state 0 32133 
&disable_so_freq_ar9170_calibration_target_power_legacy_32133
-+disable_so_btree_invalidatepage_fndecl_32134 btree_invalidatepage fndecl 2 
32134 NULL
++enable_so_max_rate_idx_ieee80211_tx_rate_control_32134 max_rate_idx 
ieee80211_tx_rate_control 0 32134 NULL nohasharray
++disable_so_btree_invalidatepage_fndecl_32134 btree_invalidatepage fndecl 2 
32134 &enable_so_max_rate_idx_ieee80211_tx_rate_control_32134
 +disable_so_hfs_bnode_findhash_fndecl_32138 hfs_bnode_findhash fndecl 2 32138 
NULL
 +disable_so_sy