Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp444830pxa; Thu, 27 Aug 2020 06:45:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/IIpV6lIBCguaN4orXx8WyGt4ErHM6H53Z4l1sTIkRdkIMrJIE3PaI/ZvfMyj5WMMHtG7 X-Received: by 2002:a17:906:3f91:: with SMTP id b17mr19857806ejj.165.1598535902258; Thu, 27 Aug 2020 06:45:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598535902; cv=none; d=google.com; s=arc-20160816; b=pERXUwLo1XCN3DyxDaq1aHlla+Ee4yXxylQvbRd6mfOQIPnjB8zhObaQFOc85Fh7Av 1J8AgPGDmLwouowaAEhl7ojLW6Rtk0z2TCs9DR6MYky8+fSDyFLzF3i4IFpfv3n/ChlE qfe1jUecyswiChdVC9sjoSnY5+gb3Hk4OtoHpD5QPizqXdqvFW3cAP5GhfgJEBpnHxP7 Xcm6gNxiY0tU+dVKE5PpHi3rkryvxQRWxEu1bcURoKffLfrXa6YRufhs+DDXr4DDp+K/ 8s+Q0Z1lN+YPYL8wIR7mFB/wVkTH5tTPAJwvsB4Ez7/BYXhW6gaSSm9AWsNsg4Q89zI7 kvMw== 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; bh=P1eAOelctVCvY77k8DvCiSb45R7pJeCygwUiBKj7ylk=; b=i+LLoKAT1aPZigyEwKlU/WNVe4Wx2+OQrRWb57CtLTo5ZXrumPAlpFzFRCTy7yzkdz qEMkKcvnJqLpYr7oeiyzUE5oumAD2uZ5C7Ehuscu2Oh6smNVnbAyqqPU8WmV9Tr791md LtAtmMsVZjWME72V+gETzNGfRdc3L7c1B9HO16+9fdEj75g60cuAgIqDS6LhvUtIP+S5 54dIBI8YDmM2rn0Ryx97rWyBPMKJo7zU68DrvwSgmMexmPZznC21y6XMTp8tzLLlmh6A VZpTgELvifn7uW2u58dAeJ42ocI1hvitSZIs2ylofyT/xC4Ay5W2OZuDGOtEBBN0ymzz AYLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KslTWM9Q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id de6si1574438edb.194.2020.08.27.06.44.39; Thu, 27 Aug 2020 06:45:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KslTWM9Q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728146AbgH0NlS (ORCPT + 99 others); Thu, 27 Aug 2020 09:41:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728190AbgH0NaA (ORCPT ); Thu, 27 Aug 2020 09:30:00 -0400 Received: from mail-il1-x144.google.com (mail-il1-x144.google.com [IPv6:2607:f8b0:4864:20::144]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B519C061264; Thu, 27 Aug 2020 06:29:34 -0700 (PDT) Received: by mail-il1-x144.google.com with SMTP id q14so4866839ilm.2; Thu, 27 Aug 2020 06:29:34 -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=P1eAOelctVCvY77k8DvCiSb45R7pJeCygwUiBKj7ylk=; b=KslTWM9QTJseKIfQwHyWHYzO4E5V9sz2t0NyQsA+FDYjpJCmberK6r1gK12Pgz7ApG aDRwPZnol6vii9x/7psJIZV393QKixDz1vAY5VufdD1L2su0SUGkwUlRjU+kIvkyaGeX Xv8Br1OD+OGHSOURsNHIRwVwsadKMnBFpOnlxRBsCEEgk1lMeHMMHZ0uQhY1oocrLzWi f/rA2Hze5ic1kTmDnRtSGdsXY7KvtyU0pyWGbPW8qRtEEs8k8OGmLcihOh2a3jLqA/qB uaMIxIHMpX9L2puZNu+odYcuv70ElOGc8HwsG1KQOmikZX/84mWmxEypdCTcjsiLCsJ6 4ErA== 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=P1eAOelctVCvY77k8DvCiSb45R7pJeCygwUiBKj7ylk=; b=UlGq8Xnd9xsDahH2Mgdq/GzST7GmqsZywZefLFD9KpOqNC+rB4PnU6Ay3EnYbITqGB SY/aUIvshFrJX5XIIVYwUc5IXDdsWJyB3jbbgWOHfUMD4ALfu9sAeerv7IlGFr7LY8lA zaa6wvFZhWaFH2bBhjmzdAw5/WNenH5hjq/M81ALBDgD2tRZKfqCrLfB0fqMPuN/KQ5c cRq4h9u/qZUPblJBdfKGWqomiovBFH162VKBw22T65KwMPnx/QePGBZhnCfDUf+TUcrC Ao7Uw2wf9VumATPZ/yWGyJg6EEkEez1Kdc7UGqXZFc/Wl1bsa90eGA6OgPAWmWZa/v/f TCdw== X-Gm-Message-State: AOAM5324iIiz89iwAdftJxVED2a9cujh6o4vIdIAfq5Qhob08Xu89lWV 631jh+dF7FFuEb+M2TXa9nF5Ipa0jlDdI49U1Mc= X-Received: by 2002:a92:6a09:: with SMTP id f9mr473727ilc.273.1598534972117; Thu, 27 Aug 2020 06:29:32 -0700 (PDT) MIME-Version: 1.0 References: <20200825002540.3351-1-yu-cheng.yu@intel.com> <20200825002540.3351-26-yu-cheng.yu@intel.com> <2d253891-9393-44d0-35e0-4b9a2da23cec@intel.com> <086c73d8-9b06-f074-e315-9964eb666db9@intel.com> <73c2211f-8811-2d9f-1930-1c5035e6129c@intel.com> <20200826164604.GW6642@arm.com> <87ft892vvf.fsf@oldenburg2.str.redhat.com> <20200826170841.GX6642@arm.com> <87tuwow7kg.fsf@oldenburg2.str.redhat.com> In-Reply-To: <87tuwow7kg.fsf@oldenburg2.str.redhat.com> From: "H.J. Lu" Date: Thu, 27 Aug 2020 06:28:56 -0700 Message-ID: Subject: Re: [PATCH v11 25/25] x86/cet/shstk: Add arch_prctl functions for shadow stack To: Florian Weimer Cc: Dave Martin , "Yu, Yu-cheng" , Dave Hansen , Andy Lutomirski , X86 ML , "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , LKML , "open list:DOCUMENTATION" , Linux-MM , linux-arch , Linux API , Arnd Bergmann , Balbir Singh , Borislav Petkov , Cyrill Gorcunov , Dave Hansen , Eugene Syromiatnikov , Jann Horn , Jonathan Corbet , Kees Cook , Mike Kravetz , Nadav Amit , Oleg Nesterov , Pavel Machek , Peter Zijlstra , Randy Dunlap , "Ravi V. Shankar" , Vedvyas Shanbhogue , Weijiang Yang 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, Aug 27, 2020 at 6:19 AM Florian Weimer wrote: > > * Dave Martin: > > > You're right that this has implications: for i386, libc probably pulls > > more arguments off the stack than are really there in some situations. > > This isn't a new problem though. There are already generic prctls with > > fewer than 4 args that are used on x86. > > As originally posted, glibc prctl would have to know that it has to pull > an u64 argument off the argument list for ARCH_X86_CET_DISABLE. But > then the u64 argument is a problem for arch_prctl as well. > Argument of ARCH_X86_CET_DISABLE is int and passed in register. -- H.J.