Re: [PATCH] powerpc/pseries: Whitelist dtl slub object for copying to userspace

2024-06-24 Thread Michael Ellerman
On Fri, 14 Jun 2024 23:08:44 +0530, Anjali K wrote: > Reading the dispatch trace log from /sys/kernel/debug/powerpc/dtl/cpu-* > results in a BUG() when the config CONFIG_HARDENED_USERCOPY is enabled as > shown below. > > kernel BUG at mm/usercopy.c:102! > Oops: Exception in kernel mode, si

Re: [PATCH] powerpc/pseries: Whitelist dtl slub object for copying to userspace

2024-06-21 Thread Michael Ellerman
Anjali K writes: > Hi Michael > > On 18/06/24 12:41, Michael Ellerman wrote: >> I guess there isn't a kmem_cache_create_user_readonly() ? > Thank you for your review.     > > My understanding of the question is whether there's a way to whitelist a 

Re: [PATCH] powerpc/pseries: Whitelist dtl slub object for copying to userspace

2024-06-21 Thread Anjali K
Hi Michael On 18/06/24 12:41, Michael Ellerman wrote: > I guess there isn't a kmem_cache_create_user_readonly() ? Thank you for your review.     My understanding of the question is whether there's a way to whitelist a    region such that it can be co

Re: [PATCH] powerpc/pseries: Whitelist dtl slub object for copying to userspace

2024-06-20 Thread Kees Cook
On Thu, Jun 20, 2024 at 10:58:49PM +0530, Anjali K wrote: > However given that:     > (i) The dtl buffer is read-only. The dtl trace is a set of metrics which    > are collected to be read by privileged users.   > (ii)

Re: [PATCH] powerpc/pseries: Whitelist dtl slub object for copying to userspace

2024-06-20 Thread Anjali K
Hi Kees Thank you for your review. On 17/06/24 23:29, Kees Cook wrote: > On Fri, Jun 14, 2024 at 11:08:44PM +0530, Anjali K wrote: >> Reading the dispatch trace log from /sys/kernel/debug/powerpc/dtl/cpu-* >> results in a BUG() when the config CONFIG_HARDENED_USERCOPY is enabled as >> shown below.

Re: [PATCH] powerpc/pseries: Whitelist dtl slub object for copying to userspace

2024-06-18 Thread Michael Ellerman
Kees Cook writes: > On Fri, Jun 14, 2024 at 11:08:44PM +0530, Anjali K wrote: >> Reading the dispatch trace log from /sys/kernel/debug/powerpc/dtl/cpu-* >> results in a BUG() when the config CONFIG_HARDENED_USERCOPY is enabled as >> shown below. >> >> kernel BUG at mm/usercopy.c:102! >> O

Re: [PATCH] powerpc/pseries: Whitelist dtl slub object for copying to userspace

2024-06-17 Thread Kees Cook
On Fri, Jun 14, 2024 at 11:08:44PM +0530, Anjali K wrote: > Reading the dispatch trace log from /sys/kernel/debug/powerpc/dtl/cpu-* > results in a BUG() when the config CONFIG_HARDENED_USERCOPY is enabled as > shown below. > > kernel BUG at mm/usercopy.c:102! > Oops: Exception in kernel mo

Re: [PATCH] powerpc/pseries: Whitelist dtl slub object for copying to userspace

2024-06-17 Thread Srikar Dronamraju
> Commit 6d07d1cd300f ("usercopy: Restrict non-usercopy caches to size 0") > requires that only whitelisted areas in slab/slub objects can be copied to > userspace when usercopy hardening is enabled using CONFIG_HARDENED_USERCOPY. > Dtl contains hypervisor dispatch events which are expected to be r

[PATCH] powerpc/pseries: Whitelist dtl slub object for copying to userspace

2024-06-14 Thread Anjali K
Reading the dispatch trace log from /sys/kernel/debug/powerpc/dtl/cpu-* results in a BUG() when the config CONFIG_HARDENED_USERCOPY is enabled as shown below. kernel BUG at mm/usercopy.c:102! Oops: Exception in kernel mode, sig: 5 [#1] LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=2048 NUMA p