Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754744AbcJEUpB (ORCPT ); Wed, 5 Oct 2016 16:45:01 -0400 Received: from foss.arm.com ([217.140.101.70]:48988 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751328AbcJEUpA (ORCPT ); Wed, 5 Oct 2016 16:45:00 -0400 Date: Wed, 5 Oct 2016 21:44:53 +0100 From: Mark Rutland To: Fredrik =?utf-8?Q?Markstr=C3=B6m?= Cc: Robin Murphy , Kees Cook , Arnd Bergmann , Ard Biesheuvel , Linus Walleij , Nicolas Pitre , Will Deacon , Russell King , kristina.martsenko@arm.com, linux-kernel@vger.kernel.org, Masahiro Yamada , Chris Brandt , Michal Marek , Zhaoxiu Zeng , linux-arm-kernel@lists.infradead.org, Jonathan Austin Subject: Re: [PATCH v2] arm: Added support for getcpu() vDSO using TPIDRURW Message-ID: <20161005204452.GB26721@remoulade> References: <1475589000-29315-1-git-send-email-fredrik.markstrom@gmail.com> <1475595363-4272-1-git-send-email-fredrik.markstrom@gmail.com> <20161004170741.GC29008@leverpostej> <50e025e0-7052-9b15-3b3e-36d1d9dfd695@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 712 Lines: 18 On Wed, Oct 05, 2016 at 08:00:38PM +0000, Fredrik Markström wrote: > On Wed, Oct 5, 2016 at 7:48 PM Robin Murphy wrote: > As far as I understand TPIDRURW isn't anything else then an architecture > specific piece of tls since the last patch, possibly slightly faster then a > "__thread u32 x;" > > The irony is that the two different ways it was handled earlier (not context > switched or always set to zero on swap in) would have made it useful for this > purpose. The "not context switched" case was also arbitrarily corrupted, and could not have been relied upon. The zeroing case is similar to the restartable sequences design. So that's probably worth looking into. Thanks, Mark.