mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Aleksa Sarai <asarai@suse.de>
To: Tejun Heo <tj@kernel.org>, Nick Desaulniers <nick.desaulniers@gmail.com>
Cc: Li Zefan <lizefan@huawei.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	cgroups@vger.kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Matthias Kaehlcke <mka@chromium.org>,
	Michael Davidson <md@google.com>,
	Greg Hackmann <ghackmann@google.com>,
	android-llvm@google.com
Subject: Re: [PATCH] cgroup: reorder flexible array members of struct cgroup_root
Date: Sun, 22 Oct 2017 02:59:33 +1100	[thread overview]
Message-ID: <85d7f6eb-7869-551d-01b1-fa1712f4bd40@suse.de> (raw)
In-Reply-To: <20171021153253.GG1302522@devbig577.frc2.facebook.com>

> Here, not necessarily but I don't want to move it for a bogus reason.
> Why would we disallow embedding structs with flexible members in the
> middle when it can be done and is useful?  If we want to discuss
> whether we want to avoid such usages in the kernel (but why?), sure,
> let's have that discussion but we can't decide that on "clang warns on
> it by default".

There was a talk a few years ago by the clang folks[1] saying that while 
trying to build a kernel with clang, they discovered that several places 
in the kernel uses "VLAIS" (variable Length Arrays In Structs") and 
argued that this is a violation of the C specification, despite it being 
a GNU extension. They also submitted several patches that removed this 
code (even working around a user-space visible usage of VLAIS).

[1]: 
https://www.linuxplumbersconf.org/2013/ocw/system/presentations/1221/original/VLAIS.pdf

-- 
Aleksa Sarai
Senior Software Engineer (Containers)
SUSE Linux GmbH
https://www.cyphar.com/

  reply	other threads:[~2017-10-21 15:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-17  6:33 Nick Desaulniers
2017-10-17  6:40 ` Nick Desaulniers
2017-10-17  6:45   ` Nick Desaulniers
2017-10-18 13:30 ` Tejun Heo
2017-10-20  7:15   ` Nick Desaulniers
2017-10-21 15:32     ` Tejun Heo
2017-10-21 15:59       ` Aleksa Sarai [this message]
2017-10-21 16:03         ` Tejun Heo
2017-10-21 19:08           ` Nick Desaulniers
2017-10-25 21:54       ` Matthias Kaehlcke
2017-10-26 14:32         ` Tejun Heo

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=85d7f6eb-7869-551d-01b1-fa1712f4bd40@suse.de \
    --to=asarai@suse.de \
    --cc=android-llvm@google.com \
    --cc=cgroups@vger.kernel.org \
    --cc=ghackmann@google.com \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizefan@huawei.com \
    --cc=md@google.com \
    --cc=mka@chromium.org \
    --cc=nick.desaulniers@gmail.com \
    --cc=tj@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

all inboxes | Powered by JetHome®