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:   Thu, 18 Nov 2021 11:12:54 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     Linus Torvalds <torvalds@...ux-foundation.org>
Cc:     Holger Hoffstätte 
        <holger@...lied-asynchrony.com>,
        Qi Zheng <zhengqi.arch@...edance.com>,
        Kees Cook <keescook@...omium.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Justin Forbes <jmforbes@...uxtx.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Guenter Roeck <linux@...ck-us.net>,
        Shuah Khan <shuah@...nel.org>, patches@...nelci.org,
        lkft-triage@...ts.linaro.org, Pavel Machek <pavel@...x.de>,
        Jon Hunter <jonathanh@...dia.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        stable <stable@...r.kernel.org>,
        Josh Poimboeuf <jpoimboe@...hat.com>
Subject: Re: [PATCH 5.15 000/923] 5.15.3-rc3 review

On Thu, Nov 18, 2021 at 10:39:44AM +0100, Peter Zijlstra wrote:
> @@ -396,22 +416,27 @@ static bool deref_stack_iret_regs(struct unwind_state *state, unsigned long addr
>  static bool get_reg(struct unwind_state *state, unsigned int reg_off,
>  		    unsigned long *val)
>  {
> -	unsigned int reg = reg_off/8;
> -
>  	if (!state->regs)
>  		return false;
>  
> +	pagefault_disable();
>  	if (state->full_regs) {
> -		*val = READ_ONCE_NOCHECK(((unsigned long *)state->regs)[reg]);
> +		__get_kernel_nofault(val, (void *)state->regs + reg_off, unsigned long, Efault);
> +		pagefault_enable();
>  		return true;
>  	}
>  
>  	if (state->prev_regs) {
> -		*val = READ_ONCE_NOCHECK(((unsigned long *)state->prev_regs)[reg]);
> +		__get_kernel_nofault(val, (void *)state->regs + reg_off, unsigned long, Efault);
							^^^ prev_regs
> +		pagefault_enable();
>  		return true;
>  	}
>  
>  	return false;
> +
> +Efault:
> +	pagefault_enable();
> +	return false;
>  }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ