From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 84349C10F25 for ; Mon, 9 Mar 2020 23:11:42 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 109062146E for ; Mon, 9 Mar 2020 23:11:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="rulg74NM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 109062146E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 7D8F66B0010; Mon, 9 Mar 2020 19:11:41 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 789B86B0032; Mon, 9 Mar 2020 19:11:41 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 651616B0036; Mon, 9 Mar 2020 19:11:41 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0093.hostedemail.com [216.40.44.93]) by kanga.kvack.org (Postfix) with ESMTP id 4B8CA6B0010 for ; Mon, 9 Mar 2020 19:11:41 -0400 (EDT) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id F0318824805A for ; Mon, 9 Mar 2020 23:11:40 +0000 (UTC) X-FDA: 76577372760.11.map21_48d94c354dd5d X-HE-Tag: map21_48d94c354dd5d X-Filterd-Recvd-Size: 5340 Received: from mail-ot1-f68.google.com (mail-ot1-f68.google.com [209.85.210.68]) by imf33.hostedemail.com (Postfix) with ESMTP for ; Mon, 9 Mar 2020 23:11:40 +0000 (UTC) Received: by mail-ot1-f68.google.com with SMTP id a9so5174390otl.6 for ; Mon, 09 Mar 2020 16:11:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=LKRHxYimFMZUOSCFWBWPQEeraoRwWzQd26N8/GrplsA=; b=rulg74NMqVMzZo2by+XKSp3K4FvZFLEJZX14TihGtvaEapM1a5FXYMGx4Y0CzF/XQb p5dlHlN5peWB/cQQ+ltlHoDtJDdFFIH2cKE2/b21VuJ79VlmdZBJSNqtpUMpKFoqMtr+ vmTtA1Kb22Sjvk/j66aWnqe06zNZBrP/+eNgVAC4ii9Ag1J8R0Jw2KbLs5fAn2FxG/Wm iDulToOeNyr0vnAEviO9klOQ4enf00c4roCnTPxv6qb6m9Uho20RwTMPGNjBPuuUef14 FVaiSZ7QGc6bkPz6hck+9VM+xv1ZB5pwevCFNa4q1ycFRFVouUkX/2NW8kMtZComw9kc vmxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LKRHxYimFMZUOSCFWBWPQEeraoRwWzQd26N8/GrplsA=; b=anuxjuJiCuL8Gtnh/w98Z+8IXfDIdTouRtLfrSThk5jmZ/9RKcFGF7AQL12rAvwDof CwZju/D5Plx00kmR6WSu1iaICKuDl+aBhCMMdOKgHXbrB+aZ7YtB/Ly0NIc3QgTagL4Z IQz0Gx1ZutKD3aNPxnhGQ049QNeWzt9fe+xTkveEmHA+kezgyZmvq7jdLW1nEU3h4kbQ rNjAavFl2tRU3TQzdsjbtCaklZaV/rtExvFGzVZPdr65ZnPl+IeSlodpvbYeLEJs+an/ cVK6NFbfsc7bp/68AVG16CVtGQVS5qadLDelGF901FQdDNVH1amBxIhtFnTmv4b208k4 u5ag== X-Gm-Message-State: ANhLgQ3W6YRTDCl9AMM6RaJpRNJmOZtqO5UW39KIETaM0POWrW2xywQx Mf7WeZuQA1ttcgOne84TeCR/F36wYQhEddw29sw= X-Google-Smtp-Source: ADFU+vtL/gChUunHBPDJ//510Fa7sEtCs5vnQQ5R8G6UMz//hGSWJNgzgLHodYMrsAEKImkJ7AcjxUHEpiE6XdjOIn8= X-Received: by 2002:a9d:6c94:: with SMTP id c20mr15239729otr.285.1583795499756; Mon, 09 Mar 2020 16:11:39 -0700 (PDT) MIME-Version: 1.0 References: <0088001c-0b12-a7dc-ff2a-9d5c282fa36b@intel.com> <56ab33ac-865b-b37e-75f2-a489424566c3@intel.com> In-Reply-To: <56ab33ac-865b-b37e-75f2-a489424566c3@intel.com> From: "H.J. Lu" Date: Mon, 9 Mar 2020 16:11:03 -0700 Message-ID: Subject: Re: [RFC PATCH v9 01/27] Documentation/x86: Add CET description To: Dave Hansen Cc: Andy Lutomirski , Yu-cheng Yu , "the arch/x86 maintainers" , "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , LKML , linux-doc@vger.kernel.org, Linux-MM , linux-arch , Linux API , Arnd Bergmann , Andy Lutomirski , Balbir Singh , Borislav Petkov , Cyrill Gorcunov , Dave Hansen , Eugene Syromiatnikov , Florian Weimer , Jann Horn , Jonathan Corbet , Kees Cook , Mike Kravetz , Nadav Amit , Oleg Nesterov , Pavel Machek , Peter Zijlstra , Randy Dunlap , "Ravi V. Shankar" , Vedvyas Shanbhogue , Dave Martin , x86-patch-review@intel.com Content-Type: text/plain; charset="UTF-8" X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Mar 9, 2020 at 3:19 PM Dave Hansen wrote: > > On 3/9/20 2:12 PM, H.J. Lu wrote: > >> But what are the rules for clone()? Should there be rules for > >> mismatches for CET enabling between threads if a process (not child > >> processes)? > > What did you mean? A threaded application is either CET enabled or not > > CET enabled. A new thread from clone makes no difference. > > Stacks are fundamentally thread-local resources. The registers that > point to them and MSRs that manage shadow stacks are all CPU-thread > local. Nothing is fundamentally tied to the address space shared across > the process. > > A thread might also share *no* control flow with its child. It might > ask the thread to start in code that the parent can never even reach. > > It sounds like you've picked a Linux implementation that has > restrictions on top of the fundamentals. That's not wrong per se, but > it does deserve explanation and deliberate, not experimental design. > > Could you go back to the folks at Intel and try to figure out what this > was designed to *do*? Yes, I'm probably one of those folks. You know > where to find me. :) A threaded application is loaded from disk. The object file on disk is either CET enabled or not CET enabled. -- H.J.