lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK7LNASRSOBy_bqUvMqk-m8WVaHPfwM8xEbiTGtcB2B2-3GBhQ@mail.gmail.com>
Date:   Wed, 5 May 2021 05:46:54 +0900
From:   Masahiro Yamada <masahiroy@...nel.org>
To:     Johannes Berg <johannes@...solutions.net>
Cc:     Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Arvind Sankar <nivedita@...m.mit.edu>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Brendan Higgins <brendanhiggins@...gle.com>,
        Catalin Marinas <catalin.marinas@....com>,
        Changbin Du <changbin.du@...el.com>,
        Krzysztof Kozlowski <krzk@...nel.org>,
        Mauro Carvalho Chehab <mchehab+huawei@...nel.org>,
        Randy Dunlap <rdunlap@...radead.org>,
        Will Deacon <will@...nel.org>,
        linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] kconfig: unify cc-option and as-option

On Wed, May 5, 2021 at 5:17 AM Johannes Berg <johannes@...solutions.net> wrote:
>
> Hi,
>
> So... I realized it's been a while:
>
> On Sun, 2020-06-14 at 23:43 +0900, Masahiro Yamada wrote:
> > cc-option and as-option are almost the same; both pass the flag to
> > $(CC). The main difference is the cc-option stops before the assemble
> > stage (-S option) whereas as-option stops after it (-c option).
> >
>
> But, I had noticed for a while now that M= build for an out-of-tree
> driver were causing some trouble. Not really completely "out-of-tree"
> but rather backported (https://backports.wiki.kernel.org/).
>
> And then I finally narrowed it down to this commit, specifically this:
>
> >  # Return y if the compiler supports <flag>, n otherwise
> > -cc-option = $(success,$(CC) -Werror $(CLANG_FLAGS) $(1) -S -x c /dev/null -o /dev/null)
> > +cc-option = $(success,mkdir .tmp_$$$$; trap "rm -rf .tmp_$$$$" EXIT; $(CC) -Werror $(CLANG_FLAGS) $(1) -c -x c /dev/null -o .tmp_$$$$/tmp.o)
>
> What happens is that we're doing
>
>  make -C /path/to/kernel M=/path/to/driver
>
> But /path/to/kernel may be the installed distro kernel headers, and thus
> not be writable to the user doing the driver compile. Obviously, the
> user may need to 'sudo' anyway to install the result, but if just test-
> compiling, or even as better practice to not run everything as root,
> this ".tmp_$$" dir cannot be created.
>
> IOW, this broke compiler option detection when KBUILD_EXTMOD=/M= is
> used. It seems this is still supported (documented in kbuild docs), so
> I'm kind of hoping it could be fixed? But OTOH, I really don't know how,
> perhaps just using "mktemp -d" here instead of the hardcoded temp dir?
>
> Thanks,
> johannes
>


 - This commit touches scripts/Kconfig.include.
 - External module builds (M= builds) never invoke Kconfig

Putting these two together, your claim is really odd.
If external module builds invoke Kconfig,
your kernel is already broken.

If you claim this is an issue,
please describe how to reproduce it in *upstream* kernel.
I do not know (or care about) your backport kernel.


--
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ