aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2013-05-17 08:29:37 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2013-05-17 08:30:49 +0000
commit38b0da640df3b549dea1106199baeddda85057cd (patch)
tree34ad80c0cc517eaac6ee15cf6aa3a81b7da886e2
parentffae20632af61ef067c268e9666aec7827ae0686 (diff)
downloadalpine_aports-38b0da640df3b549dea1106199baeddda85057cd.tar.bz2
alpine_aports-38b0da640df3b549dea1106199baeddda85057cd.tar.xz
alpine_aports-38b0da640df3b549dea1106199baeddda85057cd.zip
main/linux-grsec: upgrade to 2.9.1-3.9.2-201305162327 and fix boot on alix
fixes #1789
-rw-r--r--main/linux-grsec/APKBUILD14
-rw-r--r--main/linux-grsec/grsecurity-2.9.1-3.9.2-201305162327.patch (renamed from main/linux-grsec/grsecurity-2.9.1-3.9.2-201305142035.patch)243
-rw-r--r--main/linux-grsec/leds-leds-gpio-reserve-gpio-before-using-it.patch114
3 files changed, 332 insertions, 39 deletions
diff --git a/main/linux-grsec/APKBUILD b/main/linux-grsec/APKBUILD
index 5540cbef54..6eee77349b 100644
--- a/main/linux-grsec/APKBUILD
+++ b/main/linux-grsec/APKBUILD
@@ -7,7 +7,7 @@ case $pkgver in
7*.*.*) _kernver=${pkgver%.*};; 7*.*.*) _kernver=${pkgver%.*};;
8*.*) _kernver=${pkgver};; 8*.*) _kernver=${pkgver};;
9esac 9esac
10pkgrel=1 10pkgrel=2
11pkgdesc="Linux kernel with grsecurity" 11pkgdesc="Linux kernel with grsecurity"
12url=http://grsecurity.net 12url=http://grsecurity.net
13depends="mkinitfs linux-firmware" 13depends="mkinitfs linux-firmware"
@@ -17,9 +17,10 @@ _config=${config:-kernelconfig.${CARCH}}
17install= 17install=
18source="http://ftp.kernel.org/pub/linux/kernel/v3.x/linux-$_kernver.tar.xz 18source="http://ftp.kernel.org/pub/linux/kernel/v3.x/linux-$_kernver.tar.xz
19 http://ftp.kernel.org/pub/linux/kernel/v3.x/patch-$pkgver.xz 19 http://ftp.kernel.org/pub/linux/kernel/v3.x/patch-$pkgver.xz
20 grsecurity-2.9.1-3.9.2-201305142035.patch 20 grsecurity-2.9.1-3.9.2-201305162327.patch
21 21
22 0004-arp-flush-arp-cache-on-device-change.patch 22 0004-arp-flush-arp-cache-on-device-change.patch
23 leds-leds-gpio-reserve-gpio-before-using-it.patch
23 24
24 kernelconfig.x86 25 kernelconfig.x86
25 kernelconfig.x86_64 26 kernelconfig.x86_64
@@ -145,19 +146,22 @@ dev() {
145 146
146md5sums="4348c9b6b2eb3144d601e87c19d5d909 linux-3.9.tar.xz 147md5sums="4348c9b6b2eb3144d601e87c19d5d909 linux-3.9.tar.xz
147adeb2556568f79e827e7a0ce4c483605 patch-3.9.2.xz 148adeb2556568f79e827e7a0ce4c483605 patch-3.9.2.xz
148cfecbd87d5123f77b3adb8b9d83b4282 grsecurity-2.9.1-3.9.2-201305142035.patch 149089d16b7c5306ed0d42e344ce1b59615 grsecurity-2.9.1-3.9.2-201305162327.patch
149776adeeb5272093574f8836c5037dd7d 0004-arp-flush-arp-cache-on-device-change.patch 150776adeeb5272093574f8836c5037dd7d 0004-arp-flush-arp-cache-on-device-change.patch
15183db7136608d8101ae130728539dc376 leds-leds-gpio-reserve-gpio-before-using-it.patch
150ae4d8b3e917cdea5330ec52048080de3 kernelconfig.x86 152ae4d8b3e917cdea5330ec52048080de3 kernelconfig.x86
151839de81fedd3a6294d42da70a3fb99e0 kernelconfig.x86_64" 153839de81fedd3a6294d42da70a3fb99e0 kernelconfig.x86_64"
152sha256sums="60bc3e64ee5dc778de2cd7cd7640abf518a4c9d4f31b8ed624e16fad53f54541 linux-3.9.tar.xz 154sha256sums="60bc3e64ee5dc778de2cd7cd7640abf518a4c9d4f31b8ed624e16fad53f54541 linux-3.9.tar.xz
153069126b2b70acbc27fada2bf67235238fd90ff103267b1bb392244a301321996 patch-3.9.2.xz 155069126b2b70acbc27fada2bf67235238fd90ff103267b1bb392244a301321996 patch-3.9.2.xz
154d4e3fdf0893e671b4108ac45053a6e8d3f8832965a56aa9ecac0032f9eebdd09 grsecurity-2.9.1-3.9.2-201305142035.patch 1563de1633f26c46a4c93af8497d889a5acc37db54adaa4f3677cb5c5c027787254 grsecurity-2.9.1-3.9.2-201305162327.patch
155e2d2d1503f53572c6a2e21da729a13a430dd01f510405ffb3a33b29208860bde 0004-arp-flush-arp-cache-on-device-change.patch 157e2d2d1503f53572c6a2e21da729a13a430dd01f510405ffb3a33b29208860bde 0004-arp-flush-arp-cache-on-device-change.patch
15813676bc5610a8d03e788ac76734babd1338b023bb39559452ee54652b046e6f4 leds-leds-gpio-reserve-gpio-before-using-it.patch
156513a5f387e7453169a7f41c1ba42da3229e47edd58b5ac18da31f04905c5c0bf kernelconfig.x86 159513a5f387e7453169a7f41c1ba42da3229e47edd58b5ac18da31f04905c5c0bf kernelconfig.x86
157e842cf49decc9a8f5c0f2e4b431382f521fe41db22f2c2e6a1c077b2b158b3ab kernelconfig.x86_64" 160e842cf49decc9a8f5c0f2e4b431382f521fe41db22f2c2e6a1c077b2b158b3ab kernelconfig.x86_64"
158sha512sums="77fa521f42380409f8ab400c26f7b00e225cb075ef40834bb263325cfdcc3e65aef8511ec2fc2b50bbf4f50e226fb5ab07d7a479aaf09162adbbf318325d0790 linux-3.9.tar.xz 161sha512sums="77fa521f42380409f8ab400c26f7b00e225cb075ef40834bb263325cfdcc3e65aef8511ec2fc2b50bbf4f50e226fb5ab07d7a479aaf09162adbbf318325d0790 linux-3.9.tar.xz
159439e32edab86f8b1bd49bc4c9325e11520d78b8182ae88aebf46a4be319c4633d6d896e2ecd3fe0363d9247f5af88a989aafca9103b8e1544262bd191440dae9 patch-3.9.2.xz 162439e32edab86f8b1bd49bc4c9325e11520d78b8182ae88aebf46a4be319c4633d6d896e2ecd3fe0363d9247f5af88a989aafca9103b8e1544262bd191440dae9 patch-3.9.2.xz
1608b4fdb6d79ca3e25414064f1b303bb9f840b8a65778cda84c33063567dceff5dc46c265d1976b1e0e0aedb1f45547267e8bf3d92c25c8049ebf619268350204d grsecurity-2.9.1-3.9.2-201305142035.patch 163652847ba23a7761d6fe90a04deb68f28cdde65d71bd9a53355075ba8410279250d36169359fa759208fcf45b5bfc1cc9505f072e93dd47eae5c464652760aa97 grsecurity-2.9.1-3.9.2-201305162327.patch
161b6fdf376009f0f0f3fa194cb11be97343e4d394cf5d3547de6cfca8ad619c5bd3f60719331fd8cfadc47f09d22be8376ba5f871b46b24887ea73fe47e233a54e 0004-arp-flush-arp-cache-on-device-change.patch 164b6fdf376009f0f0f3fa194cb11be97343e4d394cf5d3547de6cfca8ad619c5bd3f60719331fd8cfadc47f09d22be8376ba5f871b46b24887ea73fe47e233a54e 0004-arp-flush-arp-cache-on-device-change.patch
16510d2cf4fb308d1bc8cb5b9df3f9a6d7b9cef453244673bcbe66bd9b64af410a498e203d4dfa51f53461362ad981736eadc46537616b2c0514f57f4d8864c830d leds-leds-gpio-reserve-gpio-before-using-it.patch
16257dc79b8b08a81993e1050197886c7f91a609843ed2f919eabd6769860fb1383e87a433def8f6b544a8c6382180822b863869ef76183c4d9df421465fe13c220 kernelconfig.x86 16657dc79b8b08a81993e1050197886c7f91a609843ed2f919eabd6769860fb1383e87a433def8f6b544a8c6382180822b863869ef76183c4d9df421465fe13c220 kernelconfig.x86
1630ce361b417821fc3795c4d8e4b3a8eeecbdc7df66261f744c55d288186f9a7d2a367f80bac2ff29c0d5c54f133cbbd74f3ec5e0147b0e7c04462627724dd3572 kernelconfig.x86_64" 1670ce361b417821fc3795c4d8e4b3a8eeecbdc7df66261f744c55d288186f9a7d2a367f80bac2ff29c0d5c54f133cbbd74f3ec5e0147b0e7c04462627724dd3572 kernelconfig.x86_64"
diff --git a/main/linux-grsec/grsecurity-2.9.1-3.9.2-201305142035.patch b/main/linux-grsec/grsecurity-2.9.1-3.9.2-201305162327.patch
index 7808b2716d..588c5edc1b 100644
--- a/main/linux-grsec/grsecurity-2.9.1-3.9.2-201305142035.patch
+++ b/main/linux-grsec/grsecurity-2.9.1-3.9.2-201305162327.patch
@@ -2028,6 +2028,19 @@ index 06e7d50..8a8e251 100644
2028 nommu_start_thread(regs); \ 2028 nommu_start_thread(regs); \
2029 }) 2029 })
2030 2030
2031diff --git a/arch/arm/include/asm/psci.h b/arch/arm/include/asm/psci.h
2032index ce0dbe7..c085b6f 100644
2033--- a/arch/arm/include/asm/psci.h
2034+++ b/arch/arm/include/asm/psci.h
2035@@ -29,7 +29,7 @@ struct psci_operations {
2036 int (*cpu_off)(struct psci_power_state state);
2037 int (*cpu_on)(unsigned long cpuid, unsigned long entry_point);
2038 int (*migrate)(unsigned long cpuid);
2039-};
2040+} __no_const;
2041
2042 extern struct psci_operations psci_ops;
2043
2031diff --git a/arch/arm/include/asm/smp.h b/arch/arm/include/asm/smp.h 2044diff --git a/arch/arm/include/asm/smp.h b/arch/arm/include/asm/smp.h
2032index d3a22be..3a69ad5 100644 2045index d3a22be..3a69ad5 100644
2033--- a/arch/arm/include/asm/smp.h 2046--- a/arch/arm/include/asm/smp.h
@@ -2824,6 +2837,19 @@ index 047d3e4..7e96107 100644
2824 return 0; 2837 return 0;
2825 } 2838 }
2826 arch_initcall(gate_vma_init); 2839 arch_initcall(gate_vma_init);
2840diff --git a/arch/arm/kernel/psci.c b/arch/arm/kernel/psci.c
2841index 3653164..d83e55d 100644
2842--- a/arch/arm/kernel/psci.c
2843+++ b/arch/arm/kernel/psci.c
2844@@ -24,7 +24,7 @@
2845 #include <asm/opcodes-virt.h>
2846 #include <asm/psci.h>
2847
2848-struct psci_operations psci_ops;
2849+struct psci_operations psci_ops __read_only;
2850
2851 static int (*invoke_psci_fn)(u32, u32, u32, u32);
2852
2827diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c 2853diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c
2828index 03deeff..741ce88 100644 2854index 03deeff..741ce88 100644
2829--- a/arch/arm/kernel/ptrace.c 2855--- a/arch/arm/kernel/ptrace.c
@@ -22547,7 +22573,7 @@ index 5cdff03..80fa283 100644
22547 * Up to this point, the boot CPU has been using .init.data 22573 * Up to this point, the boot CPU has been using .init.data
22548 * area. Reload any changed state for the boot CPU. 22574 * area. Reload any changed state for the boot CPU.
22549diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c 22575diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c
22550index 6956299..6797253 100644 22576index 6956299..f20beae 100644
22551--- a/arch/x86/kernel/signal.c 22577--- a/arch/x86/kernel/signal.c
22552+++ b/arch/x86/kernel/signal.c 22578+++ b/arch/x86/kernel/signal.c
22553@@ -196,7 +196,7 @@ static unsigned long align_sigframe(unsigned long sp) 22579@@ -196,7 +196,7 @@ static unsigned long align_sigframe(unsigned long sp)
@@ -22601,6 +22627,29 @@ index 6956299..6797253 100644
22601 } put_user_catch(err); 22627 } put_user_catch(err);
22602 22628
22603 err |= copy_siginfo_to_user(&frame->info, &ksig->info); 22629 err |= copy_siginfo_to_user(&frame->info, &ksig->info);
22630@@ -615,7 +618,12 @@ setup_rt_frame(struct ksignal *ksig, struct pt_regs *regs)
22631 {
22632 int usig = signr_convert(ksig->sig);
22633 sigset_t *set = sigmask_to_save();
22634- compat_sigset_t *cset = (compat_sigset_t *) set;
22635+ sigset_t sigcopy;
22636+ compat_sigset_t *cset;
22637+
22638+ sigcopy = *set;
22639+
22640+ cset = (compat_sigset_t *) &sigcopy;
22641
22642 /* Set up the stack frame */
22643 if (is_ia32_frame()) {
22644@@ -626,7 +634,7 @@ setup_rt_frame(struct ksignal *ksig, struct pt_regs *regs)
22645 } else if (is_x32_frame()) {
22646 return x32_setup_rt_frame(ksig, cset, regs);
22647 } else {
22648- return __setup_rt_frame(ksig->sig, ksig, set, regs);
22649+ return __setup_rt_frame(ksig->sig, ksig, &sigcopy, regs);
22650 }
22651 }
22652
22604diff --git a/arch/x86/kernel/smp.c b/arch/x86/kernel/smp.c 22653diff --git a/arch/x86/kernel/smp.c b/arch/x86/kernel/smp.c
22605index 48d2b7d..90d328a 100644 22654index 48d2b7d..90d328a 100644
22606--- a/arch/x86/kernel/smp.c 22655--- a/arch/x86/kernel/smp.c
@@ -22953,7 +23002,7 @@ index 0000000..207bec6
22953+ return addr; 23002+ return addr;
22954+} 23003+}
22955diff --git a/arch/x86/kernel/sys_x86_64.c b/arch/x86/kernel/sys_x86_64.c 23004diff --git a/arch/x86/kernel/sys_x86_64.c b/arch/x86/kernel/sys_x86_64.c
22956index dbded5a..7916f74 100644 23005index dbded5a..ace2781 100644
22957--- a/arch/x86/kernel/sys_x86_64.c 23006--- a/arch/x86/kernel/sys_x86_64.c
22958+++ b/arch/x86/kernel/sys_x86_64.c 23007+++ b/arch/x86/kernel/sys_x86_64.c
22959@@ -81,8 +81,8 @@ out: 23008@@ -81,8 +81,8 @@ out:
@@ -23020,7 +23069,7 @@ index dbded5a..7916f74 100644
23020 23069
23021 /* requested length too big for entire address space */ 23070 /* requested length too big for entire address space */
23022 if (len > TASK_SIZE) 23071 if (len > TASK_SIZE)
23023@@ -161,6 +167,10 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, 23072@@ -161,12 +167,15 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
23024 if (!test_thread_flag(TIF_ADDR32) && (flags & MAP_32BIT)) 23073 if (!test_thread_flag(TIF_ADDR32) && (flags & MAP_32BIT))
23025 goto bottomup; 23074 goto bottomup;
23026 23075
@@ -23031,7 +23080,14 @@ index dbded5a..7916f74 100644
23031 /* requesting a specific address */ 23080 /* requesting a specific address */
23032 if (addr) { 23081 if (addr) {
23033 addr = PAGE_ALIGN(addr); 23082 addr = PAGE_ALIGN(addr);
23034@@ -176,6 +186,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, 23083 vma = find_vma(mm, addr);
23084- if (TASK_SIZE - len >= addr &&
23085- (!vma || addr + len <= vma->vm_start))
23086+ if (TASK_SIZE - len >= addr && check_heap_stack_gap(vma, addr, len, offset))
23087 return addr;
23088 }
23089
23090@@ -176,6 +185,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
23035 info.high_limit = mm->mmap_base; 23091 info.high_limit = mm->mmap_base;
23036 info.align_mask = filp ? get_align_mask() : 0; 23092 info.align_mask = filp ? get_align_mask() : 0;
23037 info.align_offset = pgoff << PAGE_SHIFT; 23093 info.align_offset = pgoff << PAGE_SHIFT;
@@ -35917,7 +35973,7 @@ index 4640adb..e1384ed 100644
35917 35973
35918 for (;;) { 35974 for (;;) {
35919diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_marker.c b/drivers/gpu/drm/vmwgfx/vmwgfx_marker.c 35975diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_marker.c b/drivers/gpu/drm/vmwgfx/vmwgfx_marker.c
35920index 8a8725c..afed796 100644 35976index 8a8725c2..afed796 100644
35921--- a/drivers/gpu/drm/vmwgfx/vmwgfx_marker.c 35977--- a/drivers/gpu/drm/vmwgfx/vmwgfx_marker.c
35922+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_marker.c 35978+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_marker.c
35923@@ -151,7 +151,7 @@ int vmw_wait_lag(struct vmw_private *dev_priv, 35979@@ -151,7 +151,7 @@ int vmw_wait_lag(struct vmw_private *dev_priv,
@@ -36111,6 +36167,55 @@ index a14f634..2916ee2 100644
36111 int err; 36167 int err;
36112 36168
36113 /* Set up read-only sensors */ 36169 /* Set up read-only sensors */
36170diff --git a/drivers/hwmon/pmbus/pmbus_core.c b/drivers/hwmon/pmbus/pmbus_core.c
36171index 9add6092..ee7ba3f 100644
36172--- a/drivers/hwmon/pmbus/pmbus_core.c
36173+++ b/drivers/hwmon/pmbus/pmbus_core.c
36174@@ -781,7 +781,7 @@ static int pmbus_add_attribute(struct pmbus_data *data, struct attribute *attr)
36175 return 0;
36176 }
36177
36178-static void pmbus_dev_attr_init(struct device_attribute *dev_attr,
36179+static void pmbus_dev_attr_init(device_attribute_no_const *dev_attr,
36180 const char *name,
36181 umode_t mode,
36182 ssize_t (*show)(struct device *dev,
36183@@ -798,7 +798,7 @@ static void pmbus_dev_attr_init(struct device_attribute *dev_attr,
36184 dev_attr->store = store;
36185 }
36186
36187-static void pmbus_attr_init(struct sensor_device_attribute *a,
36188+static void pmbus_attr_init(sensor_device_attribute_no_const *a,
36189 const char *name,
36190 umode_t mode,
36191 ssize_t (*show)(struct device *dev,
36192@@ -820,7 +820,7 @@ static int pmbus_add_boolean(struct pmbus_data *data,
36193 u16 reg, u8 mask)
36194 {
36195 struct pmbus_boolean *boolean;
36196- struct sensor_device_attribute *a;
36197+ sensor_device_attribute_no_const *a;
36198
36199 boolean = devm_kzalloc(data->dev, sizeof(*boolean), GFP_KERNEL);
36200 if (!boolean)
36201@@ -845,7 +845,7 @@ static struct pmbus_sensor *pmbus_add_sensor(struct pmbus_data *data,
36202 bool update, bool readonly)
36203 {
36204 struct pmbus_sensor *sensor;
36205- struct device_attribute *a;
36206+ device_attribute_no_const *a;
36207
36208 sensor = devm_kzalloc(data->dev, sizeof(*sensor), GFP_KERNEL);
36209 if (!sensor)
36210@@ -876,7 +876,7 @@ static int pmbus_add_label(struct pmbus_data *data,
36211 const char *lstring, int index)
36212 {
36213 struct pmbus_label *label;
36214- struct device_attribute *a;
36215+ device_attribute_no_const *a;
36216
36217 label = devm_kzalloc(data->dev, sizeof(*label), GFP_KERNEL);
36218 if (!label)
36114diff --git a/drivers/hwmon/sht15.c b/drivers/hwmon/sht15.c 36219diff --git a/drivers/hwmon/sht15.c b/drivers/hwmon/sht15.c
36115index 2507f90..1645765 100644 36220index 2507f90..1645765 100644
36116--- a/drivers/hwmon/sht15.c 36221--- a/drivers/hwmon/sht15.c
@@ -37129,7 +37234,7 @@ index 7c11ff3..5b2d7a7 100644
37129 37234
37130 bool setup_remapped_irq(int irq, struct irq_cfg *cfg, struct irq_chip *chip) 37235 bool setup_remapped_irq(int irq, struct irq_cfg *cfg, struct irq_chip *chip)
37131diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c 37236diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c
37132index fc6aebf..94d5248 100644 37237index fc6aebf..762c5f5 100644
37133--- a/drivers/irqchip/irq-gic.c 37238--- a/drivers/irqchip/irq-gic.c
37134+++ b/drivers/irqchip/irq-gic.c 37239+++ b/drivers/irqchip/irq-gic.c
37135@@ -83,7 +83,7 @@ static u8 gic_cpu_map[NR_GIC_CPU_IF] __read_mostly; 37240@@ -83,7 +83,7 @@ static u8 gic_cpu_map[NR_GIC_CPU_IF] __read_mostly;
@@ -37137,7 +37242,7 @@ index fc6aebf..94d5248 100644
37137 * Default make them NULL. 37242 * Default make them NULL.
37138 */ 37243 */
37139-struct irq_chip gic_arch_extn = { 37244-struct irq_chip gic_arch_extn = {
37140+irq_chip_no_const gic_arch_extn __read_only = { 37245+irq_chip_no_const gic_arch_extn = {
37141 .irq_eoi = NULL, 37246 .irq_eoi = NULL,
37142 .irq_mask = NULL, 37247 .irq_mask = NULL,
37143 .irq_unmask = NULL, 37248 .irq_unmask = NULL,
@@ -39318,6 +39423,50 @@ index fbe5363..266b4e3 100644
39318 fifo->mempool = 39423 fifo->mempool =
39319 __vxge_hw_mempool_create(vpath->hldev, 39424 __vxge_hw_mempool_create(vpath->hldev,
39320 fifo->config->memblock_size, 39425 fifo->config->memblock_size,
39426diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c
39427index 5c033f2..7bbb0d8 100644
39428--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c
39429+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c
39430@@ -1894,7 +1894,9 @@ int qlcnic_83xx_config_default_opmode(struct qlcnic_adapter *adapter)
39431 op_mode = QLCRDX(ahw, QLC_83XX_DRV_OP_MODE);
39432
39433 if (op_mode == QLC_83XX_DEFAULT_OPMODE) {
39434- adapter->nic_ops->init_driver = qlcnic_83xx_init_default_driver;
39435+ pax_open_kernel();
39436+ *(void **)&adapter->nic_ops->init_driver = qlcnic_83xx_init_default_driver;
39437+ pax_close_kernel();
39438 ahw->idc.state_entry = qlcnic_83xx_idc_ready_state_entry;
39439 } else {
39440 return -EIO;
39441diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_vnic.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_vnic.c
39442index b0c3de9..fc5857e 100644
39443--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_vnic.c
39444+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_vnic.c
39445@@ -200,15 +200,21 @@ int qlcnic_83xx_config_vnic_opmode(struct qlcnic_adapter *adapter)
39446 if (priv_level == QLCNIC_NON_PRIV_FUNC) {
39447 ahw->op_mode = QLCNIC_NON_PRIV_FUNC;
39448 ahw->idc.state_entry = qlcnic_83xx_idc_ready_state_entry;
39449- nic_ops->init_driver = qlcnic_83xx_init_non_privileged_vnic;
39450+ pax_open_kernel();
39451+ *(void **)&nic_ops->init_driver = qlcnic_83xx_init_non_privileged_vnic;
39452+ pax_close_kernel();
39453 } else if (priv_level == QLCNIC_PRIV_FUNC) {
39454 ahw->op_mode = QLCNIC_PRIV_FUNC;
39455 ahw->idc.state_entry = qlcnic_83xx_idc_vnic_pf_entry;
39456- nic_ops->init_driver = qlcnic_83xx_init_privileged_vnic;
39457+ pax_open_kernel();
39458+ *(void **)&nic_ops->init_driver = qlcnic_83xx_init_privileged_vnic;
39459+ pax_close_kernel();
39460 } else if (priv_level == QLCNIC_MGMT_FUNC) {
39461 ahw->op_mode = QLCNIC_MGMT_FUNC;
39462 ahw->idc.state_entry = qlcnic_83xx_idc_ready_state_entry;
39463- nic_ops->init_driver = qlcnic_83xx_init_mgmt_vnic;
39464+ pax_open_kernel();
39465+ *(void **)&nic_ops->init_driver = qlcnic_83xx_init_mgmt_vnic;
39466+ pax_close_kernel();
39467 } else {
39468 return -EIO;
39469 }
39321diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c 39470diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
39322index 15ba8c4..3f56838 100644 39471index 15ba8c4..3f56838 100644
39323--- a/drivers/net/ethernet/realtek/r8169.c 39472--- a/drivers/net/ethernet/realtek/r8169.c
@@ -40628,6 +40777,19 @@ index 0b00947..64f7c0a 100644
40628 proc_create("devices", 0, proc_bus_pci_dir, 40777 proc_create("devices", 0, proc_bus_pci_dir,
40629 &proc_bus_pci_dev_operations); 40778 &proc_bus_pci_dev_operations);
40630 proc_initialized = 1; 40779 proc_initialized = 1;
40780diff --git a/drivers/platform/x86/chromeos_laptop.c b/drivers/platform/x86/chromeos_laptop.c
40781index 3e5b4497..dcdfb70 100644
40782--- a/drivers/platform/x86/chromeos_laptop.c
40783+++ b/drivers/platform/x86/chromeos_laptop.c
40784@@ -301,7 +301,7 @@ static int __init setup_tsl2563_als(const struct dmi_system_id *id)
40785 return 0;
40786 }
40787
40788-static struct dmi_system_id __initdata chromeos_laptop_dmi_table[] = {
40789+static struct dmi_system_id __initconst chromeos_laptop_dmi_table[] = {
40790 {
40791 .ident = "Samsung Series 5 550 - Touchpad",
40792 .matches = {
40631diff --git a/drivers/platform/x86/msi-laptop.c b/drivers/platform/x86/msi-laptop.c 40793diff --git a/drivers/platform/x86/msi-laptop.c b/drivers/platform/x86/msi-laptop.c
40632index 6b22938..bc9700e 100644 40794index 6b22938..bc9700e 100644
40633--- a/drivers/platform/x86/msi-laptop.c 40795--- a/drivers/platform/x86/msi-laptop.c
@@ -52386,27 +52548,9 @@ index a6597d6..41b30ec 100644
52386 52548
52387 /* 52549 /*
52388diff --git a/fs/jfs/super.c b/fs/jfs/super.c 52550diff --git a/fs/jfs/super.c b/fs/jfs/super.c
52389index 2003e83..5e1975d 100644 52551index 2003e83..40db287 100644
52390--- a/fs/jfs/super.c 52552--- a/fs/jfs/super.c
52391+++ b/fs/jfs/super.c 52553+++ b/fs/jfs/super.c
52392@@ -225,7 +225,7 @@ static const match_table_t tokens = {
52393 static int parse_options(char *options, struct super_block *sb, s64 *newLVSize,
52394 int *flag)
52395 {
52396- void *nls_map = (void *)-1; /* -1: no change; NULL: none */
52397+ const void *nls_map = (const void *)-1; /* -1: no change; NULL: none */
52398 char *p;
52399 struct jfs_sb_info *sbi = JFS_SBI(sb);
52400
52401@@ -253,7 +253,7 @@ static int parse_options(char *options, struct super_block *sb, s64 *newLVSize,
52402 /* Don't do anything ;-) */
52403 break;
52404 case Opt_iocharset:
52405- if (nls_map && nls_map != (void *) -1)
52406+ if (nls_map && nls_map != (const void *) -1)
52407 unload_nls(nls_map);
52408 if (!strcmp(args[0].from, "none"))
52409 nls_map = NULL;
52410@@ -856,7 +856,7 @@ static int __init init_jfs_fs(void) 52554@@ -856,7 +856,7 @@ static int __init init_jfs_fs(void)
52411 52555
52412 jfs_inode_cachep = 52556 jfs_inode_cachep =
@@ -68845,11 +68989,15 @@ index bc4e066..50468a9 100644
68845 /* 68989 /*
68846 * irq_chip specific flags 68990 * irq_chip specific flags
68847diff --git a/include/linux/irqchip/arm-gic.h b/include/linux/irqchip/arm-gic.h 68991diff --git a/include/linux/irqchip/arm-gic.h b/include/linux/irqchip/arm-gic.h
68848index 3fd8e42..d5403e1 100644 68992index 3fd8e42..a73e966 100644
68849--- a/include/linux/irqchip/arm-gic.h 68993--- a/include/linux/irqchip/arm-gic.h
68850+++ b/include/linux/irqchip/arm-gic.h 68994+++ b/include/linux/irqchip/arm-gic.h
68851@@ -61,7 +61,7 @@ 68995@@ -59,9 +59,11 @@
68996
68997 #ifndef __ASSEMBLY__
68852 68998
68999+#include <linux/irq.h>
69000+
68853 struct device_node; 69001 struct device_node;
68854 69002
68855-extern struct irq_chip gic_arch_extn; 69003-extern struct irq_chip gic_arch_extn;
@@ -72219,6 +72367,19 @@ index b797e8f..8e2c3aa 100644
72219 72367
72220 72368
72221 /** 72369 /**
72370diff --git a/include/sound/compress_driver.h b/include/sound/compress_driver.h
72371index ff6c741..393815f 100644
72372--- a/include/sound/compress_driver.h
72373+++ b/include/sound/compress_driver.h
72374@@ -130,7 +130,7 @@ struct snd_compr_ops {
72375 struct snd_compr_caps *caps);
72376 int (*get_codec_caps) (struct snd_compr_stream *stream,
72377 struct snd_compr_codec_caps *codec);
72378-};
72379+} __no_const;
72380
72381 /**
72382 * struct snd_compr: Compressed device
72222diff --git a/include/sound/soc.h b/include/sound/soc.h 72383diff --git a/include/sound/soc.h b/include/sound/soc.h
72223index a6a059c..2243336 100644 72384index a6a059c..2243336 100644
72224--- a/include/sound/soc.h 72385--- a/include/sound/soc.h
@@ -87228,7 +87389,7 @@ index 5b1e5af..2358147 100644
87228 return res; 87389 return res;
87229 } 87390 }
87230diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c 87391diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
87231index 843d8c4..6e0a0ff 100644 87392index 843d8c4..cb04fa1 100644
87232--- a/net/mac80211/cfg.c 87393--- a/net/mac80211/cfg.c
87233+++ b/net/mac80211/cfg.c 87394+++ b/net/mac80211/cfg.c
87234@@ -799,7 +799,7 @@ static int ieee80211_set_monitor_channel(struct wiphy *wiphy, 87395@@ -799,7 +799,7 @@ static int ieee80211_set_monitor_channel(struct wiphy *wiphy,
@@ -87255,8 +87416,8 @@ index 843d8c4..6e0a0ff 100644
87255 ret = 0; 87416 ret = 0;
87256- } else if (local->open_count > 0 && 87417- } else if (local->open_count > 0 &&
87257- local->open_count == local->monitors && 87418- local->open_count == local->monitors &&
87258+ } else if (atomic_read(&local->open_count) > 0 && 87419+ } else if (local_read(&local->open_count) > 0 &&
87259+ atomic_read(&local->open_count) == local->monitors && 87420+ local_read(&local->open_count) == local->monitors &&
87260 sdata->vif.type == NL80211_IFTYPE_MONITOR) { 87421 sdata->vif.type == NL80211_IFTYPE_MONITOR) {
87261 if (local->use_chanctx) 87422 if (local->use_chanctx)
87262 *chandef = local->monitor_chandef; 87423 *chandef = local->monitor_chandef;
@@ -90177,10 +90338,10 @@ index f5eb43d..1814de8 100644
90177 shdr = (Elf_Shdr *)((char *)ehdr + _r(&ehdr->e_shoff)); 90338 shdr = (Elf_Shdr *)((char *)ehdr + _r(&ehdr->e_shoff));
90178 shstrtab_sec = shdr + r2(&ehdr->e_shstrndx); 90339 shstrtab_sec = shdr + r2(&ehdr->e_shstrndx);
90179diff --git a/security/Kconfig b/security/Kconfig 90340diff --git a/security/Kconfig b/security/Kconfig
90180index e9c6ac7..eef8ada 100644 90341index e9c6ac7..e6254cf 100644
90181--- a/security/Kconfig 90342--- a/security/Kconfig
90182+++ b/security/Kconfig 90343+++ b/security/Kconfig
90183@@ -4,6 +4,943 @@ 90344@@ -4,6 +4,944 @@
90184 90345
90185 menu "Security options" 90346 menu "Security options"
90186 90347
@@ -90214,6 +90375,7 @@ index e9c6ac7..eef8ada 100644
90214+ select CRYPTO_SHA256 90375+ select CRYPTO_SHA256
90215+ select PROC_FS 90376+ select PROC_FS
90216+ select STOP_MACHINE 90377+ select STOP_MACHINE
90378+ select TTY
90217+ help 90379+ help
90218+ If you say Y here, you will be able to configure many features 90380+ If you say Y here, you will be able to configure many features
90219+ that will enhance the security of your system. It is highly 90381+ that will enhance the security of your system. It is highly
@@ -91124,7 +91286,7 @@ index e9c6ac7..eef8ada 100644
91124 source security/keys/Kconfig 91286 source security/keys/Kconfig
91125 91287
91126 config SECURITY_DMESG_RESTRICT 91288 config SECURITY_DMESG_RESTRICT
91127@@ -103,7 +1040,7 @@ config INTEL_TXT 91289@@ -103,7 +1041,7 @@ config INTEL_TXT
91128 config LSM_MMAP_MIN_ADDR 91290 config LSM_MMAP_MIN_ADDR
91129 int "Low address space for LSM to protect from user allocation" 91291 int "Low address space for LSM to protect from user allocation"
91130 depends on SECURITY && SECURITY_SELINUX 91292 depends on SECURITY && SECURITY_SELINUX
@@ -92082,6 +92244,19 @@ index 22056c5..25d3244 100644
92082 chip->card = card; 92244 chip->card = card;
92083 chip->pci = pci; 92245 chip->pci = pci;
92084 chip->irq = -1; 92246 chip->irq = -1;
92247diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
92248index 7decbd9..d17d9d0 100644
92249--- a/sound/soc/fsl/fsl_ssi.c
92250+++ b/sound/soc/fsl/fsl_ssi.c
92251@@ -643,7 +643,7 @@ static int fsl_ssi_probe(struct platform_device *pdev)
92252 {
92253 struct fsl_ssi_private *ssi_private;
92254 int ret = 0;
92255- struct device_attribute *dev_attr = NULL;
92256+ device_attribute_no_const *dev_attr = NULL;
92257 struct device_node *np = pdev->dev.of_node;
92258 const char *p, *sprop;
92259 const uint32_t *iprop;
92085diff --git a/tools/gcc/.gitignore b/tools/gcc/.gitignore 92260diff --git a/tools/gcc/.gitignore b/tools/gcc/.gitignore
92086new file mode 100644 92261new file mode 100644
92087index 0000000..50f2f2f 92262index 0000000..50f2f2f
diff --git a/main/linux-grsec/leds-leds-gpio-reserve-gpio-before-using-it.patch b/main/linux-grsec/leds-leds-gpio-reserve-gpio-before-using-it.patch
new file mode 100644
index 0000000000..f7af3b2a07
--- /dev/null
+++ b/main/linux-grsec/leds-leds-gpio-reserve-gpio-before-using-it.patch
@@ -0,0 +1,114 @@
1From 37e3042c345024aa5e39a1a28a667a00b75fd6ce Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
3Date: Fri, 17 May 2013 09:31:13 +0300
4Subject: [PATCH] leds: leds-gpio: reserve gpio before using it
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9This reverts commit a99d76f (leds: leds-gpio: use gpio_request_one)
10and commit 2d7c22f (leds: leds-gpio: set devm_gpio_request_one()
11flags param correctly) which was a fix of the first one.
12
13The conversion to devm_gpio_request in commit e3b1d44c (leds:
14leds-gpio: use devm_gpio_request_one) is not reverted.
15
16The problem is that gpio_cansleep() and gpio_get_value_cansleep()
17calls can crash if the gpio is not first reserved. Incidentally this
18same bug existed earlier and was fixed similarly in commit d95cbe61
19(leds: Fix potential leds-gpio oops). But the OOPS is real. It happens
20when GPIOs are provided by module which is not yet loaded.
21
22So this fixes the following BUG during my ALIX boot (3.9.2-vanilla):
23
24BUG: unable to handle kernel NULL pointer dereference at 0000004c
25IP: [<c11287d6>] __gpio_cansleep+0xe/0x1a
26*pde = 00000000
27Oops: 0000 [#1] SMP
28Modules linked in: leds_gpio(+) via_rhine mii cs5535_mfd mfd_core
29geode_rng rng_core geode_aes isofs nls_utf8 nls_cp437 vfat fat
30ata_generic pata_amd pata_cs5536 pata_acpi libata ehci_pci ehci_hcd
31ohci_hcd usb_storage usbcore usb_common sd_mod scsi_mod squashfs loop
32Pid: 881, comm: modprobe Not tainted 3.9.2 #1-Alpine
33EIP: 0060:[<c11287d6>] EFLAGS: 00010282 CPU: 0
34EIP is at __gpio_cansleep+0xe/0x1a
35EAX: 00000000 EBX: cf364018 ECX: c132b8b9 EDX: 00000000
36ESI: c13993a4 EDI: c1399370 EBP: cded9dbc ESP: cded9dbc
37 DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
38CR0: 8005003b CR2: 0000004c CR3: 0f0c4000 CR4: 00000090
39DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
40DR6: ffff0ff0 DR7: 00000400
41Process modprobe (pid: 881, ti=cded8000 task=cf094aa0 task.ti=cded8000)
42Stack:
43 cded9de0 d09471cb 00000000 c1399260 cf364014 00000000 c1399260 c1399254
44 d0949014 cded9df4 c118cd59 c1399260 d0949014 d0949014 cded9e08 c118ba47
45 c1399260 d0949014 c1399294 cded9e1c c118bb75 cded9e24 d0949014 00000000
46Call Trace:
47 [<d09471cb>] gpio_led_probe+0xba/0x203 [leds_gpio]
48 [<c118cd59>] platform_drv_probe+0x26/0x48
49 [<c118ba47>] driver_probe_device+0x75/0x15c
50 [<c118bb75>] __driver_attach+0x47/0x63
51 [<c118a727>] bus_for_each_dev+0x3c/0x66
52 [<c118b6f9>] driver_attach+0x14/0x16
53 [<c118bb2e>] ? driver_probe_device+0x15c/0x15c
54 [<c118b3d5>] bus_add_driver+0xbd/0x1bc
55 [<d08b4000>] ? 0xd08b3fff
56 [<d08b4000>] ? 0xd08b3fff
57 [<c118bffc>] driver_register+0x74/0xec
58 [<d08b4000>] ? 0xd08b3fff
59 [<c118c8e8>] platform_driver_register+0x38/0x3a
60 [<d08b400d>] gpio_led_driver_init+0xd/0x1000 [leds_gpio]
61 [<c100116c>] do_one_initcall+0x6b/0x10f
62 [<d08b4000>] ? 0xd08b3fff
63 [<c105e918>] load_module+0x1631/0x1907
64 [<c10975d6>] ? insert_vmalloc_vmlist+0x14/0x43
65 [<c1098d5b>] ? __vmalloc_node_range+0x13e/0x15f
66 [<c105ec50>] sys_init_module+0x62/0x77
67 [<c1257888>] syscall_call+0x7/0xb
68EIP: [<c11287d6>] __gpio_cansleep+0xe/0x1a SS:ESP 0068:cded9dbc
69CR2: 000000000000004c
70 ---[ end trace 5308fb20d2514822 ]---
71
72Signed-off-by: Timo Teräs <timo.teras@iki.f>
73Cc: Jingoo Han <jg1.han@samsung.com>
74Cc: Sachin Kamat <sachin.kamat@linaro.org>
75Cc: Raphael Assenat <raph@8d.com>
76Cc: Trent Piepho <tpiepho@freescale.com>
77Cc: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
78Cc: Arnaud Patard <arnaud.patard@rtp-net.org>
79Cc: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
80---
81 drivers/leds/leds-gpio.c | 9 +++++----
82 1 file changed, 5 insertions(+), 4 deletions(-)
83
84diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c
85index a0d931b..b02b679 100644
86--- a/drivers/leds/leds-gpio.c
87+++ b/drivers/leds/leds-gpio.c
88@@ -107,6 +107,10 @@ static int create_gpio_led(const struct gpio_led *template,
89 return 0;
90 }
91
92+ ret = devm_gpio_request(parent, template->gpio, template->name);
93+ if (ret < 0)
94+ return ret;
95+
96 led_dat->cdev.name = template->name;
97 led_dat->cdev.default_trigger = template->default_trigger;
98 led_dat->gpio = template->gpio;
99@@ -126,10 +130,7 @@ static int create_gpio_led(const struct gpio_led *template,
100 if (!template->retain_state_suspended)
101 led_dat->cdev.flags |= LED_CORE_SUSPENDRESUME;
102
103- ret = devm_gpio_request_one(parent, template->gpio,
104- (led_dat->active_low ^ state) ?
105- GPIOF_OUT_INIT_HIGH : GPIOF_OUT_INIT_LOW,
106- template->name);
107+ ret = gpio_direction_output(led_dat->gpio, led_dat->active_low ^ state);
108 if (ret < 0)
109 return ret;
110
111--
1121.8.2.3
113
114