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]
Message-ID: <87wnrcqfap.fsf@disp2133>
Date:   Wed, 02 Jun 2021 13:42:22 -0500
From:   ebiederm@...ssion.com (Eric W. Biederman)
To:     Jiashuo Liang <liangjs@....edu.cn>
Cc:     Dave Hansen <dave.hansen@...ux.intel.com>,
        Andy Lutomirski <luto@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        x86@...nel.org, "H. Peter Anvin" <hpa@...or.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] signal/x86: Don't send SIGSEGV twice on SEGV_PKUERR

Jiashuo Liang <liangjs@....edu.cn> writes:

> Before this patch, the __bad_area_nosemaphore function calls both
> force_sig_pkuerr and force_sig_fault when handling SEGV_PKUERR. This does
> not cause problems because the second signal is filtered by the
> legacy_queue check in __send_signal. But it causes the kernel to do
> unnecessary work.
>
> This patch should fix it.

Have you been able to test this patch?

Acked-by: "Eric W. Biederman" <ebiederm@...ssion.com>

Does one of the x86 maintainers want to pick up this trivial fix or
should I pick it up?

Eric


> Fixes: 9db812dbb29d ("signal/x86: Call force_sig_pkuerr from __bad_area_nosemaphore")
> Suggested-by: "Eric W. Biederman" <ebiederm@...ssion.com>
> Signed-off-by: Jiashuo Liang <liangjs@....edu.cn>
> ---
>  arch/x86/mm/fault.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
> index 1c548ad00752..6bda7f67d737 100644
> --- a/arch/x86/mm/fault.c
> +++ b/arch/x86/mm/fault.c
> @@ -836,8 +836,8 @@ __bad_area_nosemaphore(struct pt_regs *regs, unsigned long error_code,
>  
>  	if (si_code == SEGV_PKUERR)
>  		force_sig_pkuerr((void __user *)address, pkey);
> -
> -	force_sig_fault(SIGSEGV, si_code, (void __user *)address);
> +	else
> +		force_sig_fault(SIGSEGV, si_code, (void __user *)address);
>  
>  	local_irq_disable();
>  }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ