Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2343002imm; Thu, 7 Jun 2018 09:04:59 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKTh64xiw2nAjW1qypNCa0zpwZKnYP7maEsOJqTMbVd7HlRCBesU/oD0W1P7B6715aeblmz X-Received: by 2002:a62:9d58:: with SMTP id i85-v6mr2342743pfd.76.1528387499779; Thu, 07 Jun 2018 09:04:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528387499; cv=none; d=google.com; s=arc-20160816; b=IS0Os5Ub5lTxfLbA8bUDZV63oMImY2Kn40npluvOgYHxVFwXTTNZ2KdzR25Fp+VZ5I HoK9l3a1fOfCfqyKg/7Y/7RQx8B+8908Ff43akv1l8z4PF9ytwwT/S2kT/yDWuSyW5Az kRBDrXPT2+g0z0jkHMoPG7NRNBgfT28rxwXdDIZtBJsyBGdyq/ahmon/82/SMHFQpt3N ofsQWS5OCp9gGLqoUbUMuI28XwuGr9dh2KeTqGJcxjWZ2Fub394YNPNhuYykSKUW8rH2 SoDxaMAgzfBj4umII0twA966MyM/BsM4BhLGCSIXaaFXLva1+AX6mGr7zg9CxTj6UrbQ cUmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=WtSHo/Bq43Du1fc3s+n6QMkREQ4xf/OMUiyTp1mPVHI=; b=yrS90XpPwgQ+PvxWIvt63IOPETWhNc7QYHoNR9rYRclILyotGopMovJ+z8HgpXJi3z hAomMf8MizTUMwNkX1OUWWB9bshZuomIAND0tTVhirRm1EqUeYoU+LCe+NFtZi1dnOsj DXSmesnuBZ0Z5f+kXqPyz7tqaBrmMyRaXsZgpUU7lJ3RLyPsbnoIfNFj1sckCNs6zMZD UGskTicwDZL5fLkFexI4zgnffHT5hdgRznn/5WiIm/iLHBI1h0Nn4tdv9TnsdpzYnVbw axQ6nPe2SkQGiQmjRzXBbCs/eRfngUNIai95h2yIJtvzLvyUjEzuaKC4n8lnWdIsvTht h+xg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y11-v6si53830884plg.376.2018.06.07.09.04.44; Thu, 07 Jun 2018 09:04:59 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934517AbeFGQCY (ORCPT + 99 others); Thu, 7 Jun 2018 12:02:24 -0400 Received: from mga18.intel.com ([134.134.136.126]:15647 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932903AbeFGQCI (ORCPT ); Thu, 7 Jun 2018 12:02:08 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Jun 2018 09:02:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,486,1520924400"; d="scan'208";a="235254820" Received: from 2b52.sc.intel.com (HELO [143.183.136.51]) ([143.183.136.51]) by fmsmga005.fm.intel.com with ESMTP; 07 Jun 2018 09:02:07 -0700 Message-ID: <1528387137.4636.6.camel@2b52.sc.intel.com> Subject: Re: [PATCH 2/9] x86/cet: Add Kconfig option for user-mode shadow stack From: Yu-cheng Yu To: Andy Lutomirski 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 Date: Thu, 07 Jun 2018 08:58:57 -0700 In-Reply-To: References: <20180607143705.3531-1-yu-cheng.yu@intel.com> <20180607143705.3531-3-yu-cheng.yu@intel.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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?