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: <d6789f7c-9c44-cb57-2a52-03ac9474d2e2@zytor.com>
Date:   Tue, 11 May 2021 10:44:22 -0700
From:   "H. Peter Anvin" <hpa@...or.com>
To:     Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        Andy Lutomirski <luto@...nel.org>
Cc:     Steve Wahl <steve.wahl@....com>, Mike Travis <mike.travis@....com>,
        Dimitri Sivanich <dimitri.sivanich@....com>,
        Russ Anderson <russ.anderson@....com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 4/6] x86/irq: merge common code in
 DEFINE_IDTENTRY_SYSVEC[_SIMPLE]

On 5/11/21 7:22 AM, Thomas Gleixner wrote:
> 
> That's not really making the code more readable. Something like the
> below perhaps?
> 
> #define IDTENTRY_INVOKE_SYSVEC(func, regs, raw)				\
> do {									\
> 	irqentry_state_t state = irqentry_enter(regs);			\
> 									\
> 	instrumentation_begin();					\
> 	kvm_set_cpu_l1tf_flush_l1d();					\
>          if (raw) {							\
> 		__irq_enter_raw();					\
> 		func(regs);						\
> 		__irq_exit_raw();			                \
> 	} else {	                                                \
> 		run_sysvec_on_irqstack_cond(func, regs);	        \
>          }                                                               \
> 	instrumentation_end();						\
>          irqentry_exit(regs, state);					\
> } while (0)								\
> 

Digging more into it, it looks like a *lot* of the macros in 
<asm/irq_stack.h> and <asm/idtentry.h> can be replaced with inlines 
without any change in functionality or generated code.

	-hpa

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ