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:25:39 -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:23 AM, Borislav Petkov <bp@...en8.de> wrote:
> 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.
>

I think that some users don't want the CFI_REL_OFFSET.  Also, there's
that pesky % sign.

--Andy

> --
> Regards/Gruss,
>     Boris.
>
> Sent from a fat crate under my desk. Formatting is fine.
> --



-- 
Andy Lutomirski
AMA Capital Management, LLC
--
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