Re: [PATCH v7 0/9] arm64 userspace counter access support

From: Rob Herring
Date: Mon May 03 2021 - 10:56:53 EST


On Fri, Apr 30, 2021 at 1:59 PM Arnaldo Carvalho de Melo
<acme@xxxxxxxxxx> wrote:
>
> Em Mon, Apr 19, 2021 at 10:15:02PM -0500, Rob Herring escreveu:
> > Hi all,
> >
> > Another version of arm64 userspace counter access support. I sent out
> > the libperf bits separately and those are now applied (Thanks!), so this
> > is just the arm64 bits.
> >
> >
> > This originally resurrected Raphael's series[1] to enable userspace counter
> > access on arm64. My previous versions are here[2][3][4][5][6][7]. A git
> > branch is here[8].
>
> Rob, please don't mix kernel patches with tools patches. The kernel
> bits, if arch specific should go via the arch maintainer, core stuff to
> PeterZ/Ingo/bpetkov/tglx, and tooling stuff I'll collect.

Okay, perhaps MAINTAINERS should be updated to reflect that better.

>
> We did it on purpose to avoid any semblance of kernel/tool lockstep.
>
> The kernel changes should not prevent the tooling from working and the
> tooling changes shouldn't require the kernel changes.
>
> Preexisting kernels should work with new tools and vice versa.

The only issue I see here is the userspace access tests will fail if
enabled in libperf for an arch but run on an older kernel without
userspace access support. I could instead skip tests if cap_user_rdpmc
is not set, but then how to test that it is set when it should be? I
suppose checking sysfs 'rdpmc' is one option assuming we end up with
the same file on Arm.

Rob