LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Donnellan <ajd@linux.ibm.com>
To: Russell Currey <ruscur@russell.cc>, linuxppc-dev@lists.ozlabs.org
Cc: kernel-hardening@lists.openwall.com, jniethe5@gmail.com,
	npiggin@gmail.com, joel@jms.id.au, dja@axtens.net
Subject: Re: [PATCH v5 8/8] powerpc/mm: Disable set_memory() routines when strict RWX isn't enabled
Date: Wed, 26 Feb 2020 17:38:29 +1100	[thread overview]
Message-ID: <c560b6bb-1a42-bf50-5122-7912771e1481@linux.ibm.com> (raw)
In-Reply-To: <20200226063551.65363-9-ruscur@russell.cc>

On 26/2/20 5:35 pm, Russell Currey wrote:
> There are a couple of reasons that the set_memory() functions are
> problematic when STRICT_KERNEL_RWX isn't enabled:
> 
>   - The linear mapping is a different size and apply_to_page_range()
> 	may modify a giant section, breaking everything
>   - patch_instruction() doesn't know to work around a page being marked
>   	RO, and will subsequently crash
> 
> The latter can be replicated by building a kernel with the set_memory()
> patches but with STRICT_KERNEL_RWX off and running ftracetest.
> 
> Reported-by: Jordan Niethe <jniethe5@gmail.com>
> Signed-off-by: Russell Currey <ruscur@russell.cc>

Can we squash this in earlier in the series for the sake of bisectability?

-- 
Andrew Donnellan              OzLabs, ADL Canberra
ajd@linux.ibm.com             IBM Australia Limited


  reply	other threads:[~2020-02-26  6:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-26  6:35 [PATCH v5 0/8] set_memory() routines and STRICT_MODULE_RWX Russell Currey
2020-02-26  6:35 ` [PATCH v5 1/8] powerpc/mm: Implement set_memory() routines Russell Currey
2020-02-26  6:35 ` [PATCH v5 2/8] powerpc/kprobes: Mark newly allocated probes as RO Russell Currey
2020-02-26  6:35 ` [PATCH v5 3/8] powerpc/mm/ptdump: debugfs handler for W+X checks at runtime Russell Currey
2020-02-26 21:52   ` Kees Cook
2022-04-06 18:55   ` Kees Cook
2022-04-07  7:39     ` Christophe Leroy
2020-02-26  6:35 ` [PATCH v5 4/8] powerpc: Set ARCH_HAS_STRICT_MODULE_RWX Russell Currey
2020-02-26  6:35 ` [PATCH v5 5/8] powerpc/configs: Enable STRICT_MODULE_RWX in skiroot_defconfig Russell Currey
2020-02-26  6:35 ` [PATCH v5 6/8] powerpc/mm: implement set_memory_attr() Russell Currey
2020-02-26  6:35 ` [PATCH v5 7/8] powerpc/32: use set_memory_attr() Russell Currey
2020-02-26  6:35 ` [PATCH v5 8/8] powerpc/mm: Disable set_memory() routines when strict RWX isn't enabled Russell Currey
2020-02-26  6:38   ` Andrew Donnellan [this message]
2020-02-26  7:29   ` Christophe Leroy

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=c560b6bb-1a42-bf50-5122-7912771e1481@linux.ibm.com \
    --to=ajd@linux.ibm.com \
    --cc=dja@axtens.net \
    --cc=jniethe5@gmail.com \
    --cc=joel@jms.id.au \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=npiggin@gmail.com \
    --cc=ruscur@russell.cc \
    /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