Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp1145880rdb; Fri, 20 Oct 2023 09:34:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE0fA8jzP0vzAY7I/jAGIxHXzdlJla+Bm+1xmf85CeUyqb/NQX2RmW9OxaMdwJ+JQa0xZE8 X-Received: by 2002:a05:6a21:3e0d:b0:15d:b243:6131 with SMTP id bk13-20020a056a213e0d00b0015db2436131mr2267542pzc.44.1697819658565; Fri, 20 Oct 2023 09:34:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697819658; cv=none; d=google.com; s=arc-20160816; b=BMB0K7VKJKmkx/DWTv1y8atw0xZLhkHFVYS65+qTMhW7TlemsOGKuBMQ9Du1d/wXFr SMwYCp+hIGaxQCU3jnuQDkOO4I+cp8w44CY+C+KWNJgoORiVFZN3/jz7MbSj6772Ziue 1/F7wQHzHinAnrgP6uorl75kz6KuUCgkip7HvqvMi859PDB+bsuhwWSAZ4y1G6gQg8Au yj8WoqHoM/Za7T6Q0IzgeeY1nUVRt3Nch/uv4AVVSwMtbRb0vV9d7S45XZWiOsfvpdCV N0ESrEQEfB7RrOh4JGSzp2j9bFth9WfSc6ui6USFJ6IX1P/tTbHg7VccEk+kDf/X9WxU vTXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:cc:user-agent:mime-version :date:message-id:dkim-signature; bh=49QLDqH/9+YRY+2hRFU7DcnKJ78PzFsNBGB67PhzUz8=; fh=C7LKGIxkBZJAhC1D9oq0MEo9tZ+pZbMkIDL5ciBx0Ks=; b=kTjDq8XqkuIeFk8kj3qf0oPtYhvH3H8obJYcGex0ada2y6GaAOyd75L34H+iG8ihhN AkDB5onQUdjpn7hnD/bsar3IGF/YxBWVlcHfAdwWQ8lK6nIXnH1xuTXoNPWbxb6+n0MS nmz/n6N/IGrYHsFsKW2065a+Lpj4iLCjNJCHGBZeJxua4MBEA5Q1jhL7pWz79b8eERVc 2WPYt9J4tRT+ONbVa9IKOQin6gwGRf0wnUpNyJvZxAAZd2e+KQWPUK5pP+yB3XwwNY2I WM/KjRZwJNhLmSTGe9BgNmEEvg9wKrWEw0g5VvbOtVxHkjAPs55OIk66b9C6mQTTade1 pUMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=kxIb9rhY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id ck26-20020a056a02091a00b005859e8c7c2dsi2134725pgb.639.2023.10.20.09.34.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 09:34:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=kxIb9rhY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 07F4D83AEFF0; Fri, 20 Oct 2023 09:34:14 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377837AbjJTQdu (ORCPT + 99 others); Fri, 20 Oct 2023 12:33:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229731AbjJTQdt (ORCPT ); Fri, 20 Oct 2023 12:33:49 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 00901D5E; Fri, 20 Oct 2023 09:33:47 -0700 (PDT) Received: from [192.168.100.7] (unknown [39.34.188.12]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: usama.anjum) by madras.collabora.co.uk (Postfix) with ESMTPSA id 571ED660737B; Fri, 20 Oct 2023 17:33:29 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1697819626; bh=qAf3VEpznG3prdWZXqc557DgYUNT22t1DAY9WghAu+k=; h=Date:Cc:Subject:To:References:From:In-Reply-To:From; b=kxIb9rhY56Zh09c+xKKNsfn+CdSM2I7MVoJaUtB4doGcTTUT6bxvDoh8wQo7+qsD0 K8nzYVZbmnL3/wWhcydm+ipN0T9m/0nbqKWqE52KE8BkSZt6DmGOEuLw3mvHmkpDFd /an8HY4m3/GCQQA40CRMiNZBTjb/fTpG7d8iq6sFZNvuD34ia+IctP8S4A06l/ikO+ DWmmNyaaSUATq/+kUtSoUBKzpV26GHx17pgcFL8Zj+q2815xSfgV/e4NsMP1bCGyAB bI0I+4Ta5zBgOUbWQWY8J0SJRT3rkXLtZdPDWsoD6p80d/eluP6qp6BFcVOwylpd6l 3WzBwuIJdq+ZA== Message-ID: <53fcf507-c00e-4715-bc81-082282c37c86@collabora.com> Date: Fri, 20 Oct 2023 21:33:23 +0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Cc: Muhammad Usama Anjum , jeffxu@chromium.org, akpm@linux-foundation.org, keescook@chromium.org, jannh@google.com, sroettger@google.com, willy@infradead.org, gregkh@linuxfoundation.org, torvalds@linux-foundation.org, jeffxu@google.com, jorgelo@chromium.org, groeck@chromium.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-mm@kvack.org, surenb@google.com, alex.sierra@amd.com, apopple@nvidia.com, aneesh.kumar@linux.ibm.com, axelrasmussen@google.com, ben@decadent.org.uk, catalin.marinas@arm.com, david@redhat.com, dwmw@amazon.co.uk, ying.huang@intel.com, hughd@google.com, joey.gouly@arm.com, corbet@lwn.net, wangkefeng.wang@huawei.com, Liam.Howlett@oracle.com, lstoakes@gmail.com, mawupeng1@huawei.com, linmiaohe@huawei.com, namit@vmware.com, peterx@redhat.com, ryan.roberts@arm.com, shr@devkernel.io, vbabka@suse.cz, xiujianfeng@huawei.com, yu.ma@intel.com, zhangpeng362@huawei.com, dave.hansen@intel.com, luto@kernel.org, linux-hardening@vger.kernel.org Subject: Re: [RFC PATCH v2 8/8] selftest mm/mseal mprotect/munmap/mremap/mmap Content-Language: en-US To: Peter Zijlstra References: <20231017090815.1067790-1-jeffxu@chromium.org> <20231017090815.1067790-9-jeffxu@chromium.org> <3cf29cd5-8346-419f-88f1-3a5c8ddbacad@collabora.com> <20231020152354.GC31411@noisy.programming.kicks-ass.net> From: Muhammad Usama Anjum In-Reply-To: <20231020152354.GC31411@noisy.programming.kicks-ass.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Fri, 20 Oct 2023 09:34:14 -0700 (PDT) On 10/20/23 8:23 PM, Peter Zijlstra wrote: > On Fri, Oct 20, 2023 at 07:24:03PM +0500, Muhammad Usama Anjum wrote: > >> Please remove these. These macros would be picked up from the kernel >> headers automatically. > > As per the previous discussions, how does that work if you have O= build > directories? Then headers should be prepared in that O= directory first. make headers O=abc && make -C tools/testing/selftests O=abc > > I find this push to force people to do 'make headers' in order to use > simple selftests quite misguided. You're making it *harder* to use, > leading to less use. I'm just following what we have been doing over selftests mailing list to fix build issues in different use cases and kselfest.rst. Let me share the history: Around 2 years ago, selftest Makefile used to prepare kernel headers from source automatically and include them to build selftests. It had several bugs. So they separated the header preparation from selftest build. After a while people started getting build failures because they weren't building headers which were previously built automatically. So someone had written a patch (already in v6.6-rc6) to show informative error if headers aren't present. So now selftests can't be built until headers are built. The understanding here is that selftests come with kernel source and they should be built using in-source kernel headers as people don't always have updated headers. I think, if someone want to build just one selftest without doing make headers, he should install kernel headers from source before doing so instead of adding duplicate defines in the test itself. It helps while development to not to keep the duplicate copy of these macros in selftest as well. -- BR, Muhammad Usama Anjum