Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754717AbcJEVhj (ORCPT ); Wed, 5 Oct 2016 17:37:39 -0400 Received: from mail-oi0-f66.google.com ([209.85.218.66]:34434 "EHLO mail-oi0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751020AbcJEVhh (ORCPT ); Wed, 5 Oct 2016 17:37:37 -0400 MIME-Version: 1.0 In-Reply-To: <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> <20161005204452.GB26721@remoulade> From: =?UTF-8?Q?Fredrik_Markstr=C3=B6m?= Date: Wed, 5 Oct 2016 23:37:06 +0200 Message-ID: Subject: Re: [PATCH v2] arm: Added support for getcpu() vDSO using TPIDRURW To: Mark Rutland 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 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id u95Lbhbp014616 Content-Length: 1007 Lines: 29 On Wed, Oct 5, 2016 at 10:44 PM, Mark Rutland wrote: > 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. Ok, I missed that, sorry ! > > The zeroing case is similar to the restartable sequences design. So that's > probably worth looking into. Ok, I'm starting to believe my best bet is to hope that those make it into the kernel eventually, until then I'll probably just go with a local solution. /Fredrik > > Thanks, > Mark.