Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2515900imm; Thu, 7 Jun 2018 12:00:04 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIBRfro4tG4sV7vZ9F5TLwOlgzMBAUGKQJzrYU/0/b1zv0rZFtqGcOM29b4u4XBBZHX0tBH X-Received: by 2002:a62:ae06:: with SMTP id q6-v6mr2843845pff.17.1528398004439; Thu, 07 Jun 2018 12:00:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528398004; cv=none; d=google.com; s=arc-20160816; b=jUQGHwob9RYpP6f7kcMvPsLgKmjS+7cs9LBrsXPbaOT8+0he75wKNxYXstuKAkKyyI neIErTlYVrXD0XOA1hCW71qMCIWpEz41JI6TpI3D1miXMwTZK55nCQdZ6uXrKc2Uierq SRZg0igXJ3UrsF8rsAjDK4Qnx1GhhUmh7dfEVJNHc9NO/J9+p1DpnCRpRKTCzjYe1aqM 7kL/7DNo2+BsUGqIi88fK/UgTMe2zImibZ4jRB4IdmitDzARPreYoqzEycTavOWiJbeL bjEzEiC2mdePNiPvZpeMdGPFct8HIsePfI5vDv9/jy48ceLGrDHEpPsFPFwmjiU2eKpu NrOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=AX/F5MkdZeAw1MFQ+Ss19zRyRi4o0e8nSmTYCGrf86Q=; b=r0iXQ4/fUhhqyuA+GtlSNDiybHN4LzCPrdsXjnoaR/xPykYeNPKz8SdVMF8tpNtCw3 yx3pjAyfBGa/5wOpfbtEYvDkOBvaIjGlvP8g15I6xlfwCeiNdqUSvx26U2hKCDV1CHJX FWcCGq0dmTVV1jv8Wd5oWIti2kNcTFmAlLtfspBRbuYcVX2rD4Nv6Tc5bWmKTxoqqC/C m7UBnCIx1YPh0gMtp6pUArSuaJoqkfHyds6GOSkO5+/kVeVLUhvkJ671uxVu/t40uERM WSD7JKRy3S74r+VKEpW9tvyNy5jcKQsNGpzzDg6rJgMZjSUYmy1dmN48xeXvl7gs9+AB R3vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Cywthi7b; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u8-v6si11339937plh.492.2018.06.07.11.59.49; Thu, 07 Jun 2018 12:00:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Cywthi7b; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753871AbeFGQ2V (ORCPT + 99 others); Thu, 7 Jun 2018 12:28:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:33030 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753037AbeFGQ2T (ORCPT ); Thu, 7 Jun 2018 12:28:19 -0400 Received: from mail-wr0-f169.google.com (mail-wr0-f169.google.com [209.85.128.169]) (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 9D6242087F for ; Thu, 7 Jun 2018 16:28:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1528388898; bh=38Rz2dZgQXagFKQ3f+bPO04YOpSlZ2JS+BqQIL6xGgE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Cywthi7bEMC8sfl2A1bTc31jpIyxNyFF1TCt2S9q2oQUyjTk2AfjMwB9SxOgncX1y t9OD39opUGq3YGL7lzhsfnDHIeI52+r15K5reNXG+/BAKfWPOypR4XlF1MQBlu2bgo fj1PXpzQOmJ3SXMKAOdGenj5SgqXFYrzivrBCk0Y= Received: by mail-wr0-f169.google.com with SMTP id e18-v6so2245981wrs.5 for ; Thu, 07 Jun 2018 09:28:18 -0700 (PDT) X-Gm-Message-State: APt69E0+4E8STBchWksBVPNjEvZXymDIU0gfzBy69qXX/A77Iw+3JgVq 9/yNWfIYO8qA5lZn3FoN4m3tj07R41z4gPRZOIzS7g== X-Received: by 2002:adf:85ec:: with SMTP id 41-v6mr2313210wru.120.1528388897175; Thu, 07 Jun 2018 09:28:17 -0700 (PDT) MIME-Version: 1.0 References: <20180607143705.3531-1-yu-cheng.yu@intel.com> <20180607143705.3531-3-yu-cheng.yu@intel.com> <1528387137.4636.6.camel@2b52.sc.intel.com> In-Reply-To: <1528387137.4636.6.camel@2b52.sc.intel.com> From: Andy Lutomirski Date: Thu, 7 Jun 2018 09:28:05 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/9] x86/cet: Add Kconfig option for user-mode shadow stack To: Yu-cheng Yu Cc: Andrew Lutomirski , 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 7, 2018 at 9:02 AM Yu-cheng Yu wrote: > > On Thu, 2018-06-07 at 08:47 -0700, Andy Lutomirski wrote: > > 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 :) > > Yes, I will remove changes in "arch/x86/entry/entry32.S". > We still want to support x32/ia32 in the 64-bit kernel, right? > Yes, I think. But that's not in entry_32.S >