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=-5.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 A9B86C433E2 for ; Fri, 28 Aug 2020 17:39:21 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5815020EDD for ; Fri, 28 Aug 2020 17:39:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="TyRrjGke" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5815020EDD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id CAB856B0002; Fri, 28 Aug 2020 13:39:20 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C5BE36B0003; Fri, 28 Aug 2020 13:39:20 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B71E26B0005; Fri, 28 Aug 2020 13:39:20 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0121.hostedemail.com [216.40.44.121]) by kanga.kvack.org (Postfix) with ESMTP id A121D6B0002 for ; Fri, 28 Aug 2020 13:39:20 -0400 (EDT) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 5BE81180AD801 for ; Fri, 28 Aug 2020 17:39:20 +0000 (UTC) X-FDA: 77200688880.05.stew42_080bc7727077 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin05.hostedemail.com (Postfix) with ESMTP id 32B811801E39E for ; Fri, 28 Aug 2020 17:39:20 +0000 (UTC) X-HE-Tag: stew42_080bc7727077 X-Filterd-Recvd-Size: 4712 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf19.hostedemail.com (Postfix) with ESMTP for ; Fri, 28 Aug 2020 17:39:19 +0000 (UTC) Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (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 501A9212CC 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-f46.google.com with SMTP id z9so6134wmk.1 for ; Fri, 28 Aug 2020 10:39:18 -0700 (PDT) X-Gm-Message-State: AOAM532Fc/FYSdL7/QKCZH8O2MU3jmverzvJrhz9vdOxkfVpA6FvAW/M mEvH/ua5Gl6Ul32merku/OkF93jl7tZi4p+hg2ehcQ== X-Google-Smtp-Source: ABdhPJyhwm17L0OXGgBqLsRtUxnb+FTpBy4Z2839DwNgsYJBjPegOYm2k1/SJF+gcG8rpzzWXr5f2DuOidvrokSrcrI= 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" X-Rspamd-Queue-Id: 32B811801E39E X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam01 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 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.