linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Kees Cook <kees@kernel.org>
To: viro@zeniv.linux.org.uk, brauner@kernel.org,
	Xichao Zhao <zhao.xichao@vivo.com>
Cc: Kees Cook <kees@kernel.org>,
	jack@suse.cz, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] binfmt_elf: Replace offsetof() with struct_size() in fill_note_info()
Date: Mon, 25 Aug 2025 14:30:23 -0700	[thread overview]
Message-ID: <175615741923.2091902.12040309987283385487.b4-ty@kernel.org> (raw)
In-Reply-To: <20250813115058.635742-1-zhao.xichao@vivo.com>

On Wed, 13 Aug 2025 19:50:58 +0800, Xichao Zhao wrote:
> When dealing with structures containing flexible arrays, struct_size()
> provides additional compile-time checks compared to offsetof(). This
> enhances code robustness and reduces the risk of potential errors.
> 
> 

Applied to for-next/execve, thanks!

[1/1] binfmt_elf: Replace offsetof() with struct_size() in fill_note_info()
      https://git.kernel.org/kees/c/a728ce8ffbd2

Take care,

-- 
Kees Cook



      reply	other threads:[~2025-08-25 21:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-13 11:50 Xichao Zhao
2025-08-25 21:30 ` Kees Cook [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=175615741923.2091902.12040309987283385487.b4-ty@kernel.org \
    --to=kees@kernel.org \
    --cc=brauner@kernel.org \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=zhao.xichao@vivo.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