From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3A055D3E195 for ; Fri, 18 Oct 2024 23:56:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 48C116B00A8; Fri, 18 Oct 2024 19:56:00 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 43CC46B00AA; Fri, 18 Oct 2024 19:56:00 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2DC776B00AC; Fri, 18 Oct 2024 19:56:00 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 0F6C66B00A8 for ; Fri, 18 Oct 2024 19:56:00 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 65DA71C3A06 for ; Fri, 18 Oct 2024 23:55:45 +0000 (UTC) X-FDA: 82688383302.10.0AE0267 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2064.outbound.protection.outlook.com [40.107.223.64]) by imf09.hostedemail.com (Postfix) with ESMTP id 0AA8814000E for ; Fri, 18 Oct 2024 23:55:47 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=Nvidia.com header.s=selector2 header.b=VFvGRfX4; spf=pass (imf09.hostedemail.com: domain of jhubbard@nvidia.com designates 40.107.223.64 as permitted sender) smtp.mailfrom=jhubbard@nvidia.com; dmarc=pass (policy=reject) header.from=nvidia.com; arc=pass ("microsoft.com:s=arcselector10001:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1729295682; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=pexlr1AxcEcYYdm5dZSmncVbeuDu7RnYg62hjUujyN0=; b=PXMv3nlLjd8JV7DmZQtbVHRrLl+44KL4skVXZPJCpD6IkOg8IxuUIC83t8Ui0kAtVTqoj2 macCJ2sEPNHwZL3j3fxN9hb3XRqpgjgkKBsxeaJ+/g/V46X8aAhyvuvpVd3lM+XuPZ1txe 3Zcg0fJQT1CGRfjEMyVPSTyh6jbMD7A= ARC-Authentication-Results: i=2; imf09.hostedemail.com; dkim=pass header.d=Nvidia.com header.s=selector2 header.b=VFvGRfX4; spf=pass (imf09.hostedemail.com: domain of jhubbard@nvidia.com designates 40.107.223.64 as permitted sender) smtp.mailfrom=jhubbard@nvidia.com; dmarc=pass (policy=reject) header.from=nvidia.com; arc=pass ("microsoft.com:s=arcselector10001:i=1") ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1729295682; a=rsa-sha256; cv=pass; b=uuFO3s/iCfjjjEfFdvQaRygL2py/M3hF3NnWnNsmb9t1YYWP5sakeipSSH0dqVEMNJuOMI invSY2008g5Lk2HiwiTPPcuu8i+p8c1RtFahS4DYbgBUJLgWd6j6hOvhay6fE8MLvIEmY4 Vw9Gh0fdRI6CwX56FD1EGX+aiPUKl4c= ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=G5rwt0fSjozLNVBCMoEOFuJ9jTgoJcYL1JMgBxxWlD6LdnqBBcJuWtkBwonWTZUa7QHvWfnEHzB+fxURLLPeledgehnb4+ivi1hNGFMm27EuHKB+4nApnbXevOT7l0+jZppbQM/ygzN4Nwof/LyRgrwi3GCO3fUsOdqdlqsgsEydRDShvhYF4a/0CsFR+qNtYik6RWAsSk9IBmLJQLRnR5pPsawpj2y1ppol04/476BPlJaOfgpOa155CONjw3JJc6o8MGONxRZdk4LCQ40oQZUXY6db+fJIokDdBwt7p4oe8Im9bUHamMyv2WAP4+1WrN9qsDc1sXp4D3HN3+yLKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=pexlr1AxcEcYYdm5dZSmncVbeuDu7RnYg62hjUujyN0=; b=Ik4Tom1AKtkaz1kKaXqm0qlKVp+yEqjZZbvzMbYhmbL2Dg2uWJfUnZNmjhVCPcRfnAGFuxy7KvMIxgYwijxChufTibCgcAY2V2sqKtH3fDwYRp3tqj6yfCHpBLxI3LtTNhNnkPFXhGUGw+jecSt6e/k+oEQq/ITSWZqtR1Dp/cVCF2UmIe+B66BoIPL8yEKHJdtDe8px3xoEjG8ie01vmyEXw5650FfAFk+g5hzepYri9im73uHwTW+OPmTDxixZELreGxMgQgW/IIJuiq1t/rCOBQJN4w3z17R7OLOpGHpja85kT2wVQ1TQQN8IAOWpfXH8/I/efhgVIYSlFB6Dzw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=oracle.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pexlr1AxcEcYYdm5dZSmncVbeuDu7RnYg62hjUujyN0=; b=VFvGRfX4GCEhTdkTZeFyna6VwAXkQuIklziJ8XWq56U7nX4ySoeEnJYF07her0R/vIVtO5pyv8ps17S33fzVRHo0JHwcDmic13hXINCaXdFIt48WqKwYlnfIwL5xZLKXukwAhwgB5BBu6YRK6ryaMBHGUXM8qvc0y7cjhhprWxi1v69oExp3T3l8jwnAYztQMWQ4pzBTsOwgl8gbMgzmGuYAbJkWCZ+bVoC4mT79nj8KKlYChP6L58cUQnvgbi6tw+xC2j01kFT24QfQYQfyGZ+i/ddC3CkYqtQk13AycaiMNNlpR9RTSgTpoDur58NX8YCgZSqgqiZ4lQrrwa6PPw== Received: from SN7PR04CA0185.namprd04.prod.outlook.com (2603:10b6:806:126::10) by MW4PR12MB6684.namprd12.prod.outlook.com (2603:10b6:303:1ee::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.17; Fri, 18 Oct 2024 23:55:51 +0000 Received: from SN1PEPF0002636A.namprd02.prod.outlook.com (2603:10b6:806:126:cafe::99) by SN7PR04CA0185.outlook.office365.com (2603:10b6:806:126::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.21 via Frontend Transport; Fri, 18 Oct 2024 23:55:51 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by SN1PEPF0002636A.mail.protection.outlook.com (10.167.241.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.17 via Frontend Transport; Fri, 18 Oct 2024 23:55:51 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Fri, 18 Oct 2024 16:55:39 -0700 Received: from [10.110.48.28] (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Fri, 18 Oct 2024 16:55:38 -0700 Message-ID: <3c27a383-45f9-4307-b1b2-f6bfa78633f2@nvidia.com> Date: Fri, 18 Oct 2024 16:55:37 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 3/4] selftests: pidfd: add pidfd.h UAPI wrapper To: Lorenzo Stoakes CC: Christian Brauner , Shuah Khan , "Liam R . Howlett" , Suren Baghdasaryan , Vlastimil Babka , , , , , , , Oliver Sang References: <7df771b9-bfd6-465e-b0ba-12d2aab13ec6@nvidia.com> Content-Language: en-US From: John Hubbard In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF0002636A:EE_|MW4PR12MB6684:EE_ X-MS-Office365-Filtering-Correlation-Id: ce9c18da-4b8f-4479-503c-08dcefd06574 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|376014|82310400026|36860700013|1800799024; X-Microsoft-Antispam-Message-Info: =?utf-8?B?TE12RkdFZjhqbjZvbEh6d3RuNTZBMWZXUWQwWE5ZRTgzMUl2NnNHZWZzWkxL?= =?utf-8?B?TGJ6dlQybnJxNExLUHZ0UVVXVUx1OWFHSUVPRHFhbERmOUI3MkUwWUZzZUsw?= =?utf-8?B?WGI0ZFdGaUZ5T21LcjFiVG9XQlQxK2RjeFhzdWZwMi8zamtwZ0NTOGMrR1Jn?= =?utf-8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;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge2.nvidia.com;CAT:NONE;SFS:(13230040)(7416014)(376014)(82310400026)(36860700013)(1800799024);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Oct 2024 23:55:51.2719 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ce9c18da-4b8f-4479-503c-08dcefd06574 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.161];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: SN1PEPF0002636A.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB6684 X-Rspamd-Server: rspam03 X-Rspam-User: X-Rspamd-Queue-Id: 0AA8814000E X-Stat-Signature: xoq91w1or3g468soon8916iy3zne51mc X-HE-Tag: 1729295747-93882 X-HE-Meta: U2FsdGVkX1+KrdcONL9G39UGzJw8UggSOySS0y6pXfCBjXocjnj7SMGGu670cJ0dzE42i2zYMrOEeyeVx4FcSRxzfVSoVQlYbAQia+E1kcXjQMYlnJaSIxkjnrTeheJj8dRZ0AHXHPFKfI7Zzakw27Kh2yFi4rRfs0aRSdSA/9f3lx+TpRM6ZWWHuzcifawac3V83ft9USGVG4sSWPqMfQuDGe8Z4C7G2AJRacMFZxs+EJpCN8U8HbSrC+BHbT9ZjPrJ7RGpWJN7/cOaHz/BGhhxz5kq29vZk9hrD3q6wQuZ2p4N+kEpy7ZqBqemDKsI6dHv6Qae+yQ6ilyytYDFsN0CtThZqTPPFUYp4roAd/BuDByMpycWUiWKPhCsz+x/f2FQuLvG5DQS8QW0j3+a+Omj1Cz/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5BMLixCT5Vv/bWkixLeS7l6LgQ9lLuF0= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On 10/17/24 11:49 PM, Lorenzo Stoakes wrote: > On Thu, Oct 17, 2024 at 02:45:43PM -0700, John Hubbard wrote: >> On 10/17/24 2:05 PM, Lorenzo Stoakes wrote: ... >> Your include path above actually refers to: >> >> $(top_srcdir)/include/uapi/linux/fcntl.h >> >> ...but what I was intending was to copy a snapshot of that file (or a >> snapshot from the one generated by "make headers"), to here: >> >> $(top_srcdir)/tools/include/uapi/linux/fcntl.h > > Yeah my first version of this used the uapi one but I thought doing that > might conflict with snapshotting? Also it'd mean you'd absolutely have to > have the $(TOOLS_INCLUDES) earlier in the include priority list and better > maybe to special case in this instance. Actually, I think the goal is to just stop using KHDR_INCLUDES (./usr/include) entirely! More below... > >> >> ...and then use $(TOOLS_INCLUDES), which is already in selftests/lib.mk, >> for that reason: to be available to all of the kselftests: >> >> TOOLS_INCLUDES := -isystem $(top_srcdir)/tools/include/uapi >> >> The reasoning for this directory is further explained here: >> >> tools/include/uapi/README >> >> (And I see that selftests/proc has started using $(TOOLS_INCLUDES), that's >> progress.) >> >> And now, it's possible to change fcntl.h in place, instead of using a wrapper. >> Although either way seems OK to me. (I'm sort of ignoring the details of >> the actual header file conflict itself, for now.) > > The fcntl.h and linux/fcntl.h conflict is apparently a rather well-known > horror show. It's a difficult one to resolve as the UAPI pidfd.h header > needs O_xxx defines but we also need to include this header in kernel code. > > An #ifdef __KERNEL__ block might be a solution here but fixing that is out > of scope for these changes. Certainly out of scope! Your patch already avoids the biggest issue: it no longer requires "make headers", in order to build it. That's fine for now. Sorry to put you into the middle of a pre-existing kselftests debate. And the #ifdef __KERNEL__ sounds like a potential solution, or at least a building block for one. I need to take a closer look at this particular header file mess, the fcntl.h situation is new to me. >>> +#endif /* _TOOLS_LINUX_PIDFD_H */ >>> diff --git a/tools/testing/selftests/pidfd/Makefile b/tools/testing/selftests/pidfd/Makefile >>> index d731e3e76d5b..f5038c9dae14 100644 >>> --- a/tools/testing/selftests/pidfd/Makefile >>> +++ b/tools/testing/selftests/pidfd/Makefile >>> @@ -1,8 +1,7 @@ >>> # SPDX-License-Identifier: GPL-2.0-only >>> -CFLAGS += -g $(KHDR_INCLUDES) -pthread -Wall >>> +CFLAGS += -g -isystem $(top_srcdir)/tools/include $(KHDR_INCLUDES) -pthread -Wall >> >> Instead, it would look like this, which now mostly matches selftests/mm/Makefile, >> which is also helpful, because eventually this can be factored into a common >> piece for all selftests: >> >> CFLAGS += -g -isystem $(KHDR_INCLUDES) $(TOOLS_INCLUDES) -pthread -Wall >> >> I apologize for just now noticing this! And these kselftests shouldn't require >> so much fussing around, I know. But once we get this just right, it will work >> well and last a long time. :) > > Yeah I know, but this won't work due to the header conflict, I was doing > this previously. > > Also doing it this way means that uapi snapshot doesn't override the usr/ > one if you have that, which I guess you want? Actually, given that we want (or should want, so I claim) to build without first running "make headers", and given that "make headers" populates ./usr/include/, which in turn is what $(KHDR_INCLUDES) points to, this means that eventually we should end up with approximately: CFLAGS += -g -isystem $(TOOLS_INCLUDES) -pthread -Wall And I just checked, today's selftests/mm builds just fine, with a similar diff applied, so I'm not totally crazy: diff --git a/tools/testing/selftests/mm/Makefile b/tools/testing/selftests/mm/Makefile index 02e1204971b0..b004a8edcba5 100644 --- a/tools/testing/selftests/mm/Makefile +++ b/tools/testing/selftests/mm/Makefile @@ -33,7 +33,7 @@ endif # LDLIBS. MAKEFLAGS += --no-builtin-rules -CFLAGS = -Wall -I $(top_srcdir) $(EXTRA_CFLAGS) $(KHDR_INCLUDES) $(TOOLS_INCLUDES) +CFLAGS = -Wall -I $(top_srcdir) $(EXTRA_CFLAGS) $(TOOLS_INCLUDES) LDLIBS = -lrt -lpthread -lm TEST_GEN_FILES = cow thanks, -- John Hubbard