Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2786308lqz; Wed, 3 Apr 2024 08:34:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWBxdeemX6A05xjdem8mD0Gwc1eZJbfE+QuAj3uFsFo9QNDYh3QB2rDoOy5xTD8C30nBBn4oVTwfviJ+31czLoyZPq0UsmN4t5elv+C+Q== X-Google-Smtp-Source: AGHT+IGOjn0KysL0i4JzJQ/E2ZDI1J5W8ZzKnpXItyHXDj+hdCuvpfaLYrAcbOP9TM8jwlpQaK+j X-Received: by 2002:a05:6214:da2:b0:699:11ba:8823 with SMTP id h2-20020a0562140da200b0069911ba8823mr9439432qvh.45.1712158445540; Wed, 03 Apr 2024 08:34:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712158445; cv=pass; d=google.com; s=arc-20160816; b=Q8J4i/a7LCxfmxFBwZRVgA0T8L7Aa37v58T6jnV9NBBqLmpOaaNghrxI/bdf+BAU1W 2TC41Yo1G2hfAJ45mU7WAhM9cFZFwpm1/+J6SVMTYN9R0pjugPuqxOOePXQ9A7WZE89C 8aZj05QbgaPPNYOPaWIPwvuZh49UBVrdP+Gv4gdSx2uNB10Np30PYnMQUEzbHy7HPpVz th9l4TGifhzhXNcYbQj8sI8UwhQrVYyJg+W3KJT6EvK7qJMy6QBJm6MqyCuopRPGgn+5 UmYCnC0CjxUEM+e9sa4gXrCOH+OuLn0t1XTmtiPf9N/mfQUYlAGwVDILIOAH78wWXYyP uImg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=O/mLJGvrdnKGkeWy/I9gHJo+VOGBjJJFMGdl+YMB37U=; fh=IWK/Yy4Zv/T+Xlc68btJ8+7kkf8d3u1peEQ8jXNbVZQ=; b=PPW1brq8V4EmN7Ix0+9Wyj9Eci/KcrhS0R8um7Tv4EzlObM1NUbiVlkYwhvZsW8jSu U4kzNwVcYEQwsp7WB2X4kN9AXjOkXWFvIglqWoCWsOaUpQMAV7RJArvRsED7XAz7lqO8 PkrUIAp8mNUixsCg1vmBUx18cER5IVOxBJP7ReawtsD8GUnfbIepqUxXrpUsls+nivrt Gioy2rZK/KKl+Hyx4ziXO63JMZHE0rIlSa8ajFZuIFtvJoQcv+QbYSfrO3dtOCwbTwty eZyoZ9XyTpLB5DwNGRctQ06qdSInETljBrhq5rjop8IMYDtCT6LxnvdMvgOx5E9uA3vW ZD+g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bl9dPTS9; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-130097-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130097-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id l12-20020ad4452c000000b006969853b879si14796530qvu.104.2024.04.03.08.34.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 08:34:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-130097-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bl9dPTS9; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-130097-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130097-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 34E8E1C27041 for ; Wed, 3 Apr 2024 15:33:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9B7B314A4F4; Wed, 3 Apr 2024 15:33:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="bl9dPTS9" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B8CEA14A4C8; Wed, 3 Apr 2024 15:33:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712158407; cv=none; b=amTdQkjvVmrNS/hDxyNT6sd+Irfwfs6iaWoULZIKps/yA2Bs4NBKoUC7GwNrXS6zVD6tLt3XXdTR97MPI9TBtUWxVtyHgG1M4OJargTnTMaeS/3oamNt8A5/PWoueTqdelK7yVXq0xp4hrZNjyzviJicYiuRKBBB/w1lAeB47OE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712158407; c=relaxed/simple; bh=9KfcCS7D7DjPFMDq2QQ5xmLYUD9hfXeg8QO/vO8OgGo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=gX7I5ReWSiIPTorXNYor878SKXIiPd8shbVxkgpPhOp70tTV74qZu6ufOIhDJT6aGhtxvMIiZ/PV/to8gXQ/8plasiz5vEHN1ByHbnFJDCExlxwJujxIpxOptnnpEMCgH6RGWGR+Nue2rcq1GVXfI1jZpvUxzkDFPtI9ARts5M8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=bl9dPTS9; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id DC34DC433F1; Wed, 3 Apr 2024 15:33:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712158407; bh=9KfcCS7D7DjPFMDq2QQ5xmLYUD9hfXeg8QO/vO8OgGo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=bl9dPTS9Ifzv+/IEXdTzsyizBHuvYXnJuM15/DFAEnKts7/Wqya6/+xQimW0Fcbzu tHPy9M6iBjlfYaybYv5jWs39ZystLjywI5Axknv7K/TQSNUvmT3WxzZoKoP7pp3NkN GcH6teFpQpQKstYnRzsFVQiQ7RprXGCpyb5sEg2zTMKLMuUQwLydXRDCiKqZ3Qw7/C uEKzDRmUCtbDyn1nRpWNjRiapS+LSfmzOuCki9hQi7N4/vGfqPyVy9gQvwZu9ML3B/ 7nUGvc9plYSmw3pO1lPVyAlLKmZ6EWqbB1dbmNwy1PZknN35R7s3452/C79RIDPPkI VzGLV6ji/inGg== Date: Wed, 3 Apr 2024 12:33:24 -0300 From: Arnaldo Carvalho de Melo To: Ian Rogers Cc: Yang Jihong , peterz@infradead.org, mingo@redhat.com, namhyung@kernel.org, mark.rutland@arm.com, alexander.shishkin@linux.intel.com, jolsa@kernel.org, adrian.hunter@intel.com, kan.liang@linux.intel.com, james.clark@arm.com, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] perf beauty: Fix AT_EACCESS undeclared build error for system with kernel versions lower than v5.8 Message-ID: References: <20240403122558.1438841-1-yangjihong@bytedance.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Wed, Apr 03, 2024 at 08:05:32AM -0700, Ian Rogers wrote: > On Wed, Apr 3, 2024 at 7:21 AM Arnaldo Carvalho de Melo wrote: > > > > On Wed, Apr 03, 2024 at 08:25:58PM +0800, Yang Jihong wrote: > > > In the environment of ubuntu20.04 (the version of kernel headers is 5.4), > > > there is an error in building perf: > > > > > > CC trace/beauty/fs_at_flags.o > > > trace/beauty/fs_at_flags.c: In function ‘faccessat2__scnprintf_flags’: > > > trace/beauty/fs_at_flags.c:35:14: error: ‘AT_EACCESS’ undeclared (first use in this function); did you mean ‘DN_ACCESS’? > > > 35 | if (flags & AT_EACCESS) { > > > | ^~~~~~~~~~ > > > | DN_ACCESS > > > trace/beauty/fs_at_flags.c:35:14: note: each undeclared identifier is reported only once for each function it appears in > > > > > > commit 8a1ad4413519 ("tools headers: Remove now unused copies of > > > uapi/{fcntl,openat2}.h and asm/fcntl.h") removes fcntl.h from tools > > > headers directory, and fs_at_flags.c uses the 'AT_EACCESS' macro. > > > This macro was introduced in the kernel version v5.8. > > > For system with a kernel version older than this version, > > > it will cause compilation to fail. > > > > Thanks, I test on it, but since I didn't found libtraceevent-devel > > available there, then I have to build with NO_LIBTRACEEVENT=1 and thus > > this doesn't get built :-\ > > > > Thanks, applying. > > Yang also wrote: > https://lore.kernel.org/lkml/20240314063000.2139877-1-yangjihong@bytedance.com/ > that may have helped you with this. Yeah, if I change my build container on distros that don't provide libtraceevent-devel to build it from sources, and then point the perf build to that directory, I'll try to do that. And I just merged that patch, thanks for pointing it out. - Arnaldo > Thanks, > Ian > > > - Arnaldo > > > > > Fixes: 8a1ad4413519 ("tools headers: Remove now unused copies of uapi/{fcntl,openat2}.h and asm/fcntl.h") > > > Signed-off-by: Yang Jihong > > > --- > > > tools/perf/trace/beauty/fs_at_flags.c | 8 ++++++++ > > > 1 file changed, 8 insertions(+) > > > > > > diff --git a/tools/perf/trace/beauty/fs_at_flags.c b/tools/perf/trace/beauty/fs_at_flags.c > > > index c1365e8f0b96..c200669cb944 100644 > > > --- a/tools/perf/trace/beauty/fs_at_flags.c > > > +++ b/tools/perf/trace/beauty/fs_at_flags.c > > > @@ -10,6 +10,14 @@ > > > #include > > > #include > > > > > > +/* > > > + * uapi/linux/fcntl.h does not keep a copy in tools headers directory, > > > + * for system with kernel versions before v5.8, need to sync AT_EACCESS macro. > > > + */ > > > +#ifndef AT_EACCESS > > > +#define AT_EACCESS 0x200 > > > +#endif > > > + > > > #include "trace/beauty/generated/fs_at_flags_array.c" > > > static DEFINE_STRARRAY(fs_at_flags, "AT_"); > > > > > > -- > > > 2.25.1 > > >