Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp444596pxa; Thu, 27 Aug 2020 06:44:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxl+hDm2c5qbYuKz4S3Bymgg+QedhF0b6VbfLlxlZpJaRDN0zhqZnWEMx5zQ63Qyt5cx3q6 X-Received: by 2002:a17:907:20b6:: with SMTP id pw22mr19200436ejb.490.1598535880383; Thu, 27 Aug 2020 06:44:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598535880; cv=none; d=google.com; s=arc-20160816; b=N2YYFk5TrbaAHp8JH6npmi4pp3E7bx/YmCzDDnWy3A0ckeQogfBDWmInJILrF3NClU BFDLbfR09tyGK5yIwNJt+bcbqJ2ppLQ4tuwzuKVsKlsckOw4Cr5YwU1Fc/adXeMillwu 2+NQNJSJ+Sut6GIKrVhVXgttRLhNEaA79kgCkA86Ec+fdvP0EhHbwQbI0uymw7uZJgtA uOhY/c+/mdosdHJxe6PTPv/vcKVx2LGNbDKj5UyuJTSnfBsCube4Jf8C5V4YUhtuAuar SCrzJHjsMDnVNB2m8Z0aS5g0Z/NdHc0HWeOhI0wkd3BDKWqC0tUgo0CRAYDBEeMS2lng k0yw== 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=oOvhPuNTJiPMVazrJGWO9y/T8cFLqtvdk4KglF4pjDM=; b=ekMwJoSu9/vvXT2RDk0YNWY2y2JaUAQ8gD2kNvinT/Qp3q6Jt9PjkIn7nKwFKSX6JC I4y/fMro4A71SgxT8fIUEOVxA7AMOLmLmh+1whgnjV/bP+6UcOn50k8U5hzNPRVwyWqL Vjk54NzL4iM/Tw7NzoRG7fflBLKwudLLEJjNqvQRS0/agykEGIWfcpP+5ngRhqggGGh6 w+gLUMu1s/ampp4cm2SyjgXmT2WMGPLO078J1MEc+zF8ygZ0YzsmRPYyuvqcwQptsHmX WR/FnoPzJ08qY87jQzIsgZatSN6xkxSRMdw3UEZtUH4Gc4DA0FEyfxpZUydkXHHFzCjr n48Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=gulb3h7T; 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 l23si1565948edr.202.2020.08.27.06.44.17; Thu, 27 Aug 2020 06:44:40 -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=gulb3h7T; 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 S1726087AbgH0Nmm (ORCPT + 99 others); Thu, 27 Aug 2020 09:42:42 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:60868 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727999AbgH0Ngu (ORCPT ); Thu, 27 Aug 2020 09:36:50 -0400 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * 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