From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753502AbdJUQDP (ORCPT ); Sat, 21 Oct 2017 12:03:15 -0400 Received: from mail-qk0-f193.google.com ([209.85.220.193]:56250 "EHLO mail-qk0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753364AbdJUQDM (ORCPT ); Sat, 21 Oct 2017 12:03:12 -0400 X-Google-Smtp-Source: ABhQp+Si9trQW3nTTiiqQ8ebLKcVOHVCZEKP0Ma9hr2GBvCllr9OBu8vRzNFxoJgt3aJw2GXTOdccA== Date: Sat, 21 Oct 2017 09:03:08 -0700 From: Tejun Heo To: Aleksa Sarai Cc: Nick Desaulniers , Li Zefan , Johannes Weiner , cgroups@vger.kernel.org, Linux Kernel Mailing List , Matthias Kaehlcke , Michael Davidson , Greg Hackmann , android-llvm@google.com Subject: Re: [PATCH] cgroup: reorder flexible array members of struct cgroup_root Message-ID: <20171021160308.GN1302522@devbig577.frc2.facebook.com> References: <20171017063322.11455-1-nick.desaulniers@gmail.com> <20171018133010.GD1302522@devbig577.frc2.facebook.com> <20171021153253.GG1302522@devbig577.frc2.facebook.com> <85d7f6eb-7869-551d-01b1-fa1712f4bd40@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <85d7f6eb-7869-551d-01b1-fa1712f4bd40@suse.de> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Oct 22, 2017 at 02:59:33AM +1100, Aleksa Sarai wrote: > >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). The kernel is explicitly using GNU extended version of C and has always from the beginning, so not-std-c isn't a valid argument. Thanks. -- tejun