linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] riscv: Wire up memfd_secret in UAPI header
@ 2022-05-05  8:18 Tobias Klauser
  2022-05-05  8:46 ` Tobias Klauser
  0 siblings, 1 reply; 4+ messages in thread
From: Tobias Klauser @ 2022-05-05  8:18 UTC (permalink / raw)
  To: Paul Walmsley, Palmer Dabbelt, Albert Ou
  Cc: Mike Rapoport, Arnd Bergmann, linux-riscv, linux-arch

Move the __ARCH_WANT_MEMFD_SECRET define added in commit 7bb7f2ac24a0
("arch, mm: wire up memfd_secret system call where relevant") to
<uapi/asm/unistd.h> so __NR_memfd_secret is defined when including
<unistd.h> in userspace.

This allows the memds_secret selftest to pass on riscv.

Cc: Mike Rapoport <rppt@kernel.org>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
 arch/riscv/include/asm/unistd.h      | 1 -
 arch/riscv/include/uapi/asm/unistd.h | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/riscv/include/asm/unistd.h b/arch/riscv/include/asm/unistd.h
index 6c316093a1e5..977ee6181dab 100644
--- a/arch/riscv/include/asm/unistd.h
+++ b/arch/riscv/include/asm/unistd.h
@@ -9,7 +9,6 @@
  */
 
 #define __ARCH_WANT_SYS_CLONE
-#define __ARCH_WANT_MEMFD_SECRET
 
 #include <uapi/asm/unistd.h>
 
diff --git a/arch/riscv/include/uapi/asm/unistd.h b/arch/riscv/include/uapi/asm/unistd.h
index 8062996c2dfd..d95fbf5846b0 100644
--- a/arch/riscv/include/uapi/asm/unistd.h
+++ b/arch/riscv/include/uapi/asm/unistd.h
@@ -21,6 +21,7 @@
 #endif /* __LP64__ */
 
 #define __ARCH_WANT_SYS_CLONE3
+#define __ARCH_WANT_MEMFD_SECRET
 
 #include <asm-generic/unistd.h>
 
-- 
2.36.0


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] riscv: Wire up memfd_secret in UAPI header
  2022-05-05  8:18 [PATCH] riscv: Wire up memfd_secret in UAPI header Tobias Klauser
@ 2022-05-05  8:46 ` Tobias Klauser
  2022-06-02  5:57   ` Palmer Dabbelt
  0 siblings, 1 reply; 4+ messages in thread
From: Tobias Klauser @ 2022-05-05  8:46 UTC (permalink / raw)
  To: Paul Walmsley, Palmer Dabbelt, Albert Ou
  Cc: Mike Rapoport, Arnd Bergmann, linux-riscv, linux-arch

On 2022-05-05 at 10:18:15 +0200, Tobias Klauser <tklauser@distanz.ch> wrote:
> Move the __ARCH_WANT_MEMFD_SECRET define added in commit 7bb7f2ac24a0
> ("arch, mm: wire up memfd_secret system call where relevant") to
> <uapi/asm/unistd.h> so __NR_memfd_secret is defined when including
> <unistd.h> in userspace.
> 
> This allows the memds_secret selftest to pass on riscv.
                  ^- this should say memfd_secret

I can fix it up in a v2 if needed.

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] riscv: Wire up memfd_secret in UAPI header
  2022-05-05  8:46 ` Tobias Klauser
@ 2022-06-02  5:57   ` Palmer Dabbelt
  2022-06-02 13:03     ` Tobias Klauser
  0 siblings, 1 reply; 4+ messages in thread
From: Palmer Dabbelt @ 2022-06-02  5:57 UTC (permalink / raw)
  To: tklauser, tklauser
  Cc: Paul Walmsley, aou, rppt, Arnd Bergmann, linux-riscv, linux-arch

On Thu, 05 May 2022 01:46:11 PDT (-0700), tklauser@distanz.ch wrote:
> On 2022-05-05 at 10:18:15 +0200, Tobias Klauser <tklauser@distanz.ch> wrote:
>> Move the __ARCH_WANT_MEMFD_SECRET define added in commit 7bb7f2ac24a0
>> ("arch, mm: wire up memfd_secret system call where relevant") to
>> <uapi/asm/unistd.h> so __NR_memfd_secret is defined when including
>> <unistd.h> in userspace.
>>
>> This allows the memds_secret selftest to pass on riscv.
>                   ^- this should say memfd_secret
>
> I can fix it up in a v2 if needed.

No big deal, I don't mind squashing stuff like that.  This is on 
for-next (no fixes, I'm still on 5.19).  I added

Fixes: 7bb7f2ac24a0 ("arch, mm: wire up memfd_secret system call where relevant")
Cc: stable@vger.kernel.org

but LMK if you think that's wrong for some reason.

Thanks!

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] riscv: Wire up memfd_secret in UAPI header
  2022-06-02  5:57   ` Palmer Dabbelt
@ 2022-06-02 13:03     ` Tobias Klauser
  0 siblings, 0 replies; 4+ messages in thread
From: Tobias Klauser @ 2022-06-02 13:03 UTC (permalink / raw)
  To: Palmer Dabbelt
  Cc: Paul Walmsley, aou, rppt, Arnd Bergmann, linux-riscv, linux-arch

On 2022-06-02 at 07:57:21 +0200, Palmer Dabbelt <palmer@dabbelt.com> wrote:
> On Thu, 05 May 2022 01:46:11 PDT (-0700), tklauser@distanz.ch wrote:
> > On 2022-05-05 at 10:18:15 +0200, Tobias Klauser <tklauser@distanz.ch> wrote:
> > > Move the __ARCH_WANT_MEMFD_SECRET define added in commit 7bb7f2ac24a0
> > > ("arch, mm: wire up memfd_secret system call where relevant") to
> > > <uapi/asm/unistd.h> so __NR_memfd_secret is defined when including
> > > <unistd.h> in userspace.
> > > 
> > > This allows the memds_secret selftest to pass on riscv.
> >                   ^- this should say memfd_secret
> > 
> > I can fix it up in a v2 if needed.
> 
> No big deal, I don't mind squashing stuff like that.  This is on for-next
> (no fixes, I'm still on 5.19).  I added
> 
> Fixes: 7bb7f2ac24a0 ("arch, mm: wire up memfd_secret system call where relevant")
> Cc: stable@vger.kernel.org
> 
> but LMK if you think that's wrong for some reason.

All of the above sounds good to me. Thank you!

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-06-02 13:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-05  8:18 [PATCH] riscv: Wire up memfd_secret in UAPI header Tobias Klauser
2022-05-05  8:46 ` Tobias Klauser
2022-06-02  5:57   ` Palmer Dabbelt
2022-06-02 13:03     ` Tobias Klauser

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