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, 12 Jan 2015 11:46:53 -0800
From:	Andy Lutomirski <luto@...capital.net>
To:	Borislav Petkov <bp@...en8.de>
Cc:	Denys Vlasenko <dvlasenk@...hat.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Oleg Nesterov <oleg@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	X86 ML <x86@...nel.org>, Alexei Starovoitov <ast@...mgrid.com>,
	Will Drewry <wad@...omium.org>,
	Kees Cook <keescook@...omium.org>
Subject: Re: [PATCH] x86: introduce push/pop macros which generate
 CFI_REL_OFFSET and CFI_RESTORE

On Mon, Jan 12, 2015 at 11:37 AM, Borislav Petkov <bp@...en8.de> wrote:
> Andy, please trim your replies.
>
> On Mon, Jan 12, 2015 at 11:25:39AM -0800, Andy Lutomirski wrote:
>> I think that some users don't want the CFI_REL_OFFSET.
>
> Why? I thought those two annotations are independent? As you said:
>
> "IOW, one is to keep the stack frame tracking consistent and the other
> is to tell the unwinder about the register we just saved."
>
> Sounds to me like we want both...
>

Dumb example:

    pushq_cfi $__KERNEL_DS /* ss */

This doesn't save anything that the unwinder would care about.

Better example:

    pushq_cfi \child_rip /* rip */
    CFI_REL_OFFSET    rip,0

Doing this with a macro would need a fancier macro.

Then there's crap like:

    pushq_cfi %rdi
    SCHEDULE_USER
    popq_cfi %rdi

I would need to look a lot more carefully to figure out whether this
would need CFI_REL_OFFSET.

If we actually had a DWARF unwinder in the kernel, maybe we could have
real test cases :-/

--Andy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ