All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kees Cook <kees@kernel.org>
To: Vegard Nossum <vegard.nossum@oracle.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Masahiro Yamada <masahiroy@kernel.org>,
	Nathan Chancellor <nathan@kernel.org>,
	Petr Vorel <pvorel@suse.cz>,
	linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org,
	linux-hardening@vger.kernel.org
Subject: Re: [PATCH] kconfig: Avoid prompting for transitional symbols
Date: Tue, 30 Sep 2025 07:59:56 -0700	[thread overview]
Message-ID: <202509300758.B53A1AF@keescook> (raw)
In-Reply-To: <f2556f4c-9036-4b79-a4b0-4e4c82a93abc@oracle.com>

On Tue, Sep 30, 2025 at 08:25:06AM +0200, Vegard Nossum wrote:
> On 30/09/2025 06:53, Kees Cook wrote:
> > [...]
> > +			if (sym->type == S_BOOLEAN || sym->type == S_TRISTATE)
> > +				sym->def[S_DEF_USER].tri = newval.tri;
> > +			else
> > +				sym->def[S_DEF_USER].val = newval.val;
> 
> sym->def[S_DEF_USER] and newval are both 'struct symbol_value', can we
> just unconditionally do this instead?
> 
>     sym->def[S_DEF_USER] = newval;

Argh, yes. I even went and looked at that struct to see if tri and val
were a union and my brain didn't get to the next step. :P

I'll update this.

> I have to run, will take a closer look later. Thanks,

Thanks!

-- 
Kees Cook

      reply	other threads:[~2025-09-30 14:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-30  4:53 [PATCH] kconfig: Avoid prompting for transitional symbols Kees Cook
2025-09-30  6:25 ` Vegard Nossum
2025-09-30 14:59   ` 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=202509300758.B53A1AF@keescook \
    --to=kees@kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=nathan@kernel.org \
    --cc=pvorel@suse.cz \
    --cc=torvalds@linux-foundation.org \
    --cc=vegard.nossum@oracle.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.