Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp1129401pxa; Fri, 28 Aug 2020 04:42:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxkTF7RoJAe+X76mXQLaCbD97hBUwdOTdE78n7G/DESiI9QSJEFbiMM44uOONMYC5iWdrdq X-Received: by 2002:a17:906:38c7:: with SMTP id r7mr1390489ejd.118.1598614947089; Fri, 28 Aug 2020 04:42:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598614947; cv=none; d=google.com; s=arc-20160816; b=trQ72WpfO22jUZmH+/Km8zAqWpCQxS763jmsT8Qro1HKiXGSVZF81rI6270kJPZnwl IOX8pcu76uoWbXpgluowikJtod1vSDzqWmvy/VX5chYJufIQMQfBuSoo7Zn9fZpSTjOn KAEMN5Gxogv1dIr7Jm/224jM4Y2d8lO37nrSyPaO5+HzydJlx+XDUVjpr1eVVF/68wHY l+w3yqJEgd6tERyZe9pnQ3m/Rj/M8jwp78JSwWvqW/S5xSO0AanRDcCUq8hvMUHCNU/w su66XbozoXQ9a7/BAW9yLuTKPJwoC+UEeXrHUYaXCVyMyqlFnkXeN+H8xjnwzu1i+oNj FVYw== 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=YkhG0d/qOT3/PWJBg69FZnqsmWy5PRGz7aCU+rLDXxM=; b=S+XdXSSkJ2oUjhxr0dIxXXqKHwCdRg5rg5fWRlW6gFlFmhwI5kqfNuyioxnyR5pzwk +lcBs+CAhqmG8ZAhfv01q4QOHobR1zCUE0A+zfH5KFKLnHbVmNl9vMbmuUbHLJL/+AFU n1HN7QKb+ATjQOh+pYKSKT8N+rek07SYYgD1C/vaF1QyB2N0ATTU6s5Khzg3xpGe7IXp rWgtCw8e9IFRnA8yKoqDkVjz3joWAroXZvVSJQT1bdATRlu3OnglgoZzp8lfPg8hCsZb 51wCzulc/FC2mlPqsVxRF7JyeJlH5wOJXkUuef7G7KvTAznl1fi7rpiUvZHtX4SEA0LR RcLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="pjn/h9gD"; 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 bl4si444997ejb.512.2020.08.28.04.42.04; Fri, 28 Aug 2020 04:42:27 -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="pjn/h9gD"; 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 S1729247AbgH1Lkh (ORCPT + 99 others); Fri, 28 Aug 2020 07:40:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729268AbgH1LiM (ORCPT ); Fri, 28 Aug 2020 07:38:12 -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 74D0EC061232; Fri, 28 Aug 2020 04:38:05 -0700 (PDT) Received: by mail-il1-x144.google.com with SMTP id t4so578325iln.1; Fri, 28 Aug 2020 04:38:05 -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=YkhG0d/qOT3/PWJBg69FZnqsmWy5PRGz7aCU+rLDXxM=; b=pjn/h9gD/HjPLZEqJAJsF2uf24PYQdDAWmiD1wPfNvudgPxGPyd4OzHlALIT+VSh5Y T1zcvcf/2OMybRQ2gT7gBjFIjjRInfx9UkYnnINep6/pptBICO/GXDmFxw0v7PeiW4wu XDkRvqRvF6dHqX/VMJ7Qse/4QKYNFSQJSGuTljEs4hS0CsaRzZHiJRn515VXp64VUyHo mUROMmrauEJmNQQXeTDOGVVV/4ge7l3vFWlkNU5rIlNJrK6Y2W9Lp4B2rTeyXqaieX2Y nXNYq1z4Vsdd0w5W3dTDzbIzp/Y2343ZT6F4T5GYEDa/0jKrQnYPkFGbTDr0W4yLGmCr XMHQ== 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=YkhG0d/qOT3/PWJBg69FZnqsmWy5PRGz7aCU+rLDXxM=; b=qobOkPolgRwz6XBHweJZq2qYVObyAJizRjhB0srUoh08mGQ6mw6XjhawUF23MAYjs5 2ciKvZHkw0KAx3QEhUVpXDLBkN2TnPi8SiJF3fEzpnddEB/76DwmqPI3HEpRNeT2GwYh G/ng4c1WqlJXJl81bxAjp0d+Qc7Tu/qiPrUpSyn8QuufkpBkjjs2FsCzUOsCFLuJ2eWV Sw4LfBvEjtsu4Q9Eku/ajvNk8TvhB1McGb9f8NKrfDKPUmfMW9ptfjLZzySFaMwJxSVm n6bjgLQx6Q/Q2xm2oe7HsxxnulIE3FRU+PJEMhaj8ouebE2yUw5JY/j1Iyi09rR3CWJd 3OeQ== X-Gm-Message-State: AOAM5301TYOwcegUa9vpG9udVlQ0j0FCyjE4GHzfdRMcnYSCJMplzXro lA6EFoYg2kvoK1qyq+2P5huZi+kARj0MuxDyTLM= X-Received: by 2002:a05:6e02:586:: with SMTP id c6mr1122698ils.13.1598614684703; Fri, 28 Aug 2020 04:38:04 -0700 (PDT) MIME-Version: 1.0 References: <4BDFD364-798C-4537-A88E-F94F101F524B@amacapital.net> <87v9h3thj9.fsf@oldenburg2.str.redhat.com> In-Reply-To: <87v9h3thj9.fsf@oldenburg2.str.redhat.com> From: "H.J. Lu" Date: Fri, 28 Aug 2020 04:37:28 -0700 Message-ID: Subject: Re: [PATCH v11 25/25] x86/cet/shstk: Add arch_prctl functions for shadow stack To: Florian Weimer Cc: 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 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. -- H.J.