Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp4911190pxb; Tue, 25 Jan 2022 23:59:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJxq0ZCKh9cWA7DM3n3NC8h+yYAQK51IXfPDKXtTFMF/a8HtQ/0Fv99BR4jw6MpKniUX6nOQ X-Received: by 2002:a17:906:1cdb:: with SMTP id i27mr19642947ejh.663.1643183953269; Tue, 25 Jan 2022 23:59:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643183953; cv=none; d=google.com; s=arc-20160816; b=PG3O+/lXwvSzuMULPgVoc0MVsfIAiIbJeTRVUjZPTOxtQCHX5J9l3qVC3X5EGihmi4 BcaRlxX8svxyZfW/q5AuKmKOMn5Cc0qbLDD0u6DqwOACQxB9uwc5GzzsvSSwisFxHR9E rONNdvCi93Pnbono9LrV52YRAjDwoVzQPJKFDMgurUaYUUHKbMOeatMw7OC7ONjWgfLx b+DohRj9MQ8Tjb4P5hKL1ljg+9eqzFHDfCrFnb/Plzvv7dvREDjgGEOl5GkgiuFakm5O IvT4oeYSr/N3TXV3eEF5Kd/yfONZp3l35ZQ9+h18BRgtTcV9fwHIMaEFVWqfriEEHx9P XBpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=CfGlr20PS8gM63+DzrwYXqM+6/qD/un7GKtWXW+54Us=; b=JLR1+xohbkxgGC886/BLllcniEjhf5xsAG9lRD1diIILmDWiSm9auSqQVMNF6Dj6Aj 03e8m+DmMNBJRGWtQOmXk3g8QjLj5hNbFt3geErtSeE3OBgGMwHDYRtfE3DsIflU4CRM mokAjU7+yYsP+PTSLNC6KqbQe3INuPOffI3RiKZ7QwA9nDRA5hheNALIxgTRSxQKloRi Wqg4a08CEJvpsXe5ClJJ0LfAMEjEx/ONxXRo9OIIovEF3MpeS6o7LYazDe09PnKqTsyA mihNInubv23bubqVCwx+ACmy5EIcMlttPlq2cMrkllPBdUTFInRLSC8K93SMpaBRAStf es/Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y14si11812159edl.35.2022.01.25.23.58.34; Tue, 25 Jan 2022 23:59:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229960AbiAYT2I (ORCPT + 99 others); Tue, 25 Jan 2022 14:28:08 -0500 Received: from jabberwock.ucw.cz ([46.255.230.98]:51024 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229951AbiAYT1h (ORCPT ); Tue, 25 Jan 2022 14:27:37 -0500 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 58B371C0B98; Tue, 25 Jan 2022 20:27:36 +0100 (CET) Date: Tue, 25 Jan 2022 20:27:35 +0100 From: Pavel Machek To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Peter Zijlstra , Kajol Jain , Daniel Borkmann , Sasha Levin Subject: Re: [PATCH 5.10 138/563] bpf: Remove config check to enable bpf support for branch records Message-ID: <20220125192735.GD5395@duo.ucw.cz> References: <20220124184024.407936072@linuxfoundation.org> <20220124184029.173197383@linuxfoundation.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="NtwzykIc2mflq5ck" Content-Disposition: inline In-Reply-To: <20220124184029.173197383@linuxfoundation.org> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --NtwzykIc2mflq5ck Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > Branch data available to BPF programs can be very useful to get stack tra= ces > out of userspace application. >=20 > Commit fff7b64355ea ("bpf: Add bpf_read_branch_records() helper") added B= PF > support to capture branch records in x86. Enable this feature also for ot= her > architectures as well by removing checks specific to x86. >=20 > If an architecture doesn't support branch records, bpf_read_branch_record= s() > still has appropriate checks and it will return an -EINVAL in that scenar= io. > Based on UAPI helper doc in include/uapi/linux/bpf.h, unsupported archite= ctures > should return -ENOENT in such case. Hence, update the appropriate check to > return -ENOENT instead. >=20 > Selftest 'perf_branches' result on power9 machine which has the branch st= acks > support: >=20 > - Before this patch: >=20 > [command]# ./test_progs -t perf_branches > #88/1 perf_branches/perf_branches_hw:FAIL > #88/2 perf_branches/perf_branches_no_hw:OK > #88 perf_branches:FAIL > Summary: 0/1 PASSED, 0 SKIPPED, 1 FAILED >=20 > - After this patch: >=20 > [command]# ./test_progs -t perf_branches > #88/1 perf_branches/perf_branches_hw:OK > #88/2 perf_branches/perf_branches_no_hw:OK > #88 perf_branches:OK > Summary: 1/2 PASSED, 0 SKIPPED, 0 FAILED >=20 > Selftest 'perf_branches' result on power9 machine which doesn't have bran= ch > stack report: >=20 > - After this patch: >=20 > [command]# ./test_progs -t perf_branches > #88/1 perf_branches/perf_branches_hw:SKIP > #88/2 perf_branches/perf_branches_no_hw:OK > #88 perf_branches:OK > Summary: 1/1 PASSED, 1 SKIPPED, 0 FAILED This makes me nervous, it is not really a bugfix and probably noone tested it on the stable branch. It would be safer to keep it disabled. Best regards, Pavel --=20 DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany --NtwzykIc2mflq5ck Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRPfPO7r0eAhk010v0w5/Bqldv68gUCYfBPJwAKCRAw5/Bqldv6 8iEpAJ9sCL3h7VF39/KJbJcKOvb5z5BoVACgjZkTQY96JjevdX7yawuiLtAjLpc= =Wh42 -----END PGP SIGNATURE----- --NtwzykIc2mflq5ck--