Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp436518pxa; Thu, 27 Aug 2020 06:33:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxsQFUy0eLKc7QH4Mhzyos5SFivht2qpKuw5Nc1PdqEh5A8bUCF68bxSXOaXcAQJ1G9h1Q8 X-Received: by 2002:a05:6402:1151:: with SMTP id g17mr20280367edw.227.1598535184373; Thu, 27 Aug 2020 06:33:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598535184; cv=none; d=google.com; s=arc-20160816; b=zySr05DWcEwQi4pobzl90YOdJ7bRZAym0WgSctrqTaG+utKOdGDKpGjX9aPFd7uNrJ orGGIpS814hdTf80xtd1ZmoZHTJaeANmaho7vhQHDjSdA2wt0MLO0PpmzS0+ii98B812 Ayu8e7SwEFcvK/ze9s4KtsIcwxwcE+4gnVWCFmvGlmcfEGM6gcmg0nUoPhzW9OtU/eYj T6STnKG/cqCPjlxQbHg4OvknXxHuqUhjlMW5Y9uZzQWEZq2TMkr95Uu6x0oyw6OKrxQE cY1Sex+SeBsb7agzsvlYUq6begnNV80t/GBYwcxgrGW4nYMD7iiy9Xa5pleSwFI3mCJ9 KLnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:dkim-signature; bh=BnfuzY1Orxo7bXipPlzF8Clju2SuIQM+XAiS/9TLc4c=; b=IW+b1SbAbi/pKOrBPfvXdO7YURnqQMhyI10G++5+3pKBF6jB7Sr2UUUM8B7SqEbmzh zCZ+CWSFSodXTcbr4LVylzHeqjxzWHwcX1/nktwxcoakTsgb20DyHUAWuj5EPwMRGYZw t/DKL6Y3E6B3qflJj6ILbPOoNtbqu25qtjrz+U7tthUKPAbaSu3k9hPt1FJoDNp1mtwW OWa3bqDcMCW3SlK7JF7iTkmwLHICVTB1eK3zhP+Uhkq7NWrr+0xh6keZ2degjYjQJAAN i9ivUD2NsAqTltIPXxyGxNSU1ANUs5aj18/yvRvdJ/6y+WeG0saUN+yVtCM4QQ2EAjCj cN1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=U4LFu1sb; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c3si1558606edl.567.2020.08.27.06.32.41; Thu, 27 Aug 2020 06:33:04 -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=@redhat.com header.s=mimecast20190719 header.b=U4LFu1sb; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727772AbgH0N2M (ORCPT + 99 others); Thu, 27 Aug 2020 09:28:12 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:55317 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727949AbgH0NTT (ORCPT ); Thu, 27 Aug 2020 09:19:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598534339; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=BnfuzY1Orxo7bXipPlzF8Clju2SuIQM+XAiS/9TLc4c=; b=U4LFu1sbOb556W1a7RVM62NKge/9fg1tid0vhk/gHB/JPsbi+z+BxGA88RIoWo1naSSAzM 1JJa1MXEZngXHhxXvSbq6BngRaFLU4eFhFRfnFNuNj4h2jufarSZCd6GIL3JUfVD0F/B1V QQp+JXq9O1Hv4Wj1ju4WenVLqpHdjyY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-215-G8iNeAfnO7-2I6RDlA4A7Q-1; Thu, 27 Aug 2020 09:18:55 -0400 X-MC-Unique: G8iNeAfnO7-2I6RDlA4A7Q-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 25ED657050; Thu, 27 Aug 2020 13:18:52 +0000 (UTC) Received: from oldenburg2.str.redhat.com (ovpn-112-37.ams2.redhat.com [10.36.112.37]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C26375D9E8; Thu, 27 Aug 2020 13:18:40 +0000 (UTC) From: Florian Weimer To: Dave Martin Cc: "Yu\, Yu-cheng" , Dave Hansen , Andy Lutomirski , 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 , "H.J. Lu" , 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 Subject: Re: [PATCH v11 25/25] x86/cet/shstk: Add arch_prctl functions for shadow stack References: <20200825002540.3351-1-yu-cheng.yu@intel.com> <20200825002540.3351-26-yu-cheng.yu@intel.com> <2d253891-9393-44d0-35e0-4b9a2da23cec@intel.com> <086c73d8-9b06-f074-e315-9964eb666db9@intel.com> <73c2211f-8811-2d9f-1930-1c5035e6129c@intel.com> <20200826164604.GW6642@arm.com> <87ft892vvf.fsf@oldenburg2.str.redhat.com> <20200826170841.GX6642@arm.com> Date: Thu, 27 Aug 2020 15:18:39 +0200 In-Reply-To: <20200826170841.GX6642@arm.com> (Dave Martin's message of "Wed, 26 Aug 2020 18:08:42 +0100") Message-ID: <87tuwow7kg.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Dave Martin: > You're right that this has implications: for i386, libc probably pulls > more arguments off the stack than are really there in some situations. > This isn't a new problem though. There are already generic prctls with > fewer than 4 args that are used on x86. As originally posted, glibc prctl would have to know that it has to pull an u64 argument off the argument list for ARCH_X86_CET_DISABLE. But then the u64 argument is a problem for arch_prctl as well. Thanks, Florian