Received: by 2002:ab2:69cc:0:b0:1fd:c486:4f03 with SMTP id n12csp122484lqp; Mon, 10 Jun 2024 21:46:20 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV/md+Tc4jTkngwnjc16KInUG29l8W01wDS6MvSme5dqKInAExK7ho7h8X89C6X8xUxytVm23lPf16TMHqG9uKfHjhGQ6BSf5CghEZBow== X-Google-Smtp-Source: AGHT+IFgkY6K/qlwTbCm90Gpfgv08wGxIovpU3N6oXbocFhWErLQFm3UwmosKAwIQ4Tx29MAE2lQ X-Received: by 2002:a19:5f53:0:b0:52c:76ac:329b with SMTP id 2adb3069b0e04-52c76ac335cmr4912745e87.35.1718081180345; Mon, 10 Jun 2024 21:46:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718081180; cv=pass; d=google.com; s=arc-20160816; b=BJzFu7+uyX9gSQWkx0AqAqm1wL7fGgJXwfBtCrJ175UpoKve7w+1LrntrwGR120lfT 6C1yN+SH4Qypcpn5yjvmLLoxdt2lAtxfw6i6tG3Sz8i2An0gtFpVTKe8ciYQ+3O5IbYo kSncdjDX397avSngxSqZ29TVwNDM+RaU+2MZnPRkiu//cHoNlnabmGDuhaBvhPHW6ue+ YkKEdVk/A60Ia4OT5kap0L4gnI79E0DcYrHd1/czHV2cJdHpscVZT7HSi2OBG0TJjL0O b90Qt7JugnrKASmmBtAUhEjcu+lomqG5ch5rZExqj20eBdU3xu7foBTTj4TjJWlniijZ AnEA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=CIoabIczz86lr8Q01sQG2GhLk5y0SCRcj0MaX6R+rEA=; fh=HWJHSGARLlJKrjsaSlnbJ/HR7CAwWap5pVZXqgOiJtk=; b=fVZDmmObmEmX1op+DSU3tq/mXcY2VI87ZIpJfk66yRfB6RCBI2fX9h9BLdSvSmeKGY 8kr1wTgZxn3FvmKwLfGJQbxdv4MEkd2NLlHggKyJ4vgzhJhhWHgYswIyYH+7EVGfVOaf 4dhRlUTW8Abi7xP/mc3aywpeXqJsa0skUVGtd04lv93RxVUKyyk4lX2Bb8i47QtxtQrr +KGvr4i/WVSlJ2sz/ODJ8ivelWUxbc2F7s5E9VJiVNG0KTppyKV3IHeYoJ2rR3XFEWcJ rjn1C74C27WpdUWRqbV5FuChdxIpGQLBhClbg7cF/Xcv8ys18RwyN5lL/QjSWWDc70wB 41kA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=mhBihUmp; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-209256-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-209256-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a6f261d1dd6si129579066b.677.2024.06.10.21.46.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 21:46:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-209256-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=mhBihUmp; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-209256-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-209256-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id D76F71F2361F for ; Tue, 11 Jun 2024 04:46:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4987316FF5F; Tue, 11 Jun 2024 04:46:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="mhBihUmp" Received: from mail-oo1-f42.google.com (mail-oo1-f42.google.com [209.85.161.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E6537273FD for ; Tue, 11 Jun 2024 04:46:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718081172; cv=none; b=D1APYof7FpgOFBUp88+C59WaT5nUNhtauMEBYaJMMTwctNo6QF88hEFWAO456OA71vkLyPqJPtvPj8oyLvVnG/1FergFjwLZTSX3wMvbANHVR8risU1NOw0OM8xd5FSlpI6QhpAFf/6FbAuqWQOQoELHqVrKGGv8OXkadIaAsSY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718081172; c=relaxed/simple; bh=yuDAWE5/MJ7uLyZqxDy3EYvOR6RL7CZjGGAfPr0n8k4=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=NzWBhGAGq62h3/nmb1tjvQxogo50obLqpR28Rv+zN6RSUOCEqfmcTr67wF5NbNgQRzXM0sHWDQtD6yXzmExiC+SQ0j8CthrhIo2qRAqbiq6qqbGm5lXckvG9CitaI5pb5wdEXp41sz6Gv1MWL6vO9QCWtOJVelj5sw7DlYxojmQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=mhBihUmp; arc=none smtp.client-ip=209.85.161.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-oo1-f42.google.com with SMTP id 006d021491bc7-5b96b249d56so2775366eaf.1 for ; Mon, 10 Jun 2024 21:46:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1718081170; x=1718685970; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=CIoabIczz86lr8Q01sQG2GhLk5y0SCRcj0MaX6R+rEA=; b=mhBihUmpK9vukRlvoTBZOZfDvNlvUBtHtXWK9SkAE3pUDUxvGyKNQfSP8nACCdaL0Z KurGcMladYQSSW8biNt1qpl9a15GSfCTA8Oc3L3tQK+jTrWNODH7TKGbbnGg8QeftddI r1igUEEKy5JgfFwJNTedZnXwAAjJVNgp1U6Mw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718081170; x=1718685970; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CIoabIczz86lr8Q01sQG2GhLk5y0SCRcj0MaX6R+rEA=; b=upKtzU70sSS2hrYuo7b88MSrobg4HUCF9qmr0zJL1JoXXQdLZsqZDe5gjPlvgbep8Q 1BLG6oy2DqfMz5S0I4FSfPyeOv4UytEvGxLeOqH/qmnHrAAf52y+/YEjs1dt4viDP49e 3W5Y5yhrf2F7Yxz4OjKD5Rxr4GDOIUUdrJJbKSdWGDa/8wV3gFBjeHmjKxWP4mChwrKU XlP1Jm/N/tKvd08SKRYxTYxkNumlBb9eO5AnMdIT9O6uSxLY+eWemkIVZqOKSQOyfowJ wYIQ0kwpOoACmcNdIwnmXhPh2/Xm/G+Rqz3aoZg3eCnEYer/bqZnxgK0ioBTA8JJb/Qy JdoQ== X-Forwarded-Encrypted: i=1; AJvYcCVReZJ+DdLGFVKZIRpQyyDZwSUyVy9JHF63DcMBqEA/vtAXu/izKrRfw8lMdpF7/GQw5sIfyrHRlboZkbxiXcYkgKESDtF2vP88ynhH X-Gm-Message-State: AOJu0YyKCwDsrq35fWrV/7FYObMTDk58CIAm8DDCsrCwY45Uay6QWGnr MeZUALhL2IT29Soumg8ZHseCow4ggRZLvxYqtrrrke+Quvv+/YXSd5BWh5bUVy+4+P1eYwOrvE0 uYomwGyIdSQREb/Oi8YePFYBLlf61T0+HNaf1 X-Received: by 2002:a05:6870:350c:b0:254:ba68:a6d2 with SMTP id 586e51a60fabf-254ecf7b04emr745965fac.25.1718081169944; Mon, 10 Jun 2024 21:46:09 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240608021023.176027-1-jhubbard@nvidia.com> In-Reply-To: From: Jeff Xu Date: Mon, 10 Jun 2024 21:45:58 -0700 Message-ID: Subject: Re: [PATCH 0/5] cleanups, fixes, and progress towards avoiding "make headers" To: John Hubbard Cc: Andrew Morton , Shuah Khan , Andrei Vagin , Axel Rasmussen , Christian Brauner , David Hildenbrand , Kees Cook , Kent Overstreet , "Liam R . Howlett" , Muhammad Usama Anjum , Peter Xu , Rich Felker , linux-mm@kvack.org, linux-kselftest@vger.kernel.org, LKML Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Jun 10, 2024 at 9:34=E2=80=AFPM John Hubbard = wrote: > > On 6/10/24 9:21 PM, Jeff Xu wrote: > > Hi > > > > > > On Fri, Jun 7, 2024 at 7:10=E2=80=AFPM John Hubbard wrote: > >> > >> Eventually, once the build succeeds on a sufficiently old distro, the > >> idea is to delete $(KHDR_INCLUDES) from the selftests/mm build, and th= en > >> after that, from selftests/lib.mk and all of the other selftest builds= . > >> > >> For now, this series merely achieves a clean build of selftests/mm on = a > >> not-so-old distro: Ubuntu 23.04: > >> > >> 1. Add __NR_mseal. > >> > >> 2. Add fs.h, taken as usual from a snapshot of ./usr/include/linux/fs.= h > >> after running "make headers". This is how we have agreed to do this so= rt > >> of thing, see [1]. > >> > > What is the "official" way to build selftests/mm ? > > From Documentation/dev-tools/kselftest.rst, it is: > > $ make headers > $ make -C tools/testing/selftests > > > I tried a few ways, but it never worked, i.e. due to head missing. > > You are correct. Today's rules require "make headers" first. But > I'm working on getting rid of that requirement, because it causes > problems for some people and situations. > > (Even worse is the follow-up rule, in today's documentation, > that tells us to *run* the selftests from within Make! This > is just madness. That is hilarious! :) > Because the tests need to run as root in > many cases. And Make will try to rebuild if necessary...thus > filling your tree full of root-owned files...but that's for > another time.) > > > > > 1> > > cd tools/testing/selftests/mm > > make > > > > migration.c:10:10: fatal error: numa.h: No such file or directory > > 10 | #include > > | ^~~~~~~~ > > compilation terminated. > > > > 2> > > make headers > > make -C tools/testing/selftests > > > > make[1]: Entering directory > > '/usr/local/google/home/jeffxu/mm/tools/testing/selftests/mm' > > CC migration > > migration.c:10:10: fatal error: numa.h: No such file or directory > > 10 | #include > > > > Well, actually, for these, one should install libnuma-dev and > numactl (those are Ubuntu package names. Arch Linux would be: > numactl). > > I think. The idea is: use system headers if they are there, and > local kernel tree header files if the items are so new that they > haven't made it to $OLDEST_DISTO_REASONABLE. > > Something like that. > But I don't want to install random packages if possible. Can makefile rule continue to the next target in case of failure though ? right now it stopped at migration.c , if it continues to the next target, = then I don't need to use gcc to manually build mseal_test. > So if you systematically install various packages on your machine, > then apply the various patches that I have floating around, then > you will be able to build selftests/mm without "make headers", at > this point. Or so I claim. > > thanks, > -- > John Hubbard > NVIDIA > Thanks -Jeff