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=-4.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 836EDC433DF for ; Thu, 27 Aug 2020 13:36:53 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 45AE222CAE for ; Thu, 27 Aug 2020 13:36:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="gulb3h7T" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 45AE222CAE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id BC48B8E001C; Thu, 27 Aug 2020 09:36:52 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B4EAB8E0006; Thu, 27 Aug 2020 09:36:52 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A3D898E001C; Thu, 27 Aug 2020 09:36:52 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0214.hostedemail.com [216.40.44.214]) by kanga.kvack.org (Postfix) with ESMTP id 8ACFD8E0006 for ; Thu, 27 Aug 2020 09:36:52 -0400 (EDT) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 314B8180AD804 for ; Thu, 27 Aug 2020 13:36:52 +0000 (UTC) X-FDA: 77196449064.02.tub07_3d135982706d Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin02.hostedemail.com (Postfix) with ESMTP id E970710097AA0 for ; Thu, 27 Aug 2020 13:36:51 +0000 (UTC) X-HE-Tag: tub07_3d135982706d X-Filterd-Recvd-Size: 4749 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by imf22.hostedemail.com (Postfix) with ESMTP for ; Thu, 27 Aug 2020 13:36:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598535410; 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=oOvhPuNTJiPMVazrJGWO9y/T8cFLqtvdk4KglF4pjDM=; b=gulb3h7THnCZMPo1zYnwXg7sOaNmVUVeJZYA8bWYO8kQlql7xB85j1ro7iH/q1y6NcCZUQ p16xgB6ah8WWRpIhpmZr4yuneYNKuLdx+dnVAN/+YdMkzgIvzJu1/CIzOCyUH65CNeOZMe uAYuJRO41Ub7VSrpbjlP5ddk0YrlgQ0= 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-540-54a-fpiGNQuki1Zwqscbjg-1; Thu, 27 Aug 2020 09:36:46 -0400 X-MC-Unique: 54a-fpiGNQuki1Zwqscbjg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0F10E185FD8E; Thu, 27 Aug 2020 13:36:42 +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 953DD10013D0; Thu, 27 Aug 2020 13:36:30 +0000 (UTC) From: Florian Weimer To: "H.J. Lu" Cc: Dave Martin , "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 , 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> <87tuwow7kg.fsf@oldenburg2.str.redhat.com> Date: Thu, 27 Aug 2020 15:36:28 +0200 In-Reply-To: (H. J. Lu's message of "Thu, 27 Aug 2020 06:28:56 -0700") Message-ID: <873648w6qr.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.84 on 10.5.11.22 X-Rspamd-Queue-Id: E970710097AA0 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: * H. J. Lu: > On Thu, Aug 27, 2020 at 6:19 AM Florian Weimer wrote: >> >> * 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. >> > > Argument of ARCH_X86_CET_DISABLE is int and passed in register. The commit message and the C source say otherwise, I think (not sure about the C source, not a kernel hacker). Thanks, Florian