Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1496072

Re: [PATCH v2] arm: Added support for getcpu() vDSO using TPIDRURW

From Mark Rutland <mark.rutland@arm.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2] arm: Added support for getcpu() vDSO using TPIDRURW
Date 2016-10-05 23:50 +0200
Message-ID <sp2eB-7H9-3@gated-at.bofh.it> (permalink)
References (4 earlier) <soXyh-3sY-9@gated-at.bofh.it> <soYum-4mZ-11@gated-at.bofh.it> <sp1ix-6VP-17@gated-at.bofh.it> <sp1ix-6VP-15@gated-at.bofh.it> <sp1BU-7lx-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Oct 05, 2016 at 10:01:38PM +0100, Russell King - ARM Linux wrote:
> On Wed, Oct 05, 2016 at 09:44:53PM +0100, Mark Rutland wrote:
> > The zeroing case is similar to the restartable sequences design. So that's
> > probably worth looking into.
> 
> You're sending mixed messages: in your previous message, you said:
> 
>   Arguably, someone could have (ab)used TPIDRURW between commits 6a1c531
>   and a4780ad to detect context switches, but in practice they don't
>   appear to have, and we know of an established user relying on the
>   current behaviour.
> 
>   For better or worse, the current behaviour is ABI.
> 
> Now you're suggesting that we could go back to the case where the
> register is zeroed.

Sorry; clumsy wording on my behalf.

I meant that functionality-wise, restartable sequences had similar behaviour to
the zeroing case (without touching TPIDRURW at all) and were probably worth
looking at. I did not intend to suggest that we should go pack to case where
TPIDRURW was zeroed.

> Well, the fact is that we _can_ change the TPIDRURW behaviour - we just
> need to be careful about how we change it.  Eg, we _could_ introduce a
> per-process flag which indicates that we want some other behaviour from
> TPIDRURW such as zeroing it on context switches.  The default would be
> to preserve the existing behaviour as doing anything else breaks
> existing programs.  The problem there is finding an acceptable way to
> control such a flag from userspace (eg, prctl, syscall, etc).

Sure. Something like that could work.

Thanks,
Mark.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2] arm: Added support for getcpu() vDSO using TPIDRURW Fredrik Markstrom <fredrik.markstrom@gmail.com> - 2016-10-04 17:50 +0200
  Re: [PATCH v2] arm: Added support for getcpu() vDSO using TPIDRURW Mark Rutland <mark.rutland@arm.com> - 2016-10-04 19:10 +0200
    Re: [PATCH v2] arm: Added support for getcpu() vDSO using TPIDRURW Fredrik Markström <fredrik.markstrom@gmail.com> - 2016-10-05 14:30 +0200
      Re: [PATCH v2] arm: Added support for getcpu() vDSO using TPIDRURW Fredrik Markström <fredrik.markstrom@gmail.com> - 2016-10-05 18:50 +0200
        Re: [PATCH v2] arm: Added support for getcpu() vDSO using TPIDRURW Robin Murphy <robin.murphy@arm.com> - 2016-10-05 19:50 +0200
          Re: [PATCH v2] arm: Added support for getcpu() vDSO using TPIDRURW Russell King - ARM Linux <linux@armlinux.org.uk> - 2016-10-05 22:00 +0200
            Re: [PATCH v2] arm: Added support for getcpu() vDSO using TPIDRURW Will Deacon <will.deacon@arm.com> - 2016-10-10 17:40 +0200
              Restartable Sequences benchmarks (was: Re: [PATCH v2] arm: Added  support for getcpu() vDSO using TPIDRURW) Mathieu Desnoyers <mathieu.desnoyers@efficios.com> - 2016-10-10 18:20 +0200
          Re: [PATCH v2] arm: Added support for getcpu() vDSO using TPIDRURW Mark Rutland <mark.rutland@arm.com> - 2016-10-05 22:50 +0200
            Re: [PATCH v2] arm: Added support for getcpu() vDSO using TPIDRURW Russell King - ARM Linux <linux@armlinux.org.uk> - 2016-10-05 23:10 +0200
              Re: [PATCH v2] arm: Added support for getcpu() vDSO using TPIDRURW Mark Rutland <mark.rutland@arm.com> - 2016-10-05 23:50 +0200
            Re: [PATCH v2] arm: Added support for getcpu() vDSO using TPIDRURW Fredrik Markström <fredrik.markstrom@gmail.com> - 2016-10-05 23:40 +0200
      Re: [PATCH v2] arm: Added support for getcpu() vDSO using TPIDRURW Mark Rutland <mark.rutland@arm.com> - 2016-10-05 22:50 +0200

csiph-web