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: <20090623072811.GB6397@elte.hu>
Date:	Tue, 23 Jun 2009 09:28:11 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Len Brown <lenb@...nel.org>
Cc:	sfi-devel@...plefirmware.org, linux-kernel@...r.kernel.org,
	Feng Tang <feng.tang@...el.com>,
	Len Brown <len.brown@...el.com>
Subject: Re: [PATCH 2/8] SFI: include/linux/sfi.h


* Len Brown <lenb@...nel.org> wrote:

> +/*
> + * Table structures must be byte-packed to match the SFI specification,
> + * as they are provided by the BIOS.
> + */
> +#pragma pack(1)

We use __attribute__((packed)) for that generally.

> +struct sfi_table_header {
> +	char signature[SFI_SIGNATURE_SIZE];
> +	u32 length;
> +	u8 revision;
> +	u8 checksum;
> +	char oem_id[SFI_OEM_ID_SIZE];
> +	char oem_table_id[SFI_OEM_TABLE_ID_SIZE];
> +};

Please use more readable structure definitions, such as:

> +struct sfi_table_header {
> +	char			signature[SFI_SIGNATURE_SIZE];
> +	u32			length;
> +	u8			revision;
> +	u8			checksum;
> +	char			oem_id[SFI_OEM_ID_SIZE];
> +	char			oem_table_id[SFI_OEM_TABLE_ID_SIZE];
> +};

> +void __init __iomem *
> +arch_early_ioremap(unsigned long phys, unsigned long size);
> +void __init arch_early_iounmap(void __iomem *virt, unsigned long size);

Why is this in sfr.h? Should be in a separate series.

> +static inline int sfi_init_memory_map(void) { return -1; }
> +static inline int sfi_init(void) { return 0; }
> +static inline void sfi_init_late(void)	{}

Seems half-aligned. Please align consistently, such as:

static inline int sfi_init_memory_map(void)	{ return -1; }
static inline int sfi_init(void)		{ return  0; }
static inline void sfi_init_late(void)		{ }

or dont align at all.

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ