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: <20150112192314.GF3904@pd.tnic>
Date:	Mon, 12 Jan 2015 20:23:14 +0100
From:	Borislav Petkov <bp@...en8.de>
To:	Denys Vlasenko <dvlasenk@...hat.com>
Cc:	linux-kernel@...r.kernel.org,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Oleg Nesterov <oleg@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>,
	Andy Lutomirski <luto@...capital.net>,
	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 12:07:35AM +0100, Denys Vlasenko wrote:
> Sequences
>         pushl_cfi %reg
>         CFI_REL_OFFSET reg, 0
> and
>         popl_cfi %reg
>         CFI_RESTORE reg
> happen quite often. This patch adds macros which generate them.
> 
> No assembly changes (verified with objdump -dr vmlinux.o).

...

> diff --git a/arch/x86/include/asm/dwarf2.h b/arch/x86/include/asm/dwarf2.h
> index f6f1598..de1cdaf 100644
> --- a/arch/x86/include/asm/dwarf2.h
> +++ b/arch/x86/include/asm/dwarf2.h
> @@ -86,11 +86,23 @@
>  	CFI_ADJUST_CFA_OFFSET 8
>  	.endm
>  
> +	.macro pushq_cfi_reg reg
> +	pushq %\reg
> +	CFI_ADJUST_CFA_OFFSET 8
> +	CFI_REL_OFFSET \reg, 0
> +	.endm

What's wrong with adding the CFI_REL_OFFSET to the pushl/popl_cfi macro
and not add two new _reg macros?

I.e., have the _cfi macros add all the CFI annotations needed.

-- 
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--
--
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