Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2511858imm; Thu, 7 Jun 2018 11:54:59 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLZnaT7ERoJez8LLVkZkrN95tE9snaMUBTlYVp7/eIZN/kPjebGI4uAG+jPMOMQI1z0bRDP X-Received: by 2002:a17:902:4c88:: with SMTP id b8-v6mr3137196ple.285.1528397698963; Thu, 07 Jun 2018 11:54:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528397698; cv=none; d=google.com; s=arc-20160816; b=Ltgpw3VvFijOtAo387GnH9N/1vlI52trfOWbZ+7zmH5IGqJ500V73Wl+9KCySamaDP tE6o6Wk9DHBwLjbaMv1MmqOZFuWaGv73Nb9Re7MUoRhfNu/5IFz/hI5xl2yed/U8/N5+ Hn8emqluMaEuU0jPz9MeV+ny6iNcCa9fjSR/qN8OB2sfmOCvrxRmTF/Ou47h80l8+suO KK67SgwuVIYxSPQ8y+o5eONWgm+2nf5IrZP4GVihMgu/hKf8VOCi8QqdbGqB8t4isyB5 S9BmPQG31CYXIoMRCv1AmXwAW4ki/DZB7053v3Gn3ZL/4D1/jXqJ3u9z+tRLxG1jF5Pb fj8w== 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=ra407h422A+hI1jadsfP8405wA+dKCA8NUdIzWnDmOk=; b=Ffx+isf7FVSta6ELKq4hif9nSuEQqrYFpfLwdx3EAsoo+Ll/gg4pszQluJ7X96Ha35 T95ZtA9xHOfR7UxDAT19NCttcz0P5LIO80oDPPOvrY12IEktJdG5cCeW2x4WG5wWivQP 8fI83cEZQYLH+PycVcCtH0d/p10kDE0WUgmGLMqYffPo1H1N0d+ZRvwXT15Je1E2oMSG sH4JRfJif51oNMcxCGD85CwQvoI4U2j8sCtjDZ0uH0bumgmtO6tuNqZotrcMwVoyfqTI K5jiKJtYT8xn5SEs1z1UH5FBbnWh5AUx3qPBtniFdYibQlA9bylHGuRNJ+t4tN2bh1Ni ajXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=t4b22XPh; 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 s4-v6si22780546pgq.454.2018.06.07.11.54.45; Thu, 07 Jun 2018 11:54:58 -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=t4b22XPh; 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 S934595AbeFGPro (ORCPT + 99 others); Thu, 7 Jun 2018 11:47:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:47752 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932578AbeFGPrl (ORCPT ); Thu, 7 Jun 2018 11:47:41 -0400 Received: from mail-it0-f43.google.com (mail-it0-f43.google.com [209.85.214.43]) (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 D7D9B20896 for ; Thu, 7 Jun 2018 15:47:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1528386461; bh=mDTXmyladVBd3eh/mjrYcjmTj9XAgNFR2n7J1EwIYXw=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=t4b22XPhi1V8EcA81pcTXxuOrm3Dp/1GNdaGWLiZCnbLwCbzNu5aoN1wEFh8lASMj NscDMbnHFJCYLGG5LY5YGGhh2b5CzjB48YjIigLUttiwAkcImaTKsEVDf/Y6+A0K2U f+b6RUuXSz9JAgJpoxWdjskNN+6i/NNHf2l2l574= Received: by mail-it0-f43.google.com with SMTP id l6-v6so13260385iti.2 for ; Thu, 07 Jun 2018 08:47:40 -0700 (PDT) X-Gm-Message-State: APt69E2n3rBZJx5AYokj4QTLDwGNWTdhaeGmg9/XObyBgP0FI1HfedHl 0aNUETdtK/2errJYywsjLVobsrSiUBn/K9BaZwfiEg== X-Received: by 2002:a24:d050:: with SMTP id m77-v6mr2392521itg.147.1528386460335; 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 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: 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 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 :)