From: Kees Cook <kees@kernel.org>
To: Nathan Chancellor <nathan@kernel.org>,
Nick Desaulniers <ndesaulniers@google.com>
Cc: Abel Vesa <abel.vesa@oss.qualcomm.com>,
Bill Wendling <morbo@google.com>, Tingmao Wang <m@maowtm.org>,
"Gustavo A. R. Silva" <gustavoars@kernel.org>,
Justin Stitt <justinstitt@google.com>,
linux-security-module@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org,
llvm@lists.linux.dev,
Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
michael.bommarito@gmail.com
Subject: Re: [PATCH] landlock: Move the domain layer counter out of the anonymous union
Date: Fri, 09 Oct 2026 16:52:24 -0700 [thread overview]
Message-ID: <EF8E7F67-39BF-4382-AB18-98E9D6111CA5@kernel.org> (raw)
In-Reply-To: <20261009204554.GA778522@ax162>
On October 9, 2026 1:45:54 PM PDT, Nathan Chancellor <nathan@kernel.org> wrote:
>On Fri, Oct 09, 2026 at 10:23:14AM -0700, Nick Desaulniers wrote:
>> On Thu, Oct 8, 2026 at 4:49 AM Abel Vesa <abel.vesa@oss.qualcomm.com> wrote:
>> >
>> > On 26-10-07 14:49:28, Nick Desaulniers wrote:
>> > > Would you consider this a bug in clang, or an error in how the
>> > > __counted_by attribute is applied?
>> > >
>> > It turns out Amaan Qureshi has already reported exactly this Landlock
>> > issue and proposed an LLVM fix:
>> >
>> > https://github.com/llvm/llvm-project/pull/228309
>>
>> In that case, I would _not_ work around the compiler bug like this and
>> instead wait for that fix to land in clang, then bump the required
>> version of clang for counted-by.
>>
>> Kees and Nathan are traveling for LPC, so I don't expect quick
>> feedback from them, but they should confirm whether they agree with my
>> proposal.
>
>Bill/Kees/Justin should review that patch upstream but bumping the
>required version for __counted_by to clang-24 (or maybe 23.1.x if it can
>land in release/23.x) kind of sucks :/ but if this is a big enough
>footgun that we don't want to continuously workaround, I guess we have
>no choice.
I'm still catching up from travel, so apologies if this already got checked, but has this been verified against GCC as well? Is it only a Clang problem?
Regardless, if counted_by is not working for a given compiler version we'll need to exclude its use by version. :(
-Kees
--
Kees Cook
next prev parent reply other threads:[~2026-10-09 23:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-07 16:28 Abel Vesa
2026-10-07 21:49 ` Nick Desaulniers
2026-10-08 11:49 ` Abel Vesa
2026-10-09 17:23 ` Nick Desaulniers
2026-10-09 20:45 ` Nathan Chancellor
2026-10-09 23:52 ` Kees Cook [this message]
2026-10-10 0:02 ` Michael Bommarito
2026-10-09 11:51 ` Mike Bommarito
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=EF8E7F67-39BF-4382-AB18-98E9D6111CA5@kernel.org \
--to=kees@kernel.org \
--cc=abel.vesa@oss.qualcomm.com \
--cc=gustavoars@kernel.org \
--cc=justinstitt@google.com \
--cc=konrad.dybcio@oss.qualcomm.com \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=m@maowtm.org \
--cc=michael.bommarito@gmail.com \
--cc=morbo@google.com \
--cc=nathan@kernel.org \
--cc=ndesaulniers@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®