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: <871rnq7klm.fsf@nanos.tec.linutronix.de>
Date:   Mon, 11 May 2020 13:54:29 +0200
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Alexandre Chartre <alexandre.chartre@...cle.com>,
        LKML <linux-kernel@...r.kernel.org>
Cc:     x86@...nel.org, "Paul E. McKenney" <paulmck@...nel.org>,
        Andy Lutomirski <luto@...nel.org>,
        Frederic Weisbecker <frederic@...nel.org>,
        Paolo Bonzini <pbonzini@...hat.com>,
        Sean Christopherson <sean.j.christopherson@...el.com>,
        Masami Hiramatsu <mhiramat@...nel.org>,
        Petr Mladek <pmladek@...e.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Joel Fernandes <joel@...lfernandes.org>,
        Boris Ostrovsky <boris.ostrovsky@...cle.com>,
        Juergen Gross <jgross@...e.com>,
        Brian Gerst <brgerst@...il.com>,
        Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
        Josh Poimboeuf <jpoimboe@...hat.com>,
        Will Deacon <will@...nel.org>
Subject: Re: [patch V4 part 5 02/31] x86/entry: Provide helpers for execute on irqstack

Alexandre Chartre <alexandre.chartre@...cle.com> writes:
> On 5/5/20 3:53 PM, Thomas Gleixner wrote:
>> +	__this_cpu_add(irq_count, 1);					\
>> +	asm volatile(							\
>> +		"pushq  %%rbp					\n"	\
>> +		"movq   %%rsp, %%rbp				\n"	\
>> +		"movq	%%rsp, (%[ts])				\n"	\
>> +		"movq	%[ts], %%rsp				\n"	\
>> +		"1:						\n"	\
>> +		"	.pushsection .discard.instr_begin	\n"	\
>> +		"	.long 1b - .				\n"	\
>> +		"	.popsection				\n"	\
>> +		"call	" __ASM_FORM(func) "			\n"	\
>> +		"2:						\n"	\
>> +		"	.pushsection .discard.instr_end		\n"	\
>> +		"	.long 2b - .				\n"	\
>> +		"	.popsection				\n"	\
>> +		"popq	%%rsp					\n"	\
>> +		"leaveq						\n"	\
>> +		:							\
>> +		: [ts] "r" (tos)					\
>> +		: "memory"						\
>> +		);							\
>> +	__this_cpu_sub(irq_count, 1);					\
>> +}
>
> The pushsection/popsection discard.instr_begin/end sequences are used several
> times in asm() statement at different places, so I wonder if it might be worth
> having a macro.

As discussed elsewhere this is going to move to ASM partially and the
various variants are not longer necessary.

Thanks,

        tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ