From: Hao Ge <hao.ge@linux.dev>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Abhishek Bapat <abhishekbapat@google.com>,
Suren Baghdasaryan <surenb@google.com>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] alloc_tag: avoid implicit padding in uapi
Date: Wed, 16 Sep 2026 14:23:07 +0800 [thread overview]
Message-ID: <4281b7ac-9778-4d5b-bcc5-aea42f4f1120@linux.dev> (raw)
In-Reply-To: <20260915202404.3568029-1-arnd@kernel.org>
On 2026/9/16 04:23, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> The impliied padding causes a harmless warning when testing the uapi
> headers with -Wpadded that could in theory indicate incompatibilies or
> data leaks:
>
> ./usr/include/linux/alloc_tag.h:41:1: error: padding struct size to alignment boundary with 7 bytes [-Werror=padded]
>
> The code here is fine, but it's better to make the padding explicit
> and avoid the warning here.
>
> Fixes: 1d581ab2348c ("alloc_tag: add ioctl to /proc/allocinfo")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Thanks for the fix, with the nit from SJ.
Acked-by: Hao Ge <hao.ge@linux.dev>
Thanks
Best Regards
Hao
> ---
> include/uapi/linux/alloc_tag.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/include/uapi/linux/alloc_tag.h b/include/uapi/linux/alloc_tag.h
> index e3ad94444864..7d4618bea043 100644
> --- a/include/uapi/linux/alloc_tag.h
> +++ b/include/uapi/linux/alloc_tag.h
> @@ -38,6 +38,7 @@ struct allocinfo_counter {
> __u64 bytes;
> __u64 calls;
> __u8 accurate;
> + __u8 pad[7];
> } __attribute__((aligned(8)));
>
> struct allocinfo_tag_data {
prev parent reply other threads:[~2026-09-16 6:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-15 20:23 Arnd Bergmann
2026-09-15 21:37 ` Suren Baghdasaryan
2026-09-16 1:08 ` SJ Park
2026-09-16 6:23 ` Hao Ge [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4281b7ac-9778-4d5b-bcc5-aea42f4f1120@linux.dev \
--to=hao.ge@linux.dev \
--cc=abhishekbapat@google.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=surenb@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®