From: Jann Horn <jannh@google.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>,
Kostya Serebryany <kcc@google.com>
Cc: Kees Cook <keescook@chromium.org>,
kernel list <linux-kernel@vger.kernel.org>,
linux-arch <linux-arch@vger.kernel.org>,
Linux API <linux-api@vger.kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Andi Kleen <andi@firstfloor.org>, Andi Kleen <ak@linux.intel.com>,
Cong Wang <xiyou.wangcong@gmail.com>,
Luis Chamberlain <mcgrof@kernel.org>,
Apelete Seketeli <apelete@seketeli.net>,
Arnd Bergmann <arnd@arndb.de>,
Chee Nouk Phoon <cnphoon@altera.com>,
Chris Zankel <chris@zankel.net>,
Christian Ruppert <christian.ruppert@abilis.com>,
Greg Ungerer <gerg@uclinux.org>, Helge Deller <deller@gmx.de>,
Hongliang Tao <taohl@lemote.com>, Huacai Chen <chenhc@lemote.com>,
Jonas Jensen <jonas.jensen@gmail.com>,
Josh Boyer <jwboyer@gmail.com>, Jun Nie <jun.nie@linaro.org>,
Lars-Peter Clausen <lars@metafoo.de>,
Ley Foon Tan <lftan@altera.com>,
Linus Walleij <linus.walleij@linaro.org>,
Max Filippov <jcmvbkbc@gmail.com>,
Olof Johansson <olof@lixom.net>,
Paul Burton <paul.burton@mips.com>,
Phil Edworthy <phil.edworthy@renesas.com>,
Pierrick Hascoet <pierrick.hascoet@abilis.com>,
Ralf Baechle <ralf@linux-mips.org>,
Roland Stigge <stigge@antcom.de>,
Vineet Gupta <vgupta@synopsys.com>
Subject: Re: [RFC][PATCH] sysctl: Remove the sysctl system call
Date: Wed, 2 Oct 2019 02:40:04 +0200 [thread overview]
Message-ID: <CAG48ez1Ly26fP3_3DaGGkHgpyG3zmOmeC95jUmpVUwvjnLG8SQ@mail.gmail.com> (raw)
In-Reply-To: <87imp8hyc8.fsf@x220.int.ebiederm.org>
+Kostya (code owner for LLVM sanitizer_common) as FYI
On Wed, Oct 2, 2019 at 12:54 AM Eric W. Biederman <ebiederm@xmission.com> wrote:
> Kees Cook <keescook@chromium.org> writes:
> > On Tue, Oct 01, 2019 at 01:36:32PM -0500, Eric W. Biederman wrote:
[...]
> > I think you can actually take this further and remove (or at least
> > empty) the uapi/linux/sysctl.h file too.
[...]
> I would make it a followup that removes uapi/linux/sysctl.h. I don't
> see anything in it that isn't about the sysctl system call. I will keep
> it a separate patch as I can imagine something silly that needs the
> header file to compile. A separate patch would make a revert easier
> if we find something like that.
Unfortunately, I think that header (or at least parts of it) has to
stay around for now:
Looking through the search results for linux/sysctl.h (ignoring
glibc's sys/sysctl.h, which pulls in linux/sysctl.h, because almost
all of those hits are conditional includes for BSD systems) on
codesearch.debian.net, I noticed that e.g. the ASAN code that GCC and
LLVM use pulls in linux/sysctl.h and uses things from it:
https://github.com/llvm-mirror/compiler-rt/blob/124fd5d9aff57cf47bf077df81ad939b289acc6e/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp#L1063
And indeed, after replacing /usr/include/linux/sysctl.h with an empty
file, a build of LLVM's runtime library component (compiler-rt) (git
HEAD version) falls over with error spew about __sysctl_args:
====================
$ cmake -G Ninja -DCMAKE_BUILD_TYPE=Release
-DLLVM_ENABLE_PROJECTS='clang;compiler-rt' -DCMAKE_C_COMPILER=clang-7
-DCMAKE_CXX_COMPILER=clang++-7 -DLLVM_TARGETS_TO_BUILD="X86"
-DLLVM_USE_LINKER=lld-7 -DBUILD_SHARED_LIBS=Off ../llvm
[...]
$ ninja -j64
FAILED: projects/compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoTermination.i386.dir/sanitizer_platform_limits_posix.cpp.o
[...]
[...]/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp:1063:17:
error: use of undeclared identifier '__sysctl_args'
CHECK_TYPE_SIZE(__sysctl_args);
^
[...]/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp:1064:23:
error: use of undeclared identifier '__sysctl_args'
CHECK_SIZE_AND_OFFSET(__sysctl_args, name);
^
[...]/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp:1064:1:
error: expected expression
CHECK_SIZE_AND_OFFSET(__sysctl_args, name);
^
[...]/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h:1438:34:
note: expanded from macro 'CHECK_SIZE_AND_OFFSET'
sizeof(((CLASS *)NULL)->MEMBER)); \
^
[...]/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp:1064:23:
error: unknown type name '__sysctl_args'
CHECK_SIZE_AND_OFFSET(__sysctl_args, name);
^
====================
next prev parent reply other threads:[~2019-10-02 0:40 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <8736gcjosv.fsf@x220.int.ebiederm.org>
2019-10-01 18:46 ` [RFC][PATCH] sysctl: Remove the sysctl system call Kees Cook
2019-10-01 22:53 ` Eric W. Biederman
2019-10-02 0:40 ` Jann Horn [this message]
2019-10-02 7:31 ` Arnd Bergmann
2019-10-02 14:41 ` Eric W. Biederman
2019-10-02 14:49 ` Eric W. Biederman
2019-10-02 18:52 ` Helge Deller
2019-10-03 6:56 ` Florian Weimer
[not found] ` <87tv8pftjj.fsf_-_@x220.int.ebiederm.org>
2019-10-03 21:05 ` [REPOST][RFC][PATCH] " Kees Cook
2019-10-08 10:30 ` Michael Kerrisk (man-pages)
2019-10-03 21:08 ` [RFC][PATCH] " Christian Brauner
2019-10-04 7:31 ` vger mail woes? (was: Re: [RFC][PATCH] sysctl: Remove the sysctl system call) Florian Weimer
2019-10-02 16:17 ` [RFC][PATCH] sysctl: Remove the sysctl system call Andi Kleen
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=CAG48ez1Ly26fP3_3DaGGkHgpyG3zmOmeC95jUmpVUwvjnLG8SQ@mail.gmail.com \
--to=jannh@google.com \
--cc=ak@linux.intel.com \
--cc=andi@firstfloor.org \
--cc=apelete@seketeli.net \
--cc=arnd@arndb.de \
--cc=chenhc@lemote.com \
--cc=chris@zankel.net \
--cc=christian.ruppert@abilis.com \
--cc=cnphoon@altera.com \
--cc=deller@gmx.de \
--cc=ebiederm@xmission.com \
--cc=gerg@uclinux.org \
--cc=jcmvbkbc@gmail.com \
--cc=jonas.jensen@gmail.com \
--cc=jun.nie@linaro.org \
--cc=jwboyer@gmail.com \
--cc=kcc@google.com \
--cc=keescook@chromium.org \
--cc=lars@metafoo.de \
--cc=lftan@altera.com \
--cc=linus.walleij@linaro.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=olof@lixom.net \
--cc=paul.burton@mips.com \
--cc=phil.edworthy@renesas.com \
--cc=pierrick.hascoet@abilis.com \
--cc=ralf@linux-mips.org \
--cc=stigge@antcom.de \
--cc=taohl@lemote.com \
--cc=torvalds@linux-foundation.org \
--cc=vgupta@synopsys.com \
--cc=xiyou.wangcong@gmail.com \
/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).