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] [day] [month] [year] [list]
Message-ID: <Z9w3_2NkSJCvV9-l@smile.fi.intel.com>
Date: Thu, 20 Mar 2025 17:45:03 +0200
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: Dave Jiang <dave.jiang@...el.com>
Cc: Yi Sun <yi.sun@...el.com>, anil.s.keshavamurthy@...el.com,
	vkoul@...nel.org, dmaengine@...r.kernel.org,
	linux-kernel@...r.kernel.org, gordon.jin@...el.com,
	yi.sun@...ux.intel.com
Subject: Re: [PATCH] dma/idxd: Remove __packed from structures

On Thu, Mar 20, 2025 at 08:22:39AM -0700, Dave Jiang wrote:
> On 3/20/25 1:18 AM, Yi Sun wrote:
> > The __packed attribute introduces potential unaligned memory accesses
> > and endianness portability issues. Instead of relying on compiler-specific
> > packing, it's much better to explicitly fill structure gaps using padding
> > fields, ensuring natural alignment.
> > 
> > Since all previously __packed structures already enforce proper alignment
> > through manual padding, the __packed qualifiers are unnecessary and can be
> > safely removed.
> 
> Although endian portability is probably not a concern given this driver is
> only for an Intel platform device.

The concern is that somebody, while writing a code for a non-Intel platform,
might take it as an example and do suboptimal or wrong things.

> Reviewed-by: Dave Jiang <dave.jiang@...el.com>

Thanks!

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ