lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <94b9f14a-93f7-4d30-b22e-8a8aab8adb17@linux.ibm.com>
Date: Fri, 30 Jan 2026 13:11:33 +0530
From: Venkat Rao Bagalkote <venkat88@...ux.ibm.com>
To: Saket Kumar Bhaskar <skb99@...ux.ibm.com>, linux-kernel@...r.kernel.org,
        linux-kselftest@...r.kernel.org, bpf@...r.kernel.org,
        linuxppc-dev@...ts.ozlabs.org
Cc: hbathini@...ux.ibm.com, sachinpb@...ux.ibm.com, andrii@...nel.org,
        eddyz87@...il.com, ast@...nel.org, daniel@...earbox.net,
        martin.lau@...ux.dev, song@...nel.org, yonghong.song@...ux.dev,
        john.fastabend@...il.com, kpsingh@...nel.org, sdf@...ichev.me,
        haoluo@...gle.com, jolsa@...nel.org, christophe.leroy@...roup.eu,
        maddy@...ux.ibm.com, mpe@...erman.id.au
Subject: Re: [PATCH] selftests/bpf: Add powerpc support for
 get_preempt_count() in selftest


On 29/01/26 11:10 am, Saket Kumar Bhaskar wrote:
> get_preempt_count() is enabled to return preempt_count for powerpc,
> so that bpf_in_interrupt()/get_preempt_count() works for powerpc as
> well.
>
> Signed-off-by: Saket Kumar Bhaskar <skb99@...ux.ibm.com>
> ---
>   tools/testing/selftests/bpf/bpf_experimental.h | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/tools/testing/selftests/bpf/bpf_experimental.h b/tools/testing/selftests/bpf/bpf_experimental.h
> index 2cd9165c7348..c3f039a878f3 100644
> --- a/tools/testing/selftests/bpf/bpf_experimental.h
> +++ b/tools/testing/selftests/bpf/bpf_experimental.h
> @@ -630,6 +630,8 @@ static inline int get_preempt_count(void)
>   	return *(int *) bpf_this_cpu_ptr(&__preempt_count);
>   #elif defined(bpf_target_arm64)
>   	return bpf_get_current_task_btf()->thread_info.preempt.count;
> +#elif defined(bpf_target_powerpc)
> +	return bpf_get_current_task_btf()->thread_info.preempt_count;
>   #endif
>   	return 0;
>   }

Tested this patch by applying on mainline kernel and it passes the below 
selftest.


./test_progs -t timer_interrupt
#481     timer_interrupt:OK
Summary: 1/0 PASSED, 0 SKIPPED, 0 FAILED


Please add below tag.


Tested-by: Venkat Rao Bagalkote <venkat88@...ux.ibm.com>



Regards,

Venkat.



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ