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:	Fri, 02 Nov 2012 14:09:23 +0000
From:	"Jan Beulich" <JBeulich@...e.com>
To:	"Steven Rostedt" <rostedt@...dmis.org>
Cc:	<sqazi@...gle.com>, <peterz@...radead.org>, <tglx@...utronix.de>,
	<torvalds@...ux-foundation.org>, <hpa@...ux.intel.com>,
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] [PATCH] x86: Don't clobber top of pt_regs in
 nested NMI

>>> On 02.11.12 at 14:53, Steven Rostedt <rostedt@...dmis.org> wrote:
> On Fri, 2012-11-02 at 09:51 -0400, Steven Rostedt wrote:
>> On Thu, 2012-11-01 at 19:53 +0000, Jan Beulich wrote:
>> 
>> > There doesn't appear to be anything special about these adjustments, so I
>> > don't see what help would be required here - it ought to be the normal use
>> > of CFI_ADJUST_CFA_OFFSET that needs adding.
>> 
>> This change look fine to you?
>> 
>> diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S
>> index 52edf92..7ba5342 100644
>> --- a/arch/x86/kernel/entry_64.S
>> +++ b/arch/x86/kernel/entry_64.S
>> @@ -1796,10 +1796,12 @@ repeat_nmi:
>>  
>>  	/* Make another copy, this one may be modified by nested NMIs */
>>  	addq $(10*8), %rsp
>> +	CFI_ADJUST_CFA_OFFSET -10*8
>>  	.rept 5
>>  	pushq_cfi -6*8(%rsp)
>>  	.endr
>>  	subq $(5*8), %rsp
>> +	CFI_ADJUST_CFA_OFFSET 5*8
>>  
>>  	CFI_DEF_CFA_OFFSET SS+8-RIP
>>  end_repeat_nmi:
>> 
> 
> Is that second one even needed? Or will the CFI_DEF_CFA_OFFSET SS+8-RIP
> fix it?

Yes it will (as long as no intervening instructions get added; that's
to say that I'd recommend removing the blank line to make clear
that instruction and annotation belong together).

Jan

--
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