From: Oleg Nesterov <oleg@redhat.com>
To: Kees Cook <keescook@chromium.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>,
Al Viro <viro@zeniv.linux.org.uk>,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
Andrew Morton <akpm@linux-foundation.org>,
Denys Vlasenko <dvlasenk@redhat.com>,
Jason Gunthorpe <jgunthorpe@obsidianresearch.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
Florian Weimer <fweimer@redhat.com>,
Linux-MM <linux-mm@kvack.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v5] powerpc: Do not make the entire heap executable
Date: Thu, 29 Sep 2016 18:07:02 +0200 [thread overview]
Message-ID: <20160929160702.GA30031@redhat.com> (raw)
In-Reply-To: <CAGXu5jKzvF_vTdNQfcugcG6PqEeDjVxymYXFtsksLx6jN-Z4zg@mail.gmail.com>
On 09/28, Kees Cook wrote:
>
> This is where the flags are actually built from what's coming in
> through the newly created exported function vm_brk_flags() below. The
> only flag we're acting on is VM_EXEC (passed in from set_brk() above).
> I think do_brk_flags() should mask the valid flags, or we'll regret it
> in the future. I'd like to see something like:
>
> /* Until we need other flags, refuse anything except VM_EXEC. */
> if ((flags & (~VM_EXEC)) != 0)
> return -EINVAL;
> flags |= VM_DATA_DEFAULT_FLAGS | VM_ACCOUNT | mm->def_flags;
I tried to suggest this too. In particular it would be simply wrong
to accept VM_LOCKED in flags.
Oleg.
WARNING: multiple messages have this Message-ID (diff)
From: Oleg Nesterov <oleg@redhat.com>
To: Kees Cook <keescook@chromium.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>,
Al Viro <viro@zeniv.linux.org.uk>,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
Andrew Morton <akpm@linux-foundation.org>,
Denys Vlasenko <dvlasenk@redhat.com>,
Jason Gunthorpe <jgunthorpe@obsidianresearch.com>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
Florian Weimer <fweimer@redhat.com>,
Linux-MM <linux-mm@kvack.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v5] powerpc: Do not make the entire heap executable
Date: Thu, 29 Sep 2016 18:07:02 +0200 [thread overview]
Message-ID: <20160929160702.GA30031@redhat.com> (raw)
In-Reply-To: <CAGXu5jKzvF_vTdNQfcugcG6PqEeDjVxymYXFtsksLx6jN-Z4zg@mail.gmail.com>
On 09/28, Kees Cook wrote:
>
> This is where the flags are actually built from what's coming in
> through the newly created exported function vm_brk_flags() below. The
> only flag we're acting on is VM_EXEC (passed in from set_brk() above).
> I think do_brk_flags() should mask the valid flags, or we'll regret it
> in the future. I'd like to see something like:
>
> /* Until we need other flags, refuse anything except VM_EXEC. */
> if ((flags & (~VM_EXEC)) != 0)
> return -EINVAL;
> flags |= VM_DATA_DEFAULT_FLAGS | VM_ACCOUNT | mm->def_flags;
I tried to suggest this too. In particular it would be simply wrong
to accept VM_LOCKED in flags.
Oleg.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2016-09-29 16:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-22 18:51 [PATCH v5] powerpc: Do not make the entire heap executable Denys Vlasenko
2016-08-22 18:51 ` Denys Vlasenko
2016-09-28 1:42 ` Michael Ellerman
2016-09-28 1:42 ` Michael Ellerman
2016-09-28 2:55 ` Jason Gunthorpe
2016-09-28 2:55 ` Jason Gunthorpe
2016-09-28 13:12 ` Florian Weimer
2016-09-28 13:12 ` Florian Weimer
2016-09-28 17:16 ` Kees Cook
2016-09-28 17:16 ` Kees Cook
2016-09-29 16:07 ` Oleg Nesterov [this message]
2016-09-29 16:07 ` Oleg Nesterov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160929160702.GA30031@redhat.com \
--to=oleg@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=dvlasenk@redhat.com \
--cc=fweimer@redhat.com \
--cc=jgunthorpe@obsidianresearch.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.