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] [thread-next>] [day] [month] [year] [list]
Date: Mon, 29 Apr 2024 17:40:30 +0200
From: Ard Biesheuvel <ardb@...nel.org>
To: linke li <lilinke99@...com>
Cc: xujianhao01@...il.com, Thomas Gleixner <tglx@...utronix.de>, 
	Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>, 
	Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org, 
	"H. Peter Anvin" <hpa@...or.com>, linux-efi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86/efi: mark racy access on efi_rts_work.efi_rts_id

On Sat, 27 Apr 2024 at 07:28, linke li <lilinke99@...com> wrote:
>
> In efi_crash_gracefully_on_page_fault(), efi_rts_work.efi_rts_id can by
> changed by other thread from the comment. Mark possible data race on
> efi_rts_work.efi_rts_id as benign using READ_ONCE.
>
> This patch is aimed at reducing the number of benign races reported by
> KCSAN in order to focus future debugging effort on harmful races.
>
> Signed-off-by: linke li <lilinke99@...com>
> ---
>  arch/x86/platform/efi/quirks.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/platform/efi/quirks.c b/arch/x86/platform/efi/quirks.c
> index f0cc00032751..4acb81700caf 100644
> --- a/arch/x86/platform/efi/quirks.c
> +++ b/arch/x86/platform/efi/quirks.c
> @@ -751,7 +751,7 @@ void efi_crash_gracefully_on_page_fault(unsigned long phys_addr)
>          * because this case occurs *very* rarely and hence could be improved
>          * on a need by basis.
>          */
> -       if (efi_rts_work.efi_rts_id == EFI_RESET_SYSTEM) {
> +       if (READ_ONCE(efi_rts_work.efi_rts_id) == EFI_RESET_SYSTEM) {
>                 pr_info("efi_reset_system() buggy! Reboot through BIOS\n");
>                 machine_real_restart(MRR_BIOS);
>                 return;

Why is this the only reference that needs an annotation?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ