Re: [PATCH 02/11] fs: don't allow kernel reads and writes without iter ops

2020-08-18 Thread Kees Cook
egular ->read/->write methods and the iter > variants those could have different semantics for messed up enough > drivers. Also fails the kernel access to them in that case. > > Signed-off-by: Christoph Hellwig Reviewed-by: Kees Cook -- Kees Cook

Re: [PATCH 01/11] mem: remove duplicate ops for /dev/zero and /dev/null

2020-08-18 Thread Kees Cook
stoph Hellwig Reviewed-by: Kees Cook -- Kees Cook

Re: [PATCH 06/11] lkdtm: disable set_fs-based tests for !CONFIG_SET_FS

2020-08-18 Thread Kees Cook
rs/misc/lkdtm/usercopy.c > @@ -325,6 +325,7 @@ void lkdtm_USERCOPY_KERNEL(void) > vm_munmap(user_addr, PAGE_SIZE); > } > > +#ifdef CONFIG_SET_FS > void lkdtm_USERCOPY_KERNEL_DS(void) > { > char __user *user_ptr = > @@ -339,6 +340,7 @@ void lkdtm_USERCOPY_KERNEL_DS(void) &

Re: [PATCH 07/11] x86: move PAGE_OFFSET, TASK_SIZE & friends to page_{32,64}_types.h

2020-08-18 Thread Kees Cook
On Mon, Aug 17, 2020 at 09:32:08AM +0200, Christoph Hellwig wrote: > At least for 64-bit this moves them closer to some of the defines > they are based on, and it prepares for using the TASK_SIZE_MAX > definition from assembly. > > Signed-off-by: Christoph Hellwig Reviewe

Re: [PATCH 0/8] scsi: convert tasklets to use new tasklet_setup()

2020-08-17 Thread Kees Cook
ypeof(*var), tasklet_fieldname) > > Just use container_of directly since we all understand what it does. But then the lines get really long, wrapped, etc. This is what the timer_struct conversion did too (added a container_of wrapper), so I think it makes sense here too. -- Kees Cook

Re: [Latest Git kernel/Linux-next kernel] Xorg doesn't start after the seccomp updates v5.9-rc1

2020-08-07 Thread Kees Cook
Thanks for bisecting; yes, sorry for the trouble (I'm still trying to understand why my compat tests _passed_...). Regardless, can you try this patch: https://lore.kernel.org/lkml/20200807173609.GJ4402@mussarela/ -- Kees Cook

Re: [PATCH v2 5/5] powerpc: Add LKDTM test to hijack a patch mapping

2020-07-14 Thread Kees Cook
> + pr_err("FAIL: wrote to another cpu's patching area\n"); > + } else { > + kthread_stop(patching_kthrd); > + } > + > +out: > + /* Restore the original insn for any future lkdtm tests */ > + patch_instruction(patch_site, original_insn); Can this test be done for x86's instruction patching too? > +} > + > +#else > + > +void lkdtm_HIJACK_PATCH(void) > +{ > + if (!IS_ENABLED(CONFIG_PPC)) > + pr_err("XFAIL: this test is powerpc-only\n"); > + if (!IS_ENABLED(CONFIG_STRICT_KERNEL_RWX)) > + pr_err("XFAIL: this test requires CONFIG_STRICT_KERNEL_RWX\n"); > +} > + > +#endif /* CONFIG_PPC && CONFIG_STRICT_KERNEL_RWX */ > + > void __init lkdtm_perms_init(void) > { > /* Make sure we can write to __ro_after_init values during __init */ > -- > 2.27.0 Otherwise, looks good! -- Kees Cook

Re: [PATCH v5 06/12] arch: xtensa: add linker section for KUnit test suites

2020-06-26 Thread Kees Cook
> its own separate late_initcall. > > Signed-off-by: Brendan Higgins > --- > arch/xtensa/kernel/vmlinux.lds.S | 4 If you ever find yourself modifying multiple arch linker scripts for a series, something has gone wrong. ;) -- Kees Cook

Re: [PATCH v5 01/12] vmlinux.lds.h: add linker section for KUnit test suites

2020-06-26 Thread Kees Cook
INIT_DATA_SECTION. Not all architectures use the INIT_DATA_SECTION macro (e.g. arm64), but everything uses INIT_DATA. -- Kees Cook

Re: [PATCH 17/17] arch: rename copy_thread_tls() back to copy_thread()

2020-06-22 Thread Kees Cook
e, struct task_struct *p, > unsigned long tls) Maybe clean up the arg indentation too? I'm not sure how strongly people feel about that, but I think it'd be nice. Either way: Reviewed-by: Kees Cook -- Kees Cook

Re: [PATCH 16/17] arch: remove HAVE_COPY_THREAD_TLS

2020-06-22 Thread Kees Cook
be sufficient. Reviewed-by: Kees Cook -- Kees Cook

[PATCH] powerpc/mm: Fix typo in IS_ENABLED()

2020-06-05 Thread Kees Cook
erches.com Signed-off-by: Kees Cook --- arch/powerpc/mm/book3s64/hash_utils.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/mm/book3s64/hash_utils.c b/arch/powerpc/mm/book3s64/hash_utils.c index 8ed2411c3f39..cf2e1b06e5d4 100644 --- a/arch/powerpc/mm/book3s64/ha

Re: [PATCH] pwm: Add missing "CONFIG_" prefix

2020-06-04 Thread Kees Cook
On Wed, Jun 03, 2020 at 04:04:31PM -0700, Joe Perches wrote: > On Wed, 2020-06-03 at 15:40 -0700, Kees Cook wrote: > > The IS_ENABLED() use was missing the CONFIG_ prefix which would have > > lead to skipping this code. > > > > Fixes: 3ad1f3a33286 ("pwm: Implement

Re: [PATCH] pwm: Add missing "CONFIG_" prefix

2020-06-03 Thread Kees Cook
ing 16M linear map alignment"); > + pr_warn("Kernel not 16M aligned, disabling 16M > linear map alignment\n"); > aligned = false; > } Reviewed-by: Kees Cook -- Kees Cook

Re: [Intel-gfx] [PATCH 06/13] ocfs2: use new sysctl subdir helper register_sysctl_subdir()

2020-05-29 Thread Kees Cook
On Fri, May 29, 2020 at 11:49:12AM +, Luis Chamberlain wrote: > Yikes, sense, you're right. Nope, I left the random config tests to > 0day. Will fix, thanks! Yeah, I do the same for randconfig, but I always do an "allmodconfig" build before sending stuff. It's a good smoke

Re: [PATCH 06/13] ocfs2: use new sysctl subdir helper register_sysctl_subdir()

2020-05-29 Thread Kees Cook
me = "fs", > - .data = NULL, > - .maxlen = 0, > - .mode = 0555, > - .child = ocfs2_kern_table > - }, > - { } > -}; > + .data = NULL, > + .data = NULL, The conversion script doesn't like the .data field assignments. ;) Was this series built with allmodconfig? I would have expected this to blow up very badly. :) -- Kees Cook

Re: [PATCH 12/13] sysctl: add helper to register empty subdir

2020-05-29 Thread Kees Cook
ed-off-by: Luis Chamberlain Reviewed-by: Kees Cook -- Kees Cook

Re: [PATCH 13/13] fs: move binfmt_misc sysctl to its own file

2020-05-29 Thread Kees Cook
= "binfmt_misc", > - .mode = 0555, > - .child = sysctl_mount_point, > - }, > -#endif > { > .procname = "pipe-max-size", > .data = _max_size, > -- > 2.26.2 > -- Kees Cook

Re: [PATCH v4 2/6] printk: honor the max_reason field in kmsg_dumper

2020-05-22 Thread Kees Cook
On Fri, May 22, 2020 at 06:51:20PM +0200, Petr Mladek wrote: > On Fri 2020-05-15 11:44:30, Kees Cook wrote: > > From: Pavel Tatashin > > > > kmsg_dump() allows to dump kmesg buffer for various system events: oops, > > panic, reboot, etc. It provides an interface

Re: [PATCH] soc: fsl: qe: Replace one-element array and use struct_size() helper

2020-05-20 Thread Kees Cook
On Wed, May 20, 2020 at 06:52:21PM -0500, Li Yang wrote: > On Mon, May 18, 2020 at 5:57 PM Kees Cook wrote: > > Hm, looking at this code, I see a few other things that need to be > > fixed: > > > > 1) drivers/tty/serial/ucc_uart.c does not do a be32_to_cpu() conversio

Re: [PATCH v4 6/6] ramoops: Add max_reason optional field to ramoops DT node

2020-05-18 Thread Kees Cook
On Mon, May 18, 2020 at 04:45:32PM -0600, Rob Herring wrote: > On Fri, May 15, 2020 at 12:44 PM Kees Cook wrote: > > > > From: Pavel Tatashin > > Subject still has 'max_reason'. > > > > > Currently, it is possible to dump kmsges for panic, or oops. > &

Re: [PATCH] soc: fsl: qe: Replace one-element array and use struct_size() helper

2020-05-18 Thread Kees Cook
e < firmware || code >= firmware_end || + code + count < firmware || code + count >= firmware_end) { + printk(KERN_ERR "qe-firmware: invalid ucode offset\n"); + return -EIO; + } + } + /* * If the microcode calls for it, split the I-RAM. */ I haven't tested this. -- Kees Cook

Re: [PATCH v4 5/6] pstore/ram: Introduce max_reason and convert dump_oops

2020-05-15 Thread Kees Cook
pdata.max_reason = ramoops_max_reason; > > (ramoops_max_reason >= 0) might make more sense here, we do not want > negative max_reason even if it was provided by the user. Yeah, that's a good point. I'll tweak that. Thanks! -- Kees Cook

Re: [PATCH v4 5/6] pstore/ram: Introduce max_reason and convert dump_oops

2020-05-15 Thread Kees Cook
missing the patch where ramoops_parse_dt_size > -> ramoops_parse_dt_u32 get renamed, and updated to handle default > value. Oops! Sorry, I cut the line in the wrong place for sending out the delta on top of the pstore tree. :) It's unchanged from: https://lore.kernel.org/lkml/20200506211523.15077-4

[PATCH v4 6/6] ramoops: Add max_reason optional field to ramoops DT node

2020-05-15 Thread Kees Cook
-keesc...@chromium.org/ Signed-off-by: Kees Cook --- .../devicetree/bindings/reserved-memory/ramoops.txt | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/reserved-memory/ramoops.txt b/Documentation/devicetree/bindings/reserved-memory

[PATCH v4 0/6] allow ramoops to collect all kmesg_dump events

2020-05-15 Thread Kees Cook
6-1-pasha.tatas...@soleen.com Kees Cook (3): printk: Collapse shutdown types into a single dump reason printk: Introduce kmsg_dump_reason_str() pstore/ram: Introduce max_reason and convert dump_oops Pavel Tatashin (3): printk: honor the max_reason field in kmsg_dumper pstore/platform: P

[PATCH v4 2/6] printk: honor the max_reason field in kmsg_dumper

2020-05-15 Thread Kees Cook
is passed as kernel parameter. Allow clients to decide max_reason, and keep the current behavior when max_reason is not set. Signed-off-by: Pavel Tatashin Link: https://lore.kernel.org/lkml/20200506211523.15077-2-keesc...@chromium.org/ Signed-off-by: Kees Cook --- include/linux/kmsg_dump.h | 1

[PATCH v4 1/6] printk: Collapse shutdown types into a single dump reason

2020-05-15 Thread Kees Cook
+ck2bapv5u1ih5y9t5funtyximtfctdyxjcpuyjoyhnokr...@mail.gmail.com/ Signed-off-by: Kees Cook --- arch/powerpc/kernel/nvram_64.c | 4 +--- fs/pstore/platform.c | 8 ++-- include/linux/kmsg_dump.h | 4 +--- kernel/reboot.c| 6 +++--- 4 files changed, 7 insertions(+), 15

[PATCH v4 4/6] pstore/platform: Pass max_reason to kmesg dump

2020-05-15 Thread Kees Cook
behavior: store only Oopses and Panics, or everything if the printk.always_kmsg_dump boot param is set. Signed-off-by: Pavel Tatashin Link: https://lore.kernel.org/lkml/20200506211523.15077-3-keesc...@chromium.org/ Co-developed-by: Kees Cook Signed-off-by: Kees Cook --- fs/pstore/platform.c

[PATCH v4 5/6] pstore/ram: Introduce max_reason and convert dump_oops

2020-05-15 Thread Kees Cook
ops to behave as if max_reason was set to KMSG_DUMP_MAX. Co-developed-by: Pavel Tatashin Signed-off-by: Pavel Tatashin Link: https://lore.kernel.org/lkml/20200506211523.15077-5-keesc...@chromium.org/ Signed-off-by: Kees Cook --- Documentation/admin-guide/ramoops.rst | 14

[PATCH v4 3/6] printk: Introduce kmsg_dump_reason_str()

2020-05-15 Thread Kees Cook
-by: Petr Mladek Acked-by: Sergey Senozhatsky Signed-off-by: Kees Cook --- fs/pstore/platform.c | 18 +- include/linux/kmsg_dump.h | 7 +++ kernel/printk/printk.c| 17 + 3 files changed, 25 insertions(+), 17 deletions(-) diff --git a/fs/pstore

Re: [PATCH RESEND 1/4] uaccess: Add user_read_access_begin/end and user_write_access_begin/end

2020-04-02 Thread Kees Cook
On Thu, Apr 02, 2020 at 12:26:52PM -0700, Linus Torvalds wrote: > On Thu, Apr 2, 2020 at 11:36 AM Kees Cook wrote: > > > > Yup, I think it's a weakness of the ARM implementation and I'd like to > > not extend it further. AFAIK we should never nest, but I would not be >

Re: [PATCH RESEND 1/4] uaccess: Add user_read_access_begin/end and user_write_access_begin/end

2020-04-02 Thread Kees Cook
but I would not be surprised at all if we did. If we were looking at a design goal for all architectures, I'd like to be doing what the public PaX patchset did for their memory access switching, which is to alarm if calling into "enable" found the access already enabled, etc. Such a condition would show an unexpected nesting (like we've seen with similar constructs with set_fs() not getting reset during an exception handler, etc etc). -- Kees Cook

Re: [PATCH RESEND 1/4] uaccess: Add user_read_access_begin/end and user_write_access_begin/end

2020-04-02 Thread Kees Cook
ly since it is by definition live inside a user access region." I share this concern -- we want to keep user/kernel access as static as possible. It should be provable with static analysis, etc (e.g. objtool does this already for x86). Since this doesn't disrupt existing R+W access, I'd prefer the design of this series as-is. -- Kees Cook

Re: [PATCH RESEND 1/4] uaccess: Add user_read_access_begin/end and user_write_access_begin/end

2020-04-02 Thread Kees Cook
e new access helpers default on the > existing user_access_begin and user_access_end. > > Signed-off-by: Christophe Leroy Reviewed-by: Kees Cook -Kees > Link: https://patchwork.ozlabs.org/patch/1227926/ > --- > Resending this series as I mistakenly only sent it to power

Re: [PATCH RESEND 4/4] powerpc/uaccess: Implement user_read_access_begin and user_write_access_begin

2020-04-02 Thread Kees Cook
On Thu, Apr 02, 2020 at 07:34:19AM +, Christophe Leroy wrote: > Add support for selective read or write user access with > user_read_access_begin/end and user_write_access_begin/end. > > Signed-off-by: Christophe Leroy Reviewed-by: Kees Cook -Kees > --- > arch/powerpc/

Re: [PATCH RESEND 3/4] drm/i915/gem: Replace user_access_begin by user_write_access_begin

2020-04-02 Thread Kees Cook
phe Leroy Why is this split from the other conversions? Reviewed-by: Kees Cook > --- > drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 11 ++- > 1 file changed, 6 insertions(+), 5 deletions(-) > > diff --git a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c > b/drivers/gpu/d

Re: [PATCH RESEND 2/4] uaccess: Selectively open read or write user access

2020-04-02 Thread Kees Cook
; unsigned long *mask, > } > if (nr_compat_longs) > unsafe_put_user((compat_ulong_t)*mask, umask++, Efault); > - user_access_end(); > + user_write_access_end(); > return 0; > Efault: > - user_access_end(); > + user_write_access_end(); > return -EFAULT; > } (These correctly end write access.) All the others look correct. With the above fixed: Reviewed-by: Kees Cook -- Kees Cook

Re: [PATCH] selftest/lkdtm: Use local .gitignore

2020-02-27 Thread Kees Cook
ead of using the root one. > > Fixes: 68ca0fd272da ("selftest/lkdtm: Don't pollute 'git status'") > Signed-off-by: Christophe Leroy Yeah, that's better. Thanks! Acked-by: Kees Cook -Kees > --- > .gitignore | 4 > tools/testing/selftests/lkd

Re: [PATCH v5 3/8] powerpc/mm/ptdump: debugfs handler for W+X checks at runtime

2020-02-26 Thread Kees Cook
s would be handy to have on all architectures. Reviewed-by: Kees Cook -Kees > > Also fixed a typo. > > Signed-off-by: Russell Currey > --- > arch/powerpc/Kconfig.debug | 6 -- > arch/powerpc/mm/ptdump/ptdump.c | 21 - > 2 files changed,

Re: [PATCH] selftest/lkdtm: Don't pollute 'git status'

2020-02-20 Thread Kees Cook
("selftests/lkdtm: Add tests for LKDTM targets") > Signed-off-by: Christophe Leroy Ah! Yes, a very good idea. Thanks! Reviewed-by: Kees Cook -Kees > --- > .gitignore | 4 > 1 file changed, 4 insertions(+) > > diff --git a/.gitignore b/.gitignore > index b

Re: [PATCH] lkdtm: Test KUAP directional user access unlocks on powerpc

2020-02-01 Thread Kees Cook
not sure what that should look like. Does the new user_access_begin() API provide a way to query existing state? I'll go read the series... -- Kees Cook

Re: [PATCH] init: fix misleading "This architecture does not have kernel memory protection" message

2020-01-09 Thread Kees Cook
e a hint to the config name? Regardless: Acked-by: Kees Cook -Kees > --- > init/main.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/init/main.c b/init/main.c > index 2cd736059416..fd31b15cc910 100644 > --- a/init/main.c > +++ b/init/main.c > @@

Re: [PATCH 0/6] implement KASLR for powerpc/fsl_booke/64

2019-11-20 Thread Kees Cook
ithub.com/KSPP/linux/issues/3 with a link to this current series. -- Kees Cook

Re: [PATCH v15 0/9] open: introduce openat2(2) syscall

2019-11-12 Thread Kees Cook
to Linus directly during the v5.5 merge window, via akpm, via akpm, via Christian, or some other path? Besides Linus, it's not been clear who should "claim" this series. :) -- Kees Cook

Re: [PATCH v2 11/29] vmlinux.lds.h: Replace RODATA with RO_DATA

2019-11-12 Thread Kees Cook
On Mon, Nov 11, 2019 at 07:08:51PM +0100, Geert Uytterhoeven wrote: > Hi Kees, > > On Mon, Nov 11, 2019 at 6:23 PM Kees Cook wrote: > > On Mon, Nov 11, 2019 at 05:58:06PM +0100, Geert Uytterhoeven wrote: > > > On Fri, Oct 11, 2019 at 2:07 AM Kees Cook wrote: > >

Re: [PATCH v2 11/29] vmlinux.lds.h: Replace RODATA with RO_DATA

2019-11-11 Thread Kees Cook
On Mon, Nov 11, 2019 at 05:58:06PM +0100, Geert Uytterhoeven wrote: > Hi Kees, > > On Fri, Oct 11, 2019 at 2:07 AM Kees Cook wrote: > > There's no reason to keep the RODATA macro: replace the callers with > > the expected RO_DATA macro. > > > > Signed-off-by: K

[tip: x86/build] h8300: Move EXCEPTION_TABLE to RO_DATA segment

2019-11-05 Thread tip-bot2 for Kees Cook
The following commit has been merged into the x86/build branch of tip: Commit-ID: 380e57e2d41e9631132beccac30058228dfd376f Gitweb: https://git.kernel.org/tip/380e57e2d41e9631132beccac30058228dfd376f Author:Kees Cook AuthorDate:Tue, 29 Oct 2019 14:13:42 -07:00 Committer

[tip: x86/build] x86/vmlinux: Restore "text" Program Header with dummy section

2019-11-05 Thread tip-bot2 for Kees Cook
The following commit has been merged into the x86/build branch of tip: Commit-ID: 7a42d41d9dc2829bdf589db855ce3f948de2da6b Gitweb: https://git.kernel.org/tip/7a42d41d9dc2829bdf589db855ce3f948de2da6b Author:Kees Cook AuthorDate:Tue, 29 Oct 2019 14:13:29 -07:00 Committer

[tip: x86/build] xtensa: Move EXCEPTION_TABLE to RO_DATA segment

2019-11-05 Thread tip-bot2 for Kees Cook
The following commit has been merged into the x86/build branch of tip: Commit-ID: 94174c9b71c62a0e1a4364c2594e1422ba8fffcd Gitweb: https://git.kernel.org/tip/94174c9b71c62a0e1a4364c2594e1422ba8fffcd Author:Kees Cook AuthorDate:Tue, 29 Oct 2019 14:13:47 -07:00 Committer

[tip: x86/build] ia64: Move EXCEPTION_TABLE to RO_DATA segment

2019-11-05 Thread tip-bot2 for Kees Cook
The following commit has been merged into the x86/build branch of tip: Commit-ID: 9b30e704dd0d9ef9d99c7f88712318840cc8a338 Gitweb: https://git.kernel.org/tip/9b30e704dd0d9ef9d99c7f88712318840cc8a338 Author:Kees Cook AuthorDate:Tue, 29 Oct 2019 14:13:43 -07:00 Committer

[tip: x86/build] x86/mm: Remove redundant address-of operators on addresses

2019-11-05 Thread tip-bot2 for Kees Cook
The following commit has been merged into the x86/build branch of tip: Commit-ID: 2d0004d19829c84aaf2c7d48b5e2892d548970b6 Gitweb: https://git.kernel.org/tip/2d0004d19829c84aaf2c7d48b5e2892d548970b6 Author:Kees Cook AuthorDate:Tue, 29 Oct 2019 14:13:48 -07:00 Committer

[tip: x86/build] vmlinux.lds.h: Replace RODATA with RO_DATA

2019-11-05 Thread tip-bot2 for Kees Cook
The following commit has been merged into the x86/build branch of tip: Commit-ID: c82318254d15e5f83c75f60aedf2bb9eb408308f Gitweb: https://git.kernel.org/tip/c82318254d15e5f83c75f60aedf2bb9eb408308f Author:Kees Cook AuthorDate:Tue, 29 Oct 2019 14:13:33 -07:00 Committer

[tip: x86/build] arm64: Move EXCEPTION_TABLE to RO_DATA segment

2019-11-05 Thread tip-bot2 for Kees Cook
The following commit has been merged into the x86/build branch of tip: Commit-ID: 19f6bc32c6f4216e099963f416de91eba7ca1430 Gitweb: https://git.kernel.org/tip/19f6bc32c6f4216e099963f416de91eba7ca1430 Author:Kees Cook AuthorDate:Tue, 29 Oct 2019 14:13:40 -07:00 Committer

[tip: x86/build] alpha: Move EXCEPTION_TABLE to RO_DATA segment

2019-11-05 Thread tip-bot2 for Kees Cook
The following commit has been merged into the x86/build branch of tip: Commit-ID: 172c8b85dccf331826deda9ef6d7e75fa4f2b3e2 Gitweb: https://git.kernel.org/tip/172c8b85dccf331826deda9ef6d7e75fa4f2b3e2 Author:Kees Cook AuthorDate:Tue, 29 Oct 2019 14:13:39 -07:00 Committer

[tip: x86/build] c6x: Move EXCEPTION_TABLE to RO_DATA segment

2019-11-05 Thread tip-bot2 for Kees Cook
The following commit has been merged into the x86/build branch of tip: Commit-ID: 1e51cd538809112a6ac702a48e9719a75152c902 Gitweb: https://git.kernel.org/tip/1e51cd538809112a6ac702a48e9719a75152c902 Author:Kees Cook AuthorDate:Tue, 29 Oct 2019 14:13:41 -07:00 Committer

[tip: x86/build] parisc: Move EXCEPTION_TABLE to RO_DATA segment

2019-11-05 Thread tip-bot2 for Kees Cook
The following commit has been merged into the x86/build branch of tip: Commit-ID: 6e85e23ef2d004def8e1acd36eb155411499b7cc Gitweb: https://git.kernel.org/tip/6e85e23ef2d004def8e1acd36eb155411499b7cc Author:Kees Cook AuthorDate:Tue, 29 Oct 2019 14:13:45 -07:00 Committer

[tip: x86/build] x86/mm: Report which part of kernel image is freed

2019-11-05 Thread tip-bot2 for Kees Cook
The following commit has been merged into the x86/build branch of tip: Commit-ID: 5494c3a6a0b965906ffdcb620d94079ea4cb69ea Gitweb: https://git.kernel.org/tip/5494c3a6a0b965906ffdcb620d94079ea4cb69ea Author:Kees Cook AuthorDate:Tue, 29 Oct 2019 14:13:49 -07:00 Committer

[tip: x86/build] x86/vmlinux: Actually use _etext for the end of the text segment

2019-11-05 Thread tip-bot2 for Kees Cook
The following commit has been merged into the x86/build branch of tip: Commit-ID: b907693883fdcff5b492cf0cd02a0e264623055e Gitweb: https://git.kernel.org/tip/b907693883fdcff5b492cf0cd02a0e264623055e Author:Kees Cook AuthorDate:Tue, 29 Oct 2019 14:13:37 -07:00 Committer

[tip: x86/build] x86/vmlinux: Use INT3 instead of NOP for linker fill bytes

2019-11-05 Thread tip-bot2 for Kees Cook
The following commit has been merged into the x86/build branch of tip: Commit-ID: 7705dc8557973d8ad8f10840f61d8ec805695e9e Gitweb: https://git.kernel.org/tip/7705dc8557973d8ad8f10840f61d8ec805695e9e Author:Kees Cook AuthorDate:Tue, 29 Oct 2019 14:13:51 -07:00 Committer

[tip: x86/build] powerpc: Move EXCEPTION_TABLE to RO_DATA segment

2019-11-05 Thread tip-bot2 for Kees Cook
The following commit has been merged into the x86/build branch of tip: Commit-ID: 4e9e559a0385930649c1c9cad703d475ee030206 Gitweb: https://git.kernel.org/tip/4e9e559a0385930649c1c9cad703d475ee030206 Author:Kees Cook AuthorDate:Tue, 29 Oct 2019 14:13:46 -07:00 Committer

[tip: x86/build] s390: Move RO_DATA into "text" PT_LOAD Program Header

2019-11-05 Thread tip-bot2 for Kees Cook
The following commit has been merged into the x86/build branch of tip: Commit-ID: 6434efbd9aefa3786b446c8e4745d1f49d2983b4 Gitweb: https://git.kernel.org/tip/6434efbd9aefa3786b446c8e4745d1f49d2983b4 Author:Kees Cook AuthorDate:Tue, 29 Oct 2019 14:13:28 -07:00 Committer

[tip: x86/build] vmlinux.lds.h: Move Program Header restoration into NOTES macro

2019-11-05 Thread tip-bot2 for Kees Cook
The following commit has been merged into the x86/build branch of tip: Commit-ID: fbe6a8e618a2d70621cff277e24f6eb338d3d149 Gitweb: https://git.kernel.org/tip/fbe6a8e618a2d70621cff277e24f6eb338d3d149 Author:Kees Cook AuthorDate:Tue, 29 Oct 2019 14:13:31 -07:00 Committer

[tip: x86/build] vmlinux.lds.h: Provide EMIT_PT_NOTE to indicate export of .notes

2019-11-05 Thread tip-bot2 for Kees Cook
The following commit has been merged into the x86/build branch of tip: Commit-ID: 441110a547f86a2fd0c40bf04b274853622c53cc Gitweb: https://git.kernel.org/tip/441110a547f86a2fd0c40bf04b274853622c53cc Author:Kees Cook AuthorDate:Tue, 29 Oct 2019 14:13:30 -07:00 Committer

[tip: x86/build] powerpc: Remove PT_NOTE workaround

2019-11-05 Thread tip-bot2 for Kees Cook
The following commit has been merged into the x86/build branch of tip: Commit-ID: 6fc4000656a10fb679ab6566dcd516ee672f1706 Gitweb: https://git.kernel.org/tip/6fc4000656a10fb679ab6566dcd516ee672f1706 Author:Kees Cook AuthorDate:Tue, 29 Oct 2019 14:13:24 -07:00 Committer

[tip: x86/build] alpha: Rename PT_LOAD identifier "kernel" to "text"

2019-11-05 Thread tip-bot2 for Kees Cook
The following commit has been merged into the x86/build branch of tip: Commit-ID: 65182e6e36195fbf9340808ac4a00d1c146bc05c Gitweb: https://git.kernel.org/tip/65182e6e36195fbf9340808ac4a00d1c146bc05c Author:Kees Cook AuthorDate:Tue, 29 Oct 2019 14:13:26 -07:00 Committer

[tip: x86/build] powerpc: Rename PT_LOAD identifier "kernel" to "text"

2019-11-05 Thread tip-bot2 for Kees Cook
The following commit has been merged into the x86/build branch of tip: Commit-ID: af0f3e9e205c3d1bad91ad83e06bfd04df9712b2 Gitweb: https://git.kernel.org/tip/af0f3e9e205c3d1bad91ad83e06bfd04df9712b2 Author:Kees Cook AuthorDate:Tue, 29 Oct 2019 14:13:25 -07:00 Committer

[tip: x86/build] powerpc: Rename "notes" PT_NOTE to "note"

2019-11-05 Thread tip-bot2 for Kees Cook
The following commit has been merged into the x86/build branch of tip: Commit-ID: ec556271bbb33809b73cdb238f8cb357345908e8 Gitweb: https://git.kernel.org/tip/ec556271bbb33809b73cdb238f8cb357345908e8 Author:Kees Cook AuthorDate:Tue, 29 Oct 2019 14:13:23 -07:00 Committer

[tip: x86/build] vmlinux.lds.h: Replace RW_DATA_SECTION with RW_DATA

2019-11-05 Thread tip-bot2 for Kees Cook
The following commit has been merged into the x86/build branch of tip: Commit-ID: c9174047b48d700a785b633319dd7d27288b86be Gitweb: https://git.kernel.org/tip/c9174047b48d700a785b633319dd7d27288b86be Author:Kees Cook AuthorDate:Tue, 29 Oct 2019 14:13:35 -07:00 Committer

[tip: x86/build] ia64: Rename PT_LOAD identifier "code" to "text"

2019-11-05 Thread tip-bot2 for Kees Cook
The following commit has been merged into the x86/build branch of tip: Commit-ID: 430c6b2647e215c4129f36646ad28a725996b410 Gitweb: https://git.kernel.org/tip/430c6b2647e215c4129f36646ad28a725996b410 Author:Kees Cook AuthorDate:Tue, 29 Oct 2019 14:13:27 -07:00 Committer

[tip: x86/build] vmlinux.lds.h: Replace RO_DATA_SECTION with RO_DATA

2019-11-05 Thread tip-bot2 for Kees Cook
The following commit has been merged into the x86/build branch of tip: Commit-ID: 93240b327929ff03c1878ea8badc5c6bd86f053f Gitweb: https://git.kernel.org/tip/93240b327929ff03c1878ea8badc5c6bd86f053f Author:Kees Cook AuthorDate:Tue, 29 Oct 2019 14:13:34 -07:00 Committer

[tip: x86/build] microblaze: Move EXCEPTION_TABLE to RO_DATA segment

2019-11-05 Thread tip-bot2 for Kees Cook
The following commit has been merged into the x86/build branch of tip: Commit-ID: 3bda6f37a7949c803b84cf27e11a3995d900a179 Gitweb: https://git.kernel.org/tip/3bda6f37a7949c803b84cf27e11a3995d900a179 Author:Kees Cook AuthorDate:Tue, 29 Oct 2019 14:13:44 -07:00 Committer

[tip: x86/build] vmlinux.lds.h: Allow EXCEPTION_TABLE to live in RO_DATA

2019-11-05 Thread tip-bot2 for Kees Cook
The following commit has been merged into the x86/build branch of tip: Commit-ID: b8c2f776164c8f74ac31c5e370ca3f029be0aa19 Gitweb: https://git.kernel.org/tip/b8c2f776164c8f74ac31c5e370ca3f029be0aa19 Author:Kees Cook AuthorDate:Tue, 29 Oct 2019 14:13:36 -07:00 Committer

[tip: x86/build] vmlinux.lds.h: Move NOTES into RO_DATA

2019-11-05 Thread tip-bot2 for Kees Cook
The following commit has been merged into the x86/build branch of tip: Commit-ID: eaf937075c9a42eb8ba51eb3050773d7205d3595 Gitweb: https://git.kernel.org/tip/eaf937075c9a42eb8ba51eb3050773d7205d3595 Author:Kees Cook AuthorDate:Tue, 29 Oct 2019 14:13:32 -07:00 Committer

[tip: x86/build] x86/vmlinux: Move EXCEPTION_TABLE to RO_DATA segment

2019-11-05 Thread tip-bot2 for Kees Cook
The following commit has been merged into the x86/build branch of tip: Commit-ID: f0d7ee17d57c7a8510518a1e60366d053e2f3ff5 Gitweb: https://git.kernel.org/tip/f0d7ee17d57c7a8510518a1e60366d053e2f3ff5 Author:Kees Cook AuthorDate:Tue, 29 Oct 2019 14:13:38 -07:00 Committer

[tip: x86/build] x86/mm: Report actual image regions in /proc/iomem

2019-11-05 Thread tip-bot2 for Kees Cook
The following commit has been merged into the x86/build branch of tip: Commit-ID: a329975491aafcb1fb6e2fad0de22cae5c16154f Gitweb: https://git.kernel.org/tip/a329975491aafcb1fb6e2fad0de22cae5c16154f Author:Kees Cook AuthorDate:Tue, 29 Oct 2019 14:13:50 -07:00 Committer

Re: [PATCH v4 0/4] Implement STRICT_MODULE_RWX for powerpc

2019-10-30 Thread Kees Cook
On Wed, Oct 30, 2019 at 11:16:22AM +1100, Michael Ellerman wrote: > Kees Cook writes: > > On Mon, Oct 14, 2019 at 04:13:16PM +1100, Russell Currey wrote: > >> v3 cover letter here: > >> https://lists.ozlabs.org/pipermail/linuxppc-dev/2019-October/198023.html > >&

Re: [PATCH v5 0/5] Implement STRICT_MODULE_RWX for powerpc

2019-10-30 Thread Kees Cook
rea RO. Only user areas can be made RO. As I understand it, the idea was for it to be mandatory (or at least default-on) only for the subarches where it wasn't totally insane to accomplish. :) (I'm not familiar with all the details on the subarchs, but it sounded like the more modern systems would be the targets for this?) -- Kees Cook

Re: [PATCH v4 0/4] Implement STRICT_MODULE_RWX for powerpc

2019-10-29 Thread Kees Cook
h/powerpc/mm/ptdump/ptdump.c| 21 - > 8 files changed, 123 insertions(+), 3 deletions(-) > create mode 100644 arch/powerpc/include/asm/set_memory.h > create mode 100644 arch/powerpc/mm/pageattr.c > > -- > 2.23.0 > -- Kees Cook

[PATCH v3 28/29] x86/mm: Report actual image regions in /proc/iomem

2019-10-29 Thread Kees Cook
rnel data 02a95000-035f : Kernel bss Signed-off-by: Kees Cook --- arch/x86/kernel/setup.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 77ea96b794bd..591e885a852e 100644 --- a/arch/x86/kernel/setup.c +

[PATCH v3 25/29] xtensa: Move EXCEPTION_TABLE to RO_DATA segment

2019-10-29 Thread Kees Cook
Since the EXCEPTION_TABLE is read-only, collapse it into RO_DATA. Signed-off-by: Kees Cook Acked-by: Max Filippov --- arch/xtensa/kernel/vmlinux.lds.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/xtensa/kernel/vmlinux.lds.S b/arch/xtensa/kernel/vmlinux.lds.S index

[PATCH v3 22/29] microblaze: Move EXCEPTION_TABLE to RO_DATA segment

2019-10-29 Thread Kees Cook
Since the EXCEPTION_TABLE is read-only, collapse it into RO_DATA. Signed-off-by: Kees Cook --- arch/microblaze/kernel/vmlinux.lds.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/microblaze/kernel/vmlinux.lds.S b/arch/microblaze/kernel/vmlinux.lds.S index

[PATCH v3 23/29] parisc: Move EXCEPTION_TABLE to RO_DATA segment

2019-10-29 Thread Kees Cook
Since the EXCEPTION_TABLE is read-only, collapse it into RO_DATA. Signed-off-by: Kees Cook Acked-by: Helge Deller --- arch/parisc/kernel/vmlinux.lds.S | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/parisc/kernel/vmlinux.lds.S b/arch/parisc/kernel/vmlinux.lds.S

[PATCH v3 27/29] x86/mm: Report which part of kernel image is freed

2019-10-29 Thread Kees Cook
/rodata gap) memory: 2040K [2.336927] Freeing unused kernel image (rodata/data gap) memory: 172K Signed-off-by: Kees Cook --- arch/x86/include/asm/processor.h | 2 +- arch/x86/mm/init.c | 8 arch/x86/mm/init_64.c| 6 -- 3 files changed, 9 insertions(+), 7

[PATCH v3 24/29] powerpc: Move EXCEPTION_TABLE to RO_DATA segment

2019-10-29 Thread Kees Cook
Since the EXCEPTION_TABLE is read-only, collapse it into RO_DATA. Signed-off-by: Kees Cook --- arch/powerpc/kernel/vmlinux.lds.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S index 4e7cec088c8b

[PATCH v3 11/29] vmlinux.lds.h: Replace RODATA with RO_DATA

2019-10-29 Thread Kees Cook
There's no reason to keep the RODATA macro: replace the callers with the expected RO_DATA macro. Signed-off-by: Kees Cook --- arch/alpha/kernel/vmlinux.lds.S | 2 +- arch/ia64/kernel/vmlinux.lds.S | 2 +- arch/microblaze/kernel/vmlinux.lds.S | 2 +- arch/mips/kernel/vmlinux.lds.S

[PATCH v3 21/29] ia64: Move EXCEPTION_TABLE to RO_DATA segment

2019-10-29 Thread Kees Cook
Since the EXCEPTION_TABLE is read-only, collapse it into RO_DATA. Signed-off-by: Kees Cook --- arch/ia64/kernel/vmlinux.lds.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/ia64/kernel/vmlinux.lds.S b/arch/ia64/kernel/vmlinux.lds.S index 11d5115bc44d..1ec6b703c5b4

[PATCH v3 12/29] vmlinux.lds.h: Replace RO_DATA_SECTION with RO_DATA

2019-10-29 Thread Kees Cook
Finish renaming RO_DATA_SECTION to RO_DATA. (Calling this a "section" is a lie, since it's multiple sections and section flags cannot be applied to the macro.) Signed-off-by: Kees Cook Acked-by: Heiko Carstens # s390 Acked-by: Geert Uytterhoeven # m68k --- arch/arc/kernel/vml

[PATCH v3 20/29] h8300: Move EXCEPTION_TABLE to RO_DATA segment

2019-10-29 Thread Kees Cook
Since the EXCEPTION_TABLE is read-only, collapse it into RO_DATA. Signed-off-by: Kees Cook --- arch/h8300/kernel/vmlinux.lds.S | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/h8300/kernel/vmlinux.lds.S b/arch/h8300/kernel/vmlinux.lds.S index 2ac7bdcd2fe0

[PATCH v3 13/29] vmlinux.lds.h: Replace RW_DATA_SECTION with RW_DATA

2019-10-29 Thread Kees Cook
Rename RW_DATA_SECTION to RW_DATA. (Calling this a "section" is a lie, since it's multiple sections and section flags cannot be applied to the macro.) Signed-off-by: Kees Cook Acked-by: Heiko Carstens # s390 Acked-by: Geert Uytterhoeven # m68k --- arch/alpha/kernel/vmlinux.lds.

Re: [PATCH v2 01/29] powerpc: Rename "notes" PT_NOTE to "note"

2019-10-29 Thread Kees Cook
ationale to patch #1 in the just-sent v3 of this series. If I still can't convince you Segher, I'm happy to send "patch 30/29" to do a bulk rename to "notes". Let me know. :) -- Kees Cook

[PATCH v3 26/29] x86/mm: Remove redundant on addresses

2019-10-29 Thread Kees Cook
The on addresses are redundant. Remove them to match all the other similar functions. Signed-off-by: Kees Cook --- arch/x86/mm/init_64.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index 26299e9ce6da..e67ddca8b7a8

[PATCH v3 29/29] x86: Use INT3 instead of NOP for linker fill bytes

2019-10-29 Thread Kees Cook
810001ee: cc int3 810001ef: cc int3 810001f0 <__startup_64>: ... Signed-off-by: Kees Cook --- arch/x86/kernel/vmlinux.lds.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/vmlinux.lds.S b/arc

[PATCH v3 18/29] arm64: Move EXCEPTION_TABLE to RO_DATA segment

2019-10-29 Thread Kees Cook
Since the EXCEPTION_TABLE is read-only, collapse it into RO_DATA. Also removes the redundant ALIGN, which is already present at the end of the RO_DATA macro. Signed-off-by: Kees Cook Acked-by: Will Deacon --- arch/arm64/kernel/vmlinux.lds.S | 7 --- 1 file changed, 4 insertions(+), 3

[PATCH v3 15/29] x86: Actually use _etext for end of text segment

2019-10-29 Thread Kees Cook
Various calculations are using the end of the exception table (which does not need to be executable) as the end of the text segment. Instead, in preparation for moving the exception table into RO_DATA, move _etext after the exception table and update the calculations. Signed-off-by: Kees Cook

[PATCH v3 14/29] vmlinux.lds.h: Allow EXCEPTION_TABLE to live in RO_DATA

2019-10-29 Thread Kees Cook
Many architectures have an EXCEPTION_TABLE that only needs to be readable. As such, it should live in RO_DATA. Create a macro to identify this case for the architectures that can move EXCEPTION_TABLE into RO_DATA. Signed-off-by: Kees Cook Acked-by: Will Deacon --- include/asm-generic

[PATCH v3 19/29] c6x: Move EXCEPTION_TABLE to RO_DATA segment

2019-10-29 Thread Kees Cook
Since the EXCEPTION_TABLE is read-only, collapse it into RO_DATA. Signed-off-by: Kees Cook --- arch/c6x/kernel/vmlinux.lds.S | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/c6x/kernel/vmlinux.lds.S b/arch/c6x/kernel/vmlinux.lds.S index a3547f9d415b..ac99ba0864bf

[PATCH v3 17/29] alpha: Move EXCEPTION_TABLE to RO_DATA segment

2019-10-29 Thread Kees Cook
Since the EXCEPTION_TABLE is read-only, collapse it into RO_DATA. Signed-off-by: Kees Cook --- arch/alpha/kernel/vmlinux.lds.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/alpha/kernel/vmlinux.lds.S b/arch/alpha/kernel/vmlinux.lds.S index edc45f45523b..bc6f727278fd

[PATCH v3 16/29] x86: Move EXCEPTION_TABLE to RO_DATA segment

2019-10-29 Thread Kees Cook
The exception table was needlessly marked executable. In preparation for execute-only memory, move the table into the RO_DATA segment via the new macro that can be used by any architectures that want to make a similar consolidation. Signed-off-by: Kees Cook --- arch/x86/kernel/vmlinux.lds.S | 3

[PATCH v3 10/29] vmlinux.lds.h: Move NOTES into RO_DATA

2019-10-29 Thread Kees Cook
The .notes section should be non-executable read-only data. As such, move it to the RO_DATA macro instead of being per-architecture defined. Signed-off-by: Kees Cook Acked-by: Heiko Carstens # s390 --- arch/alpha/kernel/vmlinux.lds.S | 2 -- arch/arc/kernel/vmlinux.lds.S| 2

<    1   2   3   4   5   6   7   8   >