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: <alpine.DEB.2.21.1807032056460.1816@nanos.tec.linutronix.de>
Date:   Tue, 3 Jul 2018 21:04:01 +0200 (CEST)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>
cc:     x86@...nel.org, platform-driver-x86@...r.kernel.org,
        dave.hansen@...el.com, sean.j.christopherson@...el.com,
        nhorman@...hat.com, npmccallum@...hat.com,
        linux-sgx@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
        "H. Peter Anvin" <hpa@...or.com>,
        "open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)" 
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v12 05/13] x86/sgx: architectural structures

On Tue, 3 Jul 2018, Jarkko Sakkinen wrote:

> This commit adds arch/x86/include/asm/sgx_arch.h that contains definitions

This is not a commit. Simply: Add .....

> for data structures used by the SGX.
> 
> Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>
> Co-developed-by: Suresh Siddha <suresh.b.siddha@...el.com>

Documentaiton:

  A Co-Developed-by: states that the patch was also created by another developer
  along with the original author.  This is useful at times when multiple people
  work on a single patch.  Note, this person also needs to have a Signed-off-by:
  line in the patch as well.

Please fix all over the place.

> +
> +#define SGX_MISC_RESERVED_MASK 0xFFFFFFFFFFFFFFFEL

L ? ULL I'd say...

> +#define SGX_ATTR_RESERVED_MASK 0xFFFFFFFFFFFFFFC9L

Ditto

> +#define SGX_SECS_RESERVED1_SIZE 24
> +#define SGX_SECS_RESERVED2_SIZE 32
> +#define SGX_SECS_RESERVED3_SIZE 96
> +#define SGX_SECS_RESERVED4_SIZE 3836
> +
> +struct sgx_secs {
> +	uint64_t size;
> +	uint64_t base;
> +	uint32_t ssaframesize;
> +	uint32_t miscselect;
> +	uint8_t reserved1[SGX_SECS_RESERVED1_SIZE];
> +	uint64_t attributes;

Please make these tabular aligned for readility sake

> +	uint32_t	miscselect;
> +	uint8_t		reserved1[SGX_SECS_RESERVED1_SIZE];
> +	uint64_t	attributes;

Hmm? All over the place...

> +enum sgx_tcs_flags {
> +	SGX_TCS_DBGOPTIN	= 0x01, /* cleared on EADD */

Please do not use tail comments. Either put the comment above the define or
use kernel doc.

> +};
> +
> +#define SGX_TCS_RESERVED_MASK 0xFFFFFFFFFFFFFFFEL

See above.

> +#define SGX_SECINFO_PERMISSION_MASK	0x0000000000000007L
> +#define SGX_SECINFO_PAGE_TYPE_MASK	0x000000000000FF00L
> +#define SGX_SECINFO_RESERVED_MASK	0xFFFFFFFFFFFF00F8L

Ditto

Thanks,

	tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ