From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by kanga.kvack.org (Postfix) with ESMTP id A372D6B4315 for ; Mon, 26 Nov 2018 13:29:55 -0500 (EST) Received: by mail-pf1-f200.google.com with SMTP id u20so9755365pfa.1 for ; Mon, 26 Nov 2018 10:29:55 -0800 (PST) Received: from mail.kernel.org (mail.kernel.org. [198.145.29.99]) by mx.google.com with ESMTPS id t12si994686plq.190.2018.11.26.10.29.54 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Nov 2018 10:29:54 -0800 (PST) Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B80C92148E for ; Mon, 26 Nov 2018 18:29:53 +0000 (UTC) Received: by mail-wm1-f44.google.com with SMTP id k198so19662494wmd.3 for ; Mon, 26 Nov 2018 10:29:53 -0800 (PST) MIME-Version: 1.0 References: <20181119214809.6086-1-yu-cheng.yu@intel.com> <35b33f293bc392df71710102f38fa6a40d0bb996.camel@intel.com> In-Reply-To: <35b33f293bc392df71710102f38fa6a40d0bb996.camel@intel.com> From: Andy Lutomirski Date: Mon, 26 Nov 2018 10:29:40 -0800 Message-ID: Subject: Re: [RFC PATCH v6 00/26] Control-flow Enforcement: Shadow Stack Content-Type: text/plain; charset="UTF-8" Sender: owner-linux-mm@kvack.org List-ID: To: Yu-cheng Yu Cc: Andrew Lutomirski , Florian Weimer , Carlos O'Donell , Rich Felker , X86 ML , "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , LKML , "open list:DOCUMENTATION" , Linux-MM , linux-arch , Linux API , Arnd Bergmann , Balbir Singh , Cyrill Gorcunov , Dave Hansen , Eugene Syromiatnikov , "H. J. Lu" , Jann Horn , Jonathan Corbet , Kees Cook , Mike Kravetz , Nadav Amit , Oleg Nesterov , Pavel Machek , Peter Zijlstra , Randy Dunlap , "Ravi V. Shankar" , "Shanbhogue, Vedvyas" On Mon, Nov 26, 2018 at 9:44 AM Yu-cheng Yu wrote: > > On Thu, 2018-11-22 at 08:53 -0800, Andy Lutomirski wrote: > > [cc some more libc folks] > > > > > 2. I want to be able to modify the signal context from a signal > > handler such that, when the signal handler returns, it will return to > > a frame higher up on the call stack than where the signal started and > > to a different RIP value. How can I do this? I guess I can modify > > the shadow stack with WRSS if WR_SHSTK_EN=1, but how do I tell the > > kernel to kindly skip the frames I want to skip when I do sigreturn()? > > > > The reason I'm asking #2 is that I think it's time to resurrect my old > > vDSO syscall cancellation helper series here: > > > > https://lwn.net/Articles/679434/ > > If tools/testing/selftests/x86/unwind_vdso.c passes, can we say the kernel does > the right thing? Or do you have other tests that I can run? I haven't written the relevant test yet. Hopefully soon :)