linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
	Eric Biederman <ebiederm@xmission.com>,
	linux-api@vger.kernel.org
Subject: Re: [PATCH] ELF, uapi: fixup ELF_ST_TYPE definition
Date: Fri, 29 Apr 2022 10:25:23 -0700	[thread overview]
Message-ID: <202204291019.B628991360@keescook> (raw)
In-Reply-To: <Ymv7G1BeX4kt3obz@localhost.localdomain>

On Fri, Apr 29, 2022 at 05:50:03PM +0300, Alexey Dobriyan wrote:
> This is very theoretical compile failure:
> 
> 	ELF_ST_TYPE(st_info = A)
> 
> Cast will bind first and st_info will stop being lvalue:
> 
> 	error: lvalue required as left operand of assignment
> 
> Given that the only use of this macro is
> 
> 	ELF_ST_TYPE(sym->st_info)
> 
> where st_info is "unsigned char" I've decided to remove cast especially
> given that companion macro ELF_ST_BIND doesn't use cast.
> 
> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
> ---
> 
>  include/uapi/linux/elf.h |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

It looks like akpm already pulled this, so:

Acked-by: Kees Cook <keescook@chromium.org>

Please keep Eric & I CCed on ELF changes; there's a MAINTAINERS entry
now...

-Kees

-- 
Kees Cook

  reply	other threads:[~2022-04-29 17:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-29 14:50 [PATCH] ELF, uapi: fixup ELF_ST_TYPE definition Alexey Dobriyan
2022-04-29 17:25 ` Kees Cook [this message]
2022-04-29 18:02   ` Alexey Dobriyan

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=202204291019.B628991360@keescook \
    --to=keescook@chromium.org \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=ebiederm@xmission.com \
    --cc=linux-api@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;
as well as URLs for NNTP newsgroup(s).