Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp5472377rwb; Tue, 17 Jan 2023 14:24:16 -0800 (PST) X-Google-Smtp-Source: AMrXdXuRsQS9jW/RYmCEeHabSi8j4QY2sG9kckm6hcyPkb3J7NcftTm4hqzMexPzTWPGxjfwKljy X-Received: by 2002:a17:907:7248:b0:872:b1d7:8028 with SMTP id ds8-20020a170907724800b00872b1d78028mr5379481ejc.3.1673994256053; Tue, 17 Jan 2023 14:24:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673994256; cv=none; d=google.com; s=arc-20160816; b=kZg0EwnLw4nMLxzwxzaCUe0bTbHJDrlAVezegVePZplaBxHPOLiPnYfWdnojMpNZiz w8AKU520cnrL4MXATh4DzThQyIbiKJC6H4oIDiOSpkJxC6D09loqbChek5jEbcSwcgGW Wb7GIT51mCWUD2FuTcyy9swQa0NeprarZuI0/vX8lL7ErcDMdF5PZIX6sKbSRcsoAW4J 5OszuUVpUr+XSayAOuI+TvxyDo3MgHf130696bTv5cjDm0zlqovxZOOE0YoIk4PDQkLf o6QatTmv9Lo61aTS7zdk/WnInWJc7NOk272NoJOcGjR2etQSzwlgP/Ce/+LwlNbSbZOd BsDw== 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:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=QszTA0yny1qEnmAlZFSYaZw2i3JQtbCNFO/tYsWCG1U=; b=QEt7CniRfip2x6NYjxMW0sU8bSuTpeb9Z8A5p1tfr4rl4YzGl0psb5dD88xff65OJF 9879ueeb0DUrTq/pB243IXCG4y9VLE4frZK+24a3Uy6H/qvOwISX9FFZqaF3LOYcQeaf +4+18qFcmDyGdQShWek49IKkJvJoQFskxSgCDbgtlGiRt3G+yifU+t50erU0mlYNg6TC PMzkh2CqsPmrITdHZaKcL1AK0paU3eXEUe8/qnbVCgO5DRuRR/zettURf+bmeYa/HAJ+ GeUoOWqVzrZ0p++glcHqapBrBbF3f+Wa/rqJzg5TT5JIycfsQeXec2/Sauem9jW6dDVZ SF6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=BWNfMQ5W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xg3-20020a170907320300b007c158707538si10482773ejb.981.2023.01.17.14.23.39; Tue, 17 Jan 2023 14:24:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=BWNfMQ5W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229697AbjAQWLL (ORCPT + 46 others); Tue, 17 Jan 2023 17:11:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229931AbjAQWJR (ORCPT ); Tue, 17 Jan 2023 17:09:17 -0500 Received: from smtpout.efficios.com (smtpout.efficios.com [167.114.26.122]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B12313E090; Tue, 17 Jan 2023 12:14:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1673986459; bh=OYhFAr+sZ9bMx5kLoUnKqAkNLmvDquv/DxwJyciMtw4=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=BWNfMQ5Wf2HQotqzGQWPRw9BiABduwCxGuKUy1T634WWxY7PLpEexdAPQ9EEZ5hY2 Cv0szpxLSASegmjJ/5yZs8bJlzGWY1r/yanmjhWmti0HhPcLIp6hbG8yADugZnhLlR /A+5z3m2LYAhX94NqlNO2GHL6Ynw5HBgxzghuF+Ky8LkGZCfXLhW8VjN9t7g00wQOt pPsyIDO9YV+r2awOowjL5/JObrKh8vEmh7UDSq2H2HMfOekGKZLpfP5RQbCe0/aiQp uUf73AQS6P7lU0XyaedA+qkZil3PvkyHsJ4XZTSHDxnGDxMQ0i3QW0zmaVVWyLOuwN CxhbNIlzdGnJg== Received: from [172.16.0.101] (192-222-180-24.qc.cable.ebox.net [192.222.180.24]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4NxKqH2CmGzh8w; Tue, 17 Jan 2023 15:14:19 -0500 (EST) Message-ID: <378731e7-eec5-44ca-eded-3277792b061e@efficios.com> Date: Tue, 17 Jan 2023 15:14:52 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [tip:sched/core 7/28] rseq.c:139:37: error: 'AT_RSEQ_ALIGN' undeclared; did you mean 'R_SH_ALIGN'? Content-Language: en-US To: Shuah Khan , Ingo Molnar Cc: kernel test robot , Shuah Khan , oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org, x86@kernel.org, Peter Zijlstra , linux-kselftest@vger.kernel.org References: <202301170348.7WLKH1pl-lkp@intel.com> <4449d8b5-b7a5-0f09-5b42-7b70ba00f8f6@linuxfoundation.org> <37625f31-6ac2-1f90-d864-e4644820bba3@efficios.com> <1eed08d1-c100-6ca5-63f3-73487970b08e@linuxfoundation.org> From: Mathieu Desnoyers In-Reply-To: <1eed08d1-c100-6ca5-63f3-73487970b08e@linuxfoundation.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023-01-17 14:11, Shuah Khan wrote: > On 1/17/23 10:44, Mathieu Desnoyers wrote: >> On 2023-01-17 04:06, Ingo Molnar wrote: >>> >>> * Shuah Khan wrote: >>> >>>> On 1/16/23 13:18, Mathieu Desnoyers wrote: >>>>> On 2023-01-16 14:40, kernel test robot wrote: >>>>>> tree: >>>>>> https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git >>>>>> sched/core >>>>>> head:   79ba1e607d68178db7d3fe4f6a4aa38f06805e7b >>>>>> commit: 03f5c0272d1b59343144e199becc911dae52c37e [7/28] >>>>>> selftests/rseq: Use ELF auxiliary vector for extensible rseq >>>>>> compiler: gcc-11 (Debian 11.3.0-8) 11.3.0 >>>>>> reproduce: >>>>>>           # >>>>>> https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=03f5c0272d1b59343144e199becc911dae52c37e >>>>>>           git remote add tip >>>>>> https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git >>>>>>           git fetch --no-tags tip sched/core >>>>>>           git checkout 03f5c0272d1b59343144e199becc911dae52c37e >>>>>>           make O=/tmp/kselftest headers >>>>>>           make O=/tmp/kselftest -C tools/testing/selftests >>>>>> >>>>>> If you fix the issue, kindly add following tag where applicable >>>>>> | Reported-by: kernel test robot >>>>> >>>>> In order to fix this, I need to change -I../../../../usr/include/ >>>>> for $(KHDR_INCLUDES) in tools/testing/selftests/rseq/Makefile >>>>> >>>>> I can find 25 odd uses of the same pattern in the kernel selftests. >>>>> Should I fix them all in one go ? >>>> >>>> kselftest build depends on headers installed in the root directory. >> >> By "root directory", do you mean kernel sources root directory or >> build output root directory ? >> >>>> The main makefile enforces this dependency. >> >> How ? I figure that tools/testing/selftests/lib.mk overrides >> KHDR_INCLUDES if it is not defined yet: >> >> ifeq ($(KHDR_INCLUDES),) >> KHDR_INCLUDES := -isystem $(top_srcdir)/usr/include >> endif >> >> and selftests makefiles include ../lib.mk. >> >> This KHDR_INCLUDES can be modified by O=... when built from the kernel >> top level, thus using tools/testing/selftests/Makefile: >> >> ifneq ($(KBUILD_OUTPUT),) >> [...] >>    KHDR_INCLUDES := -isystem ${abs_objtree}/usr/include >> else >> [...] >>    KHDR_INCLUDES := -isystem ${abs_srctree}/usr/include >> endif >> >> But it's up to the individual selftests to actually use >> $(KHDR_INCLUDES). In many cases, they hardcode >> -I../../../../usr/include/ which is bogus when the build root (O=...) >> differs from the source root. >> >>   If this test is being >>>> built without installing headers by itself, I think the scripts that >>>> build individual tests have to makes sure headers are installed first. >> >> The headers were previously built by "make O=/tmp/kselftest headers", >> as it should, it's just that the selftest makefile uses a hardcoded >> path that is relative to the source directory, and it appears that >> this pattern is repeated all across the selftests. >> > > selftests Makefile used to install headers and there has been a recent > change to have mani Makefile (root) to install it. As a result individual > test builds (running make in the test directory) requires header install > now. > > I think the hard-coded includes are a problem and we have to fix them for > all cases i.e make O=, individual test builds. > > If you are still up for it, please send patch. Sure. Now that I dig a bit more, we could try using "-nostdinc" to tell the compiler not to search the standard system directories, but I've noticed that a few selftests depend on userspace library header files found in the build environment. I'm not sure how we should approach this. Thoughts ? Thanks, Mathieu > > thanks, > -- Shuah > -- Mathieu Desnoyers EfficiOS Inc. https://www.efficios.com