From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl0-f70.google.com (mail-pl0-f70.google.com [209.85.160.70]) by kanga.kvack.org (Postfix) with ESMTP id 489C26B026E for ; Thu, 7 Jun 2018 11:47:42 -0400 (EDT) Received: by mail-pl0-f70.google.com with SMTP id g92-v6so5598244plg.6 for ; Thu, 07 Jun 2018 08:47:42 -0700 (PDT) Received: from mail.kernel.org (mail.kernel.org. [198.145.29.99]) by mx.google.com with ESMTPS id x3-v6si53818726plb.478.2018.06.07.08.47.41 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Jun 2018 08:47:41 -0700 (PDT) Received: from mail-it0-f47.google.com (mail-it0-f47.google.com [209.85.214.47]) (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 D82642089B for ; Thu, 7 Jun 2018 15:47:40 +0000 (UTC) Received: by mail-it0-f47.google.com with SMTP id a3-v6so13260270itd.0 for ; Thu, 07 Jun 2018 08:47:40 -0700 (PDT) MIME-Version: 1.0 References: <20180607143705.3531-1-yu-cheng.yu@intel.com> <20180607143705.3531-3-yu-cheng.yu@intel.com> In-Reply-To: <20180607143705.3531-3-yu-cheng.yu@intel.com> From: Andy Lutomirski Date: Thu, 7 Jun 2018 08:47:28 -0700 Message-ID: Subject: Re: [PATCH 2/9] x86/cet: Add Kconfig option for user-mode shadow stack Content-Type: text/plain; charset="UTF-8" Sender: owner-linux-mm@kvack.org List-ID: To: Yu-cheng Yu Cc: LKML , linux-doc@vger.kernel.org, Linux-MM , linux-arch , X86 ML , "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , "H. J. Lu" , "Shanbhogue, Vedvyas" , "Ravi V. Shankar" , Dave Hansen , Jonathan Corbet , Oleg Nesterov , Arnd Bergmann , mike.kravetz@oracle.com On Thu, Jun 7, 2018 at 7:40 AM Yu-cheng Yu wrote: > > Introduce Kconfig option X86_INTEL_SHADOW_STACK_USER. > > An application has shadow stack protection when all the following are > true: > > (1) The kernel has X86_INTEL_SHADOW_STACK_USER enabled, > (2) The running processor supports the shadow stack, > (3) The application is built with shadow stack enabled tools & libs > and, and at runtime, all dependent shared libs can support shadow > stack. > > If this kernel config option is enabled, but (2) or (3) above is not > true, the application runs without the shadow stack protection. > Existing legacy applications will continue to work without the shadow > stack protection. > > The user-mode shadow stack protection is only implemented for the > 64-bit kernel. Thirty-two bit applications are supported under the > compatibility mode. > The 64-bit only part seems entirely reasonable. So please make the code 64-bit only :)