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: <20220317224831.ci7tb4lasg3xlgvr@black.fi.intel.com>
Date:   Fri, 18 Mar 2022 01:48:31 +0300
From:   "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
To:     Dave Hansen <dave.hansen@...el.com>
Cc:     Thomas Gleixner <tglx@...utronix.de>, mingo@...hat.com,
        bp@...en8.de, luto@...nel.org, peterz@...radead.org,
        sathyanarayanan.kuppuswamy@...ux.intel.com, aarcange@...hat.com,
        ak@...ux.intel.com, dan.j.williams@...el.com, david@...hat.com,
        hpa@...or.com, jgross@...e.com, jmattson@...gle.com,
        joro@...tes.org, jpoimboe@...hat.com, knsathya@...nel.org,
        pbonzini@...hat.com, sdeep@...are.com, seanjc@...gle.com,
        tony.luck@...el.com, vkuznets@...hat.com, wanpengli@...cent.com,
        thomas.lendacky@....com, brijesh.singh@....com, x86@...nel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCHv6 15/30] x86/boot: Port I/O: allow to hook up alternative
 helpers

On Thu, Mar 17, 2022 at 01:23:12PM -0700, Dave Hansen wrote:
> On 3/17/22 13:20, Dave Hansen wrote:
> > You keep the preprocessor away from things like
> > 
> > 	foo.inb = bar;
> > 
> > with:
> > 
> > 	#define inb(x) pio_ops.inb(x)
> 
> ... and I spotted my nonsense just as I hit send.
> 
> You could do that ^^.  But you'd need to rename the 'inb' op  like:
> 
> struct port_io_ops {
> 	u8 (*f_inb)(u16 port);
> 	...
> };
> 
> so that you do:
> 
> 	#define inb(x) pio_ops.f_inb(x)
> 
> But, remember when I said I hate playing #define tricks? ;)  This is one
> reason why.

But the define tricks are unrelated to the linker issue. The issue pops up
after you get past the preprocessor tricks.

-- 
 Kirill A. Shutemov

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ