public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: stable-commits@vger.kernel.org, Jonathan Corbet <corbet@lwn.net>,
	Federico Vaga <federico.vaga@vaga.pv.it>,
	Alex Shi <alexs@kernel.org>, Yanteng Si <siyanteng@loongson.cn>,
	Hu Haowen <src.res.211@gmail.com>,
	Masahiro Yamada <masahiroy@kernel.org>,
	Nathan Chancellor <nathan@kernel.org>,
	Nicolas Schier <nicolas@fjasle.eu>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Bill Wendling <morbo@google.com>,
	Justin Stitt <justinstitt@google.com>,
	stable@vger.kernel.org, Greg KH <gregkh@linuxfoundation.org>
Subject: Re: Patch "Kbuild: move to -std=gnu11" has been added to the 5.15-stable tree
Date: Sun, 10 Dec 2023 23:16:30 -0500	[thread overview]
Message-ID: <ZXaNHiqpN2lfEHQO@sashalap> (raw)
In-Reply-To: <da3b2875-3f1d-4a96-a4ab-7aab3a695701@app.fastmail.com>

On Sat, Dec 09, 2023 at 11:47:49AM +0100, Arnd Bergmann wrote:
>On Sat, Dec 9, 2023, at 03:46, Sasha Levin wrote:
>> This is a note to let you know that I've just added the patch titled
>>
>>     Kbuild: move to -std=gnu11
>>
>> to the 5.15-stable tree which can be found at:
>>
>> http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
>>
>> The filename of the patch is:
>>      kbuild-move-to-std-gnu11.patch
>> and it can be found in the queue-5.15 subdirectory.
>>
>> If you, or anyone else, feels it should not be added to the stable tree,
>> please let <stable@vger.kernel.org> know about it.
>
>I think the patch initially caused a few regressions, so
>I'm not sure if backporting this is the best idea. Is this
>needed for some other backport?

Hey Arnd,

I spent some time over the weeked trying to figure it out. Initially it
looked like there's something wrong with my local toolchain, but what I
found out is the following:

There is now kernel code relying on code constructs that are illegal
without c99/gnu11/etc. The example in this case is WMI code which even
in upstream [1] does:

	list_for_each_entry(wblock, &wmi_block_list, list) {
	/* skip warning and register if we know the driver will use struct wmi_driver */
	for (int i = 0; allow_duplicates[i] != NULL; i++) {
	    ^^^^^^^^^^^
		if (guid_parse_and_compare(allow_duplicates[i], guid))
			return false;

The decleration of a variable there doesn't work unless you're using a
newer standard, which is why the dependency bot ended up pulling this
commit in.

At this point, not taking this change means that we can't take some
commits without doing custom changes to backport them, which in turn
means that we'll keep diverging from upstream.

Agreeing with you that this isn't a trivial change, but it seems that we
need to take it to make even not-that-old trees (<=5.15) accept some
fixes.

With the commit in question applied I see no new errors or warnings, so
I'll keep it in 5.15, and we can see how it survives the -rc tests.

I haven't seen any fixes pointing to that commit besides a documentation
fix, so if I've missed anything please let me know.

[1]: https://elixir.bootlin.com/linux/v6.7-rc5/source/drivers/platform/x86/wmi.c#L1289

-- 
Thanks,
Sasha

           reply	other threads:[~2023-12-11  4:16 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <da3b2875-3f1d-4a96-a4ab-7aab3a695701@app.fastmail.com>]

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=ZXaNHiqpN2lfEHQO@sashalap \
    --to=sashal@kernel.org \
    --cc=alexs@kernel.org \
    --cc=arnd@arndb.de \
    --cc=catalin.marinas@arm.com \
    --cc=corbet@lwn.net \
    --cc=federico.vaga@vaga.pv.it \
    --cc=gregkh@linuxfoundation.org \
    --cc=justinstitt@google.com \
    --cc=masahiroy@kernel.org \
    --cc=morbo@google.com \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=nicolas@fjasle.eu \
    --cc=siyanteng@loongson.cn \
    --cc=src.res.211@gmail.com \
    --cc=stable-commits@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=will@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