Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp1368428pxa; Fri, 28 Aug 2020 10:40:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx5ZWSeiAD+2KFBfU3uuBqgFfzoVdvff3lEsUkK5/dT9fZd4B/tnjwhQbLyp4cEpK5MR/DA X-Received: by 2002:a17:906:7715:: with SMTP id q21mr2992590ejm.251.1598636423252; Fri, 28 Aug 2020 10:40:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598636423; cv=none; d=google.com; s=arc-20160816; b=Q+8/OH03eebl+RQyrkE2hn3TbZ9rNmsCwttS6Eijn8arzbyt/oh+Ogp7YmqFUuFOPZ byEBklWFfouwBOvcmOAjsqCdEgWkHKy0FSFIxMI42DDiTxBhJ6SI8Iys0KND0IHw3rLe LcPCRHEKLgmA7qKK1hIOmd+i5LLLNXtt/fqcUbwO2pb4tcI0fKQQqm61eP4T1JJlDTDX 7br+u+4lH1mQXqlfK3GiCDSP0R7q3RhWByfaQpxtgqCDcjRGjRdROzlGT4Y3H6p2i+Yw TC2jIhsjdxN28KV0i1++c1a59sg3yur0uxEDPnPCF9Ad5Egt62/ClR8gjoNz7v+LPX/O 9PMQ== 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=9l3s0i7eDwcqjB1HSUvD4jke5IYkc4aeEtN3XiLQ3i0=; b=Ob1CkLb2cNo5V7m/PsjURcF7iJsVtCh0irvRD4LlJrhonZPKW5S/jO6KX+pj1S9KlF Wi14iX0CrpQbSttTrpisj+nooPssHhrTgRxuvLtgC+r4DagzHeG/Ywvs3bDm36Jh+huD BLLj4CATGtZxsC8YOBks0cpCMjf3+U3nnuRiY3mTibgDNRDCCdkuFMSoMJV2XsEsbNFY gPTl5ZU0g3dm3kZTk1Kr94MhDZcBARba3tvO2Z4CPLgNnPpwjdxrIbLGwIyGDc7bdKrk PXZrZnSOJWlyWeMyk3mNnF9fB9kBBHt9AY/PZrOWOSJHCqKLGYJDbJgaewoy67QWeJEH BF4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TyRrjGke; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m7si1132361edq.314.2020.08.28.10.39.59; Fri, 28 Aug 2020 10:40:23 -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=@kernel.org header.s=default header.b=TyRrjGke; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726794AbgH1RjW (ORCPT + 99 others); Fri, 28 Aug 2020 13:39:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:56376 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726677AbgH1RjT (ORCPT ); Fri, 28 Aug 2020 13:39:19 -0400 Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (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 41F8720DD4 for ; Fri, 28 Aug 2020 17:39:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598636358; bh=nds4FCanqTVJv34u/NxVJCyvtJsI4h+1rVN+aRFYiGg=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=TyRrjGkegJtc5NUYxIc2CRRvLWWkqf3QVI21p9DZd3r+zXtNHhiTBFd3UlkrkLutM m2gdFyeVpnX0PkMaqL510A5pXF7hkUeHvcLoBDY0+OUjfZznfyPRQlCtxAFsXLhhnV xMSL/cxiwuYQZXZgTbn4Xr4D7RH+IXBRyvCTlYAE= Received: by mail-wm1-f45.google.com with SMTP id k20so140671wmi.5 for ; Fri, 28 Aug 2020 10:39:18 -0700 (PDT) X-Gm-Message-State: AOAM531QZpB3cMs+MKR+9ZC2D1U85GqMgSOz4b0ZmZjMRQyhULGnocyv YjutU/ukSWJ+ecIegc+OmntDZ2yImE2HW/Oid/mQ0w== X-Received: by 2002:a1c:7e02:: with SMTP id z2mr214706wmc.138.1598636356748; Fri, 28 Aug 2020 10:39:16 -0700 (PDT) MIME-Version: 1.0 References: <4BDFD364-798C-4537-A88E-F94F101F524B@amacapital.net> <87v9h3thj9.fsf@oldenburg2.str.redhat.com> In-Reply-To: From: Andy Lutomirski Date: Fri, 28 Aug 2020 10:39:05 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v11 25/25] x86/cet/shstk: Add arch_prctl functions for shadow stack To: "H.J. Lu" Cc: Florian Weimer , Andy Lutomirski , "Yu, Yu-cheng" , Dave Martin , Dave Hansen , 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 Fri, Aug 28, 2020 at 4:38 AM H.J. Lu wrote: > > On Thu, Aug 27, 2020 at 11:24 PM Florian Weimer wrote: > > > > * H. J. Lu: > > > > > Can you think of ANY issues of passing more arguments to arch_prctl? > > > > On x32, the glibc arch_prctl system call wrapper only passes two > > arguments to the kernel, and applications have no way of detecting that. > > musl only passes two arguments on all architectures. It happens to work > > anyway with default compiler flags, but that's an accident. > > In the current glibc, there is no arch_prctl wrapper for i386. There are > arch_prctl wrappers with 2 arguments for x86-64 and x32. But this isn't an > issue for glibc since glibc is both the provider and the user of the new > arch_prctl extension. Besides, > > long syscall(long number, ...); > > is always available. Userspace is probably full of tools and libraries that contain tables of system calls and their signatures. Think tracing, audit, container management, etc. I don't know how they will react to the addition of new arguments.