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] [day] [month] [year] [list]
Message-ID: <202503061939.AAC6EF5A44@keescook>
Date: Thu, 6 Mar 2025 19:41:59 -0800
From: Kees Cook <kees@...nel.org>
To: David Gow <davidgow@...gle.com>
Cc: Nathan Chancellor <nathan@...nel.org>,
	Thomas Weißschuh <linux@...ssschuh.net>,
	Bill Wendling <morbo@...gle.com>,
	Justin Stitt <justinstitt@...gle.com>,
	Masahiro Yamada <masahiroy@...nel.org>,
	Nicolas Schier <nicolas@...sle.eu>, llvm@...ts.linux.dev,
	linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-hardening@...r.kernel.org
Subject: Re: [PATCH v2] kbuild: clang: Support building UM with SUBARCH=i386

On Thu, Mar 06, 2025 at 04:59:53PM +0800, David Gow wrote:
> On Wed, 5 Mar 2025 at 00:21, Kees Cook <kees@...nel.org> wrote:
> >
> > The UM builds distinguish i386 from x86_64 via SUBARCH, but we don't
> > support building i386 directly with Clang. To make SUBARCH work for
> > i386 UM, we need to explicitly test for it.
> >
> > This lets me run i386 KUnit tests with Clang:
> >
> > $ ./tools/testing/kunit/kunit.py run \
> >         --make_options LLVM=1 \
> >         --make_options SUBARCH=i386
> > ...
> >
> > Fixes: c7500c1b53bf ("um: Allow builds with Clang")
> > Signed-off-by: Kees Cook <kees@...nel.org>
> > ---
> 
> Thanks for this -- I'd been using `--kconfig_add CONFIG_64BIT=n` as a
> way to build i386 UML kernels, which seems to work even without this
> patch -- but this is definitely an improvement.

Thanks! Yeah, I figured there must have been a way to get at it. I
wanted to make it work the "normal" way.

> It may be worth noting that CONFIG_FORTIFY_SOURCE is incompatible with
> clang + i386, which seems to affect UML as well. (That might actually
> not be required, as I think UML doesn't use any of the strange
> -mregparm calling convention stuff which appears to be what breaks
> FORTIFY_SOURCE here.)

Also fixed! :)
https://lore.kernel.org/lkml/20250303214929.work.499-kees@kernel.org/

> Tested-by: David Gow <davidgow@...gle.com>

Thanks for testing; I've updated the trailers in my tree.

-Kees

-- 
Kees Cook

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ