From: Brendan Jackman <jackmanb@google.com>
To: Pedro Falcato <pfalcato@suse.de>
Cc: "Liam R. Howlett" <Liam.Howlett@oracle.com>,
Andrew Morton <akpm@linux-foundation.org>,
Lorenzo Stoakes <lorenzo.stoakes@oracle.com>,
Vlastimil Babka <vbabka@suse.cz>, Jann Horn <jannh@google.com>,
<linux-kernel@vger.kernel.org>, <maple-tree@lists.infradead.org>,
<linux-mm@kvack.org>
Subject: Re: [PATCH 1/3] tools: testing: Allow importing arch headers in shared.mk
Date: Wed, 27 Aug 2025 15:07:02 +0000 [thread overview]
Message-ID: <DCDAY7MCS3CS.2QJ54F8Z86WN6@google.com> (raw)
In-Reply-To: <j2vfxy4sr6wmuovlynvljvmy6as7esevp57hyqkhofxnxnjldf@ul6befrh7eqy>
On Wed Aug 27, 2025 at 12:50 PM UTC, Pedro Falcato wrote:
> On Wed, Aug 27, 2025 at 11:04:41AM +0000, Brendan Jackman wrote:
>> There is an arch/ tree under tools. This contains some useful stuff, to
>> make that available, import the necessary Make helper file and then add
>> it to the -I flags.
>>
>> There still aren't that many headers so also just smush all of them into
>> SHARED_DEPS instead of starting to do any header dependency hocus pocus.
>>
>
> I was a little confused as to why this patchset was safe, and - yeah - i missed
> the arch/ under tools/.
>
> There are asm-generic headers so hopefully those fully take care of !x86?
[Confidently but wihout evidence] yep, without a doubt!
> Did you check?
Um, OK that's fair question. This doesn't support cross-compilation so
you actually need a non-x86 environment.
<begin verbose notes, tl;dr: yeah seems to work for arm64>
I have Nix set up to build aarch64 binaries via binfmt_misc though so I
tried using that...
❯❯ cat /etc/nix/nix.conf
# see https://nixos.org/manual/nix/stable/command-ref/conf-file
sandbox = true
max-jobs = 96
extra-platforms = aarch64-linux
So I dropped this into the root of the kernel repo (and `git add`ed it
otherwise Nix pretends it's not there):
❯❯ cat flake.nix
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-25.05";
};
outputs =
{
self,
nixpkgs,
}:
let
system = "aarch64-linux";
pkgs = import nixpkgs { inherit system; };
in
{
formatter."${system}" = pkgs.nixfmt-tree;
packages."${system}".vma-tests = pkgs.stdenv.mkDerivation {
name = "vma-tests";
src = ./.;
# (Pretty sure this is not the correct way to do this, there must be
# some mkDerivation arg that's equivalent to make's -C flag)
buildPhase = "make -C tools/testing/vma";
nativeBuildInputs = [ pkgs.liburcu ];
installPhase = ''
mkdir $out
cp tools/testing/vma/vma $out
'';
checkPhase = ''./tools/testing/vma'';
};
};
}
And, yeah at least it compiles, and that checkPhase should have run the
VMA tests:
❯❯ nix build .#packages.aarch64-linux.vma-tests
warning: Git tree '/usr/local/google/home/jackmanb/src/linux/linux' is dirty
❯❯ file ./result/vma
./result/vma: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /nix/store/r0pjdp81mmd7dvk5pv1ch75hrbbw60xb-glibc-2.40-66/lib/ld-linux-aarch64.so.1, for GNU/Linux 3.10.0, with debug_info, not stripped
So... that was easier than expected :)
next prev parent reply other threads:[~2025-08-27 15:07 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-27 11:04 [PATCH 0/3] tools: testing: Use existing atomic.h for vma/radix-tree tests Brendan Jackman
2025-08-27 11:04 ` [PATCH 1/3] tools: testing: Allow importing arch headers in shared.mk Brendan Jackman
2025-08-27 12:50 ` Pedro Falcato
2025-08-27 15:07 ` Brendan Jackman [this message]
2025-08-27 18:43 ` Liam R. Howlett
2025-08-28 1:00 ` Liam R. Howlett
2025-08-28 10:23 ` Lorenzo Stoakes
2025-08-28 11:59 ` Brendan Jackman
2025-08-27 11:04 ` [PATCH 2/3] tools: testing: Use existing atomic.h for vma/radix-tree tests Brendan Jackman
2025-08-27 12:56 ` Pedro Falcato
2025-08-27 15:19 ` Brendan Jackman
2025-08-28 1:05 ` Liam R. Howlett
2025-08-28 9:20 ` Brendan Jackman
2025-08-28 10:26 ` Lorenzo Stoakes
2025-08-27 11:04 ` [PATCH 3/3] tools: testing: Support EXTRA_CFLAGS in shared.mk Brendan Jackman
2025-08-27 12:57 ` Pedro Falcato
2025-08-28 1:04 ` Liam R. Howlett
2025-08-28 10:27 ` Lorenzo Stoakes
2025-08-28 10:28 ` [PATCH 0/3] tools: testing: Use existing atomic.h for vma/radix-tree tests Lorenzo Stoakes
2025-08-28 12:09 ` Brendan Jackman
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=DCDAY7MCS3CS.2QJ54F8Z86WN6@google.com \
--to=jackmanb@google.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=jannh@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=maple-tree@lists.infradead.org \
--cc=pfalcato@suse.de \
--cc=vbabka@suse.cz \
/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