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: <20230719200222.GD3529734@hirez.programming.kicks-ass.net>
Date:   Wed, 19 Jul 2023 22:02:22 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Petr Mladek <pmladek@...e.com>
Cc:     Brian Gerst <brgerst@...il.com>, jpoimboe@...nel.org,
        linux-kernel@...r.kernel.org, x86@...nel.org,
        Thomas Gleixner <tglx@...utronix.de>,
        Borislav Petkov <bp@...en8.de>,
        "H . Peter Anvin" <hpa@...or.com>,
        Sami Tolvanen <samitolvanen@...gle.com>,
        alyssa.milburn@...ux.intel.com, keescook@...omium.org,
        joao@...rdrivepizza.com, tim.c.chen@...ux.intel.com,
        live-patching@...r.kernel.org
Subject: Re: [PATCH v2 2/2] x86: Rewrite ret_from_fork() in C

On Wed, Jul 19, 2023 at 05:21:11PM +0200, Petr Mladek wrote:

> This patch broke livepatching. Kthreads never have a reliable stack.
> It works when I revert it.

> > +SYM_CODE_START(ret_from_fork_asm)
> > +	UNWIND_HINT_REGS

It works again when I change the above hint to UNWIND_HINT_END_OF_STACK,
so yeah. Doing this makes objtool unhappy with something else though,
so I'll go prod at things with something sharp...

Thanks!

> >  	ANNOTATE_NOENDBR // copy_thread
> >  	CALL_DEPTH_ACCOUNT
> >  
> > +	movq	%rax, %rdi		/* prev */
> > +	movq	%rsp, %rsi		/* regs */
> > +	movq	%rbx, %rdx		/* fn */
> > +	movq	%r12, %rcx		/* fn_arg */
> > +	call	ret_from_fork
> >  
> > +SYM_CODE_END(ret_from_fork_asm)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ