From: Michael Ellerman <mpe@ellerman.id.au>
To: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
Naveen N Rao <naveen@kernel.org>,
Nicholas Piggin <npiggin@gmail.com>, Kees Cook <kees@kernel.org>,
linux-hardening@vger.kernel.org
Subject: Re: [PATCH] powerpc: Add __must_check to set_memory_...()
Date: Wed, 06 Nov 2024 23:47:44 +1100 [thread overview]
Message-ID: <874j4klea7.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <8dcc739a-3fd4-434c-995c-1dce33cefe6f@csgroup.eu>
Christophe Leroy <christophe.leroy@csgroup.eu> writes:
> Hi Michael,
>
> Le 07/09/2024 à 17:40, Christophe Leroy a écrit :
>> After the following powerpc commits, all calls to set_memory_...()
>> functions check returned value.
>> - Commit 8f17bd2f4196 ("powerpc: Handle error in mark_rodata_ro() and
>> mark_initmem_nx()")
>> - Commit f7f18e30b468 ("powerpc/kprobes: Handle error returned by
>> set_memory_rox()")
>> - Commit 009cf11d4aab ("powerpc: Don't ignore errors from
>> set_memory_{n}p() in __kernel_map_pages()")
>> - Commit 9cbacb834b4a ("powerpc: Don't ignore errors from
>> set_memory_{n}p() in __kernel_map_pages()")
>> - Commit 78cb0945f714 ("powerpc: Handle error in mark_rodata_ro() and
>> mark_initmem_nx()")
>>
>> All calls in core parts of the kernel also always check returned value,
>> can be looked at with following query:
>>
>> $ git grep -w -e set_memory_ro -e set_memory_rw -e set_memory_x -e set_memory_nx -e set_memory_rox `find . -maxdepth 1 -type d | grep -v arch | grep /`
>>
>> It is now possible to flag those functions with __must_check to make
>> sure no new unchecked call it added.
>>
>> Link: https://github.com/KSPP/linux/issues/7
>> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
>
> Do you plan to take this patch anytime soon ?
>
> The generic part of the same was already applied in previous cycle, see
> https://github.com/torvalds/linux/commit/82ce8e2f31a1eb05b1527c3d807bea40031df913
I was waiting for the generic part to land, sorry I missed it.
Will put this in next now.
cheers
next prev parent reply other threads:[~2024-11-06 12:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-07 15:40 [PATCH] powerpc: Add __must_check to set_memory_...() Christophe Leroy
2024-09-07 15:40 ` [PATCH] set_memory: Add __must_check to generic stubs Christophe Leroy
2024-11-06 9:39 ` [PATCH] powerpc: Add __must_check to set_memory_...() Christophe Leroy
2024-11-06 12:47 ` Michael Ellerman [this message]
2024-11-17 12:09 ` Michael Ellerman
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=874j4klea7.fsf@mpe.ellerman.id.au \
--to=mpe@ellerman.id.au \
--cc=christophe.leroy@csgroup.eu \
--cc=kees@kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=naveen@kernel.org \
--cc=npiggin@gmail.com \
/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).