diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2013-06-25 12:52:35 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2013-07-02 12:17:35 +0000 |
commit | 70807f221a141a1f6ec1316dd0e50d1a79bcac14 (patch) | |
tree | 128e690c4678543eeca32ef18630ad7ecd87c1a5 | |
parent | 8ce7594aa8f407b8f45a383d69be0ffd5407e312 (diff) | |
download | alpine_aports-70807f221a141a1f6ec1316dd0e50d1a79bcac14.tar.bz2 alpine_aports-70807f221a141a1f6ec1316dd0e50d1a79bcac14.tar.xz alpine_aports-70807f221a141a1f6ec1316dd0e50d1a79bcac14.zip |
main/linux-grsec: upgrade to 3.9.7
(cherry picked from commit 3574145af419d12d7c72d8f699fdefbe2c956ad7)
-rw-r--r-- | main/linux-grsec/APKBUILD | 33 | ||||
-rw-r--r-- | main/linux-grsec/CVE-2013-2851.patch | 60 | ||||
-rw-r--r-- | main/linux-grsec/grsecurity-2.9.1-3.9.7-201306231443.patch (renamed from main/linux-grsec/grsecurity-2.9.1-3.9.6-201306171904.patch) | 1479 | ||||
-rw-r--r-- | main/linux-grsec/kernelconfig.x86 | 4 | ||||
-rw-r--r-- | main/linux-grsec/kernelconfig.x86_64 | 4 |
5 files changed, 1042 insertions, 538 deletions
diff --git a/main/linux-grsec/APKBUILD b/main/linux-grsec/APKBUILD index cd5bb17371..1b93d5b90a 100644 --- a/main/linux-grsec/APKBUILD +++ b/main/linux-grsec/APKBUILD | |||
@@ -2,7 +2,7 @@ | |||
2 | 2 | ||
3 | _flavor=grsec | 3 | _flavor=grsec |
4 | pkgname=linux-${_flavor} | 4 | pkgname=linux-${_flavor} |
5 | pkgver=3.9.6 | 5 | pkgver=3.9.7 |
6 | case $pkgver in | 6 | case $pkgver in |
7 | *.*.*) _kernver=${pkgver%.*};; | 7 | *.*.*) _kernver=${pkgver%.*};; |
8 | *.*) _kernver=${pkgver};; | 8 | *.*) _kernver=${pkgver};; |
@@ -17,7 +17,7 @@ _config=${config:-kernelconfig.${CARCH}} | |||
17 | install= | 17 | install= |
18 | source="http://ftp.kernel.org/pub/linux/kernel/v3.x/linux-$_kernver.tar.xz | 18 | source="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.6-201306171904.patch | 20 | grsecurity-2.9.1-3.9.7-201306231443.patch |
21 | 21 | ||
22 | 0001-net-inform-NETDEV_CHANGE-callbacks-which-flags-were-.patch | 22 | 0001-net-inform-NETDEV_CHANGE-callbacks-which-flags-were-.patch |
23 | 0002-arp-flush-arp-cache-on-IFF_NOARP-change.patch | 23 | 0002-arp-flush-arp-cache-on-IFF_NOARP-change.patch |
@@ -26,8 +26,6 @@ source="http://ftp.kernel.org/pub/linux/kernel/v3.x/linux-$_kernver.tar.xz | |||
26 | 0005-ipv4-use-separate-genid-for-next-hop-exceptions.patch | 26 | 0005-ipv4-use-separate-genid-for-next-hop-exceptions.patch |
27 | 0006-ipv4-use-next-hop-exceptions-also-for-input-routes.patch | 27 | 0006-ipv4-use-next-hop-exceptions-also-for-input-routes.patch |
28 | 28 | ||
29 | CVE-2013-2851.patch | ||
30 | |||
31 | kernelconfig.x86 | 29 | kernelconfig.x86 |
32 | kernelconfig.x86_64 | 30 | kernelconfig.x86_64 |
33 | " | 31 | " |
@@ -151,38 +149,35 @@ dev() { | |||
151 | } | 149 | } |
152 | 150 | ||
153 | md5sums="4348c9b6b2eb3144d601e87c19d5d909 linux-3.9.tar.xz | 151 | md5sums="4348c9b6b2eb3144d601e87c19d5d909 linux-3.9.tar.xz |
154 | 897cffc5167a561b38c6748e7f0a4215 patch-3.9.6.xz | 152 | 74005c469fbd309ab631d981e2d3a6e7 patch-3.9.7.xz |
155 | 8c9e11d9121958fa866b330ed3dbe4bd grsecurity-2.9.1-3.9.6-201306171904.patch | 153 | a5db3ef848185c32ad4b0bbfe19106aa grsecurity-2.9.1-3.9.7-201306231443.patch |
156 | a16f11b12381efb3bec79b9bfb329836 0001-net-inform-NETDEV_CHANGE-callbacks-which-flags-were-.patch | 154 | a16f11b12381efb3bec79b9bfb329836 0001-net-inform-NETDEV_CHANGE-callbacks-which-flags-were-.patch |
157 | 656ae7b10dd2f18dbfa1011041d08d60 0002-arp-flush-arp-cache-on-IFF_NOARP-change.patch | 155 | 656ae7b10dd2f18dbfa1011041d08d60 0002-arp-flush-arp-cache-on-IFF_NOARP-change.patch |
158 | aa454ffb96428586447775c21449e284 0003-ipv4-properly-refresh-rtable-entries-on-pmtu-redirec.patch | 156 | aa454ffb96428586447775c21449e284 0003-ipv4-properly-refresh-rtable-entries-on-pmtu-redirec.patch |
159 | 2a12a3717052e878c0cd42aa935bfcf4 0004-ipv4-rate-limit-updating-of-next-hop-exceptions-with.patch | 157 | 2a12a3717052e878c0cd42aa935bfcf4 0004-ipv4-rate-limit-updating-of-next-hop-exceptions-with.patch |
160 | 6ce5fed63aad3f1a1ff1b9ba7b741822 0005-ipv4-use-separate-genid-for-next-hop-exceptions.patch | 158 | 6ce5fed63aad3f1a1ff1b9ba7b741822 0005-ipv4-use-separate-genid-for-next-hop-exceptions.patch |
161 | 1a5800a2122ba0cc0d06733cb3bb8b8f 0006-ipv4-use-next-hop-exceptions-also-for-input-routes.patch | 159 | 1a5800a2122ba0cc0d06733cb3bb8b8f 0006-ipv4-use-next-hop-exceptions-also-for-input-routes.patch |
162 | eca3b4897b2a2191576ba719609cc654 CVE-2013-2851.patch | 160 | bfb5ddcfbc1c9f30253de200ec2a0eb0 kernelconfig.x86 |
163 | 3e219a1f25136b204d00865939532fe9 kernelconfig.x86 | 161 | 0b6534366d8abbd36c40744163c81e5a kernelconfig.x86_64" |
164 | 1d057c89927a68e5f44896887ad3e379 kernelconfig.x86_64" | ||
165 | sha256sums="60bc3e64ee5dc778de2cd7cd7640abf518a4c9d4f31b8ed624e16fad53f54541 linux-3.9.tar.xz | 162 | sha256sums="60bc3e64ee5dc778de2cd7cd7640abf518a4c9d4f31b8ed624e16fad53f54541 linux-3.9.tar.xz |
166 | 13296dad939ef4e05adba87b9d0476aa8e2ccf92866f14835327dae8a1402fc3 patch-3.9.6.xz | 163 | 23db9de5ffa2f8f36d61da85ee46656a3373f8868415c1f3c77c51c41fabfda8 patch-3.9.7.xz |
167 | a14302153a717e8cf8346c44ed4ac620b87a38795afa72c3f61797eab221290d grsecurity-2.9.1-3.9.6-201306171904.patch | 164 | 0aa3ec9d60640ee06ca6c6aed877ce2ee99c2b8a2ee8be50ad92c43ed6570617 grsecurity-2.9.1-3.9.7-201306231443.patch |
168 | 6af3757ac36a6cd3cda7b0a71b08143726383b19261294a569ad7f4042c72df3 0001-net-inform-NETDEV_CHANGE-callbacks-which-flags-were-.patch | 165 | 6af3757ac36a6cd3cda7b0a71b08143726383b19261294a569ad7f4042c72df3 0001-net-inform-NETDEV_CHANGE-callbacks-which-flags-were-.patch |
169 | dc8e82108615657f1fb9d641efd42255a5761c06edde1b00a41ae0d314d548f0 0002-arp-flush-arp-cache-on-IFF_NOARP-change.patch | 166 | dc8e82108615657f1fb9d641efd42255a5761c06edde1b00a41ae0d314d548f0 0002-arp-flush-arp-cache-on-IFF_NOARP-change.patch |
170 | 0985caa0f3ee8ed0959aeaa4214f5f8057ae8e61d50dcae39194912d31e14892 0003-ipv4-properly-refresh-rtable-entries-on-pmtu-redirec.patch | 167 | 0985caa0f3ee8ed0959aeaa4214f5f8057ae8e61d50dcae39194912d31e14892 0003-ipv4-properly-refresh-rtable-entries-on-pmtu-redirec.patch |
171 | 260fd1807838b68305a96992bf7d3302a2a8ef3a3b08fe079ba9a07e6422f736 0004-ipv4-rate-limit-updating-of-next-hop-exceptions-with.patch | 168 | 260fd1807838b68305a96992bf7d3302a2a8ef3a3b08fe079ba9a07e6422f736 0004-ipv4-rate-limit-updating-of-next-hop-exceptions-with.patch |
172 | ae32bb72afa170e6c3788c564b342763aba5945afacc1e2ebfc096adf50d77a3 0005-ipv4-use-separate-genid-for-next-hop-exceptions.patch | 169 | ae32bb72afa170e6c3788c564b342763aba5945afacc1e2ebfc096adf50d77a3 0005-ipv4-use-separate-genid-for-next-hop-exceptions.patch |
173 | fc613ac466610b866b721c41836fd5bfb2d4b75bceb67972dc6369d7f62ff47e 0006-ipv4-use-next-hop-exceptions-also-for-input-routes.patch | 170 | fc613ac466610b866b721c41836fd5bfb2d4b75bceb67972dc6369d7f62ff47e 0006-ipv4-use-next-hop-exceptions-also-for-input-routes.patch |
174 | 461d159751095d3624d74867dc8b3e3865e3a67c4b3cd48188f5ae2f1f1f66cb CVE-2013-2851.patch | 171 | c017c0a47fa0dfdefe148aa73e8a19fabb1957dc699de0f94d8d4d9a45bf5abe kernelconfig.x86 |
175 | cc3bd3d23f6a73ea6488c158de9d195ad5e3d87859ce02d92a04f0e08c9503d3 kernelconfig.x86 | 172 | aafae208fc72eaad9d09fcd8220e0d70379d8c7c7f658c10aa96990dc0b36207 kernelconfig.x86_64" |
176 | b780ef646b3b30a5b0307102367e17d45bb3a0ab7e37cf92a1ce783c3149243a kernelconfig.x86_64" | ||
177 | sha512sums="77fa521f42380409f8ab400c26f7b00e225cb075ef40834bb263325cfdcc3e65aef8511ec2fc2b50bbf4f50e226fb5ab07d7a479aaf09162adbbf318325d0790 linux-3.9.tar.xz | 173 | sha512sums="77fa521f42380409f8ab400c26f7b00e225cb075ef40834bb263325cfdcc3e65aef8511ec2fc2b50bbf4f50e226fb5ab07d7a479aaf09162adbbf318325d0790 linux-3.9.tar.xz |
178 | 6c79bde85d86c7e7dca160d5bdd5826ae05ed41cb372d0a94e4f9840413351a8bc1fec50159d59dbac462345bd13c31c6c4d8c47187ee6d87b4d71c8560093da patch-3.9.6.xz | 174 | dcf38bca1ee1b90bffd97c74c00720613dbab9183aa600401a821fe20ea665629bc43544053bd2ffe18ebfe1ee2d72d139f22d2f070374f5e231831ed6c89251 patch-3.9.7.xz |
179 | fe8a4fffb18b6ef88951e97cd20e464674e10d2a6a76a0b17d4922b87b24c6653a81d798f0b93dfb7545da011a29d73dfafd73b258f528bbe81984ef24c137ac grsecurity-2.9.1-3.9.6-201306171904.patch | 175 | 73f819bd44c724bbdc2e01ed4154c9fd53d0a8d1099ffabf56e995d82a9dbcb03c742e1c048cae9b0052d43dbda4d1c2150f6c14a1b958c25eef8b5571047f80 grsecurity-2.9.1-3.9.7-201306231443.patch |
180 | 81e78593288e8b0fd2c03ea9fc1450323887707f087e911f172450a122bc9b591ee83394836789730d951aeec13d0b75a64e1c05f04364abf8f80d883ddc4a02 0001-net-inform-NETDEV_CHANGE-callbacks-which-flags-were-.patch | 176 | 81e78593288e8b0fd2c03ea9fc1450323887707f087e911f172450a122bc9b591ee83394836789730d951aeec13d0b75a64e1c05f04364abf8f80d883ddc4a02 0001-net-inform-NETDEV_CHANGE-callbacks-which-flags-were-.patch |
181 | 51ecb15b669f6a82940a13a38939116e003bf5dfd24496771c8279e907b72adcc63d607f0340a2940d757e12ddadb7d45c7af78ae311d284935a6296dbcac00c 0002-arp-flush-arp-cache-on-IFF_NOARP-change.patch | 177 | 51ecb15b669f6a82940a13a38939116e003bf5dfd24496771c8279e907b72adcc63d607f0340a2940d757e12ddadb7d45c7af78ae311d284935a6296dbcac00c 0002-arp-flush-arp-cache-on-IFF_NOARP-change.patch |
182 | 57d0a8bd35d19cf657ded58efe24517d2252aec6984040713ba173a34edb5887ececaa2985076bc6a149eaa57639fd98a042c1c2d226ed4ad8dd5ed0e230717e 0003-ipv4-properly-refresh-rtable-entries-on-pmtu-redirec.patch | 178 | 57d0a8bd35d19cf657ded58efe24517d2252aec6984040713ba173a34edb5887ececaa2985076bc6a149eaa57639fd98a042c1c2d226ed4ad8dd5ed0e230717e 0003-ipv4-properly-refresh-rtable-entries-on-pmtu-redirec.patch |
183 | d2f578ad1d6e1fe52b55863e5bf338ae8201b828a498ec3e42e549c55295d3d1c6c3adfa9e226d711e3486628ed56ab996484e219d79ac4b0c0ec684ebd380aa 0004-ipv4-rate-limit-updating-of-next-hop-exceptions-with.patch | 179 | d2f578ad1d6e1fe52b55863e5bf338ae8201b828a498ec3e42e549c55295d3d1c6c3adfa9e226d711e3486628ed56ab996484e219d79ac4b0c0ec684ebd380aa 0004-ipv4-rate-limit-updating-of-next-hop-exceptions-with.patch |
184 | 28a33e644bf2faf99c8dd6dbccfe14e140dfdd8824a8fb2d58aa7deb9e572f130d92b6b35ee181084050d82166bdf2e498a451a2a538a67b7ab84204405d2d87 0005-ipv4-use-separate-genid-for-next-hop-exceptions.patch | 180 | 28a33e644bf2faf99c8dd6dbccfe14e140dfdd8824a8fb2d58aa7deb9e572f130d92b6b35ee181084050d82166bdf2e498a451a2a538a67b7ab84204405d2d87 0005-ipv4-use-separate-genid-for-next-hop-exceptions.patch |
185 | 249140374c19a5599876268ff5b3cda2e136681aee103b4a9fff5d7d346f8e3295a907fb43db0701b8a9fece64c299ad2abac0434259cce6631307ce84090205 0006-ipv4-use-next-hop-exceptions-also-for-input-routes.patch | 181 | 249140374c19a5599876268ff5b3cda2e136681aee103b4a9fff5d7d346f8e3295a907fb43db0701b8a9fece64c299ad2abac0434259cce6631307ce84090205 0006-ipv4-use-next-hop-exceptions-also-for-input-routes.patch |
186 | 5e5c9ac96b87efc811bd612774934a5fb8635a34d7fbe13ea80f5a8da19efa2a71f0bcab08a85224612f332d7485cea1d6cbd4d64644d90a3dd576f3458e5a99 CVE-2013-2851.patch | 182 | bcf675bafd3aac174195a2d38571b9b54f4b6e0635ab3363699ae8845794dc44bcfe952585fae881d81065d4a25333a3e033808c99c977aa4a797b81e5a36c3f kernelconfig.x86 |
187 | 00fd8694455935f96e46b6624388b8c04af27ce4295040362da78c34bf9f08382bc69c1b8b273145573a59e3b4eecfa251119560da19ab390f171a8a6da18298 kernelconfig.x86 | 183 | a8bf4cc1cdb4d1bde9fe4cd4040a596a52a24817fad15b29785ba10ab1d80fd4ae9589ac92f98c8b6b3b5e5510f01b9c9b96b11a2cf05c9684eb0bd62ee6676e kernelconfig.x86_64" |
188 | 6276f503f9dd7ea228b1661f9a36edcf18d2c4cfb6d9c4e3e1496a4f70709cc693fc8498186d86dd3f303c909c50e478cb95e08a05f50bda77c9cf165aca1ba1 kernelconfig.x86_64" | ||
diff --git a/main/linux-grsec/CVE-2013-2851.patch b/main/linux-grsec/CVE-2013-2851.patch deleted file mode 100644 index 3407731c7d..0000000000 --- a/main/linux-grsec/CVE-2013-2851.patch +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | Subject: [PATCH 1/8] block: do not pass disk names as format strings | ||
2 | |||
3 | Disk names may contain arbitrary strings, so they must not be interpreted | ||
4 | as format strings. It seems that only md allows arbitrary strings to be | ||
5 | used for disk names, but this could allow for a local memory corruption | ||
6 | from uid 0 into ring 0. | ||
7 | |||
8 | CVE-2013-2851 | ||
9 | |||
10 | Signed-off-by: Kees Cook <keescook@chromium.org> | ||
11 | Cc: stable@vger.kernel.org | ||
12 | Cc: Jens Axboe <axboe@kernel.dk> | ||
13 | --- | ||
14 | block/genhd.c | 2 +- | ||
15 | drivers/block/nbd.c | 3 ++- | ||
16 | drivers/scsi/osd/osd_uld.c | 2 +- | ||
17 | 3 files changed, 4 insertions(+), 3 deletions(-) | ||
18 | |||
19 | diff --git a/block/genhd.c b/block/genhd.c | ||
20 | index 20625ee..cdeb527 100644 | ||
21 | --- a/block/genhd.c | ||
22 | +++ b/block/genhd.c | ||
23 | @@ -512,7 +512,7 @@ static void register_disk(struct gendisk *disk) | ||
24 | |||
25 | ddev->parent = disk->driverfs_dev; | ||
26 | |||
27 | - dev_set_name(ddev, disk->disk_name); | ||
28 | + dev_set_name(ddev, "%s", disk->disk_name); | ||
29 | |||
30 | /* delay uevents, until we scanned partition table */ | ||
31 | dev_set_uevent_suppress(ddev, 1); | ||
32 | diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c | ||
33 | index 037288e..46b35f7 100644 | ||
34 | --- a/drivers/block/nbd.c | ||
35 | +++ b/drivers/block/nbd.c | ||
36 | @@ -714,7 +714,8 @@ static int __nbd_ioctl(struct block_device *bdev, struct nbd_device *nbd, | ||
37 | else | ||
38 | blk_queue_flush(nbd->disk->queue, 0); | ||
39 | |||
40 | - thread = kthread_create(nbd_thread, nbd, nbd->disk->disk_name); | ||
41 | + thread = kthread_create(nbd_thread, nbd, "%s", | ||
42 | + nbd->disk->disk_name); | ||
43 | if (IS_ERR(thread)) { | ||
44 | mutex_lock(&nbd->tx_lock); | ||
45 | return PTR_ERR(thread); | ||
46 | diff --git a/drivers/scsi/osd/osd_uld.c b/drivers/scsi/osd/osd_uld.c | ||
47 | index 0fab6b5..9d86947 100644 | ||
48 | --- a/drivers/scsi/osd/osd_uld.c | ||
49 | +++ b/drivers/scsi/osd/osd_uld.c | ||
50 | @@ -485,7 +485,7 @@ static int osd_probe(struct device *dev) | ||
51 | oud->class_dev.class = &osd_uld_class; | ||
52 | oud->class_dev.parent = dev; | ||
53 | oud->class_dev.release = __remove; | ||
54 | - error = dev_set_name(&oud->class_dev, disk->disk_name); | ||
55 | + error = dev_set_name(&oud->class_dev, "%s", disk->disk_name); | ||
56 | if (error) { | ||
57 | OSD_ERR("dev_set_name failed => %d\n", error); | ||
58 | goto err_put_cdev; | ||
59 | -- | ||
60 | 1.7.9.5 | ||
diff --git a/main/linux-grsec/grsecurity-2.9.1-3.9.6-201306171904.patch b/main/linux-grsec/grsecurity-2.9.1-3.9.7-201306231443.patch index 430bb2aca9..5af3232471 100644 --- a/main/linux-grsec/grsecurity-2.9.1-3.9.6-201306171904.patch +++ b/main/linux-grsec/grsecurity-2.9.1-3.9.7-201306231443.patch | |||
@@ -1,5 +1,5 @@ | |||
1 | diff --git a/Documentation/dontdiff b/Documentation/dontdiff | 1 | diff --git a/Documentation/dontdiff b/Documentation/dontdiff |
2 | index b89a739..b47493f 100644 | 2 | index b89a739..79768fb 100644 |
3 | --- a/Documentation/dontdiff | 3 | --- a/Documentation/dontdiff |
4 | +++ b/Documentation/dontdiff | 4 | +++ b/Documentation/dontdiff |
5 | @@ -2,9 +2,11 @@ | 5 | @@ -2,9 +2,11 @@ |
@@ -41,7 +41,7 @@ index b89a739..b47493f 100644 | |||
41 | .*.d | 41 | .*.d |
42 | .mm | 42 | .mm |
43 | 53c700_d.h | 43 | 53c700_d.h |
44 | @@ -69,6 +75,7 @@ Image | 44 | @@ -69,9 +75,11 @@ Image |
45 | Module.markers | 45 | Module.markers |
46 | Module.symvers | 46 | Module.symvers |
47 | PENDING | 47 | PENDING |
@@ -49,7 +49,11 @@ index b89a739..b47493f 100644 | |||
49 | SCCS | 49 | SCCS |
50 | System.map* | 50 | System.map* |
51 | TAGS | 51 | TAGS |
52 | @@ -80,6 +87,7 @@ aic7*seq.h* | 52 | +TRACEEVENT-CFLAGS |
53 | aconf | ||
54 | af_names.h | ||
55 | aic7*reg.h* | ||
56 | @@ -80,6 +88,7 @@ aic7*seq.h* | ||
53 | aicasm | 57 | aicasm |
54 | aicdb.h* | 58 | aicdb.h* |
55 | altivec*.c | 59 | altivec*.c |
@@ -57,7 +61,7 @@ index b89a739..b47493f 100644 | |||
57 | asm-offsets.h | 61 | asm-offsets.h |
58 | asm_offsets.h | 62 | asm_offsets.h |
59 | autoconf.h* | 63 | autoconf.h* |
60 | @@ -92,19 +100,24 @@ bounds.h | 64 | @@ -92,19 +101,24 @@ bounds.h |
61 | bsetup | 65 | bsetup |
62 | btfixupprep | 66 | btfixupprep |
63 | build | 67 | build |
@@ -82,7 +86,7 @@ index b89a739..b47493f 100644 | |||
82 | conmakehash | 86 | conmakehash |
83 | consolemap_deftbl.c* | 87 | consolemap_deftbl.c* |
84 | cpustr.h | 88 | cpustr.h |
85 | @@ -115,9 +128,11 @@ devlist.h* | 89 | @@ -115,9 +129,11 @@ devlist.h* |
86 | dnotify_test | 90 | dnotify_test |
87 | docproc | 91 | docproc |
88 | dslm | 92 | dslm |
@@ -94,7 +98,7 @@ index b89a739..b47493f 100644 | |||
94 | fixdep | 98 | fixdep |
95 | flask.h | 99 | flask.h |
96 | fore200e_mkfirm | 100 | fore200e_mkfirm |
97 | @@ -125,12 +140,15 @@ fore200e_pca_fw.c* | 101 | @@ -125,12 +141,15 @@ fore200e_pca_fw.c* |
98 | gconf | 102 | gconf |
99 | gconf.glade.h | 103 | gconf.glade.h |
100 | gen-devlist | 104 | gen-devlist |
@@ -110,7 +114,7 @@ index b89a739..b47493f 100644 | |||
110 | hpet_example | 114 | hpet_example |
111 | hugepage-mmap | 115 | hugepage-mmap |
112 | hugepage-shm | 116 | hugepage-shm |
113 | @@ -145,14 +163,14 @@ int32.c | 117 | @@ -145,14 +164,14 @@ int32.c |
114 | int4.c | 118 | int4.c |
115 | int8.c | 119 | int8.c |
116 | kallsyms | 120 | kallsyms |
@@ -127,7 +131,7 @@ index b89a739..b47493f 100644 | |||
127 | logo_*.c | 131 | logo_*.c |
128 | logo_*_clut224.c | 132 | logo_*_clut224.c |
129 | logo_*_mono.c | 133 | logo_*_mono.c |
130 | @@ -162,14 +180,15 @@ mach-types.h | 134 | @@ -162,14 +181,15 @@ mach-types.h |
131 | machtypes.h | 135 | machtypes.h |
132 | map | 136 | map |
133 | map_hugetlb | 137 | map_hugetlb |
@@ -144,7 +148,7 @@ index b89a739..b47493f 100644 | |||
144 | mkprep | 148 | mkprep |
145 | mkregtable | 149 | mkregtable |
146 | mktables | 150 | mktables |
147 | @@ -185,6 +204,8 @@ oui.c* | 151 | @@ -185,6 +205,8 @@ oui.c* |
148 | page-types | 152 | page-types |
149 | parse.c | 153 | parse.c |
150 | parse.h | 154 | parse.h |
@@ -153,7 +157,7 @@ index b89a739..b47493f 100644 | |||
153 | patches* | 157 | patches* |
154 | pca200e.bin | 158 | pca200e.bin |
155 | pca200e_ecd.bin2 | 159 | pca200e_ecd.bin2 |
156 | @@ -194,6 +215,7 @@ perf-archive | 160 | @@ -194,6 +216,7 @@ perf-archive |
157 | piggyback | 161 | piggyback |
158 | piggy.gzip | 162 | piggy.gzip |
159 | piggy.S | 163 | piggy.S |
@@ -161,7 +165,7 @@ index b89a739..b47493f 100644 | |||
161 | pnmtologo | 165 | pnmtologo |
162 | ppc_defs.h* | 166 | ppc_defs.h* |
163 | pss_boot.h | 167 | pss_boot.h |
164 | @@ -203,7 +225,10 @@ r200_reg_safe.h | 168 | @@ -203,7 +226,10 @@ r200_reg_safe.h |
165 | r300_reg_safe.h | 169 | r300_reg_safe.h |
166 | r420_reg_safe.h | 170 | r420_reg_safe.h |
167 | r600_reg_safe.h | 171 | r600_reg_safe.h |
@@ -172,7 +176,7 @@ index b89a739..b47493f 100644 | |||
172 | relocs | 176 | relocs |
173 | rlim_names.h | 177 | rlim_names.h |
174 | rn50_reg_safe.h | 178 | rn50_reg_safe.h |
175 | @@ -213,8 +238,12 @@ series | 179 | @@ -213,8 +239,12 @@ series |
176 | setup | 180 | setup |
177 | setup.bin | 181 | setup.bin |
178 | setup.elf | 182 | setup.elf |
@@ -185,7 +189,7 @@ index b89a739..b47493f 100644 | |||
185 | split-include | 189 | split-include |
186 | syscalltab.h | 190 | syscalltab.h |
187 | tables.c | 191 | tables.c |
188 | @@ -224,6 +253,7 @@ tftpboot.img | 192 | @@ -224,6 +254,7 @@ tftpboot.img |
189 | timeconst.h | 193 | timeconst.h |
190 | times.h* | 194 | times.h* |
191 | trix_boot.h | 195 | trix_boot.h |
@@ -193,7 +197,7 @@ index b89a739..b47493f 100644 | |||
193 | utsrelease.h* | 197 | utsrelease.h* |
194 | vdso-syms.lds | 198 | vdso-syms.lds |
195 | vdso.lds | 199 | vdso.lds |
196 | @@ -235,13 +265,17 @@ vdso32.lds | 200 | @@ -235,13 +266,17 @@ vdso32.lds |
197 | vdso32.so.dbg | 201 | vdso32.so.dbg |
198 | vdso64.lds | 202 | vdso64.lds |
199 | vdso64.so.dbg | 203 | vdso64.so.dbg |
@@ -211,7 +215,7 @@ index b89a739..b47493f 100644 | |||
211 | vmlinuz | 215 | vmlinuz |
212 | voffset.h | 216 | voffset.h |
213 | vsyscall.lds | 217 | vsyscall.lds |
214 | @@ -249,9 +283,12 @@ vsyscall_32.lds | 218 | @@ -249,9 +284,12 @@ vsyscall_32.lds |
215 | wanxlfw.inc | 219 | wanxlfw.inc |
216 | uImage | 220 | uImage |
217 | unifdef | 221 | unifdef |
@@ -259,7 +263,7 @@ index 8ccbf27..afffeb4 100644 | |||
259 | 263 | ||
260 | pcd. [PARIDE] | 264 | pcd. [PARIDE] |
261 | diff --git a/Makefile b/Makefile | 265 | diff --git a/Makefile b/Makefile |
262 | index 4a40307..9ac699b 100644 | 266 | index a129b15..548231d 100644 |
263 | --- a/Makefile | 267 | --- a/Makefile |
264 | +++ b/Makefile | 268 | +++ b/Makefile |
265 | @@ -241,8 +241,9 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ | 269 | @@ -241,8 +241,9 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ |
@@ -6633,7 +6637,7 @@ index ae54553..cf2184d 100644 | |||
6633 | ld r4,_DAR(r1) | 6637 | ld r4,_DAR(r1) |
6634 | bl .bad_page_fault | 6638 | bl .bad_page_fault |
6635 | diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S | 6639 | diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S |
6636 | index 3bbe7ed..14ec3eb 100644 | 6640 | index 644378e..b6f2c26 100644 |
6637 | --- a/arch/powerpc/kernel/exceptions-64s.S | 6641 | --- a/arch/powerpc/kernel/exceptions-64s.S |
6638 | +++ b/arch/powerpc/kernel/exceptions-64s.S | 6642 | +++ b/arch/powerpc/kernel/exceptions-64s.S |
6639 | @@ -1390,10 +1390,10 @@ handle_page_fault: | 6643 | @@ -1390,10 +1390,10 @@ handle_page_fault: |
@@ -6682,7 +6686,7 @@ index 2e3200c..72095ce 100644 | |||
6682 | /* Find this entry, or if that fails, the next avail. entry */ | 6686 | /* Find this entry, or if that fails, the next avail. entry */ |
6683 | while (entry->jump[0]) { | 6687 | while (entry->jump[0]) { |
6684 | diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c | 6688 | diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c |
6685 | index 9600c36..0c156d7 100644 | 6689 | index 0d86c8a..df4c5f2 100644 |
6686 | --- a/arch/powerpc/kernel/process.c | 6690 | --- a/arch/powerpc/kernel/process.c |
6687 | +++ b/arch/powerpc/kernel/process.c | 6691 | +++ b/arch/powerpc/kernel/process.c |
6688 | @@ -871,8 +871,8 @@ void show_regs(struct pt_regs * regs) | 6692 | @@ -871,8 +871,8 @@ void show_regs(struct pt_regs * regs) |
@@ -6718,7 +6722,7 @@ index 9600c36..0c156d7 100644 | |||
6718 | regs->trap, (void *)regs->nip, (void *)lr); | 6722 | regs->trap, (void *)regs->nip, (void *)lr); |
6719 | firstframe = 1; | 6723 | firstframe = 1; |
6720 | } | 6724 | } |
6721 | @@ -1396,58 +1396,3 @@ void __ppc64_runlatch_off(void) | 6725 | @@ -1396,58 +1396,3 @@ void notrace __ppc64_runlatch_off(void) |
6722 | mtspr(SPRN_CTRLT, ctrl); | 6726 | mtspr(SPRN_CTRLT, ctrl); |
6723 | } | 6727 | } |
6724 | #endif /* CONFIG_PPC64 */ | 6728 | #endif /* CONFIG_PPC64 */ |
@@ -6856,7 +6860,7 @@ index 3ce1f86..c30e629 100644 | |||
6856 | }; | 6860 | }; |
6857 | 6861 | ||
6858 | diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c | 6862 | diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c |
6859 | index 29857c6..bd31e27 100644 | 6863 | index bf33ace..e836d8b 100644 |
6860 | --- a/arch/powerpc/kernel/traps.c | 6864 | --- a/arch/powerpc/kernel/traps.c |
6861 | +++ b/arch/powerpc/kernel/traps.c | 6865 | +++ b/arch/powerpc/kernel/traps.c |
6862 | @@ -142,6 +142,8 @@ static unsigned __kprobes long oops_begin(struct pt_regs *regs) | 6866 | @@ -142,6 +142,8 @@ static unsigned __kprobes long oops_begin(struct pt_regs *regs) |
@@ -10062,6 +10066,20 @@ index d2b5944..bd813f2 100644 | |||
10062 | return addr; | 10066 | return addr; |
10063 | } | 10067 | } |
10064 | if (mm->get_unmapped_area == arch_get_unmapped_area) | 10068 | if (mm->get_unmapped_area == arch_get_unmapped_area) |
10069 | diff --git a/arch/sparc/mm/tlb.c b/arch/sparc/mm/tlb.c | ||
10070 | index 83d89bc..37e7bc4 100644 | ||
10071 | --- a/arch/sparc/mm/tlb.c | ||
10072 | +++ b/arch/sparc/mm/tlb.c | ||
10073 | @@ -85,8 +85,8 @@ static void tlb_batch_add_one(struct mm_struct *mm, unsigned long vaddr, | ||
10074 | } | ||
10075 | |||
10076 | if (!tb->active) { | ||
10077 | - global_flush_tlb_page(mm, vaddr); | ||
10078 | flush_tsb_user_page(mm, vaddr); | ||
10079 | + global_flush_tlb_page(mm, vaddr); | ||
10080 | goto out; | ||
10081 | } | ||
10082 | |||
10065 | diff --git a/arch/tile/include/asm/atomic_64.h b/arch/tile/include/asm/atomic_64.h | 10083 | diff --git a/arch/tile/include/asm/atomic_64.h b/arch/tile/include/asm/atomic_64.h |
10066 | index f4500c6..889656c 100644 | 10084 | index f4500c6..889656c 100644 |
10067 | --- a/arch/tile/include/asm/atomic_64.h | 10085 | --- a/arch/tile/include/asm/atomic_64.h |
@@ -10503,7 +10521,7 @@ index 5ef205c..342191d 100644 | |||
10503 | KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ | 10521 | KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ |
10504 | GCOV_PROFILE := n | 10522 | GCOV_PROFILE := n |
10505 | diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c | 10523 | diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c |
10506 | index 35ee62f..b6609b6 100644 | 10524 | index c205035..5853587 100644 |
10507 | --- a/arch/x86/boot/compressed/eboot.c | 10525 | --- a/arch/x86/boot/compressed/eboot.c |
10508 | +++ b/arch/x86/boot/compressed/eboot.c | 10526 | +++ b/arch/x86/boot/compressed/eboot.c |
10509 | @@ -150,7 +150,6 @@ again: | 10527 | @@ -150,7 +150,6 @@ again: |
@@ -10522,6 +10540,48 @@ index 35ee62f..b6609b6 100644 | |||
10522 | efi_call_phys1(sys_table->boottime->free_pool, map); | 10540 | efi_call_phys1(sys_table->boottime->free_pool, map); |
10523 | fail: | 10541 | fail: |
10524 | return status; | 10542 | return status; |
10543 | diff --git a/arch/x86/boot/compressed/efi_stub_32.S b/arch/x86/boot/compressed/efi_stub_32.S | ||
10544 | index a53440e..c3dbf1e 100644 | ||
10545 | --- a/arch/x86/boot/compressed/efi_stub_32.S | ||
10546 | +++ b/arch/x86/boot/compressed/efi_stub_32.S | ||
10547 | @@ -46,16 +46,13 @@ ENTRY(efi_call_phys) | ||
10548 | * parameter 2, ..., param n. To make things easy, we save the return | ||
10549 | * address of efi_call_phys in a global variable. | ||
10550 | */ | ||
10551 | - popl %ecx | ||
10552 | - movl %ecx, saved_return_addr(%edx) | ||
10553 | - /* get the function pointer into ECX*/ | ||
10554 | - popl %ecx | ||
10555 | - movl %ecx, efi_rt_function_ptr(%edx) | ||
10556 | + popl saved_return_addr(%edx) | ||
10557 | + popl efi_rt_function_ptr(%edx) | ||
10558 | |||
10559 | /* | ||
10560 | * 3. Call the physical function. | ||
10561 | */ | ||
10562 | - call *%ecx | ||
10563 | + call *efi_rt_function_ptr(%edx) | ||
10564 | |||
10565 | /* | ||
10566 | * 4. Balance the stack. And because EAX contain the return value, | ||
10567 | @@ -67,15 +64,12 @@ ENTRY(efi_call_phys) | ||
10568 | 1: popl %edx | ||
10569 | subl $1b, %edx | ||
10570 | |||
10571 | - movl efi_rt_function_ptr(%edx), %ecx | ||
10572 | - pushl %ecx | ||
10573 | + pushl efi_rt_function_ptr(%edx) | ||
10574 | |||
10575 | /* | ||
10576 | * 10. Push the saved return address onto the stack and return. | ||
10577 | */ | ||
10578 | - movl saved_return_addr(%edx), %ecx | ||
10579 | - pushl %ecx | ||
10580 | - ret | ||
10581 | + jmpl *saved_return_addr(%edx) | ||
10582 | ENDPROC(efi_call_phys) | ||
10583 | .previous | ||
10584 | |||
10525 | diff --git a/arch/x86/boot/compressed/head_32.S b/arch/x86/boot/compressed/head_32.S | 10585 | diff --git a/arch/x86/boot/compressed/head_32.S b/arch/x86/boot/compressed/head_32.S |
10526 | index 1e3184f..0d11e2e 100644 | 10586 | index 1e3184f..0d11e2e 100644 |
10527 | --- a/arch/x86/boot/compressed/head_32.S | 10587 | --- a/arch/x86/boot/compressed/head_32.S |
@@ -17405,7 +17465,7 @@ index 7c6f7d5..8cac382 100644 | |||
17405 | }; | 17465 | }; |
17406 | 17466 | ||
17407 | diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c | 17467 | diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c |
17408 | index 7bc1263..ce2cbfb 100644 | 17468 | index 7bc1263..bff5686 100644 |
17409 | --- a/arch/x86/kernel/cpu/mcheck/mce.c | 17469 | --- a/arch/x86/kernel/cpu/mcheck/mce.c |
17410 | +++ b/arch/x86/kernel/cpu/mcheck/mce.c | 17470 | +++ b/arch/x86/kernel/cpu/mcheck/mce.c |
17411 | @@ -45,6 +45,7 @@ | 17471 | @@ -45,6 +45,7 @@ |
@@ -17456,6 +17516,15 @@ index 7bc1263..ce2cbfb 100644 | |||
17456 | return; | 17516 | return; |
17457 | } | 17517 | } |
17458 | /* First print corrected ones that are still unlogged */ | 17518 | /* First print corrected ones that are still unlogged */ |
17519 | @@ -353,7 +354,7 @@ static void mce_panic(char *msg, struct mce *final, char *exp) | ||
17520 | if (!fake_panic) { | ||
17521 | if (panic_timeout == 0) | ||
17522 | panic_timeout = mca_cfg.panic_timeout; | ||
17523 | - panic(msg); | ||
17524 | + panic("%s", msg); | ||
17525 | } else | ||
17526 | pr_emerg(HW_ERR "Fake kernel panic: %s\n", msg); | ||
17527 | } | ||
17459 | @@ -683,7 +684,7 @@ static int mce_timed_out(u64 *t) | 17528 | @@ -683,7 +684,7 @@ static int mce_timed_out(u64 *t) |
17460 | * might have been modified by someone else. | 17529 | * might have been modified by someone else. |
17461 | */ | 17530 | */ |
@@ -18171,6 +18240,21 @@ index b653675..51cc8c0 100644 | |||
18171 | +} | 18240 | +} |
18172 | +EXPORT_SYMBOL(pax_check_alloca); | 18241 | +EXPORT_SYMBOL(pax_check_alloca); |
18173 | +#endif | 18242 | +#endif |
18243 | diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c | ||
18244 | index d32abea..74daf4f 100644 | ||
18245 | --- a/arch/x86/kernel/e820.c | ||
18246 | +++ b/arch/x86/kernel/e820.c | ||
18247 | @@ -800,8 +800,8 @@ unsigned long __init e820_end_of_low_ram_pfn(void) | ||
18248 | |||
18249 | static void early_panic(char *msg) | ||
18250 | { | ||
18251 | - early_printk(msg); | ||
18252 | - panic(msg); | ||
18253 | + early_printk("%s", msg); | ||
18254 | + panic("%s", msg); | ||
18255 | } | ||
18256 | |||
18257 | static int userdef __initdata; | ||
18174 | diff --git a/arch/x86/kernel/early_printk.c b/arch/x86/kernel/early_printk.c | 18258 | diff --git a/arch/x86/kernel/early_printk.c b/arch/x86/kernel/early_printk.c |
18175 | index 9b9f18b..9fcaa04 100644 | 18259 | index 9b9f18b..9fcaa04 100644 |
18176 | --- a/arch/x86/kernel/early_printk.c | 18260 | --- a/arch/x86/kernel/early_printk.c |
@@ -18944,7 +19028,7 @@ index 8f3e2de..934870f 100644 | |||
18944 | 19028 | ||
18945 | /* | 19029 | /* |
18946 | diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S | 19030 | diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S |
18947 | index c1d01e6..5625dce 100644 | 19031 | index c1d01e6..1bef85a 100644 |
18948 | --- a/arch/x86/kernel/entry_64.S | 19032 | --- a/arch/x86/kernel/entry_64.S |
18949 | +++ b/arch/x86/kernel/entry_64.S | 19033 | +++ b/arch/x86/kernel/entry_64.S |
18950 | @@ -59,6 +59,8 @@ | 19034 | @@ -59,6 +59,8 @@ |
@@ -19031,7 +19115,7 @@ index c1d01e6..5625dce 100644 | |||
19031 | #endif | 19115 | #endif |
19032 | 19116 | ||
19033 | 19117 | ||
19034 | @@ -284,6 +293,282 @@ ENTRY(native_usergs_sysret64) | 19118 | @@ -284,6 +293,311 @@ ENTRY(native_usergs_sysret64) |
19035 | ENDPROC(native_usergs_sysret64) | 19119 | ENDPROC(native_usergs_sysret64) |
19036 | #endif /* CONFIG_PARAVIRT */ | 19120 | #endif /* CONFIG_PARAVIRT */ |
19037 | 19121 | ||
@@ -19139,7 +19223,9 @@ index c1d01e6..5625dce 100644 | |||
19139 | +#endif | 19223 | +#endif |
19140 | +#ifdef CONFIG_PAX_RANDKSTACK | 19224 | +#ifdef CONFIG_PAX_RANDKSTACK |
19141 | + pushq %rax | 19225 | + pushq %rax |
19226 | + pushq %r11 | ||
19142 | + call pax_randomize_kstack | 19227 | + call pax_randomize_kstack |
19228 | + popq %r11 | ||
19143 | + popq %rax | 19229 | + popq %rax |
19144 | +#endif | 19230 | +#endif |
19145 | + .endm | 19231 | + .endm |
@@ -19202,10 +19288,10 @@ index c1d01e6..5625dce 100644 | |||
19202 | +ENDPROC(pax_enter_kernel_user) | 19288 | +ENDPROC(pax_enter_kernel_user) |
19203 | + | 19289 | + |
19204 | +ENTRY(pax_exit_kernel_user) | 19290 | +ENTRY(pax_exit_kernel_user) |
19205 | + push %rdi | 19291 | + pushq %rdi |
19292 | + pushq %rbx | ||
19206 | + | 19293 | + |
19207 | +#ifdef CONFIG_PARAVIRT | 19294 | +#ifdef CONFIG_PARAVIRT |
19208 | + pushq %rbx | ||
19209 | + PV_SAVE_REGS(CLBR_RDI) | 19295 | + PV_SAVE_REGS(CLBR_RDI) |
19210 | +#endif | 19296 | +#endif |
19211 | + | 19297 | + |
@@ -19217,13 +19303,14 @@ index c1d01e6..5625dce 100644 | |||
19217 | +#endif | 19303 | +#endif |
19218 | + | 19304 | + |
19219 | + GET_CR3_INTO_RDI | 19305 | + GET_CR3_INTO_RDI |
19220 | + add $__START_KERNEL_map,%rdi | 19306 | + mov %rdi,%rbx |
19221 | + sub phys_base(%rip),%rdi | 19307 | + add $__START_KERNEL_map,%rbx |
19308 | + sub phys_base(%rip),%rbx | ||
19222 | + | 19309 | + |
19223 | +#ifdef CONFIG_PARAVIRT | 19310 | +#ifdef CONFIG_PARAVIRT |
19311 | + pushq %rdi | ||
19224 | + cmpl $0, pv_info+PARAVIRT_enabled | 19312 | + cmpl $0, pv_info+PARAVIRT_enabled |
19225 | + jz 1f | 19313 | + jz 1f |
19226 | + mov %rdi,%rbx | ||
19227 | + i = 0 | 19314 | + i = 0 |
19228 | + .rept USER_PGD_PTRS | 19315 | + .rept USER_PGD_PTRS |
19229 | + mov i*8(%rbx),%rsi | 19316 | + mov i*8(%rbx),%rsi |
@@ -19232,21 +19319,23 @@ index c1d01e6..5625dce 100644 | |||
19232 | + call PARA_INDIRECT(pv_mmu_ops+PV_MMU_set_pgd_batched) | 19319 | + call PARA_INDIRECT(pv_mmu_ops+PV_MMU_set_pgd_batched) |
19233 | + i = i + 1 | 19320 | + i = i + 1 |
19234 | + .endr | 19321 | + .endr |
19322 | + popq %rdi | ||
19323 | + PV_RESTORE_REGS(CLBR_RDI) | ||
19235 | + jmp 2f | 19324 | + jmp 2f |
19236 | +1: | 19325 | +1: |
19237 | +#endif | 19326 | +#endif |
19238 | + | 19327 | + |
19239 | + i = 0 | 19328 | + i = 0 |
19240 | + .rept USER_PGD_PTRS | 19329 | + .rept USER_PGD_PTRS |
19241 | + movb $0x67,i*8(%rdi) | 19330 | + movb $0x67,i*8(%rbx) |
19242 | + i = i + 1 | 19331 | + i = i + 1 |
19243 | + .endr | 19332 | + .endr |
19244 | + | 19333 | + |
19245 | +#ifdef CONFIG_PARAVIRT | 19334 | +#ifdef CONFIG_PARAVIRT |
19246 | +2: PV_RESTORE_REGS(CLBR_RDI) | 19335 | +2: |
19247 | + popq %rbx | ||
19248 | +#endif | 19336 | +#endif |
19249 | + | 19337 | + |
19338 | + popq %rbx | ||
19250 | + popq %rdi | 19339 | + popq %rdi |
19251 | + pax_force_retaddr | 19340 | + pax_force_retaddr |
19252 | + retq | 19341 | + retq |
@@ -19255,6 +19344,30 @@ index c1d01e6..5625dce 100644 | |||
19255 | +ENDPROC(pax_exit_kernel_user) | 19344 | +ENDPROC(pax_exit_kernel_user) |
19256 | +#endif | 19345 | +#endif |
19257 | + | 19346 | + |
19347 | + .macro pax_enter_kernel_nmi | ||
19348 | + pax_set_fptr_mask | ||
19349 | + | ||
19350 | +#ifdef CONFIG_PAX_KERNEXEC | ||
19351 | + GET_CR0_INTO_RDI | ||
19352 | + bts $16,%rdi | ||
19353 | + SET_RDI_INTO_CR0 | ||
19354 | + jc 110f | ||
19355 | + or $2,%ebx | ||
19356 | +110: | ||
19357 | +#endif | ||
19358 | + .endm | ||
19359 | + | ||
19360 | + .macro pax_exit_kernel_nmi | ||
19361 | +#ifdef CONFIG_PAX_KERNEXEC | ||
19362 | + test $2,%ebx | ||
19363 | + jz 110f | ||
19364 | + GET_CR0_INTO_RDI | ||
19365 | + btr $16,%rdi | ||
19366 | + SET_RDI_INTO_CR0 | ||
19367 | +110: | ||
19368 | +#endif | ||
19369 | + .endm | ||
19370 | + | ||
19258 | +.macro pax_erase_kstack | 19371 | +.macro pax_erase_kstack |
19259 | +#ifdef CONFIG_PAX_MEMORY_STACKLEAK | 19372 | +#ifdef CONFIG_PAX_MEMORY_STACKLEAK |
19260 | + call pax_erase_kstack | 19373 | + call pax_erase_kstack |
@@ -19314,7 +19427,7 @@ index c1d01e6..5625dce 100644 | |||
19314 | 19427 | ||
19315 | .macro TRACE_IRQS_IRETQ offset=ARGOFFSET | 19428 | .macro TRACE_IRQS_IRETQ offset=ARGOFFSET |
19316 | #ifdef CONFIG_TRACE_IRQFLAGS | 19429 | #ifdef CONFIG_TRACE_IRQFLAGS |
19317 | @@ -375,8 +660,8 @@ ENDPROC(native_usergs_sysret64) | 19430 | @@ -375,8 +689,8 @@ ENDPROC(native_usergs_sysret64) |
19318 | .endm | 19431 | .endm |
19319 | 19432 | ||
19320 | .macro UNFAKE_STACK_FRAME | 19433 | .macro UNFAKE_STACK_FRAME |
@@ -19325,7 +19438,7 @@ index c1d01e6..5625dce 100644 | |||
19325 | .endm | 19438 | .endm |
19326 | 19439 | ||
19327 | /* | 19440 | /* |
19328 | @@ -463,7 +748,7 @@ ENDPROC(native_usergs_sysret64) | 19441 | @@ -463,7 +777,7 @@ ENDPROC(native_usergs_sysret64) |
19329 | movq %rsp, %rsi | 19442 | movq %rsp, %rsi |
19330 | 19443 | ||
19331 | leaq -RBP(%rsp),%rdi /* arg1 for handler */ | 19444 | leaq -RBP(%rsp),%rdi /* arg1 for handler */ |
@@ -19334,7 +19447,7 @@ index c1d01e6..5625dce 100644 | |||
19334 | je 1f | 19447 | je 1f |
19335 | SWAPGS | 19448 | SWAPGS |
19336 | /* | 19449 | /* |
19337 | @@ -498,9 +783,10 @@ ENTRY(save_rest) | 19450 | @@ -498,9 +812,10 @@ ENTRY(save_rest) |
19338 | movq_cfi r15, R15+16 | 19451 | movq_cfi r15, R15+16 |
19339 | movq %r11, 8(%rsp) /* return address */ | 19452 | movq %r11, 8(%rsp) /* return address */ |
19340 | FIXUP_TOP_OF_STACK %r11, 16 | 19453 | FIXUP_TOP_OF_STACK %r11, 16 |
@@ -19346,7 +19459,7 @@ index c1d01e6..5625dce 100644 | |||
19346 | 19459 | ||
19347 | /* save complete stack frame */ | 19460 | /* save complete stack frame */ |
19348 | .pushsection .kprobes.text, "ax" | 19461 | .pushsection .kprobes.text, "ax" |
19349 | @@ -529,9 +815,10 @@ ENTRY(save_paranoid) | 19462 | @@ -529,9 +844,10 @@ ENTRY(save_paranoid) |
19350 | js 1f /* negative -> in kernel */ | 19463 | js 1f /* negative -> in kernel */ |
19351 | SWAPGS | 19464 | SWAPGS |
19352 | xorl %ebx,%ebx | 19465 | xorl %ebx,%ebx |
@@ -19359,7 +19472,7 @@ index c1d01e6..5625dce 100644 | |||
19359 | .popsection | 19472 | .popsection |
19360 | 19473 | ||
19361 | /* | 19474 | /* |
19362 | @@ -553,7 +840,7 @@ ENTRY(ret_from_fork) | 19475 | @@ -553,7 +869,7 @@ ENTRY(ret_from_fork) |
19363 | 19476 | ||
19364 | RESTORE_REST | 19477 | RESTORE_REST |
19365 | 19478 | ||
@@ -19368,7 +19481,7 @@ index c1d01e6..5625dce 100644 | |||
19368 | jz 1f | 19481 | jz 1f |
19369 | 19482 | ||
19370 | testl $_TIF_IA32, TI_flags(%rcx) # 32-bit compat task needs IRET | 19483 | testl $_TIF_IA32, TI_flags(%rcx) # 32-bit compat task needs IRET |
19371 | @@ -571,7 +858,7 @@ ENTRY(ret_from_fork) | 19484 | @@ -571,7 +887,7 @@ ENTRY(ret_from_fork) |
19372 | RESTORE_REST | 19485 | RESTORE_REST |
19373 | jmp int_ret_from_sys_call | 19486 | jmp int_ret_from_sys_call |
19374 | CFI_ENDPROC | 19487 | CFI_ENDPROC |
@@ -19377,7 +19490,7 @@ index c1d01e6..5625dce 100644 | |||
19377 | 19490 | ||
19378 | /* | 19491 | /* |
19379 | * System call entry. Up to 6 arguments in registers are supported. | 19492 | * System call entry. Up to 6 arguments in registers are supported. |
19380 | @@ -608,7 +895,7 @@ END(ret_from_fork) | 19493 | @@ -608,7 +924,7 @@ END(ret_from_fork) |
19381 | ENTRY(system_call) | 19494 | ENTRY(system_call) |
19382 | CFI_STARTPROC simple | 19495 | CFI_STARTPROC simple |
19383 | CFI_SIGNAL_FRAME | 19496 | CFI_SIGNAL_FRAME |
@@ -19386,7 +19499,7 @@ index c1d01e6..5625dce 100644 | |||
19386 | CFI_REGISTER rip,rcx | 19499 | CFI_REGISTER rip,rcx |
19387 | /*CFI_REGISTER rflags,r11*/ | 19500 | /*CFI_REGISTER rflags,r11*/ |
19388 | SWAPGS_UNSAFE_STACK | 19501 | SWAPGS_UNSAFE_STACK |
19389 | @@ -621,16 +908,23 @@ GLOBAL(system_call_after_swapgs) | 19502 | @@ -621,16 +937,23 @@ GLOBAL(system_call_after_swapgs) |
19390 | 19503 | ||
19391 | movq %rsp,PER_CPU_VAR(old_rsp) | 19504 | movq %rsp,PER_CPU_VAR(old_rsp) |
19392 | movq PER_CPU_VAR(kernel_stack),%rsp | 19505 | movq PER_CPU_VAR(kernel_stack),%rsp |
@@ -19412,7 +19525,7 @@ index c1d01e6..5625dce 100644 | |||
19412 | jnz tracesys | 19525 | jnz tracesys |
19413 | system_call_fastpath: | 19526 | system_call_fastpath: |
19414 | #if __SYSCALL_MASK == ~0 | 19527 | #if __SYSCALL_MASK == ~0 |
19415 | @@ -640,7 +934,7 @@ system_call_fastpath: | 19528 | @@ -640,7 +963,7 @@ system_call_fastpath: |
19416 | cmpl $__NR_syscall_max,%eax | 19529 | cmpl $__NR_syscall_max,%eax |
19417 | #endif | 19530 | #endif |
19418 | ja badsys | 19531 | ja badsys |
@@ -19421,7 +19534,7 @@ index c1d01e6..5625dce 100644 | |||
19421 | call *sys_call_table(,%rax,8) # XXX: rip relative | 19534 | call *sys_call_table(,%rax,8) # XXX: rip relative |
19422 | movq %rax,RAX-ARGOFFSET(%rsp) | 19535 | movq %rax,RAX-ARGOFFSET(%rsp) |
19423 | /* | 19536 | /* |
19424 | @@ -654,10 +948,13 @@ sysret_check: | 19537 | @@ -654,10 +977,13 @@ sysret_check: |
19425 | LOCKDEP_SYS_EXIT | 19538 | LOCKDEP_SYS_EXIT |
19426 | DISABLE_INTERRUPTS(CLBR_NONE) | 19539 | DISABLE_INTERRUPTS(CLBR_NONE) |
19427 | TRACE_IRQS_OFF | 19540 | TRACE_IRQS_OFF |
@@ -19436,7 +19549,7 @@ index c1d01e6..5625dce 100644 | |||
19436 | /* | 19549 | /* |
19437 | * sysretq will re-enable interrupts: | 19550 | * sysretq will re-enable interrupts: |
19438 | */ | 19551 | */ |
19439 | @@ -709,14 +1006,18 @@ badsys: | 19552 | @@ -709,14 +1035,18 @@ badsys: |
19440 | * jump back to the normal fast path. | 19553 | * jump back to the normal fast path. |
19441 | */ | 19554 | */ |
19442 | auditsys: | 19555 | auditsys: |
@@ -19456,7 +19569,7 @@ index c1d01e6..5625dce 100644 | |||
19456 | jmp system_call_fastpath | 19569 | jmp system_call_fastpath |
19457 | 19570 | ||
19458 | /* | 19571 | /* |
19459 | @@ -737,7 +1038,7 @@ sysret_audit: | 19572 | @@ -737,7 +1067,7 @@ sysret_audit: |
19460 | /* Do syscall tracing */ | 19573 | /* Do syscall tracing */ |
19461 | tracesys: | 19574 | tracesys: |
19462 | #ifdef CONFIG_AUDITSYSCALL | 19575 | #ifdef CONFIG_AUDITSYSCALL |
@@ -19465,7 +19578,7 @@ index c1d01e6..5625dce 100644 | |||
19465 | jz auditsys | 19578 | jz auditsys |
19466 | #endif | 19579 | #endif |
19467 | SAVE_REST | 19580 | SAVE_REST |
19468 | @@ -745,12 +1046,16 @@ tracesys: | 19581 | @@ -745,12 +1075,16 @@ tracesys: |
19469 | FIXUP_TOP_OF_STACK %rdi | 19582 | FIXUP_TOP_OF_STACK %rdi |
19470 | movq %rsp,%rdi | 19583 | movq %rsp,%rdi |
19471 | call syscall_trace_enter | 19584 | call syscall_trace_enter |
@@ -19482,7 +19595,7 @@ index c1d01e6..5625dce 100644 | |||
19482 | RESTORE_REST | 19595 | RESTORE_REST |
19483 | #if __SYSCALL_MASK == ~0 | 19596 | #if __SYSCALL_MASK == ~0 |
19484 | cmpq $__NR_syscall_max,%rax | 19597 | cmpq $__NR_syscall_max,%rax |
19485 | @@ -759,7 +1064,7 @@ tracesys: | 19598 | @@ -759,7 +1093,7 @@ tracesys: |
19486 | cmpl $__NR_syscall_max,%eax | 19599 | cmpl $__NR_syscall_max,%eax |
19487 | #endif | 19600 | #endif |
19488 | ja int_ret_from_sys_call /* RAX(%rsp) set to -ENOSYS above */ | 19601 | ja int_ret_from_sys_call /* RAX(%rsp) set to -ENOSYS above */ |
@@ -19491,7 +19604,7 @@ index c1d01e6..5625dce 100644 | |||
19491 | call *sys_call_table(,%rax,8) | 19604 | call *sys_call_table(,%rax,8) |
19492 | movq %rax,RAX-ARGOFFSET(%rsp) | 19605 | movq %rax,RAX-ARGOFFSET(%rsp) |
19493 | /* Use IRET because user could have changed frame */ | 19606 | /* Use IRET because user could have changed frame */ |
19494 | @@ -780,7 +1085,9 @@ GLOBAL(int_with_check) | 19607 | @@ -780,7 +1114,9 @@ GLOBAL(int_with_check) |
19495 | andl %edi,%edx | 19608 | andl %edi,%edx |
19496 | jnz int_careful | 19609 | jnz int_careful |
19497 | andl $~TS_COMPAT,TI_status(%rcx) | 19610 | andl $~TS_COMPAT,TI_status(%rcx) |
@@ -19502,7 +19615,7 @@ index c1d01e6..5625dce 100644 | |||
19502 | 19615 | ||
19503 | /* Either reschedule or signal or syscall exit tracking needed. */ | 19616 | /* Either reschedule or signal or syscall exit tracking needed. */ |
19504 | /* First do a reschedule test. */ | 19617 | /* First do a reschedule test. */ |
19505 | @@ -826,7 +1133,7 @@ int_restore_rest: | 19618 | @@ -826,7 +1162,7 @@ int_restore_rest: |
19506 | TRACE_IRQS_OFF | 19619 | TRACE_IRQS_OFF |
19507 | jmp int_with_check | 19620 | jmp int_with_check |
19508 | CFI_ENDPROC | 19621 | CFI_ENDPROC |
@@ -19511,7 +19624,7 @@ index c1d01e6..5625dce 100644 | |||
19511 | 19624 | ||
19512 | .macro FORK_LIKE func | 19625 | .macro FORK_LIKE func |
19513 | ENTRY(stub_\func) | 19626 | ENTRY(stub_\func) |
19514 | @@ -839,9 +1146,10 @@ ENTRY(stub_\func) | 19627 | @@ -839,9 +1175,10 @@ ENTRY(stub_\func) |
19515 | DEFAULT_FRAME 0 8 /* offset 8: return address */ | 19628 | DEFAULT_FRAME 0 8 /* offset 8: return address */ |
19516 | call sys_\func | 19629 | call sys_\func |
19517 | RESTORE_TOP_OF_STACK %r11, 8 | 19630 | RESTORE_TOP_OF_STACK %r11, 8 |
@@ -19523,7 +19636,7 @@ index c1d01e6..5625dce 100644 | |||
19523 | .endm | 19636 | .endm |
19524 | 19637 | ||
19525 | .macro FIXED_FRAME label,func | 19638 | .macro FIXED_FRAME label,func |
19526 | @@ -851,9 +1159,10 @@ ENTRY(\label) | 19639 | @@ -851,9 +1188,10 @@ ENTRY(\label) |
19527 | FIXUP_TOP_OF_STACK %r11, 8-ARGOFFSET | 19640 | FIXUP_TOP_OF_STACK %r11, 8-ARGOFFSET |
19528 | call \func | 19641 | call \func |
19529 | RESTORE_TOP_OF_STACK %r11, 8-ARGOFFSET | 19642 | RESTORE_TOP_OF_STACK %r11, 8-ARGOFFSET |
@@ -19535,7 +19648,7 @@ index c1d01e6..5625dce 100644 | |||
19535 | .endm | 19648 | .endm |
19536 | 19649 | ||
19537 | FORK_LIKE clone | 19650 | FORK_LIKE clone |
19538 | @@ -870,9 +1179,10 @@ ENTRY(ptregscall_common) | 19651 | @@ -870,9 +1208,10 @@ ENTRY(ptregscall_common) |
19539 | movq_cfi_restore R12+8, r12 | 19652 | movq_cfi_restore R12+8, r12 |
19540 | movq_cfi_restore RBP+8, rbp | 19653 | movq_cfi_restore RBP+8, rbp |
19541 | movq_cfi_restore RBX+8, rbx | 19654 | movq_cfi_restore RBX+8, rbx |
@@ -19547,7 +19660,7 @@ index c1d01e6..5625dce 100644 | |||
19547 | 19660 | ||
19548 | ENTRY(stub_execve) | 19661 | ENTRY(stub_execve) |
19549 | CFI_STARTPROC | 19662 | CFI_STARTPROC |
19550 | @@ -885,7 +1195,7 @@ ENTRY(stub_execve) | 19663 | @@ -885,7 +1224,7 @@ ENTRY(stub_execve) |
19551 | RESTORE_REST | 19664 | RESTORE_REST |
19552 | jmp int_ret_from_sys_call | 19665 | jmp int_ret_from_sys_call |
19553 | CFI_ENDPROC | 19666 | CFI_ENDPROC |
@@ -19556,7 +19669,7 @@ index c1d01e6..5625dce 100644 | |||
19556 | 19669 | ||
19557 | /* | 19670 | /* |
19558 | * sigreturn is special because it needs to restore all registers on return. | 19671 | * sigreturn is special because it needs to restore all registers on return. |
19559 | @@ -902,7 +1212,7 @@ ENTRY(stub_rt_sigreturn) | 19672 | @@ -902,7 +1241,7 @@ ENTRY(stub_rt_sigreturn) |
19560 | RESTORE_REST | 19673 | RESTORE_REST |
19561 | jmp int_ret_from_sys_call | 19674 | jmp int_ret_from_sys_call |
19562 | CFI_ENDPROC | 19675 | CFI_ENDPROC |
@@ -19565,7 +19678,7 @@ index c1d01e6..5625dce 100644 | |||
19565 | 19678 | ||
19566 | #ifdef CONFIG_X86_X32_ABI | 19679 | #ifdef CONFIG_X86_X32_ABI |
19567 | ENTRY(stub_x32_rt_sigreturn) | 19680 | ENTRY(stub_x32_rt_sigreturn) |
19568 | @@ -916,7 +1226,7 @@ ENTRY(stub_x32_rt_sigreturn) | 19681 | @@ -916,7 +1255,7 @@ ENTRY(stub_x32_rt_sigreturn) |
19569 | RESTORE_REST | 19682 | RESTORE_REST |
19570 | jmp int_ret_from_sys_call | 19683 | jmp int_ret_from_sys_call |
19571 | CFI_ENDPROC | 19684 | CFI_ENDPROC |
@@ -19574,7 +19687,7 @@ index c1d01e6..5625dce 100644 | |||
19574 | 19687 | ||
19575 | ENTRY(stub_x32_execve) | 19688 | ENTRY(stub_x32_execve) |
19576 | CFI_STARTPROC | 19689 | CFI_STARTPROC |
19577 | @@ -930,7 +1240,7 @@ ENTRY(stub_x32_execve) | 19690 | @@ -930,7 +1269,7 @@ ENTRY(stub_x32_execve) |
19578 | RESTORE_REST | 19691 | RESTORE_REST |
19579 | jmp int_ret_from_sys_call | 19692 | jmp int_ret_from_sys_call |
19580 | CFI_ENDPROC | 19693 | CFI_ENDPROC |
@@ -19583,7 +19696,7 @@ index c1d01e6..5625dce 100644 | |||
19583 | 19696 | ||
19584 | #endif | 19697 | #endif |
19585 | 19698 | ||
19586 | @@ -967,7 +1277,7 @@ vector=vector+1 | 19699 | @@ -967,7 +1306,7 @@ vector=vector+1 |
19587 | 2: jmp common_interrupt | 19700 | 2: jmp common_interrupt |
19588 | .endr | 19701 | .endr |
19589 | CFI_ENDPROC | 19702 | CFI_ENDPROC |
@@ -19592,7 +19705,7 @@ index c1d01e6..5625dce 100644 | |||
19592 | 19705 | ||
19593 | .previous | 19706 | .previous |
19594 | END(interrupt) | 19707 | END(interrupt) |
19595 | @@ -987,6 +1297,16 @@ END(interrupt) | 19708 | @@ -987,6 +1326,16 @@ END(interrupt) |
19596 | subq $ORIG_RAX-RBP, %rsp | 19709 | subq $ORIG_RAX-RBP, %rsp |
19597 | CFI_ADJUST_CFA_OFFSET ORIG_RAX-RBP | 19710 | CFI_ADJUST_CFA_OFFSET ORIG_RAX-RBP |
19598 | SAVE_ARGS_IRQ | 19711 | SAVE_ARGS_IRQ |
@@ -19609,7 +19722,7 @@ index c1d01e6..5625dce 100644 | |||
19609 | call \func | 19722 | call \func |
19610 | .endm | 19723 | .endm |
19611 | 19724 | ||
19612 | @@ -1019,7 +1339,7 @@ ret_from_intr: | 19725 | @@ -1019,7 +1368,7 @@ ret_from_intr: |
19613 | 19726 | ||
19614 | exit_intr: | 19727 | exit_intr: |
19615 | GET_THREAD_INFO(%rcx) | 19728 | GET_THREAD_INFO(%rcx) |
@@ -19618,7 +19731,7 @@ index c1d01e6..5625dce 100644 | |||
19618 | je retint_kernel | 19731 | je retint_kernel |
19619 | 19732 | ||
19620 | /* Interrupt came from user space */ | 19733 | /* Interrupt came from user space */ |
19621 | @@ -1041,12 +1361,16 @@ retint_swapgs: /* return to user-space */ | 19734 | @@ -1041,12 +1390,16 @@ retint_swapgs: /* return to user-space */ |
19622 | * The iretq could re-enable interrupts: | 19735 | * The iretq could re-enable interrupts: |
19623 | */ | 19736 | */ |
19624 | DISABLE_INTERRUPTS(CLBR_ANY) | 19737 | DISABLE_INTERRUPTS(CLBR_ANY) |
@@ -19635,7 +19748,7 @@ index c1d01e6..5625dce 100644 | |||
19635 | /* | 19748 | /* |
19636 | * The iretq could re-enable interrupts: | 19749 | * The iretq could re-enable interrupts: |
19637 | */ | 19750 | */ |
19638 | @@ -1129,7 +1453,7 @@ ENTRY(retint_kernel) | 19751 | @@ -1129,7 +1482,7 @@ ENTRY(retint_kernel) |
19639 | #endif | 19752 | #endif |
19640 | 19753 | ||
19641 | CFI_ENDPROC | 19754 | CFI_ENDPROC |
@@ -19644,7 +19757,7 @@ index c1d01e6..5625dce 100644 | |||
19644 | /* | 19757 | /* |
19645 | * End of kprobes section | 19758 | * End of kprobes section |
19646 | */ | 19759 | */ |
19647 | @@ -1147,7 +1471,7 @@ ENTRY(\sym) | 19760 | @@ -1147,7 +1500,7 @@ ENTRY(\sym) |
19648 | interrupt \do_sym | 19761 | interrupt \do_sym |
19649 | jmp ret_from_intr | 19762 | jmp ret_from_intr |
19650 | CFI_ENDPROC | 19763 | CFI_ENDPROC |
@@ -19653,7 +19766,7 @@ index c1d01e6..5625dce 100644 | |||
19653 | .endm | 19766 | .endm |
19654 | 19767 | ||
19655 | #ifdef CONFIG_SMP | 19768 | #ifdef CONFIG_SMP |
19656 | @@ -1203,12 +1527,22 @@ ENTRY(\sym) | 19769 | @@ -1203,12 +1556,22 @@ ENTRY(\sym) |
19657 | CFI_ADJUST_CFA_OFFSET ORIG_RAX-R15 | 19770 | CFI_ADJUST_CFA_OFFSET ORIG_RAX-R15 |
19658 | call error_entry | 19771 | call error_entry |
19659 | DEFAULT_FRAME 0 | 19772 | DEFAULT_FRAME 0 |
@@ -19677,7 +19790,7 @@ index c1d01e6..5625dce 100644 | |||
19677 | .endm | 19790 | .endm |
19678 | 19791 | ||
19679 | .macro paranoidzeroentry sym do_sym | 19792 | .macro paranoidzeroentry sym do_sym |
19680 | @@ -1221,15 +1555,25 @@ ENTRY(\sym) | 19793 | @@ -1221,15 +1584,25 @@ ENTRY(\sym) |
19681 | CFI_ADJUST_CFA_OFFSET ORIG_RAX-R15 | 19794 | CFI_ADJUST_CFA_OFFSET ORIG_RAX-R15 |
19682 | call save_paranoid | 19795 | call save_paranoid |
19683 | TRACE_IRQS_OFF | 19796 | TRACE_IRQS_OFF |
@@ -19705,7 +19818,7 @@ index c1d01e6..5625dce 100644 | |||
19705 | .macro paranoidzeroentry_ist sym do_sym ist | 19818 | .macro paranoidzeroentry_ist sym do_sym ist |
19706 | ENTRY(\sym) | 19819 | ENTRY(\sym) |
19707 | INTR_FRAME | 19820 | INTR_FRAME |
19708 | @@ -1240,14 +1584,30 @@ ENTRY(\sym) | 19821 | @@ -1240,14 +1613,30 @@ ENTRY(\sym) |
19709 | CFI_ADJUST_CFA_OFFSET ORIG_RAX-R15 | 19822 | CFI_ADJUST_CFA_OFFSET ORIG_RAX-R15 |
19710 | call save_paranoid | 19823 | call save_paranoid |
19711 | TRACE_IRQS_OFF_DEBUG | 19824 | TRACE_IRQS_OFF_DEBUG |
@@ -19737,7 +19850,7 @@ index c1d01e6..5625dce 100644 | |||
19737 | .endm | 19850 | .endm |
19738 | 19851 | ||
19739 | .macro errorentry sym do_sym | 19852 | .macro errorentry sym do_sym |
19740 | @@ -1259,13 +1619,23 @@ ENTRY(\sym) | 19853 | @@ -1259,13 +1648,23 @@ ENTRY(\sym) |
19741 | CFI_ADJUST_CFA_OFFSET ORIG_RAX-R15 | 19854 | CFI_ADJUST_CFA_OFFSET ORIG_RAX-R15 |
19742 | call error_entry | 19855 | call error_entry |
19743 | DEFAULT_FRAME 0 | 19856 | DEFAULT_FRAME 0 |
@@ -19762,7 +19875,7 @@ index c1d01e6..5625dce 100644 | |||
19762 | .endm | 19875 | .endm |
19763 | 19876 | ||
19764 | /* error code is on the stack already */ | 19877 | /* error code is on the stack already */ |
19765 | @@ -1279,13 +1649,23 @@ ENTRY(\sym) | 19878 | @@ -1279,13 +1678,23 @@ ENTRY(\sym) |
19766 | call save_paranoid | 19879 | call save_paranoid |
19767 | DEFAULT_FRAME 0 | 19880 | DEFAULT_FRAME 0 |
19768 | TRACE_IRQS_OFF | 19881 | TRACE_IRQS_OFF |
@@ -19787,7 +19900,7 @@ index c1d01e6..5625dce 100644 | |||
19787 | .endm | 19900 | .endm |
19788 | 19901 | ||
19789 | zeroentry divide_error do_divide_error | 19902 | zeroentry divide_error do_divide_error |
19790 | @@ -1315,9 +1695,10 @@ gs_change: | 19903 | @@ -1315,9 +1724,10 @@ gs_change: |
19791 | 2: mfence /* workaround */ | 19904 | 2: mfence /* workaround */ |
19792 | SWAPGS | 19905 | SWAPGS |
19793 | popfq_cfi | 19906 | popfq_cfi |
@@ -19799,7 +19912,7 @@ index c1d01e6..5625dce 100644 | |||
19799 | 19912 | ||
19800 | _ASM_EXTABLE(gs_change,bad_gs) | 19913 | _ASM_EXTABLE(gs_change,bad_gs) |
19801 | .section .fixup,"ax" | 19914 | .section .fixup,"ax" |
19802 | @@ -1345,9 +1726,10 @@ ENTRY(call_softirq) | 19915 | @@ -1345,9 +1755,10 @@ ENTRY(call_softirq) |
19803 | CFI_DEF_CFA_REGISTER rsp | 19916 | CFI_DEF_CFA_REGISTER rsp |
19804 | CFI_ADJUST_CFA_OFFSET -8 | 19917 | CFI_ADJUST_CFA_OFFSET -8 |
19805 | decl PER_CPU_VAR(irq_count) | 19918 | decl PER_CPU_VAR(irq_count) |
@@ -19811,7 +19924,7 @@ index c1d01e6..5625dce 100644 | |||
19811 | 19924 | ||
19812 | #ifdef CONFIG_XEN | 19925 | #ifdef CONFIG_XEN |
19813 | zeroentry xen_hypervisor_callback xen_do_hypervisor_callback | 19926 | zeroentry xen_hypervisor_callback xen_do_hypervisor_callback |
19814 | @@ -1385,7 +1767,7 @@ ENTRY(xen_do_hypervisor_callback) # do_hypervisor_callback(struct *pt_regs) | 19927 | @@ -1385,7 +1796,7 @@ ENTRY(xen_do_hypervisor_callback) # do_hypervisor_callback(struct *pt_regs) |
19815 | decl PER_CPU_VAR(irq_count) | 19928 | decl PER_CPU_VAR(irq_count) |
19816 | jmp error_exit | 19929 | jmp error_exit |
19817 | CFI_ENDPROC | 19930 | CFI_ENDPROC |
@@ -19820,7 +19933,7 @@ index c1d01e6..5625dce 100644 | |||
19820 | 19933 | ||
19821 | /* | 19934 | /* |
19822 | * Hypervisor uses this for application faults while it executes. | 19935 | * Hypervisor uses this for application faults while it executes. |
19823 | @@ -1444,7 +1826,7 @@ ENTRY(xen_failsafe_callback) | 19936 | @@ -1444,7 +1855,7 @@ ENTRY(xen_failsafe_callback) |
19824 | SAVE_ALL | 19937 | SAVE_ALL |
19825 | jmp error_exit | 19938 | jmp error_exit |
19826 | CFI_ENDPROC | 19939 | CFI_ENDPROC |
@@ -19829,7 +19942,7 @@ index c1d01e6..5625dce 100644 | |||
19829 | 19942 | ||
19830 | apicinterrupt HYPERVISOR_CALLBACK_VECTOR \ | 19943 | apicinterrupt HYPERVISOR_CALLBACK_VECTOR \ |
19831 | xen_hvm_callback_vector xen_evtchn_do_upcall | 19944 | xen_hvm_callback_vector xen_evtchn_do_upcall |
19832 | @@ -1498,16 +1880,31 @@ ENTRY(paranoid_exit) | 19945 | @@ -1498,16 +1909,31 @@ ENTRY(paranoid_exit) |
19833 | TRACE_IRQS_OFF_DEBUG | 19946 | TRACE_IRQS_OFF_DEBUG |
19834 | testl %ebx,%ebx /* swapgs needed? */ | 19947 | testl %ebx,%ebx /* swapgs needed? */ |
19835 | jnz paranoid_restore | 19948 | jnz paranoid_restore |
@@ -19862,7 +19975,7 @@ index c1d01e6..5625dce 100644 | |||
19862 | jmp irq_return | 19975 | jmp irq_return |
19863 | paranoid_userspace: | 19976 | paranoid_userspace: |
19864 | GET_THREAD_INFO(%rcx) | 19977 | GET_THREAD_INFO(%rcx) |
19865 | @@ -1536,7 +1933,7 @@ paranoid_schedule: | 19978 | @@ -1536,7 +1962,7 @@ paranoid_schedule: |
19866 | TRACE_IRQS_OFF | 19979 | TRACE_IRQS_OFF |
19867 | jmp paranoid_userspace | 19980 | jmp paranoid_userspace |
19868 | CFI_ENDPROC | 19981 | CFI_ENDPROC |
@@ -19871,7 +19984,7 @@ index c1d01e6..5625dce 100644 | |||
19871 | 19984 | ||
19872 | /* | 19985 | /* |
19873 | * Exception entry point. This expects an error code/orig_rax on the stack. | 19986 | * Exception entry point. This expects an error code/orig_rax on the stack. |
19874 | @@ -1563,12 +1960,13 @@ ENTRY(error_entry) | 19987 | @@ -1563,12 +1989,13 @@ ENTRY(error_entry) |
19875 | movq_cfi r14, R14+8 | 19988 | movq_cfi r14, R14+8 |
19876 | movq_cfi r15, R15+8 | 19989 | movq_cfi r15, R15+8 |
19877 | xorl %ebx,%ebx | 19990 | xorl %ebx,%ebx |
@@ -19886,7 +19999,7 @@ index c1d01e6..5625dce 100644 | |||
19886 | ret | 19999 | ret |
19887 | 20000 | ||
19888 | /* | 20001 | /* |
19889 | @@ -1595,7 +1993,7 @@ bstep_iret: | 20002 | @@ -1595,7 +2022,7 @@ bstep_iret: |
19890 | movq %rcx,RIP+8(%rsp) | 20003 | movq %rcx,RIP+8(%rsp) |
19891 | jmp error_swapgs | 20004 | jmp error_swapgs |
19892 | CFI_ENDPROC | 20005 | CFI_ENDPROC |
@@ -19895,7 +20008,7 @@ index c1d01e6..5625dce 100644 | |||
19895 | 20008 | ||
19896 | 20009 | ||
19897 | /* ebx: no swapgs flag (1: don't need swapgs, 0: need it) */ | 20010 | /* ebx: no swapgs flag (1: don't need swapgs, 0: need it) */ |
19898 | @@ -1615,7 +2013,7 @@ ENTRY(error_exit) | 20011 | @@ -1615,7 +2042,7 @@ ENTRY(error_exit) |
19899 | jnz retint_careful | 20012 | jnz retint_careful |
19900 | jmp retint_swapgs | 20013 | jmp retint_swapgs |
19901 | CFI_ENDPROC | 20014 | CFI_ENDPROC |
@@ -19904,7 +20017,7 @@ index c1d01e6..5625dce 100644 | |||
19904 | 20017 | ||
19905 | /* | 20018 | /* |
19906 | * Test if a given stack is an NMI stack or not. | 20019 | * Test if a given stack is an NMI stack or not. |
19907 | @@ -1673,9 +2071,11 @@ ENTRY(nmi) | 20020 | @@ -1673,9 +2100,11 @@ ENTRY(nmi) |
19908 | * If %cs was not the kernel segment, then the NMI triggered in user | 20021 | * If %cs was not the kernel segment, then the NMI triggered in user |
19909 | * space, which means it is definitely not nested. | 20022 | * space, which means it is definitely not nested. |
19910 | */ | 20023 | */ |
@@ -19917,7 +20030,7 @@ index c1d01e6..5625dce 100644 | |||
19917 | /* | 20030 | /* |
19918 | * Check the special variable on the stack to see if NMIs are | 20031 | * Check the special variable on the stack to see if NMIs are |
19919 | * executing. | 20032 | * executing. |
19920 | @@ -1709,8 +2109,7 @@ nested_nmi: | 20033 | @@ -1709,8 +2138,7 @@ nested_nmi: |
19921 | 20034 | ||
19922 | 1: | 20035 | 1: |
19923 | /* Set up the interrupted NMIs stack to jump to repeat_nmi */ | 20036 | /* Set up the interrupted NMIs stack to jump to repeat_nmi */ |
@@ -19927,51 +20040,40 @@ index c1d01e6..5625dce 100644 | |||
19927 | CFI_ADJUST_CFA_OFFSET 1*8 | 20040 | CFI_ADJUST_CFA_OFFSET 1*8 |
19928 | leaq -10*8(%rsp), %rdx | 20041 | leaq -10*8(%rsp), %rdx |
19929 | pushq_cfi $__KERNEL_DS | 20042 | pushq_cfi $__KERNEL_DS |
19930 | @@ -1728,6 +2127,7 @@ nested_nmi_out: | 20043 | @@ -1728,6 +2156,7 @@ nested_nmi_out: |
19931 | CFI_RESTORE rdx | 20044 | CFI_RESTORE rdx |
19932 | 20045 | ||
19933 | /* No need to check faults here */ | 20046 | /* No need to check faults here */ |
19934 | + pax_force_retaddr_bts | 20047 | +# pax_force_retaddr_bts |
19935 | INTERRUPT_RETURN | 20048 | INTERRUPT_RETURN |
19936 | 20049 | ||
19937 | CFI_RESTORE_STATE | 20050 | CFI_RESTORE_STATE |
19938 | @@ -1844,6 +2244,17 @@ end_repeat_nmi: | 20051 | @@ -1844,6 +2273,8 @@ end_repeat_nmi: |
19939 | */ | 20052 | */ |
19940 | movq %cr2, %r12 | 20053 | movq %cr2, %r12 |
19941 | 20054 | ||
19942 | +#ifdef CONFIG_PAX_MEMORY_UDEREF | 20055 | + pax_enter_kernel_nmi |
19943 | + testb $3, CS(%rsp) | ||
19944 | + jnz 1f | ||
19945 | + pax_enter_kernel | ||
19946 | + jmp 2f | ||
19947 | +1: pax_enter_kernel_user | ||
19948 | +2: | ||
19949 | +#else | ||
19950 | + pax_enter_kernel | ||
19951 | +#endif | ||
19952 | + | 20056 | + |
19953 | /* paranoidentry do_nmi, 0; without TRACE_IRQS_OFF */ | 20057 | /* paranoidentry do_nmi, 0; without TRACE_IRQS_OFF */ |
19954 | movq %rsp,%rdi | 20058 | movq %rsp,%rdi |
19955 | movq $-1,%rsi | 20059 | movq $-1,%rsi |
19956 | @@ -1859,23 +2270,34 @@ end_repeat_nmi: | 20060 | @@ -1856,26 +2287,31 @@ end_repeat_nmi: |
19957 | testl %ebx,%ebx /* swapgs needed? */ | 20061 | movq %r12, %cr2 |
20062 | 1: | ||
20063 | |||
20064 | - testl %ebx,%ebx /* swapgs needed? */ | ||
20065 | + testl $1,%ebx /* swapgs needed? */ | ||
19958 | jnz nmi_restore | 20066 | jnz nmi_restore |
19959 | nmi_swapgs: | 20067 | nmi_swapgs: |
19960 | +#ifdef CONFIG_PAX_MEMORY_UDEREF | ||
19961 | + pax_exit_kernel_user | ||
19962 | +#else | ||
19963 | + pax_exit_kernel | ||
19964 | +#endif | ||
19965 | SWAPGS_UNSAFE_STACK | 20068 | SWAPGS_UNSAFE_STACK |
19966 | + RESTORE_ALL 6*8 | ||
19967 | + /* Clear the NMI executing stack variable */ | ||
19968 | + movq $0, 5*8(%rsp) | ||
19969 | + jmp irq_return | ||
19970 | nmi_restore: | 20069 | nmi_restore: |
19971 | + pax_exit_kernel | 20070 | + pax_exit_kernel_nmi |
19972 | /* Pop the extra iret frame at once */ | 20071 | /* Pop the extra iret frame at once */ |
19973 | RESTORE_ALL 6*8 | 20072 | RESTORE_ALL 6*8 |
20073 | + testb $3, 8(%rsp) | ||
20074 | + jnz 1f | ||
19974 | + pax_force_retaddr_bts | 20075 | + pax_force_retaddr_bts |
20076 | +1: | ||
19975 | 20077 | ||
19976 | /* Clear the NMI executing stack variable */ | 20078 | /* Clear the NMI executing stack variable */ |
19977 | movq $0, 5*8(%rsp) | 20079 | movq $0, 5*8(%rsp) |
@@ -22479,7 +22581,7 @@ index 76fa1e9..abf09ea 100644 | |||
22479 | .shutdown = native_machine_shutdown, | 22581 | .shutdown = native_machine_shutdown, |
22480 | .emergency_restart = native_machine_emergency_restart, | 22582 | .emergency_restart = native_machine_emergency_restart, |
22481 | diff --git a/arch/x86/kernel/relocate_kernel_64.S b/arch/x86/kernel/relocate_kernel_64.S | 22583 | diff --git a/arch/x86/kernel/relocate_kernel_64.S b/arch/x86/kernel/relocate_kernel_64.S |
22482 | index 7a6f3b3..bed145d7 100644 | 22584 | index f2bb9c9..bed145d7 100644 |
22483 | --- a/arch/x86/kernel/relocate_kernel_64.S | 22585 | --- a/arch/x86/kernel/relocate_kernel_64.S |
22484 | +++ b/arch/x86/kernel/relocate_kernel_64.S | 22586 | +++ b/arch/x86/kernel/relocate_kernel_64.S |
22485 | @@ -11,6 +11,7 @@ | 22587 | @@ -11,6 +11,7 @@ |
@@ -22490,15 +22592,7 @@ index 7a6f3b3..bed145d7 100644 | |||
22490 | 22592 | ||
22491 | /* | 22593 | /* |
22492 | * Must be relocatable PIC code callable as a C function | 22594 | * Must be relocatable PIC code callable as a C function |
22493 | @@ -160,13 +161,14 @@ identity_mapped: | 22595 | @@ -167,6 +168,7 @@ identity_mapped: |
22494 | xorq %rbp, %rbp | ||
22495 | xorq %r8, %r8 | ||
22496 | xorq %r9, %r9 | ||
22497 | - xorq %r10, %r9 | ||
22498 | + xorq %r10, %r10 | ||
22499 | xorq %r11, %r11 | ||
22500 | xorq %r12, %r12 | ||
22501 | xorq %r13, %r13 | ||
22502 | xorq %r14, %r14 | 22596 | xorq %r14, %r14 |
22503 | xorq %r15, %r15 | 22597 | xorq %r15, %r15 |
22504 | 22598 | ||
@@ -23547,7 +23641,7 @@ index 3dbdd9c..888b14e 100644 | |||
23547 | goto cannot_handle; | 23641 | goto cannot_handle; |
23548 | if ((segoffs >> 16) == BIOSSEG) | 23642 | if ((segoffs >> 16) == BIOSSEG) |
23549 | diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S | 23643 | diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S |
23550 | index 22a1530..8fbaaad 100644 | 23644 | index 22a1530..5efafbf 100644 |
23551 | --- a/arch/x86/kernel/vmlinux.lds.S | 23645 | --- a/arch/x86/kernel/vmlinux.lds.S |
23552 | +++ b/arch/x86/kernel/vmlinux.lds.S | 23646 | +++ b/arch/x86/kernel/vmlinux.lds.S |
23553 | @@ -26,6 +26,13 @@ | 23647 | @@ -26,6 +26,13 @@ |
@@ -23632,7 +23726,7 @@ index 22a1530..8fbaaad 100644 | |||
23632 | + . = ALIGN(PAGE_SIZE); | 23726 | + . = ALIGN(PAGE_SIZE); |
23633 | + .module.text : AT(ADDR(.module.text) - LOAD_OFFSET) { | 23727 | + .module.text : AT(ADDR(.module.text) - LOAD_OFFSET) { |
23634 | + | 23728 | + |
23635 | +#if defined(CONFIG_PAX_KERNEXEC) && defined(CONFIG_MODULES) | 23729 | +#ifdef CONFIG_PAX_KERNEXEC |
23636 | + MODULES_EXEC_VADDR = .; | 23730 | + MODULES_EXEC_VADDR = .; |
23637 | + BYTE(0) | 23731 | + BYTE(0) |
23638 | + . += (CONFIG_PAX_KERNEXEC_MODULE_TEXT * 1024 * 1024); | 23732 | + . += (CONFIG_PAX_KERNEXEC_MODULE_TEXT * 1024 * 1024); |
@@ -28089,7 +28183,7 @@ index ae1aa71..d9bea75 100644 | |||
28089 | 28183 | ||
28090 | #endif /*HAVE_ARCH_HUGETLB_UNMAPPED_AREA*/ | 28184 | #endif /*HAVE_ARCH_HUGETLB_UNMAPPED_AREA*/ |
28091 | diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c | 28185 | diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c |
28092 | index 59b7fc4..b1dd75f 100644 | 28186 | index 0c13708..689fe7f 100644 |
28093 | --- a/arch/x86/mm/init.c | 28187 | --- a/arch/x86/mm/init.c |
28094 | +++ b/arch/x86/mm/init.c | 28188 | +++ b/arch/x86/mm/init.c |
28095 | @@ -4,6 +4,7 @@ | 28189 | @@ -4,6 +4,7 @@ |
@@ -30397,6 +30491,31 @@ index c77b24a..c979855 100644 | |||
30397 | return !(ret & 0xff00); | 30491 | return !(ret & 0xff00); |
30398 | } | 30492 | } |
30399 | EXPORT_SYMBOL(pcibios_set_irq_routing); | 30493 | EXPORT_SYMBOL(pcibios_set_irq_routing); |
30494 | diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c | ||
30495 | index 90f3a52..714e825 100644 | ||
30496 | --- a/arch/x86/platform/efi/efi.c | ||
30497 | +++ b/arch/x86/platform/efi/efi.c | ||
30498 | @@ -1059,7 +1059,10 @@ efi_status_t efi_query_variable_store(u32 attributes, unsigned long size) | ||
30499 | * that by attempting to use more space than is available. | ||
30500 | */ | ||
30501 | unsigned long dummy_size = remaining_size + 1024; | ||
30502 | - void *dummy = kmalloc(dummy_size, GFP_ATOMIC); | ||
30503 | + void *dummy = kzalloc(dummy_size, GFP_ATOMIC); | ||
30504 | + | ||
30505 | + if (!dummy) | ||
30506 | + return EFI_OUT_OF_RESOURCES; | ||
30507 | |||
30508 | status = efi.set_variable(efi_dummy_name, &EFI_DUMMY_GUID, | ||
30509 | EFI_VARIABLE_NON_VOLATILE | | ||
30510 | @@ -1079,6 +1082,8 @@ efi_status_t efi_query_variable_store(u32 attributes, unsigned long size) | ||
30511 | 0, dummy); | ||
30512 | } | ||
30513 | |||
30514 | + kfree(dummy); | ||
30515 | + | ||
30516 | /* | ||
30517 | * The runtime code may now have triggered a garbage collection | ||
30518 | * run, so check the variable info again | ||
30400 | diff --git a/arch/x86/platform/efi/efi_32.c b/arch/x86/platform/efi/efi_32.c | 30519 | diff --git a/arch/x86/platform/efi/efi_32.c b/arch/x86/platform/efi/efi_32.c |
30401 | index 40e4469..1ab536e 100644 | 30520 | index 40e4469..1ab536e 100644 |
30402 | --- a/arch/x86/platform/efi/efi_32.c | 30521 | --- a/arch/x86/platform/efi/efi_32.c |
@@ -31645,6 +31764,47 @@ index 7c668c8..db3521c 100644 | |||
31645 | if (err) { | 31764 | if (err) { |
31646 | err = -EFAULT; | 31765 | err = -EFAULT; |
31647 | goto out; | 31766 | goto out; |
31767 | diff --git a/block/genhd.c b/block/genhd.c | ||
31768 | index 3c001fb..d15a9e8 100644 | ||
31769 | --- a/block/genhd.c | ||
31770 | +++ b/block/genhd.c | ||
31771 | @@ -467,21 +467,24 @@ static char *bdevt_str(dev_t devt, char *buf) | ||
31772 | |||
31773 | /* | ||
31774 | * Register device numbers dev..(dev+range-1) | ||
31775 | - * range must be nonzero | ||
31776 | + * Noop if @range is zero. | ||
31777 | * The hash chain is sorted on range, so that subranges can override. | ||
31778 | */ | ||
31779 | void blk_register_region(dev_t devt, unsigned long range, struct module *module, | ||
31780 | struct kobject *(*probe)(dev_t, int *, void *), | ||
31781 | int (*lock)(dev_t, void *), void *data) | ||
31782 | { | ||
31783 | - kobj_map(bdev_map, devt, range, module, probe, lock, data); | ||
31784 | + if (range) | ||
31785 | + kobj_map(bdev_map, devt, range, module, probe, lock, data); | ||
31786 | } | ||
31787 | |||
31788 | EXPORT_SYMBOL(blk_register_region); | ||
31789 | |||
31790 | +/* undo blk_register_region(), noop if @range is zero */ | ||
31791 | void blk_unregister_region(dev_t devt, unsigned long range) | ||
31792 | { | ||
31793 | - kobj_unmap(bdev_map, devt, range); | ||
31794 | + if (range) | ||
31795 | + kobj_unmap(bdev_map, devt, range); | ||
31796 | } | ||
31797 | |||
31798 | EXPORT_SYMBOL(blk_unregister_region); | ||
31799 | @@ -512,7 +515,7 @@ static void register_disk(struct gendisk *disk) | ||
31800 | |||
31801 | ddev->parent = disk->driverfs_dev; | ||
31802 | |||
31803 | - dev_set_name(ddev, disk->disk_name); | ||
31804 | + dev_set_name(ddev, "%s", disk->disk_name); | ||
31805 | |||
31806 | /* delay uevents, until we scanned partition table */ | ||
31807 | dev_set_uevent_suppress(ddev, 1); | ||
31648 | diff --git a/block/partitions/efi.c b/block/partitions/efi.c | 31808 | diff --git a/block/partitions/efi.c b/block/partitions/efi.c |
31649 | index ff5804e..a88acad 100644 | 31809 | index ff5804e..a88acad 100644 |
31650 | --- a/block/partitions/efi.c | 31810 | --- a/block/partitions/efi.c |
@@ -31725,6 +31885,19 @@ index 9a87daa..fb17486 100644 | |||
31725 | if (in_len && copy_from_user(buffer, sic->data + cmdlen, in_len)) | 31885 | if (in_len && copy_from_user(buffer, sic->data + cmdlen, in_len)) |
31726 | goto error; | 31886 | goto error; |
31727 | 31887 | ||
31888 | diff --git a/crypto/algapi.c b/crypto/algapi.c | ||
31889 | index 6149a6e..55ed50d 100644 | ||
31890 | --- a/crypto/algapi.c | ||
31891 | +++ b/crypto/algapi.c | ||
31892 | @@ -495,7 +495,7 @@ static struct crypto_template *__crypto_lookup_template(const char *name) | ||
31893 | |||
31894 | struct crypto_template *crypto_lookup_template(const char *name) | ||
31895 | { | ||
31896 | - return try_then_request_module(__crypto_lookup_template(name), name); | ||
31897 | + return try_then_request_module(__crypto_lookup_template(name), "%s", name); | ||
31898 | } | ||
31899 | EXPORT_SYMBOL_GPL(crypto_lookup_template); | ||
31900 | |||
31728 | diff --git a/crypto/cryptd.c b/crypto/cryptd.c | 31901 | diff --git a/crypto/cryptd.c b/crypto/cryptd.c |
31729 | index 7bdd61b..afec999 100644 | 31902 | index 7bdd61b..afec999 100644 |
31730 | --- a/crypto/cryptd.c | 31903 | --- a/crypto/cryptd.c |
@@ -31747,6 +31920,30 @@ index 7bdd61b..afec999 100644 | |||
31747 | 31920 | ||
31748 | static void cryptd_queue_worker(struct work_struct *work); | 31921 | static void cryptd_queue_worker(struct work_struct *work); |
31749 | 31922 | ||
31923 | diff --git a/crypto/pcrypt.c b/crypto/pcrypt.c | ||
31924 | index b2c99dc..476c9fb 100644 | ||
31925 | --- a/crypto/pcrypt.c | ||
31926 | +++ b/crypto/pcrypt.c | ||
31927 | @@ -440,7 +440,7 @@ static int pcrypt_sysfs_add(struct padata_instance *pinst, const char *name) | ||
31928 | int ret; | ||
31929 | |||
31930 | pinst->kobj.kset = pcrypt_kset; | ||
31931 | - ret = kobject_add(&pinst->kobj, NULL, name); | ||
31932 | + ret = kobject_add(&pinst->kobj, NULL, "%s", name); | ||
31933 | if (!ret) | ||
31934 | kobject_uevent(&pinst->kobj, KOBJ_ADD); | ||
31935 | |||
31936 | @@ -455,8 +455,8 @@ static int pcrypt_init_padata(struct padata_pcrypt *pcrypt, | ||
31937 | |||
31938 | get_online_cpus(); | ||
31939 | |||
31940 | - pcrypt->wq = alloc_workqueue(name, | ||
31941 | - WQ_MEM_RECLAIM | WQ_CPU_INTENSIVE, 1); | ||
31942 | + pcrypt->wq = alloc_workqueue("%s", | ||
31943 | + WQ_MEM_RECLAIM | WQ_CPU_INTENSIVE, 1, name); | ||
31944 | if (!pcrypt->wq) | ||
31945 | goto err; | ||
31946 | |||
31750 | diff --git a/drivers/acpi/apei/apei-internal.h b/drivers/acpi/apei/apei-internal.h | 31947 | diff --git a/drivers/acpi/apei/apei-internal.h b/drivers/acpi/apei/apei-internal.h |
31751 | index f220d64..d359ad6 100644 | 31948 | index f220d64..d359ad6 100644 |
31752 | --- a/drivers/acpi/apei/apei-internal.h | 31949 | --- a/drivers/acpi/apei/apei-internal.h |
@@ -32969,6 +33166,19 @@ index 969c3c2..9b72956 100644 | |||
32969 | wake_up(&zatm_vcc->tx_wait); | 33166 | wake_up(&zatm_vcc->tx_wait); |
32970 | } | 33167 | } |
32971 | 33168 | ||
33169 | diff --git a/drivers/base/attribute_container.c b/drivers/base/attribute_container.c | ||
33170 | index d78b204..ecc1929 100644 | ||
33171 | --- a/drivers/base/attribute_container.c | ||
33172 | +++ b/drivers/base/attribute_container.c | ||
33173 | @@ -167,7 +167,7 @@ attribute_container_add_device(struct device *dev, | ||
33174 | ic->classdev.parent = get_device(dev); | ||
33175 | ic->classdev.class = cont->class; | ||
33176 | cont->class->dev_release = attribute_container_release; | ||
33177 | - dev_set_name(&ic->classdev, dev_name(dev)); | ||
33178 | + dev_set_name(&ic->classdev, "%s", dev_name(dev)); | ||
33179 | if (fn) | ||
33180 | fn(cont, dev, &ic->classdev); | ||
33181 | else | ||
32972 | diff --git a/drivers/base/bus.c b/drivers/base/bus.c | 33182 | diff --git a/drivers/base/bus.c b/drivers/base/bus.c |
32973 | index 519865b..e540db3 100644 | 33183 | index 519865b..e540db3 100644 |
32974 | --- a/drivers/base/bus.c | 33184 | --- a/drivers/base/bus.c |
@@ -33054,6 +33264,19 @@ index 9a6b05a..2fc8fb9 100644 | |||
33054 | int ret = 0; | 33264 | int ret = 0; |
33055 | 33265 | ||
33056 | if (IS_ERR_OR_NULL(genpd)) | 33266 | if (IS_ERR_OR_NULL(genpd)) |
33267 | diff --git a/drivers/base/power/sysfs.c b/drivers/base/power/sysfs.c | ||
33268 | index a53ebd2..8f73eeb 100644 | ||
33269 | --- a/drivers/base/power/sysfs.c | ||
33270 | +++ b/drivers/base/power/sysfs.c | ||
33271 | @@ -185,7 +185,7 @@ static ssize_t rtpm_status_show(struct device *dev, | ||
33272 | return -EIO; | ||
33273 | } | ||
33274 | } | ||
33275 | - return sprintf(buf, p); | ||
33276 | + return sprintf(buf, "%s", p); | ||
33277 | } | ||
33278 | |||
33279 | static DEVICE_ATTR(runtime_status, 0444, rtpm_status_show, NULL); | ||
33057 | diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c | 33280 | diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c |
33058 | index 79715e7..df06b3b 100644 | 33281 | index 79715e7..df06b3b 100644 |
33059 | --- a/drivers/base/power/wakeup.c | 33282 | --- a/drivers/base/power/wakeup.c |
@@ -33116,10 +33339,10 @@ index e8d11b6..7b1b36f 100644 | |||
33116 | } | 33339 | } |
33117 | EXPORT_SYMBOL_GPL(unregister_syscore_ops); | 33340 | EXPORT_SYMBOL_GPL(unregister_syscore_ops); |
33118 | diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c | 33341 | diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c |
33119 | index 1c1b8e5..b7fc681 100644 | 33342 | index dadea48..a1f3835 100644 |
33120 | --- a/drivers/block/cciss.c | 33343 | --- a/drivers/block/cciss.c |
33121 | +++ b/drivers/block/cciss.c | 33344 | +++ b/drivers/block/cciss.c |
33122 | @@ -1196,6 +1196,8 @@ static int cciss_ioctl32_passthru(struct block_device *bdev, fmode_t mode, | 33345 | @@ -1184,6 +1184,8 @@ static int cciss_ioctl32_passthru(struct block_device *bdev, fmode_t mode, |
33123 | int err; | 33346 | int err; |
33124 | u32 cp; | 33347 | u32 cp; |
33125 | 33348 | ||
@@ -33572,6 +33795,19 @@ index dfe7583..83768bb 100644 | |||
33572 | set_fs(old_fs); | 33795 | set_fs(old_fs); |
33573 | if (likely(bw == len)) | 33796 | if (likely(bw == len)) |
33574 | return 0; | 33797 | return 0; |
33798 | diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c | ||
33799 | index 7fecc78..84d217c 100644 | ||
33800 | --- a/drivers/block/nbd.c | ||
33801 | +++ b/drivers/block/nbd.c | ||
33802 | @@ -714,7 +714,7 @@ static int __nbd_ioctl(struct block_device *bdev, struct nbd_device *nbd, | ||
33803 | else | ||
33804 | blk_queue_flush(nbd->disk->queue, 0); | ||
33805 | |||
33806 | - thread = kthread_create(nbd_thread, nbd, nbd->disk->disk_name); | ||
33807 | + thread = kthread_create(nbd_thread, nbd, "%s", nbd->disk->disk_name); | ||
33808 | if (IS_ERR(thread)) { | ||
33809 | mutex_lock(&nbd->tx_lock); | ||
33810 | return PTR_ERR(thread); | ||
33575 | diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c | 33811 | diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c |
33576 | index 2e7de7a..ed86dc0 100644 | 33812 | index 2e7de7a..ed86dc0 100644 |
33577 | --- a/drivers/block/pktcdvd.c | 33813 | --- a/drivers/block/pktcdvd.c |
@@ -33586,7 +33822,7 @@ index 2e7de7a..ed86dc0 100644 | |||
33586 | static DEFINE_MUTEX(pktcdvd_mutex); | 33822 | static DEFINE_MUTEX(pktcdvd_mutex); |
33587 | static struct pktcdvd_device *pkt_devs[MAX_WRITERS]; | 33823 | static struct pktcdvd_device *pkt_devs[MAX_WRITERS]; |
33588 | diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c | 33824 | diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c |
33589 | index d620b44..e9abc80 100644 | 33825 | index d620b44..d7538c2 100644 |
33590 | --- a/drivers/cdrom/cdrom.c | 33826 | --- a/drivers/cdrom/cdrom.c |
33591 | +++ b/drivers/cdrom/cdrom.c | 33827 | +++ b/drivers/cdrom/cdrom.c |
33592 | @@ -416,7 +416,6 @@ int register_cdrom(struct cdrom_device_info *cdi) | 33828 | @@ -416,7 +416,6 @@ int register_cdrom(struct cdrom_device_info *cdi) |
@@ -33637,6 +33873,15 @@ index d620b44..e9abc80 100644 | |||
33637 | if (cgc->buffer == NULL) | 33873 | if (cgc->buffer == NULL) |
33638 | return -ENOMEM; | 33874 | return -ENOMEM; |
33639 | 33875 | ||
33876 | @@ -3429,7 +3430,7 @@ static int cdrom_print_info(const char *header, int val, char *info, | ||
33877 | struct cdrom_device_info *cdi; | ||
33878 | int ret; | ||
33879 | |||
33880 | - ret = scnprintf(info + *pos, max_size - *pos, header); | ||
33881 | + ret = scnprintf(info + *pos, max_size - *pos, "%s", header); | ||
33882 | if (!ret) | ||
33883 | return 1; | ||
33884 | |||
33640 | diff --git a/drivers/cdrom/gdrom.c b/drivers/cdrom/gdrom.c | 33885 | diff --git a/drivers/cdrom/gdrom.c b/drivers/cdrom/gdrom.c |
33641 | index d59cdcb..11afddf 100644 | 33886 | index d59cdcb..11afddf 100644 |
33642 | --- a/drivers/cdrom/gdrom.c | 33887 | --- a/drivers/cdrom/gdrom.c |
@@ -33731,6 +33976,19 @@ index d784650..e8bfd69 100644 | |||
33731 | struct hpet_info *info) | 33976 | struct hpet_info *info) |
33732 | { | 33977 | { |
33733 | struct hpet_timer __iomem *timer; | 33978 | struct hpet_timer __iomem *timer; |
33979 | diff --git a/drivers/char/hw_random/intel-rng.c b/drivers/char/hw_random/intel-rng.c | ||
33980 | index 86fe45c..c0ea948 100644 | ||
33981 | --- a/drivers/char/hw_random/intel-rng.c | ||
33982 | +++ b/drivers/char/hw_random/intel-rng.c | ||
33983 | @@ -314,7 +314,7 @@ PFX "RNG, try using the 'no_fwh_detect' option.\n"; | ||
33984 | |||
33985 | if (no_fwh_detect) | ||
33986 | return -ENODEV; | ||
33987 | - printk(warning); | ||
33988 | + printk("%s", warning); | ||
33989 | return -EBUSY; | ||
33990 | } | ||
33991 | |||
33734 | diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c | 33992 | diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c |
33735 | index 053201b0..8335cce 100644 | 33993 | index 053201b0..8335cce 100644 |
33736 | --- a/drivers/char/ipmi/ipmi_msghandler.c | 33994 | --- a/drivers/char/ipmi/ipmi_msghandler.c |
@@ -33800,7 +34058,7 @@ index 0ac9b45..6179fb5 100644 | |||
33800 | new_smi->interrupt_disabled = 1; | 34058 | new_smi->interrupt_disabled = 1; |
33801 | atomic_set(&new_smi->stop_operation, 0); | 34059 | atomic_set(&new_smi->stop_operation, 0); |
33802 | diff --git a/drivers/char/mem.c b/drivers/char/mem.c | 34060 | diff --git a/drivers/char/mem.c b/drivers/char/mem.c |
33803 | index 2c644af..d4d7f17 100644 | 34061 | index 2c644af..4b7aede 100644 |
33804 | --- a/drivers/char/mem.c | 34062 | --- a/drivers/char/mem.c |
33805 | +++ b/drivers/char/mem.c | 34063 | +++ b/drivers/char/mem.c |
33806 | @@ -18,6 +18,7 @@ | 34064 | @@ -18,6 +18,7 @@ |
@@ -33944,6 +34202,15 @@ index 2c644af..d4d7f17 100644 | |||
33944 | }; | 34202 | }; |
33945 | 34203 | ||
33946 | static int memory_open(struct inode *inode, struct file *filp) | 34204 | static int memory_open(struct inode *inode, struct file *filp) |
34205 | @@ -904,7 +954,7 @@ static int __init chr_dev_init(void) | ||
34206 | continue; | ||
34207 | |||
34208 | device_create(mem_class, NULL, MKDEV(MEM_MAJOR, minor), | ||
34209 | - NULL, devlist[minor].name); | ||
34210 | + NULL, "%s", devlist[minor].name); | ||
34211 | } | ||
34212 | |||
34213 | return tty_init(); | ||
33947 | diff --git a/drivers/char/mwave/tp3780i.c b/drivers/char/mwave/tp3780i.c | 34214 | diff --git a/drivers/char/mwave/tp3780i.c b/drivers/char/mwave/tp3780i.c |
33948 | index c689697..04e6d6a2 100644 | 34215 | index c689697..04e6d6a2 100644 |
33949 | --- a/drivers/char/mwave/tp3780i.c | 34216 | --- a/drivers/char/mwave/tp3780i.c |
@@ -34477,9 +34744,18 @@ index 428754a..8bdf9cc 100644 | |||
34477 | .name = "cpuidle", | 34744 | .name = "cpuidle", |
34478 | }; | 34745 | }; |
34479 | diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c | 34746 | diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c |
34480 | index 3b36797..289c16a 100644 | 34747 | index 3b36797..db0b0c0 100644 |
34481 | --- a/drivers/devfreq/devfreq.c | 34748 | --- a/drivers/devfreq/devfreq.c |
34482 | +++ b/drivers/devfreq/devfreq.c | 34749 | +++ b/drivers/devfreq/devfreq.c |
34750 | @@ -477,7 +477,7 @@ struct devfreq *devfreq_add_device(struct device *dev, | ||
34751 | GFP_KERNEL); | ||
34752 | devfreq->last_stat_updated = jiffies; | ||
34753 | |||
34754 | - dev_set_name(&devfreq->dev, dev_name(dev)); | ||
34755 | + dev_set_name(&devfreq->dev, "%s", dev_name(dev)); | ||
34756 | err = device_register(&devfreq->dev); | ||
34757 | if (err) { | ||
34758 | put_device(&devfreq->dev); | ||
34483 | @@ -588,7 +588,7 @@ int devfreq_add_governor(struct devfreq_governor *governor) | 34759 | @@ -588,7 +588,7 @@ int devfreq_add_governor(struct devfreq_governor *governor) |
34484 | goto err_out; | 34760 | goto err_out; |
34485 | } | 34761 | } |
@@ -34863,6 +35139,28 @@ index 25f91cd..a376f55 100644 | |||
34863 | ++file_priv->ioctl_count; | 35139 | ++file_priv->ioctl_count; |
34864 | 35140 | ||
34865 | DRM_DEBUG("pid=%d, cmd=0x%02x, nr=0x%02x, dev 0x%lx, auth=%d\n", | 35141 | DRM_DEBUG("pid=%d, cmd=0x%02x, nr=0x%02x, dev 0x%lx, auth=%d\n", |
35142 | diff --git a/drivers/gpu/drm/drm_encoder_slave.c b/drivers/gpu/drm/drm_encoder_slave.c | ||
35143 | index 48c52f7..0cfb60f 100644 | ||
35144 | --- a/drivers/gpu/drm/drm_encoder_slave.c | ||
35145 | +++ b/drivers/gpu/drm/drm_encoder_slave.c | ||
35146 | @@ -54,16 +54,12 @@ int drm_i2c_encoder_init(struct drm_device *dev, | ||
35147 | struct i2c_adapter *adap, | ||
35148 | const struct i2c_board_info *info) | ||
35149 | { | ||
35150 | - char modalias[sizeof(I2C_MODULE_PREFIX) | ||
35151 | - + I2C_NAME_SIZE]; | ||
35152 | struct module *module = NULL; | ||
35153 | struct i2c_client *client; | ||
35154 | struct drm_i2c_encoder_driver *encoder_drv; | ||
35155 | int err = 0; | ||
35156 | |||
35157 | - snprintf(modalias, sizeof(modalias), | ||
35158 | - "%s%s", I2C_MODULE_PREFIX, info->type); | ||
35159 | - request_module(modalias); | ||
35160 | + request_module("%s%s", I2C_MODULE_PREFIX, info->type); | ||
35161 | |||
35162 | client = i2c_new_device(adap, info); | ||
35163 | if (!client) { | ||
34866 | diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c | 35164 | diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c |
34867 | index 429e07d..e681a2c 100644 | 35165 | index 429e07d..e681a2c 100644 |
34868 | --- a/drivers/gpu/drm/drm_fops.c | 35166 | --- a/drivers/gpu/drm/drm_fops.c |
@@ -35141,6 +35439,19 @@ index 7d30802..42c6cbb 100644 | |||
35141 | drm_put_dev(dev); | 35439 | drm_put_dev(dev); |
35142 | } | 35440 | } |
35143 | mutex_unlock(&drm_global_mutex); | 35441 | mutex_unlock(&drm_global_mutex); |
35442 | diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c | ||
35443 | index 0229665..f61329c 100644 | ||
35444 | --- a/drivers/gpu/drm/drm_sysfs.c | ||
35445 | +++ b/drivers/gpu/drm/drm_sysfs.c | ||
35446 | @@ -499,7 +499,7 @@ EXPORT_SYMBOL(drm_sysfs_hotplug_event); | ||
35447 | int drm_sysfs_device_add(struct drm_minor *minor) | ||
35448 | { | ||
35449 | int err; | ||
35450 | - char *minor_str; | ||
35451 | + const char *minor_str; | ||
35452 | |||
35453 | minor->kdev.parent = minor->dev->dev; | ||
35454 | |||
35144 | diff --git a/drivers/gpu/drm/i810/i810_dma.c b/drivers/gpu/drm/i810/i810_dma.c | 35455 | diff --git a/drivers/gpu/drm/i810/i810_dma.c b/drivers/gpu/drm/i810/i810_dma.c |
35145 | index 004ecdf..db1f6e0 100644 | 35456 | index 004ecdf..db1f6e0 100644 |
35146 | --- a/drivers/gpu/drm/i810/i810_dma.c | 35457 | --- a/drivers/gpu/drm/i810/i810_dma.c |
@@ -35943,6 +36254,28 @@ index fad6633..4ff94de 100644 | |||
35943 | } else { | 36254 | } else { |
35944 | if (rdev->pm.max_bandwidth.full > rdev->pm.k8_bandwidth.full && | 36255 | if (rdev->pm.max_bandwidth.full > rdev->pm.k8_bandwidth.full && |
35945 | rdev->pm.k8_bandwidth.full) | 36256 | rdev->pm.k8_bandwidth.full) |
36257 | diff --git a/drivers/gpu/drm/ttm/ttm_memory.c b/drivers/gpu/drm/ttm/ttm_memory.c | ||
36258 | index dbc2def..0a9f710 100644 | ||
36259 | --- a/drivers/gpu/drm/ttm/ttm_memory.c | ||
36260 | +++ b/drivers/gpu/drm/ttm/ttm_memory.c | ||
36261 | @@ -264,7 +264,7 @@ static int ttm_mem_init_kernel_zone(struct ttm_mem_global *glob, | ||
36262 | zone->glob = glob; | ||
36263 | glob->zone_kernel = zone; | ||
36264 | ret = kobject_init_and_add( | ||
36265 | - &zone->kobj, &ttm_mem_zone_kobj_type, &glob->kobj, zone->name); | ||
36266 | + &zone->kobj, &ttm_mem_zone_kobj_type, &glob->kobj, "%s", zone->name); | ||
36267 | if (unlikely(ret != 0)) { | ||
36268 | kobject_put(&zone->kobj); | ||
36269 | return ret; | ||
36270 | @@ -347,7 +347,7 @@ static int ttm_mem_init_dma32_zone(struct ttm_mem_global *glob, | ||
36271 | zone->glob = glob; | ||
36272 | glob->zone_dma32 = zone; | ||
36273 | ret = kobject_init_and_add( | ||
36274 | - &zone->kobj, &ttm_mem_zone_kobj_type, &glob->kobj, zone->name); | ||
36275 | + &zone->kobj, &ttm_mem_zone_kobj_type, &glob->kobj, "%s", zone->name); | ||
36276 | if (unlikely(ret != 0)) { | ||
36277 | kobject_put(&zone->kobj); | ||
36278 | return ret; | ||
35946 | diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c | 36279 | diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c |
35947 | index bd2a3b4..122d9ad 100644 | 36280 | index bd2a3b4..122d9ad 100644 |
35948 | --- a/drivers/gpu/drm/ttm/ttm_page_alloc.c | 36281 | --- a/drivers/gpu/drm/ttm/ttm_page_alloc.c |
@@ -37418,9 +37751,18 @@ index b972d43..8943713 100644 | |||
37418 | 37751 | ||
37419 | /** | 37752 | /** |
37420 | diff --git a/drivers/iommu/irq_remapping.c b/drivers/iommu/irq_remapping.c | 37753 | diff --git a/drivers/iommu/irq_remapping.c b/drivers/iommu/irq_remapping.c |
37421 | index 7c11ff3..5b2d7a7 100644 | 37754 | index 7c11ff3..a2a0457 100644 |
37422 | --- a/drivers/iommu/irq_remapping.c | 37755 | --- a/drivers/iommu/irq_remapping.c |
37423 | +++ b/drivers/iommu/irq_remapping.c | 37756 | +++ b/drivers/iommu/irq_remapping.c |
37757 | @@ -348,7 +348,7 @@ int setup_hpet_msi_remapped(unsigned int irq, unsigned int id) | ||
37758 | void panic_if_irq_remap(const char *msg) | ||
37759 | { | ||
37760 | if (irq_remapping_enabled) | ||
37761 | - panic(msg); | ||
37762 | + panic("%s", msg); | ||
37763 | } | ||
37764 | |||
37765 | static void ir_ack_apic_edge(struct irq_data *data) | ||
37424 | @@ -369,10 +369,12 @@ static void ir_print_prefix(struct irq_data *data, struct seq_file *p) | 37766 | @@ -369,10 +369,12 @@ static void ir_print_prefix(struct irq_data *data, struct seq_file *p) |
37425 | 37767 | ||
37426 | void irq_remap_modify_chip_defaults(struct irq_chip *chip) | 37768 | void irq_remap_modify_chip_defaults(struct irq_chip *chip) |
@@ -38225,10 +38567,10 @@ index 1cbfc6b..56e1dbb 100644 | |||
38225 | /*----------------------------------------------------------------*/ | 38567 | /*----------------------------------------------------------------*/ |
38226 | 38568 | ||
38227 | diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c | 38569 | diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c |
38228 | index 6af167f..40c25a1 100644 | 38570 | index 7116798..c81390c 100644 |
38229 | --- a/drivers/md/raid1.c | 38571 | --- a/drivers/md/raid1.c |
38230 | +++ b/drivers/md/raid1.c | 38572 | +++ b/drivers/md/raid1.c |
38231 | @@ -1826,7 +1826,7 @@ static int fix_sync_read_error(struct r1bio *r1_bio) | 38573 | @@ -1836,7 +1836,7 @@ static int fix_sync_read_error(struct r1bio *r1_bio) |
38232 | if (r1_sync_page_io(rdev, sect, s, | 38574 | if (r1_sync_page_io(rdev, sect, s, |
38233 | bio->bi_io_vec[idx].bv_page, | 38575 | bio->bi_io_vec[idx].bv_page, |
38234 | READ) != 0) | 38576 | READ) != 0) |
@@ -38237,7 +38579,7 @@ index 6af167f..40c25a1 100644 | |||
38237 | } | 38579 | } |
38238 | sectors -= s; | 38580 | sectors -= s; |
38239 | sect += s; | 38581 | sect += s; |
38240 | @@ -2048,7 +2048,7 @@ static void fix_read_error(struct r1conf *conf, int read_disk, | 38582 | @@ -2058,7 +2058,7 @@ static void fix_read_error(struct r1conf *conf, int read_disk, |
38241 | test_bit(In_sync, &rdev->flags)) { | 38583 | test_bit(In_sync, &rdev->flags)) { |
38242 | if (r1_sync_page_io(rdev, sect, s, | 38584 | if (r1_sync_page_io(rdev, sect, s, |
38243 | conf->tmppage, READ)) { | 38585 | conf->tmppage, READ)) { |
@@ -38247,10 +38589,10 @@ index 6af167f..40c25a1 100644 | |||
38247 | "md/raid1:%s: read error corrected " | 38589 | "md/raid1:%s: read error corrected " |
38248 | "(%d sectors at %llu on %s)\n", | 38590 | "(%d sectors at %llu on %s)\n", |
38249 | diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c | 38591 | diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c |
38250 | index 46c14e5..4db5966 100644 | 38592 | index e4ea992..d234520 100644 |
38251 | --- a/drivers/md/raid10.c | 38593 | --- a/drivers/md/raid10.c |
38252 | +++ b/drivers/md/raid10.c | 38594 | +++ b/drivers/md/raid10.c |
38253 | @@ -1932,7 +1932,7 @@ static void end_sync_read(struct bio *bio, int error) | 38595 | @@ -1942,7 +1942,7 @@ static void end_sync_read(struct bio *bio, int error) |
38254 | /* The write handler will notice the lack of | 38596 | /* The write handler will notice the lack of |
38255 | * R10BIO_Uptodate and record any errors etc | 38597 | * R10BIO_Uptodate and record any errors etc |
38256 | */ | 38598 | */ |
@@ -38259,7 +38601,7 @@ index 46c14e5..4db5966 100644 | |||
38259 | &conf->mirrors[d].rdev->corrected_errors); | 38601 | &conf->mirrors[d].rdev->corrected_errors); |
38260 | 38602 | ||
38261 | /* for reconstruct, we always reschedule after a read. | 38603 | /* for reconstruct, we always reschedule after a read. |
38262 | @@ -2281,7 +2281,7 @@ static void check_decay_read_errors(struct mddev *mddev, struct md_rdev *rdev) | 38604 | @@ -2291,7 +2291,7 @@ static void check_decay_read_errors(struct mddev *mddev, struct md_rdev *rdev) |
38263 | { | 38605 | { |
38264 | struct timespec cur_time_mon; | 38606 | struct timespec cur_time_mon; |
38265 | unsigned long hours_since_last; | 38607 | unsigned long hours_since_last; |
@@ -38268,7 +38610,7 @@ index 46c14e5..4db5966 100644 | |||
38268 | 38610 | ||
38269 | ktime_get_ts(&cur_time_mon); | 38611 | ktime_get_ts(&cur_time_mon); |
38270 | 38612 | ||
38271 | @@ -2303,9 +2303,9 @@ static void check_decay_read_errors(struct mddev *mddev, struct md_rdev *rdev) | 38613 | @@ -2313,9 +2313,9 @@ static void check_decay_read_errors(struct mddev *mddev, struct md_rdev *rdev) |
38272 | * overflowing the shift of read_errors by hours_since_last. | 38614 | * overflowing the shift of read_errors by hours_since_last. |
38273 | */ | 38615 | */ |
38274 | if (hours_since_last >= 8 * sizeof(read_errors)) | 38616 | if (hours_since_last >= 8 * sizeof(read_errors)) |
@@ -38280,7 +38622,7 @@ index 46c14e5..4db5966 100644 | |||
38280 | } | 38622 | } |
38281 | 38623 | ||
38282 | static int r10_sync_page_io(struct md_rdev *rdev, sector_t sector, | 38624 | static int r10_sync_page_io(struct md_rdev *rdev, sector_t sector, |
38283 | @@ -2359,8 +2359,8 @@ static void fix_read_error(struct r10conf *conf, struct mddev *mddev, struct r10 | 38625 | @@ -2369,8 +2369,8 @@ static void fix_read_error(struct r10conf *conf, struct mddev *mddev, struct r10 |
38284 | return; | 38626 | return; |
38285 | 38627 | ||
38286 | check_decay_read_errors(mddev, rdev); | 38628 | check_decay_read_errors(mddev, rdev); |
@@ -38291,7 +38633,7 @@ index 46c14e5..4db5966 100644 | |||
38291 | char b[BDEVNAME_SIZE]; | 38633 | char b[BDEVNAME_SIZE]; |
38292 | bdevname(rdev->bdev, b); | 38634 | bdevname(rdev->bdev, b); |
38293 | 38635 | ||
38294 | @@ -2368,7 +2368,7 @@ static void fix_read_error(struct r10conf *conf, struct mddev *mddev, struct r10 | 38636 | @@ -2378,7 +2378,7 @@ static void fix_read_error(struct r10conf *conf, struct mddev *mddev, struct r10 |
38295 | "md/raid10:%s: %s: Raid device exceeded " | 38637 | "md/raid10:%s: %s: Raid device exceeded " |
38296 | "read_error threshold [cur %d:max %d]\n", | 38638 | "read_error threshold [cur %d:max %d]\n", |
38297 | mdname(mddev), b, | 38639 | mdname(mddev), b, |
@@ -38300,7 +38642,7 @@ index 46c14e5..4db5966 100644 | |||
38300 | printk(KERN_NOTICE | 38642 | printk(KERN_NOTICE |
38301 | "md/raid10:%s: %s: Failing raid device\n", | 38643 | "md/raid10:%s: %s: Failing raid device\n", |
38302 | mdname(mddev), b); | 38644 | mdname(mddev), b); |
38303 | @@ -2523,7 +2523,7 @@ static void fix_read_error(struct r10conf *conf, struct mddev *mddev, struct r10 | 38645 | @@ -2533,7 +2533,7 @@ static void fix_read_error(struct r10conf *conf, struct mddev *mddev, struct r10 |
38304 | sect + | 38646 | sect + |
38305 | choose_data_offset(r10_bio, rdev)), | 38647 | choose_data_offset(r10_bio, rdev)), |
38306 | bdevname(rdev->bdev, b)); | 38648 | bdevname(rdev->bdev, b)); |
@@ -38310,7 +38652,7 @@ index 46c14e5..4db5966 100644 | |||
38310 | 38652 | ||
38311 | rdev_dec_pending(rdev, mddev); | 38653 | rdev_dec_pending(rdev, mddev); |
38312 | diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c | 38654 | diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c |
38313 | index f4e87bf..0d4ad3f 100644 | 38655 | index 251ab64..ed23a18 100644 |
38314 | --- a/drivers/md/raid5.c | 38656 | --- a/drivers/md/raid5.c |
38315 | +++ b/drivers/md/raid5.c | 38657 | +++ b/drivers/md/raid5.c |
38316 | @@ -1763,21 +1763,21 @@ static void raid5_end_read_request(struct bio * bi, int error) | 38658 | @@ -1763,21 +1763,21 @@ static void raid5_end_read_request(struct bio * bi, int error) |
@@ -40387,19 +40729,6 @@ index 784e81c..349e01e 100644 | |||
40387 | 40729 | ||
40388 | struct ath_nf_limits { | 40730 | struct ath_nf_limits { |
40389 | s16 max; | 40731 | s16 max; |
40390 | diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c | ||
40391 | index 64b637a..911c4c0 100644 | ||
40392 | --- a/drivers/net/wireless/b43/main.c | ||
40393 | +++ b/drivers/net/wireless/b43/main.c | ||
40394 | @@ -2451,7 +2451,7 @@ static void b43_request_firmware(struct work_struct *work) | ||
40395 | for (i = 0; i < B43_NR_FWTYPES; i++) { | ||
40396 | errmsg = ctx->errors[i]; | ||
40397 | if (strlen(errmsg)) | ||
40398 | - b43err(dev->wl, errmsg); | ||
40399 | + b43err(dev->wl, "%s", errmsg); | ||
40400 | } | ||
40401 | b43_print_fw_helptext(dev->wl, 1); | ||
40402 | goto out; | ||
40403 | diff --git a/drivers/net/wireless/iwlegacy/3945-mac.c b/drivers/net/wireless/iwlegacy/3945-mac.c | 40732 | diff --git a/drivers/net/wireless/iwlegacy/3945-mac.c b/drivers/net/wireless/iwlegacy/3945-mac.c |
40404 | index c353b5f..62aaca2 100644 | 40733 | index c353b5f..62aaca2 100644 |
40405 | --- a/drivers/net/wireless/iwlegacy/3945-mac.c | 40734 | --- a/drivers/net/wireless/iwlegacy/3945-mac.c |
@@ -47528,6 +47857,19 @@ index ff22871..b129bed 100644 | |||
47528 | 47857 | ||
47529 | info->var.accel_flags = (!noaccel); | 47858 | info->var.accel_flags = (!noaccel); |
47530 | 47859 | ||
47860 | diff --git a/drivers/video/output.c b/drivers/video/output.c | ||
47861 | index 0d6f2cd..6285b97 100644 | ||
47862 | --- a/drivers/video/output.c | ||
47863 | +++ b/drivers/video/output.c | ||
47864 | @@ -97,7 +97,7 @@ struct output_device *video_output_register(const char *name, | ||
47865 | new_dev->props = op; | ||
47866 | new_dev->dev.class = &video_output_class; | ||
47867 | new_dev->dev.parent = dev; | ||
47868 | - dev_set_name(&new_dev->dev, name); | ||
47869 | + dev_set_name(&new_dev->dev, "%s", name); | ||
47870 | dev_set_drvdata(&new_dev->dev, devdata); | ||
47871 | ret_code = device_register(&new_dev->dev); | ||
47872 | if (ret_code) { | ||
47531 | diff --git a/drivers/video/s1d13xxxfb.c b/drivers/video/s1d13xxxfb.c | 47873 | diff --git a/drivers/video/s1d13xxxfb.c b/drivers/video/s1d13xxxfb.c |
47532 | index 76d9053..dec2bfd 100644 | 47874 | index 76d9053..dec2bfd 100644 |
47533 | --- a/drivers/video/s1d13xxxfb.c | 47875 | --- a/drivers/video/s1d13xxxfb.c |
@@ -51224,6 +51566,19 @@ index f3190ab..84ffb21 100644 | |||
51224 | trace_ext4_mballoc_discard(sb, NULL, group, bit, pa->pa_len); | 51566 | trace_ext4_mballoc_discard(sb, NULL, group, bit, pa->pa_len); |
51225 | 51567 | ||
51226 | return 0; | 51568 | return 0; |
51569 | diff --git a/fs/ext4/mmp.c b/fs/ext4/mmp.c | ||
51570 | index b3b1f7d..cff51d5 100644 | ||
51571 | --- a/fs/ext4/mmp.c | ||
51572 | +++ b/fs/ext4/mmp.c | ||
51573 | @@ -113,7 +113,7 @@ static int read_mmp_block(struct super_block *sb, struct buffer_head **bh, | ||
51574 | void __dump_mmp_msg(struct super_block *sb, struct mmp_struct *mmp, | ||
51575 | const char *function, unsigned int line, const char *msg) | ||
51576 | { | ||
51577 | - __ext4_warning(sb, function, line, msg); | ||
51578 | + __ext4_warning(sb, function, line, "%s", msg); | ||
51579 | __ext4_warning(sb, function, line, | ||
51580 | "MMP failure info: last update time: %llu, last update " | ||
51581 | "node: %s, last update device: %s\n", | ||
51227 | diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c | 51582 | diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c |
51228 | index 3beae6a..8cc5637 100644 | 51583 | index 3beae6a..8cc5637 100644 |
51229 | --- a/fs/ext4/resize.c | 51584 | --- a/fs/ext4/resize.c |
@@ -51264,9 +51619,18 @@ index 3beae6a..8cc5637 100644 | |||
51264 | else if (input->reserved_blocks > input->blocks_count / 5) | 51619 | else if (input->reserved_blocks > input->blocks_count / 5) |
51265 | ext4_warning(sb, "Reserved blocks too high (%u)", | 51620 | ext4_warning(sb, "Reserved blocks too high (%u)", |
51266 | diff --git a/fs/ext4/super.c b/fs/ext4/super.c | 51621 | diff --git a/fs/ext4/super.c b/fs/ext4/super.c |
51267 | index febbe0e..782c4fd 100644 | 51622 | index febbe0e..d0cdc02 100644 |
51268 | --- a/fs/ext4/super.c | 51623 | --- a/fs/ext4/super.c |
51269 | +++ b/fs/ext4/super.c | 51624 | +++ b/fs/ext4/super.c |
51625 | @@ -1238,7 +1238,7 @@ static ext4_fsblk_t get_sb_block(void **data) | ||
51626 | } | ||
51627 | |||
51628 | #define DEFAULT_JOURNAL_IOPRIO (IOPRIO_PRIO_VALUE(IOPRIO_CLASS_BE, 3)) | ||
51629 | -static char deprecated_msg[] = "Mount option \"%s\" will be removed by %s\n" | ||
51630 | +static const char deprecated_msg[] = "Mount option \"%s\" will be removed by %s\n" | ||
51631 | "Contact linux-ext4@vger.kernel.org if you think we should keep it.\n"; | ||
51632 | |||
51633 | #ifdef CONFIG_QUOTA | ||
51270 | @@ -2380,7 +2380,7 @@ struct ext4_attr { | 51634 | @@ -2380,7 +2380,7 @@ struct ext4_attr { |
51271 | ssize_t (*store)(struct ext4_attr *, struct ext4_sb_info *, | 51635 | ssize_t (*store)(struct ext4_attr *, struct ext4_sb_info *, |
51272 | const char *, size_t); | 51636 | const char *, size_t); |
@@ -53103,6 +53467,19 @@ index 9760ecb..9b838ef 100644 | |||
53103 | 53467 | ||
53104 | memcpy(c->data, &cookie, 4); | 53468 | memcpy(c->data, &cookie, 4); |
53105 | c->len=4; | 53469 | c->len=4; |
53470 | diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c | ||
53471 | index a2aa97d..10d6c41 100644 | ||
53472 | --- a/fs/lockd/svc.c | ||
53473 | +++ b/fs/lockd/svc.c | ||
53474 | @@ -305,7 +305,7 @@ static int lockd_start_svc(struct svc_serv *serv) | ||
53475 | svc_sock_update_bufs(serv); | ||
53476 | serv->sv_maxconn = nlm_max_connections; | ||
53477 | |||
53478 | - nlmsvc_task = kthread_run(lockd, nlmsvc_rqst, serv->sv_name); | ||
53479 | + nlmsvc_task = kthread_run(lockd, nlmsvc_rqst, "%s", serv->sv_name); | ||
53480 | if (IS_ERR(nlmsvc_task)) { | ||
53481 | error = PTR_ERR(nlmsvc_task); | ||
53482 | printk(KERN_WARNING | ||
53106 | diff --git a/fs/locks.c b/fs/locks.c | 53483 | diff --git a/fs/locks.c b/fs/locks.c |
53107 | index cb424a4..850e4dd 100644 | 53484 | index cb424a4..850e4dd 100644 |
53108 | --- a/fs/locks.c | 53485 | --- a/fs/locks.c |
@@ -53803,6 +54180,30 @@ index e945b81..fc018e2 100644 | |||
53803 | return -EINVAL; | 54180 | return -EINVAL; |
53804 | 54181 | ||
53805 | get_mnt_ns(mnt_ns); | 54182 | get_mnt_ns(mnt_ns); |
54183 | diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c | ||
54184 | index 5088b57..eabd719 100644 | ||
54185 | --- a/fs/nfs/callback.c | ||
54186 | +++ b/fs/nfs/callback.c | ||
54187 | @@ -208,7 +208,6 @@ static int nfs_callback_start_svc(int minorversion, struct rpc_xprt *xprt, | ||
54188 | struct svc_rqst *rqstp; | ||
54189 | int (*callback_svc)(void *vrqstp); | ||
54190 | struct nfs_callback_data *cb_info = &nfs_callback_info[minorversion]; | ||
54191 | - char svc_name[12]; | ||
54192 | int ret; | ||
54193 | |||
54194 | nfs_callback_bc_serv(minorversion, xprt, serv); | ||
54195 | @@ -232,10 +231,9 @@ static int nfs_callback_start_svc(int minorversion, struct rpc_xprt *xprt, | ||
54196 | |||
54197 | svc_sock_update_bufs(serv); | ||
54198 | |||
54199 | - sprintf(svc_name, "nfsv4.%u-svc", minorversion); | ||
54200 | cb_info->serv = serv; | ||
54201 | cb_info->rqst = rqstp; | ||
54202 | - cb_info->task = kthread_run(callback_svc, cb_info->rqst, svc_name); | ||
54203 | + cb_info->task = kthread_run(callback_svc, cb_info->rqst, "nfsv4.%u-svc", minorversion); | ||
54204 | if (IS_ERR(cb_info->task)) { | ||
54205 | ret = PTR_ERR(cb_info->task); | ||
54206 | svc_exit_thread(cb_info->rqst); | ||
53806 | diff --git a/fs/nfs/callback_xdr.c b/fs/nfs/callback_xdr.c | 54207 | diff --git a/fs/nfs/callback_xdr.c b/fs/nfs/callback_xdr.c |
53807 | index 59461c9..b17c57e 100644 | 54208 | index 59461c9..b17c57e 100644 |
53808 | --- a/fs/nfs/callback_xdr.c | 54209 | --- a/fs/nfs/callback_xdr.c |
@@ -53840,6 +54241,19 @@ index 1f94167..79c4ce4 100644 | |||
53840 | } | 54241 | } |
53841 | 54242 | ||
53842 | void nfs_fattr_init(struct nfs_fattr *fattr) | 54243 | void nfs_fattr_init(struct nfs_fattr *fattr) |
54244 | diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c | ||
54245 | index d41a351..7899577 100644 | ||
54246 | --- a/fs/nfs/nfs4state.c | ||
54247 | +++ b/fs/nfs/nfs4state.c | ||
54248 | @@ -1182,7 +1182,7 @@ void nfs4_schedule_state_manager(struct nfs_client *clp) | ||
54249 | snprintf(buf, sizeof(buf), "%s-manager", | ||
54250 | rpc_peeraddr2str(clp->cl_rpcclient, RPC_DISPLAY_ADDR)); | ||
54251 | rcu_read_unlock(); | ||
54252 | - task = kthread_run(nfs4_run_state_manager, clp, buf); | ||
54253 | + task = kthread_run(nfs4_run_state_manager, clp, "%s", buf); | ||
54254 | if (IS_ERR(task)) { | ||
54255 | printk(KERN_ERR "%s: kthread_run: %ld\n", | ||
54256 | __func__, PTR_ERR(task)); | ||
53843 | diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c | 54257 | diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c |
53844 | index d401d01..10b3e62 100644 | 54258 | index d401d01..10b3e62 100644 |
53845 | --- a/fs/nfsd/nfs4proc.c | 54259 | --- a/fs/nfsd/nfs4proc.c |
@@ -53885,10 +54299,10 @@ index 6eb0dc5..29067a9 100644 | |||
53885 | }; | 54299 | }; |
53886 | 54300 | ||
53887 | diff --git a/fs/nfsd/nfscache.c b/fs/nfsd/nfscache.c | 54301 | diff --git a/fs/nfsd/nfscache.c b/fs/nfsd/nfscache.c |
53888 | index ca05f6d..411a576 100644 | 54302 | index ca05f6d..b88c3a7 100644 |
53889 | --- a/fs/nfsd/nfscache.c | 54303 | --- a/fs/nfsd/nfscache.c |
53890 | +++ b/fs/nfsd/nfscache.c | 54304 | +++ b/fs/nfsd/nfscache.c |
53891 | @@ -461,13 +461,15 @@ nfsd_cache_update(struct svc_rqst *rqstp, int cachetype, __be32 *statp) | 54305 | @@ -461,13 +461,16 @@ nfsd_cache_update(struct svc_rqst *rqstp, int cachetype, __be32 *statp) |
53892 | { | 54306 | { |
53893 | struct svc_cacherep *rp = rqstp->rq_cacherep; | 54307 | struct svc_cacherep *rp = rqstp->rq_cacherep; |
53894 | struct kvec *resv = &rqstp->rq_res.head[0], *cachv; | 54308 | struct kvec *resv = &rqstp->rq_res.head[0], *cachv; |
@@ -53901,7 +54315,8 @@ index ca05f6d..411a576 100644 | |||
53901 | - len = resv->iov_len - ((char*)statp - (char*)resv->iov_base); | 54315 | - len = resv->iov_len - ((char*)statp - (char*)resv->iov_base); |
53902 | - len >>= 2; | 54316 | - len >>= 2; |
53903 | + if (statp) { | 54317 | + if (statp) { |
53904 | + len = resv->iov_len - ((char*)statp - (char*)resv->iov_base); | 54318 | + len = (char*)statp - (char*)resv->iov_base; |
54319 | + len = resv->iov_len - len; | ||
53905 | + len >>= 2; | 54320 | + len >>= 2; |
53906 | + } | 54321 | + } |
53907 | 54322 | ||
@@ -67692,7 +68107,7 @@ index 34025df..d94bbbc 100644 | |||
67692 | /* | 68107 | /* |
67693 | * Users often need to create attribute structures for their configurable | 68108 | * Users often need to create attribute structures for their configurable |
67694 | diff --git a/include/linux/cpu.h b/include/linux/cpu.h | 68109 | diff --git a/include/linux/cpu.h b/include/linux/cpu.h |
67695 | index ce7a074..01ab8ac 100644 | 68110 | index 714e792..e6130d9 100644 |
67696 | --- a/include/linux/cpu.h | 68111 | --- a/include/linux/cpu.h |
67697 | +++ b/include/linux/cpu.h | 68112 | +++ b/include/linux/cpu.h |
67698 | @@ -115,7 +115,7 @@ enum { | 68113 | @@ -115,7 +115,7 @@ enum { |
@@ -72140,7 +72555,7 @@ index 6f8fbcf..8259001 100644 | |||
72140 | + MODULE_GRSEC | 72555 | + MODULE_GRSEC |
72141 | 72556 | ||
72142 | diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h | 72557 | diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h |
72143 | index 6071e91..ca6a489 100644 | 72558 | index 6071e91..4c73b47 100644 |
72144 | --- a/include/linux/vmalloc.h | 72559 | --- a/include/linux/vmalloc.h |
72145 | +++ b/include/linux/vmalloc.h | 72560 | +++ b/include/linux/vmalloc.h |
72146 | @@ -14,6 +14,11 @@ struct vm_area_struct; /* vma defining user mapping in mm_types.h */ | 72561 | @@ -14,6 +14,11 @@ struct vm_area_struct; /* vma defining user mapping in mm_types.h */ |
@@ -72148,7 +72563,7 @@ index 6071e91..ca6a489 100644 | |||
72148 | #define VM_VPAGES 0x00000010 /* buffer for pages was vmalloc'ed */ | 72563 | #define VM_VPAGES 0x00000010 /* buffer for pages was vmalloc'ed */ |
72149 | #define VM_UNLIST 0x00000020 /* vm_struct is not listed in vmlist */ | 72564 | #define VM_UNLIST 0x00000020 /* vm_struct is not listed in vmlist */ |
72150 | + | 72565 | + |
72151 | +#if defined(CONFIG_MODULES) && defined(CONFIG_X86) && defined(CONFIG_PAX_KERNEXEC) | 72566 | +#if defined(CONFIG_X86) && defined(CONFIG_PAX_KERNEXEC) |
72152 | +#define VM_KERNEXEC 0x00000040 /* allocate from executable kernel memory range */ | 72567 | +#define VM_KERNEXEC 0x00000040 /* allocate from executable kernel memory range */ |
72153 | +#endif | 72568 | +#endif |
72154 | + | 72569 | + |
@@ -73657,7 +74072,7 @@ index ba0a7f36..2bcf1d5 100644 | |||
73657 | { INIT_THREAD_INFO(init_task) }; | 74072 | { INIT_THREAD_INFO(init_task) }; |
73658 | +#endif | 74073 | +#endif |
73659 | diff --git a/init/initramfs.c b/init/initramfs.c | 74074 | diff --git a/init/initramfs.c b/init/initramfs.c |
73660 | index a67ef9d..3d88592 100644 | 74075 | index a67ef9d..2d17ed9 100644 |
73661 | --- a/init/initramfs.c | 74076 | --- a/init/initramfs.c |
73662 | +++ b/init/initramfs.c | 74077 | +++ b/init/initramfs.c |
73663 | @@ -84,7 +84,7 @@ static void __init free_hash(void) | 74078 | @@ -84,7 +84,7 @@ static void __init free_hash(void) |
@@ -73768,6 +74183,15 @@ index a67ef9d..3d88592 100644 | |||
73768 | state = SkipIt; | 74183 | state = SkipIt; |
73769 | next_state = Reset; | 74184 | next_state = Reset; |
73770 | return 0; | 74185 | return 0; |
74186 | @@ -583,7 +583,7 @@ static int __init populate_rootfs(void) | ||
74187 | { | ||
74188 | char *err = unpack_to_rootfs(__initramfs_start, __initramfs_size); | ||
74189 | if (err) | ||
74190 | - panic(err); /* Failed to decompress INTERNAL initramfs */ | ||
74191 | + panic("%s", err); /* Failed to decompress INTERNAL initramfs */ | ||
74192 | if (initrd_start) { | ||
74193 | #ifdef CONFIG_BLK_DEV_RAM | ||
74194 | int fd; | ||
73771 | diff --git a/init/main.c b/init/main.c | 74195 | diff --git a/init/main.c b/init/main.c |
73772 | index 63534a1..85feae2 100644 | 74196 | index 63534a1..85feae2 100644 |
73773 | --- a/init/main.c | 74197 | --- a/init/main.c |
@@ -74184,7 +74608,7 @@ index b9bd7f0..1762b4a 100644 | |||
74184 | current->signal->rlim[RLIMIT_FSIZE].rlim_cur = flim; | 74608 | current->signal->rlim[RLIMIT_FSIZE].rlim_cur = flim; |
74185 | set_fs(fs); | 74609 | set_fs(fs); |
74186 | diff --git a/kernel/audit.c b/kernel/audit.c | 74610 | diff --git a/kernel/audit.c b/kernel/audit.c |
74187 | index d596e53..dbef3c3 100644 | 74611 | index 8a667f10..7375e3f 100644 |
74188 | --- a/kernel/audit.c | 74612 | --- a/kernel/audit.c |
74189 | +++ b/kernel/audit.c | 74613 | +++ b/kernel/audit.c |
74190 | @@ -116,7 +116,7 @@ u32 audit_sig_sid = 0; | 74614 | @@ -116,7 +116,7 @@ u32 audit_sig_sid = 0; |
@@ -77131,37 +77555,10 @@ index 98088e0..aaf95c0 100644 | |||
77131 | 77555 | ||
77132 | if (pm_wakeup_pending()) { | 77556 | if (pm_wakeup_pending()) { |
77133 | diff --git a/kernel/printk.c b/kernel/printk.c | 77557 | diff --git a/kernel/printk.c b/kernel/printk.c |
77134 | index abbdd9e..f294251 100644 | 77558 | index 0e4eba6a..d58ebf0 100644 |
77135 | --- a/kernel/printk.c | 77559 | --- a/kernel/printk.c |
77136 | +++ b/kernel/printk.c | 77560 | +++ b/kernel/printk.c |
77137 | @@ -615,11 +615,17 @@ static unsigned int devkmsg_poll(struct file *file, poll_table *wait) | 77561 | @@ -395,6 +395,11 @@ static int check_syslog_permissions(int type, bool from_file) |
77138 | return ret; | ||
77139 | } | ||
77140 | |||
77141 | +static int check_syslog_permissions(int type, bool from_file); | ||
77142 | + | ||
77143 | static int devkmsg_open(struct inode *inode, struct file *file) | ||
77144 | { | ||
77145 | struct devkmsg_user *user; | ||
77146 | int err; | ||
77147 | |||
77148 | + err = check_syslog_permissions(SYSLOG_ACTION_OPEN, SYSLOG_FROM_FILE); | ||
77149 | + if (err) | ||
77150 | + return err; | ||
77151 | + | ||
77152 | /* write-only does not need any file context */ | ||
77153 | if ((file->f_flags & O_ACCMODE) == O_WRONLY) | ||
77154 | return 0; | ||
77155 | @@ -828,7 +834,7 @@ static int syslog_action_restricted(int type) | ||
77156 | if (dmesg_restrict) | ||
77157 | return 1; | ||
77158 | /* Unless restricted, we allow "read all" and "get buffer size" for everybody */ | ||
77159 | - return type != SYSLOG_ACTION_READ_ALL && type != SYSLOG_ACTION_SIZE_BUFFER; | ||
77160 | + return type != SYSLOG_ACTION_OPEN && type != SYSLOG_ACTION_READ_ALL && type != SYSLOG_ACTION_SIZE_BUFFER; | ||
77161 | } | ||
77162 | |||
77163 | static int check_syslog_permissions(int type, bool from_file) | ||
77164 | @@ -840,6 +846,11 @@ static int check_syslog_permissions(int type, bool from_file) | ||
77165 | if (from_file && type != SYSLOG_ACTION_OPEN) | 77562 | if (from_file && type != SYSLOG_ACTION_OPEN) |
77166 | return 0; | 77563 | return 0; |
77167 | 77564 | ||
@@ -77549,7 +77946,7 @@ index e1f3a8c..42c94a2 100644 | |||
77549 | for (i = 0; i < RCU_TORTURE_PIPE_LEN + 1; i++) { | 77946 | for (i = 0; i < RCU_TORTURE_PIPE_LEN + 1; i++) { |
77550 | per_cpu(rcu_torture_count, cpu)[i] = 0; | 77947 | per_cpu(rcu_torture_count, cpu)[i] = 0; |
77551 | diff --git a/kernel/rcutree.c b/kernel/rcutree.c | 77948 | diff --git a/kernel/rcutree.c b/kernel/rcutree.c |
77552 | index 5b8ad82..17274d1 100644 | 77949 | index 5b8ad82..59e1f64 100644 |
77553 | --- a/kernel/rcutree.c | 77950 | --- a/kernel/rcutree.c |
77554 | +++ b/kernel/rcutree.c | 77951 | +++ b/kernel/rcutree.c |
77555 | @@ -353,9 +353,9 @@ static void rcu_eqs_enter_common(struct rcu_dynticks *rdtp, long long oldval, | 77952 | @@ -353,9 +353,9 @@ static void rcu_eqs_enter_common(struct rcu_dynticks *rdtp, long long oldval, |
@@ -77803,6 +78200,15 @@ index 5b8ad82..17274d1 100644 | |||
77803 | rcu_prepare_for_idle_init(cpu); | 78200 | rcu_prepare_for_idle_init(cpu); |
77804 | raw_spin_unlock(&rnp->lock); /* irqs remain disabled. */ | 78201 | raw_spin_unlock(&rnp->lock); /* irqs remain disabled. */ |
77805 | 78202 | ||
78203 | @@ -2964,7 +2964,7 @@ static int __init rcu_spawn_gp_kthread(void) | ||
78204 | struct task_struct *t; | ||
78205 | |||
78206 | for_each_rcu_flavor(rsp) { | ||
78207 | - t = kthread_run(rcu_gp_kthread, rsp, rsp->name); | ||
78208 | + t = kthread_run(rcu_gp_kthread, rsp, "%s", rsp->name); | ||
78209 | BUG_ON(IS_ERR(t)); | ||
78210 | rnp = rcu_get_root(rsp); | ||
78211 | raw_spin_lock_irqsave(&rnp->lock, flags); | ||
77806 | diff --git a/kernel/rcutree.h b/kernel/rcutree.h | 78212 | diff --git a/kernel/rcutree.h b/kernel/rcutree.h |
77807 | index c896b50..c357252 100644 | 78213 | index c896b50..c357252 100644 |
77808 | --- a/kernel/rcutree.h | 78214 | --- a/kernel/rcutree.h |
@@ -78571,7 +78977,7 @@ index 01d5ccb..cdcbee6 100644 | |||
78571 | return idx; | 78977 | return idx; |
78572 | } | 78978 | } |
78573 | diff --git a/kernel/sys.c b/kernel/sys.c | 78979 | diff --git a/kernel/sys.c b/kernel/sys.c |
78574 | index 0da73cf..5c2af3c 100644 | 78980 | index e5f0aca..8d58b1f 100644 |
78575 | --- a/kernel/sys.c | 78981 | --- a/kernel/sys.c |
78576 | +++ b/kernel/sys.c | 78982 | +++ b/kernel/sys.c |
78577 | @@ -158,6 +158,12 @@ static int set_one_prio(struct task_struct *p, int niceval, int error) | 78983 | @@ -158,6 +158,12 @@ static int set_one_prio(struct task_struct *p, int niceval, int error) |
@@ -78587,7 +78993,7 @@ index 0da73cf..5c2af3c 100644 | |||
78587 | no_nice = security_task_setnice(p, niceval); | 78993 | no_nice = security_task_setnice(p, niceval); |
78588 | if (no_nice) { | 78994 | if (no_nice) { |
78589 | error = no_nice; | 78995 | error = no_nice; |
78590 | @@ -598,6 +604,9 @@ SYSCALL_DEFINE2(setregid, gid_t, rgid, gid_t, egid) | 78996 | @@ -621,6 +627,9 @@ SYSCALL_DEFINE2(setregid, gid_t, rgid, gid_t, egid) |
78591 | goto error; | 78997 | goto error; |
78592 | } | 78998 | } |
78593 | 78999 | ||
@@ -78597,7 +79003,7 @@ index 0da73cf..5c2af3c 100644 | |||
78597 | if (rgid != (gid_t) -1 || | 79003 | if (rgid != (gid_t) -1 || |
78598 | (egid != (gid_t) -1 && !gid_eq(kegid, old->gid))) | 79004 | (egid != (gid_t) -1 && !gid_eq(kegid, old->gid))) |
78599 | new->sgid = new->egid; | 79005 | new->sgid = new->egid; |
78600 | @@ -633,6 +642,10 @@ SYSCALL_DEFINE1(setgid, gid_t, gid) | 79006 | @@ -656,6 +665,10 @@ SYSCALL_DEFINE1(setgid, gid_t, gid) |
78601 | old = current_cred(); | 79007 | old = current_cred(); |
78602 | 79008 | ||
78603 | retval = -EPERM; | 79009 | retval = -EPERM; |
@@ -78608,7 +79014,7 @@ index 0da73cf..5c2af3c 100644 | |||
78608 | if (nsown_capable(CAP_SETGID)) | 79014 | if (nsown_capable(CAP_SETGID)) |
78609 | new->gid = new->egid = new->sgid = new->fsgid = kgid; | 79015 | new->gid = new->egid = new->sgid = new->fsgid = kgid; |
78610 | else if (gid_eq(kgid, old->gid) || gid_eq(kgid, old->sgid)) | 79016 | else if (gid_eq(kgid, old->gid) || gid_eq(kgid, old->sgid)) |
78611 | @@ -650,7 +663,7 @@ error: | 79017 | @@ -673,7 +686,7 @@ error: |
78612 | /* | 79018 | /* |
78613 | * change the user struct in a credentials set to match the new UID | 79019 | * change the user struct in a credentials set to match the new UID |
78614 | */ | 79020 | */ |
@@ -78617,7 +79023,7 @@ index 0da73cf..5c2af3c 100644 | |||
78617 | { | 79023 | { |
78618 | struct user_struct *new_user; | 79024 | struct user_struct *new_user; |
78619 | 79025 | ||
78620 | @@ -730,6 +743,9 @@ SYSCALL_DEFINE2(setreuid, uid_t, ruid, uid_t, euid) | 79026 | @@ -753,6 +766,9 @@ SYSCALL_DEFINE2(setreuid, uid_t, ruid, uid_t, euid) |
78621 | goto error; | 79027 | goto error; |
78622 | } | 79028 | } |
78623 | 79029 | ||
@@ -78627,7 +79033,7 @@ index 0da73cf..5c2af3c 100644 | |||
78627 | if (!uid_eq(new->uid, old->uid)) { | 79033 | if (!uid_eq(new->uid, old->uid)) { |
78628 | retval = set_user(new); | 79034 | retval = set_user(new); |
78629 | if (retval < 0) | 79035 | if (retval < 0) |
78630 | @@ -780,6 +796,12 @@ SYSCALL_DEFINE1(setuid, uid_t, uid) | 79036 | @@ -803,6 +819,12 @@ SYSCALL_DEFINE1(setuid, uid_t, uid) |
78631 | old = current_cred(); | 79037 | old = current_cred(); |
78632 | 79038 | ||
78633 | retval = -EPERM; | 79039 | retval = -EPERM; |
@@ -78640,7 +79046,7 @@ index 0da73cf..5c2af3c 100644 | |||
78640 | if (nsown_capable(CAP_SETUID)) { | 79046 | if (nsown_capable(CAP_SETUID)) { |
78641 | new->suid = new->uid = kuid; | 79047 | new->suid = new->uid = kuid; |
78642 | if (!uid_eq(kuid, old->uid)) { | 79048 | if (!uid_eq(kuid, old->uid)) { |
78643 | @@ -849,6 +871,9 @@ SYSCALL_DEFINE3(setresuid, uid_t, ruid, uid_t, euid, uid_t, suid) | 79049 | @@ -872,6 +894,9 @@ SYSCALL_DEFINE3(setresuid, uid_t, ruid, uid_t, euid, uid_t, suid) |
78644 | goto error; | 79050 | goto error; |
78645 | } | 79051 | } |
78646 | 79052 | ||
@@ -78650,7 +79056,7 @@ index 0da73cf..5c2af3c 100644 | |||
78650 | if (ruid != (uid_t) -1) { | 79056 | if (ruid != (uid_t) -1) { |
78651 | new->uid = kruid; | 79057 | new->uid = kruid; |
78652 | if (!uid_eq(kruid, old->uid)) { | 79058 | if (!uid_eq(kruid, old->uid)) { |
78653 | @@ -931,6 +956,9 @@ SYSCALL_DEFINE3(setresgid, gid_t, rgid, gid_t, egid, gid_t, sgid) | 79059 | @@ -954,6 +979,9 @@ SYSCALL_DEFINE3(setresgid, gid_t, rgid, gid_t, egid, gid_t, sgid) |
78654 | goto error; | 79060 | goto error; |
78655 | } | 79061 | } |
78656 | 79062 | ||
@@ -78660,7 +79066,7 @@ index 0da73cf..5c2af3c 100644 | |||
78660 | if (rgid != (gid_t) -1) | 79066 | if (rgid != (gid_t) -1) |
78661 | new->gid = krgid; | 79067 | new->gid = krgid; |
78662 | if (egid != (gid_t) -1) | 79068 | if (egid != (gid_t) -1) |
78663 | @@ -992,12 +1020,16 @@ SYSCALL_DEFINE1(setfsuid, uid_t, uid) | 79069 | @@ -1015,12 +1043,16 @@ SYSCALL_DEFINE1(setfsuid, uid_t, uid) |
78664 | uid_eq(kuid, old->suid) || uid_eq(kuid, old->fsuid) || | 79070 | uid_eq(kuid, old->suid) || uid_eq(kuid, old->fsuid) || |
78665 | nsown_capable(CAP_SETUID)) { | 79071 | nsown_capable(CAP_SETUID)) { |
78666 | if (!uid_eq(kuid, old->fsuid)) { | 79072 | if (!uid_eq(kuid, old->fsuid)) { |
@@ -78677,7 +79083,7 @@ index 0da73cf..5c2af3c 100644 | |||
78677 | abort_creds(new); | 79083 | abort_creds(new); |
78678 | return old_fsuid; | 79084 | return old_fsuid; |
78679 | 79085 | ||
78680 | @@ -1030,12 +1062,16 @@ SYSCALL_DEFINE1(setfsgid, gid_t, gid) | 79086 | @@ -1053,12 +1085,16 @@ SYSCALL_DEFINE1(setfsgid, gid_t, gid) |
78681 | if (gid_eq(kgid, old->gid) || gid_eq(kgid, old->egid) || | 79087 | if (gid_eq(kgid, old->gid) || gid_eq(kgid, old->egid) || |
78682 | gid_eq(kgid, old->sgid) || gid_eq(kgid, old->fsgid) || | 79088 | gid_eq(kgid, old->sgid) || gid_eq(kgid, old->fsgid) || |
78683 | nsown_capable(CAP_SETGID)) { | 79089 | nsown_capable(CAP_SETGID)) { |
@@ -78694,7 +79100,7 @@ index 0da73cf..5c2af3c 100644 | |||
78694 | abort_creds(new); | 79100 | abort_creds(new); |
78695 | return old_fsgid; | 79101 | return old_fsgid; |
78696 | 79102 | ||
78697 | @@ -1343,19 +1379,19 @@ SYSCALL_DEFINE1(olduname, struct oldold_utsname __user *, name) | 79103 | @@ -1366,19 +1402,19 @@ SYSCALL_DEFINE1(olduname, struct oldold_utsname __user *, name) |
78698 | return -EFAULT; | 79104 | return -EFAULT; |
78699 | 79105 | ||
78700 | down_read(&uts_sem); | 79106 | down_read(&uts_sem); |
@@ -78719,7 +79125,7 @@ index 0da73cf..5c2af3c 100644 | |||
78719 | __OLD_UTS_LEN); | 79125 | __OLD_UTS_LEN); |
78720 | error |= __put_user(0, name->machine + __OLD_UTS_LEN); | 79126 | error |= __put_user(0, name->machine + __OLD_UTS_LEN); |
78721 | up_read(&uts_sem); | 79127 | up_read(&uts_sem); |
78722 | @@ -1557,6 +1593,13 @@ int do_prlimit(struct task_struct *tsk, unsigned int resource, | 79128 | @@ -1580,6 +1616,13 @@ int do_prlimit(struct task_struct *tsk, unsigned int resource, |
78723 | */ | 79129 | */ |
78724 | new_rlim->rlim_cur = 1; | 79130 | new_rlim->rlim_cur = 1; |
78725 | } | 79131 | } |
@@ -80094,9 +80500,18 @@ index bd2bea9..6b3c95e 100644 | |||
80094 | return false; | 80500 | return false; |
80095 | 80501 | ||
80096 | diff --git a/lib/kobject.c b/lib/kobject.c | 80502 | diff --git a/lib/kobject.c b/lib/kobject.c |
80097 | index a654866..a4fd13d 100644 | 80503 | index a654866..d8bb115 100644 |
80098 | --- a/lib/kobject.c | 80504 | --- a/lib/kobject.c |
80099 | +++ b/lib/kobject.c | 80505 | +++ b/lib/kobject.c |
80506 | @@ -805,7 +805,7 @@ static struct kset *kset_create(const char *name, | ||
80507 | kset = kzalloc(sizeof(*kset), GFP_KERNEL); | ||
80508 | if (!kset) | ||
80509 | return NULL; | ||
80510 | - retval = kobject_set_name(&kset->kobj, name); | ||
80511 | + retval = kobject_set_name(&kset->kobj, "%s", name); | ||
80512 | if (retval) { | ||
80513 | kfree(kset); | ||
80514 | return NULL; | ||
80100 | @@ -859,9 +859,9 @@ EXPORT_SYMBOL_GPL(kset_create_and_add); | 80515 | @@ -859,9 +859,9 @@ EXPORT_SYMBOL_GPL(kset_create_and_add); |
80101 | 80516 | ||
80102 | 80517 | ||
@@ -80489,6 +80904,28 @@ index 3bea74f..e821c99 100644 | |||
80489 | select PROC_PAGE_MONITOR | 80904 | select PROC_PAGE_MONITOR |
80490 | 80905 | ||
80491 | config NOMMU_INITIAL_TRIM_EXCESS | 80906 | config NOMMU_INITIAL_TRIM_EXCESS |
80907 | diff --git a/mm/backing-dev.c b/mm/backing-dev.c | ||
80908 | index 41733c5..d80d7a9 100644 | ||
80909 | --- a/mm/backing-dev.c | ||
80910 | +++ b/mm/backing-dev.c | ||
80911 | @@ -716,7 +716,6 @@ EXPORT_SYMBOL(bdi_destroy); | ||
80912 | int bdi_setup_and_register(struct backing_dev_info *bdi, char *name, | ||
80913 | unsigned int cap) | ||
80914 | { | ||
80915 | - char tmp[32]; | ||
80916 | int err; | ||
80917 | |||
80918 | bdi->name = name; | ||
80919 | @@ -725,8 +724,7 @@ int bdi_setup_and_register(struct backing_dev_info *bdi, char *name, | ||
80920 | if (err) | ||
80921 | return err; | ||
80922 | |||
80923 | - sprintf(tmp, "%.28s%s", name, "-%d"); | ||
80924 | - err = bdi_register(bdi, NULL, tmp, atomic_long_inc_return(&bdi_seq)); | ||
80925 | + err = bdi_register(bdi, NULL, "%.28s-%ld", name, atomic_long_inc_return(&bdi_seq)); | ||
80926 | if (err) { | ||
80927 | bdi_destroy(bdi); | ||
80928 | return err; | ||
80492 | diff --git a/mm/filemap.c b/mm/filemap.c | 80929 | diff --git a/mm/filemap.c b/mm/filemap.c |
80493 | index e1979fd..dda5120 100644 | 80930 | index e1979fd..dda5120 100644 |
80494 | --- a/mm/filemap.c | 80931 | --- a/mm/filemap.c |
@@ -80555,7 +80992,7 @@ index b32b70c..e512eb0 100644 | |||
80555 | set_page_address(page, (void *)vaddr); | 80992 | set_page_address(page, (void *)vaddr); |
80556 | 80993 | ||
80557 | diff --git a/mm/hugetlb.c b/mm/hugetlb.c | 80994 | diff --git a/mm/hugetlb.c b/mm/hugetlb.c |
80558 | index 1a12f5b..a85b8fc 100644 | 80995 | index ce4cb19..93899ef 100644 |
80559 | --- a/mm/hugetlb.c | 80996 | --- a/mm/hugetlb.c |
80560 | +++ b/mm/hugetlb.c | 80997 | +++ b/mm/hugetlb.c |
80561 | @@ -2005,15 +2005,17 @@ static int hugetlb_sysctl_handler_common(bool obey_mempolicy, | 80998 | @@ -2005,15 +2005,17 @@ static int hugetlb_sysctl_handler_common(bool obey_mempolicy, |
@@ -81722,10 +82159,10 @@ index 7431001..0f8344e 100644 | |||
81722 | capable(CAP_SYS_NICE) ? MPOL_MF_MOVE_ALL : MPOL_MF_MOVE); | 82159 | capable(CAP_SYS_NICE) ? MPOL_MF_MOVE_ALL : MPOL_MF_MOVE); |
81723 | 82160 | ||
81724 | diff --git a/mm/migrate.c b/mm/migrate.c | 82161 | diff --git a/mm/migrate.c b/mm/migrate.c |
81725 | index 22ed5c1..87c424c 100644 | 82162 | index c04d9af..0b41805 100644 |
81726 | --- a/mm/migrate.c | 82163 | --- a/mm/migrate.c |
81727 | +++ b/mm/migrate.c | 82164 | +++ b/mm/migrate.c |
81728 | @@ -1382,8 +1382,7 @@ SYSCALL_DEFINE6(move_pages, pid_t, pid, unsigned long, nr_pages, | 82165 | @@ -1395,8 +1395,7 @@ SYSCALL_DEFINE6(move_pages, pid_t, pid, unsigned long, nr_pages, |
81729 | */ | 82166 | */ |
81730 | tcred = __task_cred(task); | 82167 | tcred = __task_cred(task); |
81731 | if (!uid_eq(cred->euid, tcred->suid) && !uid_eq(cred->euid, tcred->uid) && | 82168 | if (!uid_eq(cred->euid, tcred->suid) && !uid_eq(cred->euid, tcred->uid) && |
@@ -83456,7 +83893,7 @@ index efe6814..64b4701 100644 | |||
83456 | .next = NULL, | 83893 | .next = NULL, |
83457 | }; | 83894 | }; |
83458 | diff --git a/mm/page_alloc.c b/mm/page_alloc.c | 83895 | diff --git a/mm/page_alloc.c b/mm/page_alloc.c |
83459 | index 8fcced7..ebcd481 100644 | 83896 | index 0d4fef2..8870335 100644 |
83460 | --- a/mm/page_alloc.c | 83897 | --- a/mm/page_alloc.c |
83461 | +++ b/mm/page_alloc.c | 83898 | +++ b/mm/page_alloc.c |
83462 | @@ -59,6 +59,7 @@ | 83899 | @@ -59,6 +59,7 @@ |
@@ -84423,7 +84860,7 @@ index eeed4a0..6ee34ec 100644 | |||
84423 | EXPORT_SYMBOL(kmem_cache_free); | 84860 | EXPORT_SYMBOL(kmem_cache_free); |
84424 | 84861 | ||
84425 | diff --git a/mm/slub.c b/mm/slub.c | 84862 | diff --git a/mm/slub.c b/mm/slub.c |
84426 | index 4aec537..a64753d 100644 | 84863 | index 4aec537..8043df1 100644 |
84427 | --- a/mm/slub.c | 84864 | --- a/mm/slub.c |
84428 | +++ b/mm/slub.c | 84865 | +++ b/mm/slub.c |
84429 | @@ -197,7 +197,7 @@ struct track { | 84866 | @@ -197,7 +197,7 @@ struct track { |
@@ -84667,6 +85104,15 @@ index 4aec537..a64753d 100644 | |||
84667 | static int sysfs_slab_add(struct kmem_cache *s) | 85104 | static int sysfs_slab_add(struct kmem_cache *s) |
84668 | { | 85105 | { |
84669 | int err; | 85106 | int err; |
85107 | @@ -5289,7 +5371,7 @@ static int sysfs_slab_add(struct kmem_cache *s) | ||
85108 | } | ||
85109 | |||
85110 | s->kobj.kset = slab_kset; | ||
85111 | - err = kobject_init_and_add(&s->kobj, &slab_ktype, NULL, name); | ||
85112 | + err = kobject_init_and_add(&s->kobj, &slab_ktype, NULL, "%s", name); | ||
85113 | if (err) { | ||
85114 | kobject_put(&s->kobj); | ||
85115 | return err; | ||
84670 | @@ -5323,6 +5405,7 @@ static void sysfs_slab_remove(struct kmem_cache *s) | 85116 | @@ -5323,6 +5405,7 @@ static void sysfs_slab_remove(struct kmem_cache *s) |
84671 | kobject_del(&s->kobj); | 85117 | kobject_del(&s->kobj); |
84672 | kobject_put(&s->kobj); | 85118 | kobject_put(&s->kobj); |
@@ -84816,7 +85262,7 @@ index ab1424d..7c5bd5a 100644 | |||
84816 | mm->unmap_area = arch_unmap_area; | 85262 | mm->unmap_area = arch_unmap_area; |
84817 | } | 85263 | } |
84818 | diff --git a/mm/vmalloc.c b/mm/vmalloc.c | 85264 | diff --git a/mm/vmalloc.c b/mm/vmalloc.c |
84819 | index 0f751f2..ef398a0 100644 | 85265 | index 0f751f2..2bc3bd1 100644 |
84820 | --- a/mm/vmalloc.c | 85266 | --- a/mm/vmalloc.c |
84821 | +++ b/mm/vmalloc.c | 85267 | +++ b/mm/vmalloc.c |
84822 | @@ -39,8 +39,19 @@ static void vunmap_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end) | 85268 | @@ -39,8 +39,19 @@ static void vunmap_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end) |
@@ -84826,7 +85272,7 @@ index 0f751f2..ef398a0 100644 | |||
84826 | - pte_t ptent = ptep_get_and_clear(&init_mm, addr, pte); | 85272 | - pte_t ptent = ptep_get_and_clear(&init_mm, addr, pte); |
84827 | - WARN_ON(!pte_none(ptent) && !pte_present(ptent)); | 85273 | - WARN_ON(!pte_none(ptent) && !pte_present(ptent)); |
84828 | + | 85274 | + |
84829 | +#if defined(CONFIG_MODULES) && defined(CONFIG_X86_32) && defined(CONFIG_PAX_KERNEXEC) | 85275 | +#if defined(CONFIG_X86_32) && defined(CONFIG_PAX_KERNEXEC) |
84830 | + if ((unsigned long)MODULES_EXEC_VADDR <= addr && addr < (unsigned long)MODULES_EXEC_END) { | 85276 | + if ((unsigned long)MODULES_EXEC_VADDR <= addr && addr < (unsigned long)MODULES_EXEC_END) { |
84831 | + BUG_ON(!pte_exec(*pte)); | 85277 | + BUG_ON(!pte_exec(*pte)); |
84832 | + set_pte_at(&init_mm, addr, pte, pfn_pte(__pa(addr) >> PAGE_SHIFT, PAGE_KERNEL_EXEC)); | 85278 | + set_pte_at(&init_mm, addr, pte, pfn_pte(__pa(addr) >> PAGE_SHIFT, PAGE_KERNEL_EXEC)); |
@@ -84851,7 +85297,7 @@ index 0f751f2..ef398a0 100644 | |||
84851 | struct page *page = pages[*nr]; | 85297 | struct page *page = pages[*nr]; |
84852 | 85298 | ||
84853 | - if (WARN_ON(!pte_none(*pte))) | 85299 | - if (WARN_ON(!pte_none(*pte))) |
84854 | +#if defined(CONFIG_MODULES) && defined(CONFIG_X86_32) && defined(CONFIG_PAX_KERNEXEC) | 85300 | +#if defined(CONFIG_X86_32) && defined(CONFIG_PAX_KERNEXEC) |
84855 | + if (pgprot_val(prot) & _PAGE_NX) | 85301 | + if (pgprot_val(prot) & _PAGE_NX) |
84856 | +#endif | 85302 | +#endif |
84857 | + | 85303 | + |
@@ -84891,14 +85337,7 @@ index 0f751f2..ef398a0 100644 | |||
84891 | if (!pud) | 85337 | if (!pud) |
84892 | return -ENOMEM; | 85338 | return -ENOMEM; |
84893 | do { | 85339 | do { |
84894 | @@ -191,11 +215,20 @@ int is_vmalloc_or_module_addr(const void *x) | 85340 | @@ -196,6 +220,12 @@ int is_vmalloc_or_module_addr(const void *x) |
84895 | * and fall back on vmalloc() if that fails. Others | ||
84896 | * just put it in the vmalloc space. | ||
84897 | */ | ||
84898 | -#if defined(CONFIG_MODULES) && defined(MODULES_VADDR) | ||
84899 | +#ifdef CONFIG_MODULES | ||
84900 | +#ifdef MODULES_VADDR | ||
84901 | unsigned long addr = (unsigned long)x; | ||
84902 | if (addr >= MODULES_VADDR && addr < MODULES_END) | 85341 | if (addr >= MODULES_VADDR && addr < MODULES_END) |
84903 | return 1; | 85342 | return 1; |
84904 | #endif | 85343 | #endif |
@@ -84908,12 +85347,10 @@ index 0f751f2..ef398a0 100644 | |||
84908 | + return 1; | 85347 | + return 1; |
84909 | +#endif | 85348 | +#endif |
84910 | + | 85349 | + |
84911 | +#endif | ||
84912 | + | ||
84913 | return is_vmalloc_addr(x); | 85350 | return is_vmalloc_addr(x); |
84914 | } | 85351 | } |
84915 | 85352 | ||
84916 | @@ -216,8 +249,14 @@ struct page *vmalloc_to_page(const void *vmalloc_addr) | 85353 | @@ -216,8 +246,14 @@ struct page *vmalloc_to_page(const void *vmalloc_addr) |
84917 | 85354 | ||
84918 | if (!pgd_none(*pgd)) { | 85355 | if (!pgd_none(*pgd)) { |
84919 | pud_t *pud = pud_offset(pgd, addr); | 85356 | pud_t *pud = pud_offset(pgd, addr); |
@@ -84928,7 +85365,7 @@ index 0f751f2..ef398a0 100644 | |||
84928 | if (!pmd_none(*pmd)) { | 85365 | if (!pmd_none(*pmd)) { |
84929 | pte_t *ptep, pte; | 85366 | pte_t *ptep, pte; |
84930 | 85367 | ||
84931 | @@ -329,7 +368,7 @@ static void purge_vmap_area_lazy(void); | 85368 | @@ -329,7 +365,7 @@ static void purge_vmap_area_lazy(void); |
84932 | * Allocate a region of KVA of the specified size and alignment, within the | 85369 | * Allocate a region of KVA of the specified size and alignment, within the |
84933 | * vstart and vend. | 85370 | * vstart and vend. |
84934 | */ | 85371 | */ |
@@ -84937,12 +85374,12 @@ index 0f751f2..ef398a0 100644 | |||
84937 | unsigned long align, | 85374 | unsigned long align, |
84938 | unsigned long vstart, unsigned long vend, | 85375 | unsigned long vstart, unsigned long vend, |
84939 | int node, gfp_t gfp_mask) | 85376 | int node, gfp_t gfp_mask) |
84940 | @@ -1328,6 +1367,16 @@ static struct vm_struct *__get_vm_area_node(unsigned long size, | 85377 | @@ -1328,6 +1364,16 @@ static struct vm_struct *__get_vm_area_node(unsigned long size, |
84941 | struct vm_struct *area; | 85378 | struct vm_struct *area; |
84942 | 85379 | ||
84943 | BUG_ON(in_interrupt()); | 85380 | BUG_ON(in_interrupt()); |
84944 | + | 85381 | + |
84945 | +#if defined(CONFIG_MODULES) && defined(CONFIG_X86) && defined(CONFIG_PAX_KERNEXEC) | 85382 | +#if defined(CONFIG_X86) && defined(CONFIG_PAX_KERNEXEC) |
84946 | + if (flags & VM_KERNEXEC) { | 85383 | + if (flags & VM_KERNEXEC) { |
84947 | + if (start != VMALLOC_START || end != VMALLOC_END) | 85384 | + if (start != VMALLOC_START || end != VMALLOC_END) |
84948 | + return NULL; | 85385 | + return NULL; |
@@ -84954,11 +85391,11 @@ index 0f751f2..ef398a0 100644 | |||
84954 | if (flags & VM_IOREMAP) { | 85391 | if (flags & VM_IOREMAP) { |
84955 | int bit = fls(size); | 85392 | int bit = fls(size); |
84956 | 85393 | ||
84957 | @@ -1569,6 +1618,11 @@ void *vmap(struct page **pages, unsigned int count, | 85394 | @@ -1569,6 +1615,11 @@ void *vmap(struct page **pages, unsigned int count, |
84958 | if (count > totalram_pages) | 85395 | if (count > totalram_pages) |
84959 | return NULL; | 85396 | return NULL; |
84960 | 85397 | ||
84961 | +#if defined(CONFIG_MODULES) && defined(CONFIG_X86) && defined(CONFIG_PAX_KERNEXEC) | 85398 | +#if defined(CONFIG_X86) && defined(CONFIG_PAX_KERNEXEC) |
84962 | + if (!(pgprot_val(prot) & _PAGE_NX)) | 85399 | + if (!(pgprot_val(prot) & _PAGE_NX)) |
84963 | + flags |= VM_KERNEXEC; | 85400 | + flags |= VM_KERNEXEC; |
84964 | +#endif | 85401 | +#endif |
@@ -84966,11 +85403,11 @@ index 0f751f2..ef398a0 100644 | |||
84966 | area = get_vm_area_caller((count << PAGE_SHIFT), flags, | 85403 | area = get_vm_area_caller((count << PAGE_SHIFT), flags, |
84967 | __builtin_return_address(0)); | 85404 | __builtin_return_address(0)); |
84968 | if (!area) | 85405 | if (!area) |
84969 | @@ -1670,6 +1724,13 @@ void *__vmalloc_node_range(unsigned long size, unsigned long align, | 85406 | @@ -1670,6 +1721,13 @@ void *__vmalloc_node_range(unsigned long size, unsigned long align, |
84970 | if (!size || (size >> PAGE_SHIFT) > totalram_pages) | 85407 | if (!size || (size >> PAGE_SHIFT) > totalram_pages) |
84971 | goto fail; | 85408 | goto fail; |
84972 | 85409 | ||
84973 | +#if defined(CONFIG_MODULES) && defined(CONFIG_X86) && defined(CONFIG_PAX_KERNEXEC) | 85410 | +#if defined(CONFIG_X86) && defined(CONFIG_PAX_KERNEXEC) |
84974 | + if (!(pgprot_val(prot) & _PAGE_NX)) | 85411 | + if (!(pgprot_val(prot) & _PAGE_NX)) |
84975 | + area = __get_vm_area_node(size, align, VM_ALLOC | VM_UNLIST | VM_KERNEXEC, | 85412 | + area = __get_vm_area_node(size, align, VM_ALLOC | VM_UNLIST | VM_KERNEXEC, |
84976 | + VMALLOC_START, VMALLOC_END, node, gfp_mask, caller); | 85413 | + VMALLOC_START, VMALLOC_END, node, gfp_mask, caller); |
@@ -84980,7 +85417,7 @@ index 0f751f2..ef398a0 100644 | |||
84980 | area = __get_vm_area_node(size, align, VM_ALLOC | VM_UNLIST, | 85417 | area = __get_vm_area_node(size, align, VM_ALLOC | VM_UNLIST, |
84981 | start, end, node, gfp_mask, caller); | 85418 | start, end, node, gfp_mask, caller); |
84982 | if (!area) | 85419 | if (!area) |
84983 | @@ -1845,10 +1906,9 @@ EXPORT_SYMBOL(vzalloc_node); | 85420 | @@ -1845,10 +1903,9 @@ EXPORT_SYMBOL(vzalloc_node); |
84984 | * For tight control over page level allocator and protection flags | 85421 | * For tight control over page level allocator and protection flags |
84985 | * use __vmalloc() instead. | 85422 | * use __vmalloc() instead. |
84986 | */ | 85423 | */ |
@@ -84992,7 +85429,7 @@ index 0f751f2..ef398a0 100644 | |||
84992 | NUMA_NO_NODE, __builtin_return_address(0)); | 85429 | NUMA_NO_NODE, __builtin_return_address(0)); |
84993 | } | 85430 | } |
84994 | 85431 | ||
84995 | @@ -2139,6 +2199,8 @@ int remap_vmalloc_range(struct vm_area_struct *vma, void *addr, | 85432 | @@ -2139,6 +2196,8 @@ int remap_vmalloc_range(struct vm_area_struct *vma, void *addr, |
84996 | unsigned long uaddr = vma->vm_start; | 85433 | unsigned long uaddr = vma->vm_start; |
84997 | unsigned long usize = vma->vm_end - vma->vm_start; | 85434 | unsigned long usize = vma->vm_end - vma->vm_start; |
84998 | 85435 | ||
@@ -85001,7 +85438,7 @@ index 0f751f2..ef398a0 100644 | |||
85001 | if ((PAGE_SIZE-1) & (unsigned long)addr) | 85438 | if ((PAGE_SIZE-1) & (unsigned long)addr) |
85002 | return -EINVAL; | 85439 | return -EINVAL; |
85003 | 85440 | ||
85004 | @@ -2578,7 +2640,11 @@ static int s_show(struct seq_file *m, void *p) | 85441 | @@ -2578,7 +2637,11 @@ static int s_show(struct seq_file *m, void *p) |
85005 | v->addr, v->addr + v->size, v->size); | 85442 | v->addr, v->addr + v->size, v->size); |
85006 | 85443 | ||
85007 | if (v->caller) | 85444 | if (v->caller) |
@@ -85388,6 +85825,31 @@ index 50e079f..49ce2d2 100644 | |||
85388 | frag1->seqno = htons(seqno - 1); | 85825 | frag1->seqno = htons(seqno - 1); |
85389 | frag2->seqno = htons(seqno); | 85826 | frag2->seqno = htons(seqno); |
85390 | 85827 | ||
85828 | diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c | ||
85829 | index b88605f..958e3e2 100644 | ||
85830 | --- a/net/bluetooth/hci_core.c | ||
85831 | +++ b/net/bluetooth/hci_core.c | ||
85832 | @@ -1793,16 +1793,16 @@ int hci_register_dev(struct hci_dev *hdev) | ||
85833 | list_add(&hdev->list, &hci_dev_list); | ||
85834 | write_unlock(&hci_dev_list_lock); | ||
85835 | |||
85836 | - hdev->workqueue = alloc_workqueue(hdev->name, WQ_HIGHPRI | WQ_UNBOUND | | ||
85837 | - WQ_MEM_RECLAIM, 1); | ||
85838 | + hdev->workqueue = alloc_workqueue("%s", WQ_HIGHPRI | WQ_UNBOUND | | ||
85839 | + WQ_MEM_RECLAIM, 1, hdev->name); | ||
85840 | if (!hdev->workqueue) { | ||
85841 | error = -ENOMEM; | ||
85842 | goto err; | ||
85843 | } | ||
85844 | |||
85845 | - hdev->req_workqueue = alloc_workqueue(hdev->name, | ||
85846 | + hdev->req_workqueue = alloc_workqueue("%s", | ||
85847 | WQ_HIGHPRI | WQ_UNBOUND | | ||
85848 | - WQ_MEM_RECLAIM, 1); | ||
85849 | + WQ_MEM_RECLAIM, 1, hdev->name); | ||
85850 | if (!hdev->req_workqueue) { | ||
85851 | destroy_workqueue(hdev->workqueue); | ||
85852 | error = -ENOMEM; | ||
85391 | diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c | 85853 | diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c |
85392 | index 6a93614..1415549 100644 | 85854 | index 6a93614..1415549 100644 |
85393 | --- a/net/bluetooth/hci_sock.c | 85855 | --- a/net/bluetooth/hci_sock.c |
@@ -85402,7 +85864,7 @@ index 6a93614..1415549 100644 | |||
85402 | err = -EFAULT; | 85864 | err = -EFAULT; |
85403 | break; | 85865 | break; |
85404 | diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c | 85866 | diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c |
85405 | index 7c7e932..8d23158 100644 | 85867 | index c5f9cd6..8d23158 100644 |
85406 | --- a/net/bluetooth/l2cap_core.c | 85868 | --- a/net/bluetooth/l2cap_core.c |
85407 | +++ b/net/bluetooth/l2cap_core.c | 85869 | +++ b/net/bluetooth/l2cap_core.c |
85408 | @@ -3395,8 +3395,10 @@ static int l2cap_parse_conf_rsp(struct l2cap_chan *chan, void *rsp, int len, | 85870 | @@ -3395,8 +3395,10 @@ static int l2cap_parse_conf_rsp(struct l2cap_chan *chan, void *rsp, int len, |
@@ -85418,223 +85880,6 @@ index 7c7e932..8d23158 100644 | |||
85418 | 85880 | ||
85419 | if (test_bit(CONF_STATE2_DEVICE, &chan->conf_state) && | 85881 | if (test_bit(CONF_STATE2_DEVICE, &chan->conf_state) && |
85420 | rfc.mode != chan->mode) | 85882 | rfc.mode != chan->mode) |
85421 | @@ -3568,10 +3570,14 @@ static void l2cap_conf_rfc_get(struct l2cap_chan *chan, void *rsp, int len) | ||
85422 | } | ||
85423 | |||
85424 | static inline int l2cap_command_rej(struct l2cap_conn *conn, | ||
85425 | - struct l2cap_cmd_hdr *cmd, u8 *data) | ||
85426 | + struct l2cap_cmd_hdr *cmd, u16 cmd_len, | ||
85427 | + u8 *data) | ||
85428 | { | ||
85429 | struct l2cap_cmd_rej_unk *rej = (struct l2cap_cmd_rej_unk *) data; | ||
85430 | |||
85431 | + if (cmd_len < sizeof(*rej)) | ||
85432 | + return -EPROTO; | ||
85433 | + | ||
85434 | if (rej->reason != L2CAP_REJ_NOT_UNDERSTOOD) | ||
85435 | return 0; | ||
85436 | |||
85437 | @@ -3720,11 +3726,14 @@ sendresp: | ||
85438 | } | ||
85439 | |||
85440 | static int l2cap_connect_req(struct l2cap_conn *conn, | ||
85441 | - struct l2cap_cmd_hdr *cmd, u8 *data) | ||
85442 | + struct l2cap_cmd_hdr *cmd, u16 cmd_len, u8 *data) | ||
85443 | { | ||
85444 | struct hci_dev *hdev = conn->hcon->hdev; | ||
85445 | struct hci_conn *hcon = conn->hcon; | ||
85446 | |||
85447 | + if (cmd_len < sizeof(struct l2cap_conn_req)) | ||
85448 | + return -EPROTO; | ||
85449 | + | ||
85450 | hci_dev_lock(hdev); | ||
85451 | if (test_bit(HCI_MGMT, &hdev->dev_flags) && | ||
85452 | !test_and_set_bit(HCI_CONN_MGMT_CONNECTED, &hcon->flags)) | ||
85453 | @@ -3738,7 +3747,8 @@ static int l2cap_connect_req(struct l2cap_conn *conn, | ||
85454 | } | ||
85455 | |||
85456 | static int l2cap_connect_create_rsp(struct l2cap_conn *conn, | ||
85457 | - struct l2cap_cmd_hdr *cmd, u8 *data) | ||
85458 | + struct l2cap_cmd_hdr *cmd, u16 cmd_len, | ||
85459 | + u8 *data) | ||
85460 | { | ||
85461 | struct l2cap_conn_rsp *rsp = (struct l2cap_conn_rsp *) data; | ||
85462 | u16 scid, dcid, result, status; | ||
85463 | @@ -3746,6 +3756,9 @@ static int l2cap_connect_create_rsp(struct l2cap_conn *conn, | ||
85464 | u8 req[128]; | ||
85465 | int err; | ||
85466 | |||
85467 | + if (cmd_len < sizeof(*rsp)) | ||
85468 | + return -EPROTO; | ||
85469 | + | ||
85470 | scid = __le16_to_cpu(rsp->scid); | ||
85471 | dcid = __le16_to_cpu(rsp->dcid); | ||
85472 | result = __le16_to_cpu(rsp->result); | ||
85473 | @@ -3843,6 +3856,9 @@ static inline int l2cap_config_req(struct l2cap_conn *conn, | ||
85474 | struct l2cap_chan *chan; | ||
85475 | int len, err = 0; | ||
85476 | |||
85477 | + if (cmd_len < sizeof(*req)) | ||
85478 | + return -EPROTO; | ||
85479 | + | ||
85480 | dcid = __le16_to_cpu(req->dcid); | ||
85481 | flags = __le16_to_cpu(req->flags); | ||
85482 | |||
85483 | @@ -3866,7 +3882,7 @@ static inline int l2cap_config_req(struct l2cap_conn *conn, | ||
85484 | |||
85485 | /* Reject if config buffer is too small. */ | ||
85486 | len = cmd_len - sizeof(*req); | ||
85487 | - if (len < 0 || chan->conf_len + len > sizeof(chan->conf_req)) { | ||
85488 | + if (chan->conf_len + len > sizeof(chan->conf_req)) { | ||
85489 | l2cap_send_cmd(conn, cmd->ident, L2CAP_CONF_RSP, | ||
85490 | l2cap_build_conf_rsp(chan, rsp, | ||
85491 | L2CAP_CONF_REJECT, flags), rsp); | ||
85492 | @@ -3944,14 +3960,18 @@ unlock: | ||
85493 | } | ||
85494 | |||
85495 | static inline int l2cap_config_rsp(struct l2cap_conn *conn, | ||
85496 | - struct l2cap_cmd_hdr *cmd, u8 *data) | ||
85497 | + struct l2cap_cmd_hdr *cmd, u16 cmd_len, | ||
85498 | + u8 *data) | ||
85499 | { | ||
85500 | struct l2cap_conf_rsp *rsp = (struct l2cap_conf_rsp *)data; | ||
85501 | u16 scid, flags, result; | ||
85502 | struct l2cap_chan *chan; | ||
85503 | - int len = le16_to_cpu(cmd->len) - sizeof(*rsp); | ||
85504 | + int len = cmd_len - sizeof(*rsp); | ||
85505 | int err = 0; | ||
85506 | |||
85507 | + if (cmd_len < sizeof(*rsp)) | ||
85508 | + return -EPROTO; | ||
85509 | + | ||
85510 | scid = __le16_to_cpu(rsp->scid); | ||
85511 | flags = __le16_to_cpu(rsp->flags); | ||
85512 | result = __le16_to_cpu(rsp->result); | ||
85513 | @@ -4052,7 +4072,8 @@ done: | ||
85514 | } | ||
85515 | |||
85516 | static inline int l2cap_disconnect_req(struct l2cap_conn *conn, | ||
85517 | - struct l2cap_cmd_hdr *cmd, u8 *data) | ||
85518 | + struct l2cap_cmd_hdr *cmd, u16 cmd_len, | ||
85519 | + u8 *data) | ||
85520 | { | ||
85521 | struct l2cap_disconn_req *req = (struct l2cap_disconn_req *) data; | ||
85522 | struct l2cap_disconn_rsp rsp; | ||
85523 | @@ -4060,6 +4081,9 @@ static inline int l2cap_disconnect_req(struct l2cap_conn *conn, | ||
85524 | struct l2cap_chan *chan; | ||
85525 | struct sock *sk; | ||
85526 | |||
85527 | + if (cmd_len != sizeof(*req)) | ||
85528 | + return -EPROTO; | ||
85529 | + | ||
85530 | scid = __le16_to_cpu(req->scid); | ||
85531 | dcid = __le16_to_cpu(req->dcid); | ||
85532 | |||
85533 | @@ -4099,12 +4123,16 @@ static inline int l2cap_disconnect_req(struct l2cap_conn *conn, | ||
85534 | } | ||
85535 | |||
85536 | static inline int l2cap_disconnect_rsp(struct l2cap_conn *conn, | ||
85537 | - struct l2cap_cmd_hdr *cmd, u8 *data) | ||
85538 | + struct l2cap_cmd_hdr *cmd, u16 cmd_len, | ||
85539 | + u8 *data) | ||
85540 | { | ||
85541 | struct l2cap_disconn_rsp *rsp = (struct l2cap_disconn_rsp *) data; | ||
85542 | u16 dcid, scid; | ||
85543 | struct l2cap_chan *chan; | ||
85544 | |||
85545 | + if (cmd_len != sizeof(*rsp)) | ||
85546 | + return -EPROTO; | ||
85547 | + | ||
85548 | scid = __le16_to_cpu(rsp->scid); | ||
85549 | dcid = __le16_to_cpu(rsp->dcid); | ||
85550 | |||
85551 | @@ -4134,11 +4162,15 @@ static inline int l2cap_disconnect_rsp(struct l2cap_conn *conn, | ||
85552 | } | ||
85553 | |||
85554 | static inline int l2cap_information_req(struct l2cap_conn *conn, | ||
85555 | - struct l2cap_cmd_hdr *cmd, u8 *data) | ||
85556 | + struct l2cap_cmd_hdr *cmd, u16 cmd_len, | ||
85557 | + u8 *data) | ||
85558 | { | ||
85559 | struct l2cap_info_req *req = (struct l2cap_info_req *) data; | ||
85560 | u16 type; | ||
85561 | |||
85562 | + if (cmd_len != sizeof(*req)) | ||
85563 | + return -EPROTO; | ||
85564 | + | ||
85565 | type = __le16_to_cpu(req->type); | ||
85566 | |||
85567 | BT_DBG("type 0x%4.4x", type); | ||
85568 | @@ -4185,11 +4217,15 @@ static inline int l2cap_information_req(struct l2cap_conn *conn, | ||
85569 | } | ||
85570 | |||
85571 | static inline int l2cap_information_rsp(struct l2cap_conn *conn, | ||
85572 | - struct l2cap_cmd_hdr *cmd, u8 *data) | ||
85573 | + struct l2cap_cmd_hdr *cmd, u16 cmd_len, | ||
85574 | + u8 *data) | ||
85575 | { | ||
85576 | struct l2cap_info_rsp *rsp = (struct l2cap_info_rsp *) data; | ||
85577 | u16 type, result; | ||
85578 | |||
85579 | + if (cmd_len != sizeof(*rsp)) | ||
85580 | + return -EPROTO; | ||
85581 | + | ||
85582 | type = __le16_to_cpu(rsp->type); | ||
85583 | result = __le16_to_cpu(rsp->result); | ||
85584 | |||
85585 | @@ -5055,16 +5091,16 @@ static inline int l2cap_bredr_sig_cmd(struct l2cap_conn *conn, | ||
85586 | |||
85587 | switch (cmd->code) { | ||
85588 | case L2CAP_COMMAND_REJ: | ||
85589 | - l2cap_command_rej(conn, cmd, data); | ||
85590 | + l2cap_command_rej(conn, cmd, cmd_len, data); | ||
85591 | break; | ||
85592 | |||
85593 | case L2CAP_CONN_REQ: | ||
85594 | - err = l2cap_connect_req(conn, cmd, data); | ||
85595 | + err = l2cap_connect_req(conn, cmd, cmd_len, data); | ||
85596 | break; | ||
85597 | |||
85598 | case L2CAP_CONN_RSP: | ||
85599 | case L2CAP_CREATE_CHAN_RSP: | ||
85600 | - err = l2cap_connect_create_rsp(conn, cmd, data); | ||
85601 | + err = l2cap_connect_create_rsp(conn, cmd, cmd_len, data); | ||
85602 | break; | ||
85603 | |||
85604 | case L2CAP_CONF_REQ: | ||
85605 | @@ -5072,15 +5108,15 @@ static inline int l2cap_bredr_sig_cmd(struct l2cap_conn *conn, | ||
85606 | break; | ||
85607 | |||
85608 | case L2CAP_CONF_RSP: | ||
85609 | - err = l2cap_config_rsp(conn, cmd, data); | ||
85610 | + err = l2cap_config_rsp(conn, cmd, cmd_len, data); | ||
85611 | break; | ||
85612 | |||
85613 | case L2CAP_DISCONN_REQ: | ||
85614 | - err = l2cap_disconnect_req(conn, cmd, data); | ||
85615 | + err = l2cap_disconnect_req(conn, cmd, cmd_len, data); | ||
85616 | break; | ||
85617 | |||
85618 | case L2CAP_DISCONN_RSP: | ||
85619 | - err = l2cap_disconnect_rsp(conn, cmd, data); | ||
85620 | + err = l2cap_disconnect_rsp(conn, cmd, cmd_len, data); | ||
85621 | break; | ||
85622 | |||
85623 | case L2CAP_ECHO_REQ: | ||
85624 | @@ -5091,11 +5127,11 @@ static inline int l2cap_bredr_sig_cmd(struct l2cap_conn *conn, | ||
85625 | break; | ||
85626 | |||
85627 | case L2CAP_INFO_REQ: | ||
85628 | - err = l2cap_information_req(conn, cmd, data); | ||
85629 | + err = l2cap_information_req(conn, cmd, cmd_len, data); | ||
85630 | break; | ||
85631 | |||
85632 | case L2CAP_INFO_RSP: | ||
85633 | - err = l2cap_information_rsp(conn, cmd, data); | ||
85634 | + err = l2cap_information_rsp(conn, cmd, cmd_len, data); | ||
85635 | break; | ||
85636 | |||
85637 | case L2CAP_CREATE_CHAN_REQ: | ||
85638 | diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c | 85883 | diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c |
85639 | index 1bcfb84..dad9f98 100644 | 85884 | index 1bcfb84..dad9f98 100644 |
85640 | --- a/net/bluetooth/l2cap_sock.c | 85885 | --- a/net/bluetooth/l2cap_sock.c |
@@ -89030,6 +89275,28 @@ index 58ab405..50eb8d3 100644 | |||
89030 | unsigned int users) | 89275 | unsigned int users) |
89031 | { | 89276 | { |
89032 | if (users > 0) | 89277 | if (users > 0) |
89278 | diff --git a/net/netfilter/nf_conntrack_proto_dccp.c b/net/netfilter/nf_conntrack_proto_dccp.c | ||
89279 | index ba65b20..2a4d937 100644 | ||
89280 | --- a/net/netfilter/nf_conntrack_proto_dccp.c | ||
89281 | +++ b/net/netfilter/nf_conntrack_proto_dccp.c | ||
89282 | @@ -456,7 +456,7 @@ static bool dccp_new(struct nf_conn *ct, const struct sk_buff *skb, | ||
89283 | |||
89284 | out_invalid: | ||
89285 | if (LOG_INVALID(net, IPPROTO_DCCP)) | ||
89286 | - nf_log_packet(nf_ct_l3num(ct), 0, skb, NULL, NULL, NULL, msg); | ||
89287 | + nf_log_packet(nf_ct_l3num(ct), 0, skb, NULL, NULL, NULL, "%s", msg); | ||
89288 | return false; | ||
89289 | } | ||
89290 | |||
89291 | @@ -613,7 +613,7 @@ static int dccp_error(struct net *net, struct nf_conn *tmpl, | ||
89292 | |||
89293 | out_invalid: | ||
89294 | if (LOG_INVALID(net, IPPROTO_DCCP)) | ||
89295 | - nf_log_packet(pf, 0, skb, NULL, NULL, NULL, msg); | ||
89296 | + nf_log_packet(pf, 0, skb, NULL, NULL, NULL, "%s", msg); | ||
89297 | return -NF_ACCEPT; | ||
89298 | } | ||
89299 | |||
89033 | diff --git a/net/netfilter/nf_conntrack_standalone.c b/net/netfilter/nf_conntrack_standalone.c | 89300 | diff --git a/net/netfilter/nf_conntrack_standalone.c b/net/netfilter/nf_conntrack_standalone.c |
89034 | index fedee39..d62a93d 100644 | 89301 | index fedee39..d62a93d 100644 |
89035 | --- a/net/netfilter/nf_conntrack_standalone.c | 89302 | --- a/net/netfilter/nf_conntrack_standalone.c |
@@ -90576,9 +90843,18 @@ index 5356b12..c0f4c29 100644 | |||
90576 | #else | 90843 | #else |
90577 | static inline void rpc_task_set_debuginfo(struct rpc_task *task) | 90844 | static inline void rpc_task_set_debuginfo(struct rpc_task *task) |
90578 | diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c | 90845 | diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c |
90579 | index 89a588b..ba2cef8 100644 | 90846 | index 89a588b..678ed90 100644 |
90580 | --- a/net/sunrpc/svc.c | 90847 | --- a/net/sunrpc/svc.c |
90581 | +++ b/net/sunrpc/svc.c | 90848 | +++ b/net/sunrpc/svc.c |
90849 | @@ -740,7 +740,7 @@ svc_set_num_threads(struct svc_serv *serv, struct svc_pool *pool, int nrservs) | ||
90850 | |||
90851 | __module_get(serv->sv_module); | ||
90852 | task = kthread_create_on_node(serv->sv_function, rqstp, | ||
90853 | - node, serv->sv_name); | ||
90854 | + node, "%s", serv->sv_name); | ||
90855 | if (IS_ERR(task)) { | ||
90856 | error = PTR_ERR(task); | ||
90857 | module_put(serv->sv_module); | ||
90582 | @@ -1160,7 +1160,9 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *argv, struct kvec *resv) | 90858 | @@ -1160,7 +1160,9 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *argv, struct kvec *resv) |
90583 | svc_putnl(resv, RPC_SUCCESS); | 90859 | svc_putnl(resv, RPC_SUCCESS); |
90584 | 90860 | ||
@@ -91681,10 +91957,10 @@ index f5eb43d..1814de8 100644 | |||
91681 | shdr = (Elf_Shdr *)((char *)ehdr + _r(&ehdr->e_shoff)); | 91957 | shdr = (Elf_Shdr *)((char *)ehdr + _r(&ehdr->e_shoff)); |
91682 | shstrtab_sec = shdr + r2(&ehdr->e_shstrndx); | 91958 | shstrtab_sec = shdr + r2(&ehdr->e_shstrndx); |
91683 | diff --git a/security/Kconfig b/security/Kconfig | 91959 | diff --git a/security/Kconfig b/security/Kconfig |
91684 | index e9c6ac7..e6254cf 100644 | 91960 | index e9c6ac7..66bf8e9 100644 |
91685 | --- a/security/Kconfig | 91961 | --- a/security/Kconfig |
91686 | +++ b/security/Kconfig | 91962 | +++ b/security/Kconfig |
91687 | @@ -4,6 +4,944 @@ | 91963 | @@ -4,6 +4,945 @@ |
91688 | 91964 | ||
91689 | menu "Security options" | 91965 | menu "Security options" |
91690 | 91966 | ||
@@ -92309,15 +92585,16 @@ index e9c6ac7..e6254cf 100644 | |||
92309 | + int "Minimum amount of memory reserved for module code" | 92585 | + int "Minimum amount of memory reserved for module code" |
92310 | + default "4" if (!GRKERNSEC_CONFIG_AUTO || GRKERNSEC_CONFIG_SERVER) | 92586 | + default "4" if (!GRKERNSEC_CONFIG_AUTO || GRKERNSEC_CONFIG_SERVER) |
92311 | + default "12" if (GRKERNSEC_CONFIG_AUTO && GRKERNSEC_CONFIG_DESKTOP) | 92587 | + default "12" if (GRKERNSEC_CONFIG_AUTO && GRKERNSEC_CONFIG_DESKTOP) |
92312 | + depends on PAX_KERNEXEC && X86_32 && MODULES | 92588 | + depends on PAX_KERNEXEC && X86_32 |
92313 | + help | 92589 | + help |
92314 | + Due to implementation details the kernel must reserve a fixed | 92590 | + Due to implementation details the kernel must reserve a fixed |
92315 | + amount of memory for module code at compile time that cannot be | 92591 | + amount of memory for runtime allocated code (such as modules) |
92316 | + changed at runtime. Here you can specify the minimum amount | 92592 | + at compile time that cannot be changed at runtime. Here you |
92317 | + in MB that will be reserved. Due to the same implementation | 92593 | + can specify the minimum amount in MB that will be reserved. |
92318 | + details this size will always be rounded up to the next 2/4 MB | 92594 | + Due to the same implementation details this size will always |
92319 | + boundary (depends on PAE) so the actually available memory for | 92595 | + be rounded up to the next 2/4 MB boundary (depends on PAE) so |
92320 | + module code will usually be more than this minimum. | 92596 | + the actually available memory for runtime allocated code will |
92597 | + usually be more than this minimum. | ||
92321 | + | 92598 | + |
92322 | + The default 4 MB should be enough for most users but if you have | 92599 | + The default 4 MB should be enough for most users but if you have |
92323 | + an excessive number of modules (e.g., most distribution configs | 92600 | + an excessive number of modules (e.g., most distribution configs |
@@ -92629,7 +92906,7 @@ index e9c6ac7..e6254cf 100644 | |||
92629 | source security/keys/Kconfig | 92906 | source security/keys/Kconfig |
92630 | 92907 | ||
92631 | config SECURITY_DMESG_RESTRICT | 92908 | config SECURITY_DMESG_RESTRICT |
92632 | @@ -103,7 +1041,7 @@ config INTEL_TXT | 92909 | @@ -103,7 +1042,7 @@ config INTEL_TXT |
92633 | config LSM_MMAP_MIN_ADDR | 92910 | config LSM_MMAP_MIN_ADDR |
92634 | int "Low address space for LSM to protect from user allocation" | 92911 | int "Low address space for LSM to protect from user allocation" |
92635 | depends on SECURITY && SECURITY_SELINUX | 92912 | depends on SECURITY && SECURITY_SELINUX |
@@ -92638,6 +92915,272 @@ index e9c6ac7..e6254cf 100644 | |||
92638 | default 65536 | 92915 | default 65536 |
92639 | help | 92916 | help |
92640 | This is the portion of low virtual memory which should be protected | 92917 | This is the portion of low virtual memory which should be protected |
92918 | diff --git a/security/apparmor/Kconfig b/security/apparmor/Kconfig | ||
92919 | index 9b9013b..51ebf96 100644 | ||
92920 | --- a/security/apparmor/Kconfig | ||
92921 | +++ b/security/apparmor/Kconfig | ||
92922 | @@ -29,3 +29,12 @@ config SECURITY_APPARMOR_BOOTPARAM_VALUE | ||
92923 | boot. | ||
92924 | |||
92925 | If you are unsure how to answer this question, answer 1. | ||
92926 | + | ||
92927 | +config SECURITY_APPARMOR_COMPAT_24 | ||
92928 | + bool "Enable AppArmor 2.4 compatability" | ||
92929 | + depends on SECURITY_APPARMOR | ||
92930 | + default y | ||
92931 | + help | ||
92932 | + This option enables compatability with AppArmor 2.4. It is | ||
92933 | + recommended if compatability with older versions of AppArmor | ||
92934 | + is desired. | ||
92935 | diff --git a/security/apparmor/apparmorfs.c b/security/apparmor/apparmorfs.c | ||
92936 | index 16c15ec..42b7c9f 100644 | ||
92937 | --- a/security/apparmor/apparmorfs.c | ||
92938 | +++ b/security/apparmor/apparmorfs.c | ||
92939 | @@ -182,6 +182,234 @@ const struct file_operations aa_fs_seq_file_ops = { | ||
92940 | .release = single_release, | ||
92941 | }; | ||
92942 | |||
92943 | +#ifdef CONFIG_SECURITY_APPARMOR_COMPAT_24 | ||
92944 | +/** | ||
92945 | + * __next_namespace - find the next namespace to list | ||
92946 | + * @root: root namespace to stop search at (NOT NULL) | ||
92947 | + * @ns: current ns position (NOT NULL) | ||
92948 | + * | ||
92949 | + * Find the next namespace from @ns under @root and handle all locking needed | ||
92950 | + * while switching current namespace. | ||
92951 | + * | ||
92952 | + * Returns: next namespace or NULL if at last namespace under @root | ||
92953 | + * NOTE: will not unlock root->lock | ||
92954 | + */ | ||
92955 | +static struct aa_namespace *__next_namespace(struct aa_namespace *root, | ||
92956 | + struct aa_namespace *ns) | ||
92957 | +{ | ||
92958 | + struct aa_namespace *parent; | ||
92959 | + | ||
92960 | + /* is next namespace a child */ | ||
92961 | + if (!list_empty(&ns->sub_ns)) { | ||
92962 | + struct aa_namespace *next; | ||
92963 | + next = list_first_entry(&ns->sub_ns, typeof(*ns), base.list); | ||
92964 | + read_lock(&next->lock); | ||
92965 | + return next; | ||
92966 | + } | ||
92967 | + | ||
92968 | + /* check if the next ns is a sibling, parent, gp, .. */ | ||
92969 | + parent = ns->parent; | ||
92970 | + while (parent) { | ||
92971 | + read_unlock(&ns->lock); | ||
92972 | + list_for_each_entry_continue(ns, &parent->sub_ns, base.list) { | ||
92973 | + read_lock(&ns->lock); | ||
92974 | + return ns; | ||
92975 | + } | ||
92976 | + if (parent == root) | ||
92977 | + return NULL; | ||
92978 | + ns = parent; | ||
92979 | + parent = parent->parent; | ||
92980 | + } | ||
92981 | + | ||
92982 | + return NULL; | ||
92983 | +} | ||
92984 | + | ||
92985 | +/** | ||
92986 | + * __first_profile - find the first profile in a namespace | ||
92987 | + * @root: namespace that is root of profiles being displayed (NOT NULL) | ||
92988 | + * @ns: namespace to start in (NOT NULL) | ||
92989 | + * | ||
92990 | + * Returns: unrefcounted profile or NULL if no profile | ||
92991 | + */ | ||
92992 | +static struct aa_profile *__first_profile(struct aa_namespace *root, | ||
92993 | + struct aa_namespace *ns) | ||
92994 | +{ | ||
92995 | + for ( ; ns; ns = __next_namespace(root, ns)) { | ||
92996 | + if (!list_empty(&ns->base.profiles)) | ||
92997 | + return list_first_entry(&ns->base.profiles, | ||
92998 | + struct aa_profile, base.list); | ||
92999 | + } | ||
93000 | + return NULL; | ||
93001 | +} | ||
93002 | + | ||
93003 | +/** | ||
93004 | + * __next_profile - step to the next profile in a profile tree | ||
93005 | + * @profile: current profile in tree (NOT NULL) | ||
93006 | + * | ||
93007 | + * Perform a depth first taversal on the profile tree in a namespace | ||
93008 | + * | ||
93009 | + * Returns: next profile or NULL if done | ||
93010 | + * Requires: profile->ns.lock to be held | ||
93011 | + */ | ||
93012 | +static struct aa_profile *__next_profile(struct aa_profile *p) | ||
93013 | +{ | ||
93014 | + struct aa_profile *parent; | ||
93015 | + struct aa_namespace *ns = p->ns; | ||
93016 | + | ||
93017 | + /* is next profile a child */ | ||
93018 | + if (!list_empty(&p->base.profiles)) | ||
93019 | + return list_first_entry(&p->base.profiles, typeof(*p), | ||
93020 | + base.list); | ||
93021 | + | ||
93022 | + /* is next profile a sibling, parent sibling, gp, subling, .. */ | ||
93023 | + parent = p->parent; | ||
93024 | + while (parent) { | ||
93025 | + list_for_each_entry_continue(p, &parent->base.profiles, | ||
93026 | + base.list) | ||
93027 | + return p; | ||
93028 | + p = parent; | ||
93029 | + parent = parent->parent; | ||
93030 | + } | ||
93031 | + | ||
93032 | + /* is next another profile in the namespace */ | ||
93033 | + list_for_each_entry_continue(p, &ns->base.profiles, base.list) | ||
93034 | + return p; | ||
93035 | + | ||
93036 | + return NULL; | ||
93037 | +} | ||
93038 | + | ||
93039 | +/** | ||
93040 | + * next_profile - step to the next profile in where ever it may be | ||
93041 | + * @root: root namespace (NOT NULL) | ||
93042 | + * @profile: current profile (NOT NULL) | ||
93043 | + * | ||
93044 | + * Returns: next profile or NULL if there isn't one | ||
93045 | + */ | ||
93046 | +static struct aa_profile *next_profile(struct aa_namespace *root, | ||
93047 | + struct aa_profile *profile) | ||
93048 | +{ | ||
93049 | + struct aa_profile *next = __next_profile(profile); | ||
93050 | + if (next) | ||
93051 | + return next; | ||
93052 | + | ||
93053 | + /* finished all profiles in namespace move to next namespace */ | ||
93054 | + return __first_profile(root, __next_namespace(root, profile->ns)); | ||
93055 | +} | ||
93056 | + | ||
93057 | +/** | ||
93058 | + * p_start - start a depth first traversal of profile tree | ||
93059 | + * @f: seq_file to fill | ||
93060 | + * @pos: current position | ||
93061 | + * | ||
93062 | + * Returns: first profile under current namespace or NULL if none found | ||
93063 | + * | ||
93064 | + * acquires first ns->lock | ||
93065 | + */ | ||
93066 | +static void *p_start(struct seq_file *f, loff_t *pos) | ||
93067 | + __acquires(root->lock) | ||
93068 | +{ | ||
93069 | + struct aa_profile *profile = NULL; | ||
93070 | + struct aa_namespace *root = aa_current_profile()->ns; | ||
93071 | + loff_t l = *pos; | ||
93072 | + f->private = aa_get_namespace(root); | ||
93073 | + | ||
93074 | + | ||
93075 | + /* find the first profile */ | ||
93076 | + read_lock(&root->lock); | ||
93077 | + profile = __first_profile(root, root); | ||
93078 | + | ||
93079 | + /* skip to position */ | ||
93080 | + for (; profile && l > 0; l--) | ||
93081 | + profile = next_profile(root, profile); | ||
93082 | + | ||
93083 | + return profile; | ||
93084 | +} | ||
93085 | + | ||
93086 | +/** | ||
93087 | + * p_next - read the next profile entry | ||
93088 | + * @f: seq_file to fill | ||
93089 | + * @p: profile previously returned | ||
93090 | + * @pos: current position | ||
93091 | + * | ||
93092 | + * Returns: next profile after @p or NULL if none | ||
93093 | + * | ||
93094 | + * may acquire/release locks in namespace tree as necessary | ||
93095 | + */ | ||
93096 | +static void *p_next(struct seq_file *f, void *p, loff_t *pos) | ||
93097 | +{ | ||
93098 | + struct aa_profile *profile = p; | ||
93099 | + struct aa_namespace *root = f->private; | ||
93100 | + (*pos)++; | ||
93101 | + | ||
93102 | + return next_profile(root, profile); | ||
93103 | +} | ||
93104 | + | ||
93105 | +/** | ||
93106 | + * p_stop - stop depth first traversal | ||
93107 | + * @f: seq_file we are filling | ||
93108 | + * @p: the last profile writen | ||
93109 | + * | ||
93110 | + * Release all locking done by p_start/p_next on namespace tree | ||
93111 | + */ | ||
93112 | +static void p_stop(struct seq_file *f, void *p) | ||
93113 | + __releases(root->lock) | ||
93114 | +{ | ||
93115 | + struct aa_profile *profile = p; | ||
93116 | + struct aa_namespace *root = f->private, *ns; | ||
93117 | + | ||
93118 | + if (profile) { | ||
93119 | + for (ns = profile->ns; ns && ns != root; ns = ns->parent) | ||
93120 | + read_unlock(&ns->lock); | ||
93121 | + } | ||
93122 | + read_unlock(&root->lock); | ||
93123 | + aa_put_namespace(root); | ||
93124 | +} | ||
93125 | + | ||
93126 | +/** | ||
93127 | + * seq_show_profile - show a profile entry | ||
93128 | + * @f: seq_file to file | ||
93129 | + * @p: current position (profile) (NOT NULL) | ||
93130 | + * | ||
93131 | + * Returns: error on failure | ||
93132 | + */ | ||
93133 | +static int seq_show_profile(struct seq_file *f, void *p) | ||
93134 | +{ | ||
93135 | + struct aa_profile *profile = (struct aa_profile *)p; | ||
93136 | + struct aa_namespace *root = f->private; | ||
93137 | + | ||
93138 | + if (profile->ns != root) | ||
93139 | + seq_printf(f, ":%s://", aa_ns_name(root, profile->ns)); | ||
93140 | + seq_printf(f, "%s (%s)\n", profile->base.hname, | ||
93141 | + COMPLAIN_MODE(profile) ? "complain" : "enforce"); | ||
93142 | + | ||
93143 | + return 0; | ||
93144 | +} | ||
93145 | + | ||
93146 | +static const struct seq_operations aa_fs_profiles_op = { | ||
93147 | + .start = p_start, | ||
93148 | + .next = p_next, | ||
93149 | + .stop = p_stop, | ||
93150 | + .show = seq_show_profile, | ||
93151 | +}; | ||
93152 | + | ||
93153 | +static int profiles_open(struct inode *inode, struct file *file) | ||
93154 | +{ | ||
93155 | + return seq_open(file, &aa_fs_profiles_op); | ||
93156 | +} | ||
93157 | + | ||
93158 | +static int profiles_release(struct inode *inode, struct file *file) | ||
93159 | +{ | ||
93160 | + return seq_release(inode, file); | ||
93161 | +} | ||
93162 | + | ||
93163 | +const struct file_operations aa_fs_profiles_fops = { | ||
93164 | + .open = profiles_open, | ||
93165 | + .read = seq_read, | ||
93166 | + .llseek = seq_lseek, | ||
93167 | + .release = profiles_release, | ||
93168 | +}; | ||
93169 | +#endif /* CONFIG_SECURITY_APPARMOR_COMPAT_24 */ | ||
93170 | + | ||
93171 | /** Base file system setup **/ | ||
93172 | |||
93173 | static struct aa_fs_entry aa_fs_entry_file[] = { | ||
93174 | @@ -210,6 +438,9 @@ static struct aa_fs_entry aa_fs_entry_apparmor[] = { | ||
93175 | AA_FS_FILE_FOPS(".load", 0640, &aa_fs_profile_load), | ||
93176 | AA_FS_FILE_FOPS(".replace", 0640, &aa_fs_profile_replace), | ||
93177 | AA_FS_FILE_FOPS(".remove", 0640, &aa_fs_profile_remove), | ||
93178 | +#ifdef CONFIG_SECURITY_APPARMOR_COMPAT_24 | ||
93179 | + AA_FS_FILE_FOPS("profiles", 0640, &aa_fs_profiles_fops), | ||
93180 | +#endif | ||
93181 | AA_FS_DIR("features", aa_fs_entry_features), | ||
93182 | { } | ||
93183 | }; | ||
92641 | diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c | 93184 | diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c |
92642 | index b21830e..a7d1a17 100644 | 93185 | index b21830e..a7d1a17 100644 |
92643 | --- a/security/apparmor/lsm.c | 93186 | --- a/security/apparmor/lsm.c |
@@ -93286,6 +93829,19 @@ index 040c60e..989a19a 100644 | |||
93286 | dev->status = SNDRV_SEQ_DEVICE_FREE; | 93829 | dev->status = SNDRV_SEQ_DEVICE_FREE; |
93287 | dev->driver_data = NULL; | 93830 | dev->driver_data = NULL; |
93288 | ops->num_init_devices--; | 93831 | ops->num_init_devices--; |
93832 | diff --git a/sound/core/sound.c b/sound/core/sound.c | ||
93833 | index 70ccdab..50f2e10 100644 | ||
93834 | --- a/sound/core/sound.c | ||
93835 | +++ b/sound/core/sound.c | ||
93836 | @@ -86,7 +86,7 @@ static void snd_request_other(int minor) | ||
93837 | case SNDRV_MINOR_TIMER: str = "snd-timer"; break; | ||
93838 | default: return; | ||
93839 | } | ||
93840 | - request_module(str); | ||
93841 | + request_module("%s", str); | ||
93842 | } | ||
93843 | |||
93844 | #endif /* modular kernel */ | ||
93289 | diff --git a/sound/drivers/mts64.c b/sound/drivers/mts64.c | 93845 | diff --git a/sound/drivers/mts64.c b/sound/drivers/mts64.c |
93290 | index 4e0dd22..7a1f32c 100644 | 93846 | index 4e0dd22..7a1f32c 100644 |
93291 | --- a/sound/drivers/mts64.c | 93847 | --- a/sound/drivers/mts64.c |
@@ -93613,6 +94169,19 @@ index 7decbd9..d17d9d0 100644 | |||
93613 | struct device_node *np = pdev->dev.of_node; | 94169 | struct device_node *np = pdev->dev.of_node; |
93614 | const char *p, *sprop; | 94170 | const char *p, *sprop; |
93615 | const uint32_t *iprop; | 94171 | const uint32_t *iprop; |
94172 | diff --git a/sound/sound_core.c b/sound/sound_core.c | ||
94173 | index bb23009..db346c2 100644 | ||
94174 | --- a/sound/sound_core.c | ||
94175 | +++ b/sound/sound_core.c | ||
94176 | @@ -292,7 +292,7 @@ retry: | ||
94177 | } | ||
94178 | |||
94179 | device_create(sound_class, dev, MKDEV(SOUND_MAJOR, s->unit_minor), | ||
94180 | - NULL, s->name+6); | ||
94181 | + NULL, "%s", s->name+6); | ||
94182 | return s->unit_minor; | ||
94183 | |||
94184 | fail: | ||
93616 | diff --git a/tools/gcc/.gitignore b/tools/gcc/.gitignore | 94185 | diff --git a/tools/gcc/.gitignore b/tools/gcc/.gitignore |
93617 | new file mode 100644 | 94186 | new file mode 100644 |
93618 | index 0000000..50f2f2f | 94187 | index 0000000..50f2f2f |
diff --git a/main/linux-grsec/kernelconfig.x86 b/main/linux-grsec/kernelconfig.x86 index 5774d1f22d..3f50316571 100644 --- a/main/linux-grsec/kernelconfig.x86 +++ b/main/linux-grsec/kernelconfig.x86 | |||
@@ -1,6 +1,6 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated file; DO NOT EDIT. | 2 | # Automatically generated file; DO NOT EDIT. |
3 | # Linux/x86 3.9.5 Kernel Configuration | 3 | # Linux/x86 3.9.7 Kernel Configuration |
4 | # | 4 | # |
5 | # CONFIG_64BIT is not set | 5 | # CONFIG_64BIT is not set |
6 | CONFIG_X86_32=y | 6 | CONFIG_X86_32=y |
@@ -2308,7 +2308,7 @@ CONFIG_ATH9K=m | |||
2308 | CONFIG_ATH9K_PCI=y | 2308 | CONFIG_ATH9K_PCI=y |
2309 | CONFIG_ATH9K_AHB=y | 2309 | CONFIG_ATH9K_AHB=y |
2310 | # CONFIG_ATH9K_DEBUGFS is not set | 2310 | # CONFIG_ATH9K_DEBUGFS is not set |
2311 | CONFIG_ATH9K_RATE_CONTROL=y | 2311 | # CONFIG_ATH9K_LEGACY_RATE_CONTROL is not set |
2312 | CONFIG_ATH9K_HTC=m | 2312 | CONFIG_ATH9K_HTC=m |
2313 | # CONFIG_ATH9K_HTC_DEBUGFS is not set | 2313 | # CONFIG_ATH9K_HTC_DEBUGFS is not set |
2314 | CONFIG_CARL9170=m | 2314 | CONFIG_CARL9170=m |
diff --git a/main/linux-grsec/kernelconfig.x86_64 b/main/linux-grsec/kernelconfig.x86_64 index df9536d19f..f338d7ad0b 100644 --- a/main/linux-grsec/kernelconfig.x86_64 +++ b/main/linux-grsec/kernelconfig.x86_64 | |||
@@ -1,6 +1,6 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated file; DO NOT EDIT. | 2 | # Automatically generated file; DO NOT EDIT. |
3 | # Linux/x86 3.9.5 Kernel Configuration | 3 | # Linux/x86 3.9.7 Kernel Configuration |
4 | # | 4 | # |
5 | CONFIG_64BIT=y | 5 | CONFIG_64BIT=y |
6 | CONFIG_X86_64=y | 6 | CONFIG_X86_64=y |
@@ -2282,7 +2282,7 @@ CONFIG_ATH9K=m | |||
2282 | CONFIG_ATH9K_PCI=y | 2282 | CONFIG_ATH9K_PCI=y |
2283 | CONFIG_ATH9K_AHB=y | 2283 | CONFIG_ATH9K_AHB=y |
2284 | # CONFIG_ATH9K_DEBUGFS is not set | 2284 | # CONFIG_ATH9K_DEBUGFS is not set |
2285 | CONFIG_ATH9K_RATE_CONTROL=y | 2285 | # CONFIG_ATH9K_LEGACY_RATE_CONTROL is not set |
2286 | CONFIG_ATH9K_HTC=m | 2286 | CONFIG_ATH9K_HTC=m |
2287 | # CONFIG_ATH9K_HTC_DEBUGFS is not set | 2287 | # CONFIG_ATH9K_HTC_DEBUGFS is not set |
2288 | CONFIG_CARL9170=m | 2288 | CONFIG_CARL9170=m |