linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Denys Vlasenko <dvlasenk@redhat.com>
To: Kees Cook <keescook@chromium.org>
Cc: "linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
	Jason Gunthorpe <jgunthorpe@obsidianresearch.com>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>,
	Oleg Nesterov <oleg@redhat.com>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Florian Weimer <fweimer@redhat.com>,
	Linux-MM <linux-mm@kvack.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3] powerpc: Do not make the entire heap executable
Date: Wed, 10 Aug 2016 14:56:53 +0200	[thread overview]
Message-ID: <3e1336d7-d0c1-beec-7526-af4eebc199fa@redhat.com> (raw)
In-Reply-To: <CAGXu5j+arjRNmGVPeevMBsO6Mdpmw8Lq0GPvJvXNPJeQ8uCWkA@mail.gmail.com>

On 08/10/2016 12:43 AM, Kees Cook wrote:
>> -static int do_brk(unsigned long addr, unsigned long len)
>> +static int do_brk_flags(unsigned long addr, unsigned long len, unsigned long flags)
>>  {
>>         struct mm_struct *mm = current->mm;
>>         struct vm_area_struct *vma, *prev;
>> -       unsigned long flags;
>>         struct rb_node **rb_link, *rb_parent;
>>         pgoff_t pgoff = addr >> PAGE_SHIFT;
>>         int error;
>> @@ -2666,7 +2665,7 @@ static int do_brk(unsigned long addr, unsigned long len)
>>         if (!len)
>>                 return 0;
>>
>> -       flags = VM_DATA_DEFAULT_FLAGS | VM_ACCOUNT | mm->def_flags;
>> +       flags |= VM_DATA_DEFAULT_FLAGS | VM_ACCOUNT | mm->def_flags;
>
> For sanity's sake, should a mask be applied here? i.e. to be extra
> careful about what flags can get passed in?

Maybe... I am leaving it to mm experts.

> Otherwise, this looks okay to me:
>
> Reviewed-by: Kees Cook <keescook@chromium.org>
>
> -Kees

--
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>

  reply	other threads:[~2016-08-10 12:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-09 19:08 [PATCH v3] powerpc: Do not make the entire heap executable Denys Vlasenko
2016-08-09 22:43 ` Kees Cook
2016-08-10 12:56   ` Denys Vlasenko [this message]
2016-08-10  4:36 ` Michael Ellerman
2016-08-10 12:05   ` Denys Vlasenko

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=3e1336d7-d0c1-beec-7526-af4eebc199fa@redhat.com \
    --to=dvlasenk@redhat.com \
    --cc=benh@kernel.crashing.org \
    --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=oleg@redhat.com \
    --cc=paulus@samba.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).