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 26E41C433E6 for ; Fri, 28 Aug 2020 17:39:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E668A2098B for ; Fri, 28 Aug 2020 17:39:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598636366; bh=nds4FCanqTVJv34u/NxVJCyvtJsI4h+1rVN+aRFYiGg=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-ID:From; b=V/DJlB/iVPrahyqxYF0QtIrmRiATjW8iMCF/LsDtwQ6kA2RJJ40nRydDAALEZPNeH wXmwOC7yFQ93EZf+TpWX2N6WHChiolYCKhSwJBBYUthMLw8QMTY0kORMr2aV68aSi+ FT5qtqzFX5CUnWgVm3Mi1ZJWEIlmrSPOCVhTzVpk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726867AbgH1RjW (ORCPT ); Fri, 28 Aug 2020 13:39:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:56420 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726794AbgH1RjT (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 67E8821531 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 b79so146738wmb.4 for ; Fri, 28 Aug 2020 10:39:18 -0700 (PDT) X-Gm-Message-State: AOAM532aZLVassEnOwOuyyj30Jh3qSKQzJS1QhUj9Wb/S9qX2/z82+R0 CnlJDGZ0HTOTs2VN2GjNJ81dJcFBxEQwQIHQaHShMw== 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" Sender: linux-arch-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arch@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.