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

2024-06-21 Thread Anjali K
hat it can be copied to userspace, but not written to using    copy_from_user().      No, we don't have a function to whitelist only for copy_to_user() and not   copy_from_user(). Thank you Anjali K

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

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

2024-06-14 Thread Anjali K
s. Specify useroffset=0 and usersize=DISPATCH_LOG_BYTES to whitelist the entire object. Co-developed-by: Vishal Chourasia Signed-off-by: Vishal Chourasia Signed-off-by: Anjali K --- arch/powerpc/platforms/pseries/setup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ar

Re: [PATCH v3] powerpc/perf: Set cpumode flags using sample address

2024-06-13 Thread Anjali K
Hi Michael, Can you please share your review comments on this patch when you get a chance? On 28/05/24 09:33, Anjali K wrote: > Currently in some cases, when the sampled instruction address register > latches to a specific address during sampling, the privilege bits captured > in th

[PATCH v3] powerpc/perf: Set cpumode flags using sample address

2024-05-27 Thread Anjali K
events are also included under PPMU_P10, hence remove the code specific to PPMU_P10_DD1 marked events. Signed-off-by: Anjali K --- Changelog: v2->v3: Addressed review comments from Michael Ellerman to change the commit message and update the values of PPMU_P10 and PPMU_HAS_ATTR_CONFIG1 flags t

Re: [PATCH v2] powerpc/perf: Set cpumode flags using sample address

2024-05-27 Thread Anjali K
On 24/05/24 12:55, Michael Ellerman wrote: > Hi Anjali, > > Anjali K writes: >> Currently in some cases, when the sampled instruction address register >> latches to a specific address during sampling, there is an inconsistency >> in the privilege bits captured in

[PATCH v2] powerpc/perf: Set cpumode flags using sample address

2024-05-17 Thread Anjali K
ed to contain the proposed fix. Signed-off-by: Anjali K --- Changelog: V1->V2: Fixed the build warning reported by the kernel test bot Added a new flag PPMU_P10 and used it instead of PPMU_ARCH_31 to restrict the changes to the current platform (Power10) arch/powerpc/include/asm/perf_event_s

Re: [PATCH] powerpc/perf: set cpumode flags using sample address in the PPMU_ARCH_31 case

2024-05-13 Thread Anjali K
On 12/05/24 07:52, kernel test robot wrote: Hi Anjali, kernel test robot noticed the following build warnings: [auto build test WARNING on dd5a440a31fae6e459c0d627162825505361] url:https://github.com/intel-lab-lkp/linux/commits/Anjali-K/powerpc-perf-set-cpumode-flags-using-sample-address

[PATCH] powerpc/perf: set cpumode flags using sample address in the PPMU_ARCH_31 case

2024-05-11 Thread Anjali K
RCH_31). Signed-off-by: Anjali K --- arch/powerpc/perf/core-book3s.c | 41 ++--- 1 file changed, 17 insertions(+), 24 deletions(-) diff --git a/arch/powerpc/perf/core-book3s.c b/arch/powerpc/perf/core-book3s.c index 6b5f8a94e7d8..dd0c23ebaf5a 100644 --- a/arch/powerp