Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1478518

Re: [PATCH] fs/proc/kcore.c: Omit kernel text area for hardened usercopy feature

From Linus Torvalds <torvalds@linux-foundation.org>
Newsgroups linux.kernel
Subject Re: [PATCH] fs/proc/kcore.c: Omit kernel text area for hardened usercopy feature
Date 2016-09-07 19:30 +0200
Message-ID <seOPD-2Ez-7@gated-at.bofh.it> (permalink)
References (3 earlier) <sesPd-55p-11@gated-at.bofh.it> <setrQ-5CI-45@gated-at.bofh.it> <seuxz-6eZ-7@gated-at.bofh.it> <seuxA-6eZ-27@gated-at.bofh.it> <seOFY-2Bs-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Sep 7, 2016 at 10:17 AM, Kees Cook <keescook@chromium.org> wrote:
>
> !DEVKMEM is easy to represent, but STRICT_DEVMEM=y gets a little ugly,

I think you can just do

   config STRICT_DEVMEM
        bool "Filter access to /dev/mem" if !HARDENED_USERCOPY
        depends on MMU
        depends on ARCH_HAS_DEVMEM_IS_ALLOWED
        default y

ie you put the "if !HARDENED_USERCOPY" on the *question*, so that if
HARDENED_USERCOPY is set you'll never actually ask it.

Or you just make it go the other way, and make HARDENED_USERCOPY
depend on STRICT_DEVMEM.

                  Linus

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] fs/proc/kcore.c: Omit kernel text area for hardened usercopy feature Jiri Olsa <jolsa@kernel.org> - 2016-09-02 14:30 +0200
  Re: [PATCH] fs/proc/kcore.c: Omit kernel text area for hardened  usercopy feature Andi Kleen <andi@firstfloor.org> - 2016-09-02 17:20 +0200
    Re: [PATCH] fs/proc/kcore.c: Omit kernel text area for hardened  usercopy feature Jiri Olsa <jolsa@redhat.com> - 2016-09-02 18:20 +0200
    Re: [PATCH] fs/proc/kcore.c: Omit kernel text area for hardened  usercopy feature Jiri Olsa <jolsa@redhat.com> - 2016-09-05 10:50 +0200
      Re: [PATCH] fs/proc/kcore.c: Omit kernel text area for hardened  usercopy feature Andi Kleen <andi@firstfloor.org> - 2016-09-05 18:30 +0200
      Re: [PATCH] fs/proc/kcore.c: Omit kernel text area for hardened  usercopy feature Kees Cook <keescook@chromium.org> - 2016-09-06 20:00 +0200
        Re: [PATCH] fs/proc/kcore.c: Omit kernel text area for hardened  usercopy feature Linus Torvalds <torvalds@linux-foundation.org> - 2016-09-06 20:40 +0200
          Re: [PATCH] fs/proc/kcore.c: Omit kernel text area for hardened  usercopy feature Andi Kleen <andi@firstfloor.org> - 2016-09-06 21:50 +0200
            Re: [PATCH] fs/proc/kcore.c: Omit kernel text area for hardened  usercopy feature Linus Torvalds <torvalds@linux-foundation.org> - 2016-09-06 21:50 +0200
              Re: [PATCH] fs/proc/kcore.c: Omit kernel text area for hardened  usercopy feature Kees Cook <keescook@chromium.org> - 2016-09-07 19:20 +0200
                Re: [PATCH] fs/proc/kcore.c: Omit kernel text area for hardened  usercopy feature Linus Torvalds <torvalds@linux-foundation.org> - 2016-09-07 19:30 +0200
        Re: [PATCH] fs/proc/kcore.c: Omit kernel text area for hardened  usercopy feature Jiri Olsa <jolsa@redhat.com> - 2016-09-07 09:40 +0200
          Re: [PATCH] fs/proc/kcore.c: Omit kernel text area for hardened  usercopy feature Andi Kleen <andi@firstfloor.org> - 2016-09-07 18:40 +0200
            Re: [PATCH] fs/proc/kcore.c: Omit kernel text area for hardened  usercopy feature Linus Torvalds <torvalds@linux-foundation.org> - 2016-09-07 19:00 +0200
              Re: [PATCH] fs/proc/kcore.c: Omit kernel text area for hardened  usercopy feature Jiri Olsa <jolsa@redhat.com> - 2016-09-07 21:30 +0200
                Re: [PATCH] fs/proc/kcore.c: Omit kernel text area for hardened  usercopy feature Jiri Olsa <jolsa@redhat.com> - 2016-09-07 23:30 +0200
                Re: [PATCH] fs/proc/kcore.c: Omit kernel text area for hardened  usercopy feature Linus Torvalds <torvalds@linux-foundation.org> - 2016-09-08 01:00 +0200

csiph-web