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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201007145450.32yrrq75csmq7vgo@treble>
Date:   Wed, 7 Oct 2020 09:54:50 -0500
From:   Josh Poimboeuf <jpoimboe@...hat.com>
To:     Jiri Slaby <jslaby@...e.cz>
Cc:     linux-kernel@...r.kernel.org, Miroslav Benes <mbenes@...e.cz>
Subject: Re: [PATCH] x86/unwind/orc: fix inactive tasks with sp in sp

-ENOPARSE on $SUBJECT.

Also please address it to x86@...nel.org, I think the tip maintainers
can pick up the fix directly.

Also it might be a good idea to Cc the live-patching mailing list, I
presume this causes a livepatch stall?

On Wed, Oct 07, 2020 at 10:19:09AM +0200, Jiri Slaby wrote:
> gcc-10 optimizes the scheduler code differently than its predecessors,
> depending on DEBUG_SECTION_MISMATCH=y config -- the config sets
> -fno-inline-functions-called-once.

Weird.  Was GCC ignoring this flag before?

> @@ -663,7 +656,13 @@ void __unwind_start(struct unwind_state *state, struct task_struct *task,
>  	} else {
>  		struct inactive_task_frame *frame = (void *)task->thread.sp;
>  
> -		state->sp = task->thread.sp;
> +		/*
> +		 * @ret_addr is in __schedule _before_ the @frame is pushed to
> +		 * the stack, but @thread.sp is saved in __switch_to_asm only
> +		 * _after_ saving the @frame, so subtract the @frame size, i.e.
> +		 * add it to @thread.sp.
> +		 */
> +		state->sp = task->thread.sp + sizeof(*frame);

IMO, the code speaks for itself and the comment may be superfluous.

Otherwise it looks good to me.  Thanks for fixing it!

-- 
Josh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ