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=-3.6 required=3.0 tests=BAYES_00,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 935A4C433E7 for ; Fri, 28 Aug 2020 17:46:28 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 527FB2098B for ; Fri, 28 Aug 2020 17:46:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="icC1Bpgn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 527FB2098B 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 D93686B0005; Fri, 28 Aug 2020 13:46:27 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D43B96B0007; Fri, 28 Aug 2020 13:46:27 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C327C8E0003; Fri, 28 Aug 2020 13:46:27 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0067.hostedemail.com [216.40.44.67]) by kanga.kvack.org (Postfix) with ESMTP id ABDB86B0005 for ; Fri, 28 Aug 2020 13:46:27 -0400 (EDT) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 64D62180AD801 for ; Fri, 28 Aug 2020 17:46:27 +0000 (UTC) X-FDA: 77200706814.07.home53_260333027077 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin07.hostedemail.com (Postfix) with ESMTP id 1A9E61803FF14 for ; Fri, 28 Aug 2020 17:46:27 +0000 (UTC) X-HE-Tag: home53_260333027077 X-Filterd-Recvd-Size: 5521 Received: from mail-il1-f195.google.com (mail-il1-f195.google.com [209.85.166.195]) by imf35.hostedemail.com (Postfix) with ESMTP for ; Fri, 28 Aug 2020 17:46:26 +0000 (UTC) Received: by mail-il1-f195.google.com with SMTP id y2so1380805ilp.7 for ; Fri, 28 Aug 2020 10:46:26 -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=pHD2od9a3q3ducRP27N4YhrcnzJznka8g9wB3couczI=; b=icC1BpgngsKcBshxupbrzi25rjmsbAQOUN7MB16qmho0eYgKflLT7ANJDf3pUDnubN 78YGL05njlRMtdciiZsYVN1VVQBMZjIe6pdf/yGP9BwzPCATHFugUx2WpO0GwB/oM/td 0fxLIn9YE98lUR6z93flUX7/YZT1bSXD8CjH+N+BS7Q3W0YWocw7ma5YnyqNywfSoYkK uQVabMZ/STD/n3oAfEe2stGAK92d83/wNDqP4Iw3itV6btGDhCX29orA4o/j41AJaIom anIODK7Y8nBxVFvG7/VA/SAMIZt37AHDfS/0UKi44VRdVWWh9s3JonKzphJdhvBH0fNY k6qw== 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=pHD2od9a3q3ducRP27N4YhrcnzJznka8g9wB3couczI=; b=XrjcS+iYzDnQJ+scHPinFJ79PTaFDOp1uYUz3oc3PSFRlowQ2aXGtX8lgqr/DzMVln sjc+uRcl8Iwg9QDSvEaPHfWrmZkM/ONKjZyJl0ppn+mKYadOiHzBYbpYZGdbrvOZNSiR gFQDHYvHP8yKByMs6YUR0JzWemUcTbGHYKsFK9mKgfCh4gGBAOzUQsBbRgrPsZ0gax7z SGMSpn2NArOm14DqTdha905uBGPXArRnF4D9Ce2budULYiEfKwfZzJHrmgD9Bp2AzGBp Vjm0QiBEzT92HvErR1sOSEBp3Xw+gZae4X6CYQpAvTmTNw7kDL2Mt0ks+n0J1dYZROqo aVWQ== X-Gm-Message-State: AOAM5339eKbkIvMOEs11wCPqfIL4DD8gMtroSpp99BYbM1X23rkeVdqC bPpEyZZa3VmY5zIPPaYPIM6E1qfGf8SjLPhXfrk= X-Google-Smtp-Source: ABdhPJxEPJRWFsSsLDEp8AT+kPrU4AEp/SFFKSWD282FnHn23h5DqcZW5RrwWZvBUnzwjewVJ+Pvt/vIrYZcV2MQjUc= X-Received: by 2002:a05:6e02:586:: with SMTP id c6mr30110ils.13.1598636785749; Fri, 28 Aug 2020 10:46:25 -0700 (PDT) MIME-Version: 1.0 References: <4BDFD364-798C-4537-A88E-F94F101F524B@amacapital.net> <87v9h3thj9.fsf@oldenburg2.str.redhat.com> In-Reply-To: From: "H.J. Lu" Date: Fri, 28 Aug 2020 10:45:49 -0700 Message-ID: Subject: Re: [PATCH v11 25/25] x86/cet/shstk: Add arch_prctl functions for shadow stack To: Andy Lutomirski Cc: Florian Weimer , "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: 1A9E61803FF14 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 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 10:39 AM Andy Lutomirski wrote: > > 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. Yes, they need to be updated to understand other new operations added for CET. -- H.J.