Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2742096lqz; Wed, 3 Apr 2024 07:22:23 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV55g6h4qYXGhdxtaR2qcZb3qgQ+6qUvnRJzpnfM9aOFiaRshGFyaa9ZAowz/tXBOHaSbzuSX8YTRopn/6jMnGKfKy/gvbJgqS+3MsV9A== X-Google-Smtp-Source: AGHT+IG3UN35HwfijziHR4lU+GLwiFcLvOoWFzaDormHRhM8hiWAYLDT/4CbxqwPEGx59oHTot0f X-Received: by 2002:a17:906:c2c2:b0:a46:8daa:436f with SMTP id ch2-20020a170906c2c200b00a468daa436fmr2023689ejb.69.1712154138034; Wed, 03 Apr 2024 07:22:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712154138; cv=pass; d=google.com; s=arc-20160816; b=YZdGuwED6LxoxzFBOV9ONrZ1j2rC+73uKwi1tkshmEzxKnFCQdUEY701drpQ+x+Qs4 KvQrlgoObVCZv/uV+im7Yf9bZLF7E12KIyO/WO0VXGvUEC44g3vm7ShZFo3tzMUjINh7 I89lmc52+UUTVaoSXGTpJ+gTldsG+dsUuPDqbbqr+ajIr/lSGkcErD8gf0aPe68AKkbX FF+6dAmzhx7kExfwVCiFnzPh1aasgizOa+0QN7/inRRqnae1INWe2vaRvXppC1dV7uW/ LpQlnj6GOySEooiggLCPOgeJzEQbI5lqV8A38TZb7bUb9nzRGwJIGq8lqxF3MLKvIXCF C0YQ== 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=5KNzGITkucPl9AWViVfDQgYWx11VHQjRjBsCgRjsbt8=; fh=pqt6OQqy7hI/D2Xn1ivjhKhQo6hT+5l6oGCWEwAEZz0=; b=bvUwmI0oTJhUAQmiHbDD5vimjdTFAuL8taayx/1gjpl66mJ8hdF38HiJr8FnKB+Yjw +cpijVIJhKXDr2pKoxiwSovexBBJJFyqKmjmMFiLAoReNoIMJC8RkutL3kqfCB4ZCM07 7VRQSrCHJKv3lxH0Gj/3ipzO+mZ+Ik+MqfypvzgZF9q0Gis2buJobTuV2G8e/ia2CnNq 2RKgEPG3olRij1U2SBRI3rF/QhYP6CTm/hIL3RYE+kqaSTsNqQ4xi0zuKK+D4Vymfnu0 G1IOGno5XfRCpfuiBCGMgiow4FbQOq+CSGMRYZm6cCBo+m0swuxt/wGo8IN1TGz9z7Sx lhaA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oY5cHO5f; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-129945-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-129945-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id p4-20020a17090635c400b00a4ea034e461si763197ejb.907.2024.04.03.07.22.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 07:22:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-129945-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oY5cHO5f; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-129945-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-129945-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 26FF61F239C7 for ; Wed, 3 Apr 2024 14:22:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AFAFE14A097; Wed, 3 Apr 2024 14:21:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="oY5cHO5f" 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 D6213149C47; Wed, 3 Apr 2024 14:21:21 +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=1712154081; cv=none; b=dQ/ml7D3e+sIyYHd9SEyOXwe48sm2DXSbIPPOOqjvNlgduASFu/vRieh39CrZwniSMTxuaBUUS2bb+X6ADnDGTqhHmDLGm11M6wTImJWluSlM4Xv9JgLnSnyCNB48hwMpn/aCpj5SdjKbdYkbgFiwqm/gyv+S1QbBqhj0/1vAb8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712154081; c=relaxed/simple; bh=/q4fBitqFxCOY548OFJKuQZURhoeAk7wbdCOBzEyi20=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=B/isGkePzgwNcLt8RjnTuCSUjcHUMH7jxmjO4Dobus1sJ30kOtrG5ZxVvFIFB1KoWL8TOBqwhCwmKK1cYnvfqJT3hy+Zt15VePEeX9XRbfg+6tDnDCLOEMcqtL9q37HKl0KZY0p+J5zZJvdLpbiAHMKjE86irOpamq4EZpybUdc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=oY5cHO5f; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id F318BC43394; Wed, 3 Apr 2024 14:21:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712154081; bh=/q4fBitqFxCOY548OFJKuQZURhoeAk7wbdCOBzEyi20=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=oY5cHO5feTs4f6Fb6PKrEkmsybCEaYbf/K7HZ5fDN0BA/n21s26F3bSx1wGs8ArWB QYnqlrz8adWS92ksvCV+z/BAqYBo636IvW4kNRWcA2oHEZSahdnCNjOowmFKr0g/10 vvtnaTePplLn9+DzS+rtfc8fkGgurTMtZP4RJSQFcfyGTE2yXrsZ6aui2MuVdL55yj vkd1rKdWsRlM0ClAVAE8fi0ZnMfLTYw5UBFSuFcosmdNpeJMHijg2UfzwCw0cXZ7o/ Se/zl0BK5kHsYhx1137Ydt6jbXpfaVQt6zaAydYHRY2HEjcEEtrvuvXvZHRtlvqGEP xaSSgsXEoP1Lg== Date: Wed, 3 Apr 2024 11:21:17 -0300 From: Arnaldo Carvalho de Melo To: Yang Jihong Cc: peterz@infradead.org, mingo@redhat.com, namhyung@kernel.org, mark.rutland@arm.com, alexander.shishkin@linux.intel.com, jolsa@kernel.org, irogers@google.com, 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: <20240403122558.1438841-1-yangjihong@bytedance.com> 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. - 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 >