From: Jakub Kicinski <kuba@kernel.org>
To: Kees Cook <keescook@chromium.org>
Cc: "David S. Miller" <davem@davemloft.net>,
Christoph Hellwig <hch@infradead.org>,
Paolo Abeni <pabeni@redhat.com>,
Kuniyuki Iwashima <kuniyu@amazon.co.jp>,
Alexei Starovoitov <ast@kernel.org>,
Cong Wang <cong.wang@bytedance.com>,
Al Viro <viro@zeniv.linux.org.uk>,
netdev@vger.kernel.org, linux-hardening@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] af_unix: Silence randstruct GCC plugin warning
Date: Wed, 11 May 2022 15:15:42 -0700 [thread overview]
Message-ID: <20220511151542.4cb3ff17@kernel.org> (raw)
In-Reply-To: <20220511000109.3628404-1-keescook@chromium.org>
On Tue, 10 May 2022 17:01:09 -0700 Kees Cook wrote:
> While preparing for Clang randstruct support (which duplicated many of
> the warnings the randstruct GCC plugin warned about), one strange one
> remained only for the randstruct GCC plugin. Eliminating this rids
> the plugin of the last exception.
>
> It seems the plugin is happy to dereference individual members of
> a cross-struct cast, but it is upset about casting to a whole object
> pointer. This only manifests in one place in the kernel, so just replace
> the variable with individual member accesses. There is no change in
> executable instruction output.
>
> Drop the last exception from the randstruct GCC plugin.
>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Jakub Kicinski <kuba@kernel.org>
> Cc: Christoph Hellwig <hch@infradead.org>
> Cc: Paolo Abeni <pabeni@redhat.com>
> Cc: Kuniyuki Iwashima <kuniyu@amazon.co.jp>
> Cc: Alexei Starovoitov <ast@kernel.org>
> Cc: Cong Wang <cong.wang@bytedance.com>
> Cc: Al Viro <viro@zeniv.linux.org.uk>
> Cc: netdev@vger.kernel.org
> Cc: linux-hardening@vger.kernel.org
> Signed-off-by: Kees Cook <keescook@chromium.org>
> ---
> If someone can Ack this, I can carry it in the gcc-plugins tree,
> as I'm trying to remove all its exceptions so I can drop that code.
Acked-by: Jakub Kicinski <kuba@kernel.org>
prev parent reply other threads:[~2022-05-11 22:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-11 0:01 [PATCH] af_unix: Silence randstruct GCC plugin warning Kees Cook
2022-05-11 2:22 ` Kuniyuki Iwashima
2022-05-11 22:15 ` Jakub Kicinski [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=20220511151542.4cb3ff17@kernel.org \
--to=kuba@kernel.org \
--cc=ast@kernel.org \
--cc=cong.wang@bytedance.com \
--cc=davem@davemloft.net \
--cc=hch@infradead.org \
--cc=keescook@chromium.org \
--cc=kuniyu@amazon.co.jp \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=viro@zeniv.linux.org.uk \
/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.