Linux Hardening
 help / color / mirror / Atom feed
From: Alexander Lobakin <aleksander.lobakin@intel.com>
To: Kees Cook <kees@kernel.org>
Cc: "Gustavo A. R. Silva" <gustavoars@kernel.org>,
	<linux-hardening@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] overflow: Introduce __DEFINE_FLEX for having no initializer
Date: Tue, 3 Jun 2025 15:55:35 +0200	[thread overview]
Message-ID: <92dc9f5b-cef8-47ff-ba75-a099fa9c6718@intel.com> (raw)
In-Reply-To: <20250530191312.work.661-kees@kernel.org>

From: Kees Cook <kees@kernel.org>
Date: Fri, 30 May 2025 12:13:16 -0700

> While not yet in the tree, there is a proposed patch[1] that was
> depending on the prior behavior of _DEFINE_FLEX, which did not have an
> explicit initializer. Provide this via __DEFINE_FLEX now, which can also
> have attributes applied (e.g. __uninitialized).
> 
> Examples of the resulting initializer behaviors can be seen here:
> https://godbolt.org/z/P7Go8Tr33
> 
> Link: https://lore.kernel.org/netdev/20250520205920.2134829-9-anthony.l.nguyen@intel.com [1]
> Fixes: 47e36ed78406 ("overflow: Fix direct struct member initialization in _DEFINE_FLEX()")
> Signed-off-by: Kees Cook <kees@kernel.org>

Looks great to me, thanks!

Also, double thanks for this hint about using __uninitialized to
mitigate perf hits with automatic stack initialization -- will
definitely help :)

Olek

      reply	other threads:[~2025-06-03 13:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-30 19:13 [PATCH] overflow: Introduce __DEFINE_FLEX for having no initializer Kees Cook
2025-06-03 13:55 ` Alexander Lobakin [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=92dc9f5b-cef8-47ff-ba75-a099fa9c6718@intel.com \
    --to=aleksander.lobakin@intel.com \
    --cc=gustavoars@kernel.org \
    --cc=kees@kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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