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:   Mon, 05 Jun 2023 14:07:48 +0200
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Xin Li <xin3.li@...el.com>, linux-kernel@...r.kernel.org,
        x86@...nel.org, kvm@...r.kernel.org
Cc:     mingo@...hat.com, bp@...en8.de, dave.hansen@...ux.intel.com,
        hpa@...or.com, peterz@...radead.org, andrew.cooper3@...rix.com,
        seanjc@...gle.com, pbonzini@...hat.com, ravi.v.shankar@...el.com,
        jiangshanlai@...il.com, shan.kang@...el.com
Subject: Re: [PATCH v8 02/33] x86/fred: make unions for the cs and ss fields
 in struct pt_regs

On Mon, Apr 10 2023 at 01:14, Xin Li wrote:
> +	union {
> +		unsigned long  csx;	/* cs extended: CS + any fields above it */
> +		struct __attribute__((__packed__)) {
> +			unsigned short cs;	/* CS selector proper */
> +			unsigned int current_stack_level: 2;
> +			unsigned int __csx_resv1	: 6;
> +			unsigned int interrupt_shadowed	: 1;
> +			unsigned int software_initiated	: 1;
> +			unsigned int __csx_resv2	: 2;
> +			unsigned int nmi		: 1;
> +			unsigned int __csx_resv3	: 3;
> +			unsigned int __csx_resv4	: 32;
> +		};
> +	};
>  	unsigned long flags;
>  	unsigned long sp;
> -	unsigned long ss;
> +	union {
> +		unsigned long  ssx;	/* ss extended: SS + any fields above it */
> +		struct __attribute__((__packed__)) {
> +			unsigned short ss;	/* SS selector proper */
> +			unsigned int __ssx_resv1	: 16;
> +			unsigned int vector		: 8;
> +			unsigned int __ssx_resv2	: 8;
> +			unsigned int type		: 4;
> +			unsigned int __ssx_resv3	: 4;
> +			unsigned int enclv		: 1;
> +			unsigned int long_mode		: 1;
> +			unsigned int nested		: 1;
> +			unsigned int __ssx_resv4	: 1;
> +			unsigned int instr_len		: 4;
> +		};
> +	};

This does not match section

    5.2.1 Saving Information on the Regular Stack?

of version 4 and later of the specification.

Thanks,

        tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ