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: <87czik22wk.ffs@tglx>
Date:   Thu, 17 Mar 2022 13:12:59 +0100
From:   Thomas Gleixner <tglx@...utronix.de>
To:     "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
        mingo@...hat.com, bp@...en8.de, dave.hansen@...el.com,
        luto@...nel.org, peterz@...radead.org
Cc:     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,
        "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
Subject: Re: [PATCHv6 15/30] x86/boot: Port I/O: allow to hook up
 alternative helpers

On Wed, Mar 16 2022 at 05:08, Kirill A. Shutemov wrote:
> +#undef inb
> +#undef inw
> +#undef inl
> +#undef outb
> +#undef outw
> +#undef outl
> +
> +struct port_io_ops {
> +	u8 (*inb)(u16 port);
> +	u16 (*inw)(u16 port);
> +	u32 (*inl)(u16 port);
> +	void (*outb)(u8 v, u16 port);
> +	void (*outw)(u16 v, u16 port);
> +	void (*outl)(u32 v, u16 port);

	u8	(*inb)(u16 port);
	void	(*outb)(u8 v, u16 port);
	void	(*outw)(u16 v, u16 port);

is all what's used AFAICT.

> +};
> +
> +extern struct port_io_ops pio_ops;
> +
> +/*
> + * Use the normal I/O instructions by default.
> + * TDX guests override these to use hypercalls.
> + */
> +static inline void init_default_io_ops(void)
> +{
> +	pio_ops.inb = __inb;
> +	pio_ops.inw = __inw;
> +	pio_ops.inl = __inl;
> +	pio_ops.outb = __outb;
> +	pio_ops.outw = __outw;
> +	pio_ops.outl = __outl;
> +}

#define DEFINE_PORT_IO_OPS()		\
	struct port_io_ops pio_ops = {	\
        	.inb	= __inb,	\
        	.outb	= __outb,	\
        	.outw	= __outw, }

Hmm?

Thanks,

        tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ