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: <0a68d437-5d6a-42aa-ae4e-6f5d89cfcaf3@acm.org>
Date: Wed, 26 Mar 2025 06:49:43 -0400
From: Bart Van Assche <bvanassche@....org>
To: "Bao D. Nguyen" <quic_nguyenb@...cinc.com>,
 Arthur Simchaev <Arthur.Simchaev@...disk.com>,
 "quic_cang@...cinc.com" <quic_cang@...cinc.com>,
 "quic_nitirawa@...cinc.com" <quic_nitirawa@...cinc.com>,
 "avri.altman@....com" <avri.altman@....com>,
 "peter.wang@...iatek.com" <peter.wang@...iatek.com>,
 "manivannan.sadhasivam@...aro.org" <manivannan.sadhasivam@...aro.org>,
 "minwoo.im@...sung.com" <minwoo.im@...sung.com>,
 "adrian.hunter@...el.com" <adrian.hunter@...el.com>,
 "martin.petersen@...cle.com" <martin.petersen@...cle.com>
Cc: "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
 Alim Akhtar <alim.akhtar@...sung.com>,
 "James E.J. Bottomley" <James.Bottomley@...senPartnership.com>,
 Matthias Brugger <matthias.bgg@...il.com>,
 AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
 Bean Huo <beanhuo@...ron.com>, Keoseong Park <keosung.park@...sung.com>,
 Ziqi Chen <quic_ziqichen@...cinc.com>, Al Viro <viro@...iv.linux.org.uk>,
 Gwendal Grignou <gwendal@...omium.org>, Eric Biggers <ebiggers@...gle.com>,
 open list <linux-kernel@...r.kernel.org>,
 "moderated list:ARM/Mediatek SoC support:Keyword:mediatek"
 <linux-arm-kernel@...ts.infradead.org>,
 "moderated list:ARM/Mediatek SoC support:Keyword:mediatek"
 <linux-mediatek@...ts.infradead.org>
Subject: Re: [PATCH v4 1/1] scsi: ufs: core: add device level exception
 support

On 3/25/25 6:15 PM, Bao D. Nguyen wrote:
> The existing "struct utp_upiu_query_v4_0" probably has a bug in it. It 
> does not use theĀ  __attribute__((__packed__)) attribute. The compiler is 
> free to add padding in this structure, resulting in the read attribute 
> value being incorrect. I plan to provide a separate patch to fix this 
> issue.

Adding __attribute__((__packed__)) or __packed to data structures that
don't need it is not an improvement but is a change that makes
processing slower on architectures that do not support unaligned
accesses. Instead of adding __packed to data structures in their
entirety, only add it to those members that need it and check the
structure size as follows:

static_assert(sizeof(...) == ...);

Thanks,

Bart.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ