All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tadeusz Struk <tadeusz.struk@linaro.org>
To: Kees Cook <keescook@chromium.org>
Cc: Dan Williams <dan.j.williams@intel.com>,
	Gustavo Silva <gustavoars@kernel.org>,
	Keith Packard <keithp@keithp.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] uapi/linux/stddef.h: add include guards
Date: Wed, 30 Mar 2022 15:48:45 -0700	[thread overview]
Message-ID: <c8663435-c444-40bf-94e8-aa8b06d4404b@linaro.org> (raw)
In-Reply-To: <202203301448.31FEB0D2B@keescook>

On 3/30/22 14:49, Kees Cook wrote:
> On Tue, Mar 29, 2022 at 10:12:52AM -0700, Tadeusz Struk wrote:
>> Add iclude guarde to uapi/linux/stddef.h to prevent
>> redefining macros.
>>
>> Signed-off-by: Tadeusz Struk <tadeusz.struk@linaro.org>
> 
> Hi!
> 
> What was tripping over this? This isn't a new file, so has something
> changed with how it has been included?

Hi Kees,
Yes, it isn't new, but up until 5.15 it had only three lines:

#ifndef __always_inline
#define __always_inline inline
#endif

https://elixir.bootlin.com/linux/v5.15.32/source/include/uapi/linux/stddef.h

and one could include it as many time as one would liked.
Now that it has more #defines, and since it is an user api that people
can directly include in their projects, wouldn't it need to have
the include guards to avoid warnings about redefined symbols?
All the other headers in include/uapi/linux/ do have that.

-- 
Thanks,
Tadeusz

  reply	other threads:[~2022-03-30 22:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-29 17:12 [PATCH] uapi/linux/stddef.h: add include guards Tadeusz Struk
2022-03-30 21:49 ` Kees Cook
2022-03-30 22:48   ` Tadeusz Struk [this message]
2022-03-31 20:07 ` Kees Cook
2022-03-31 20:25 ` Kees Cook

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=c8663435-c444-40bf-94e8-aa8b06d4404b@linaro.org \
    --to=tadeusz.struk@linaro.org \
    --cc=dan.j.williams@intel.com \
    --cc=gustavoars@kernel.org \
    --cc=keescook@chromium.org \
    --cc=keithp@keithp.com \
    --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 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.