From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 12FF124A06A for ; Fri, 15 May 2026 15:31:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778859077; cv=none; b=n3LBqDDSZjnsSdAjXwzFRwYTkHY0uxqXaQAkC+IIsZD5El0sXtID/dfnEdKBo9ajyhfcvy7CvVoh+wDxmWvjv2enPy/s+DYisAHyVrfgfXtgPQfn/T3zNqQxpm1DTBinFTF0RFCQ1z4UlNYS7uxbwu+4VjQjFj+HiLWnngTqz90= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778859077; c=relaxed/simple; bh=pKLnsCp414a+0fHQmDZnhLj87vhhRwZccsPGIazgLSg=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=ULyEzQXs4dUkWrNw1pVimDIzM+46/1EWKAOYveHVjBeFyozw+iWxV/jMB9BtjR5BmcD1fu2UWFxVIubGcXAlRfcrBiXpmD2Mq04Fm1GYlTEQ58Ibb26CmDlBiyIUakv53nvydx8YkR6lyNem5JvZqfloptNvuy2wyWfcGNYF9C8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=OKKtbC1t; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="OKKtbC1t" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4B9BCC2BCC9; Fri, 15 May 2026 15:31:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1778859076; bh=pKLnsCp414a+0fHQmDZnhLj87vhhRwZccsPGIazgLSg=; h=Subject:To:Cc:From:Date:From; b=OKKtbC1tBRw+SRuAWuvGKEymz/HLlUUdl3cwH0oE4Eu1ppbzwV27Q1TQZCWJl6+C1 gVf7y1zjlai5Tj56XWfaPZzqVYwarqf8e0Mb3kGBmeysGzeFRonMnG6TB6SaV9tDzA ZzzGi7zHEA85q8uwDMSZTo4nxUnAdyEuq8XUzWnY= Subject: FAILED: patch "[PATCH] crypto: nx - Fix packed layout in struct nx842_crypto_header" failed to apply to 6.6-stable tree To: gustavoars@kernel.org,herbert@gondor.apana.org.au,thorsten.blum@linux.dev Cc: From: Date: Fri, 15 May 2026 17:31:20 +0200 Message-ID: <2026051520-stimuli-giving-49a0@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 6.6-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.6.y git checkout FETCH_HEAD git cherry-pick -x b0bfa49c03e3c65737eafa73d8a698eaf55379a6 # git commit -s git send-email --to '' --in-reply-to '2026051520-stimuli-giving-49a0@gregkh' --subject-prefix 'PATCH 6.6.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From b0bfa49c03e3c65737eafa73d8a698eaf55379a6 Mon Sep 17 00:00:00 2001 From: "Gustavo A. R. Silva" Date: Tue, 17 Mar 2026 17:40:02 -0600 Subject: [PATCH] crypto: nx - Fix packed layout in struct nx842_crypto_header struct nx842_crypto_header is declared with the __packed attribute, however the fields grouped with struct_group_tagged() were not packed. This caused the grouped header portion of the structure to lose the packed layout guarantees of the containing structure. Fix this by replacing struct_group_tagged() with __struct_group(..., ..., __packed, ...) so the grouped fields are packed, and the original layout is preserved, restoring the intended packed layout of the structure. Before changes: struct nx842_crypto_header { union { struct { __be16 magic; /* 0 2 */ __be16 ignore; /* 2 2 */ u8 groups; /* 4 1 */ }; /* 0 6 */ struct nx842_crypto_header_hdr hdr; /* 0 6 */ }; /* 0 6 */ struct nx842_crypto_header_group group[]; /* 6 0 */ /* size: 6, cachelines: 1, members: 2 */ /* last cacheline: 6 bytes */ } __attribute__((__packed__)); After changes: struct nx842_crypto_header { union { struct { __be16 magic; /* 0 2 */ __be16 ignore; /* 2 2 */ u8 groups; /* 4 1 */ } __attribute__((__packed__)); /* 0 5 */ struct nx842_crypto_header_hdr hdr; /* 0 5 */ }; /* 0 5 */ struct nx842_crypto_header_group group[]; /* 5 0 */ /* size: 5, cachelines: 1, members: 2 */ /* last cacheline: 5 bytes */ } __attribute__((__packed__)); Fixes: 1e6b251ce175 ("crypto: nx - Avoid -Wflex-array-member-not-at-end warning") Cc: stable@vger.kernel.org Signed-off-by: Gustavo A. R. Silva Reviewed-by: Thorsten Blum Signed-off-by: Herbert Xu diff --git a/drivers/crypto/nx/nx-842.h b/drivers/crypto/nx/nx-842.h index a04e85e9f78e..c401cdf1a453 100644 --- a/drivers/crypto/nx/nx-842.h +++ b/drivers/crypto/nx/nx-842.h @@ -159,7 +159,7 @@ struct nx842_crypto_header_group { struct nx842_crypto_header { /* New members MUST be added within the struct_group() macro below. */ - struct_group_tagged(nx842_crypto_header_hdr, hdr, + __struct_group(nx842_crypto_header_hdr, hdr, __packed, __be16 magic; /* NX842_CRYPTO_MAGIC */ __be16 ignore; /* decompressed end bytes to ignore */ u8 groups; /* total groups in this header */ @@ -167,7 +167,7 @@ struct nx842_crypto_header { struct nx842_crypto_header_group group[] __counted_by(groups); } __packed; static_assert(offsetof(struct nx842_crypto_header, group) == sizeof(struct nx842_crypto_header_hdr), - "struct member likely outside of struct_group_tagged()"); + "struct member likely outside of __struct_group()"); #define NX842_CRYPTO_GROUP_MAX (0x20)