Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp903907ybt; Wed, 1 Jul 2020 13:00:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQ1VKp5/tWbpICcVX19CBEl7COwbKUHi8cjgYaD1CmWjA4QQA38DQR81O5xo7lFK04YV6q X-Received: by 2002:a05:6402:1841:: with SMTP id v1mr17678842edy.198.1593633648412; Wed, 01 Jul 2020 13:00:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593633648; cv=none; d=google.com; s=arc-20160816; b=bf+a95kVUBGKG0tBjVwLXa38lj/c2TWl4hglvXeFZ3wRriVIdqA8+GDueXW7/MBWeC 9lDKX0hUYxXAXazK02wtGscGq4Q4wNoBm1Gkbv9k0Lu9EcIZP5JjZWfJ3KpPCuh5K2pX mTBuzwIExSExeyofGpKdts75NRsp3Qo/7XUtgGmOvk1zfdvH+zd///Eovs3CVX5SjGyO 8AsSwVCTAa0vh7D8t/H0hhbV4GJ4NJBuk8L8qDuAotCGzxdToULShsODe/3LlJtCQxgg CBaA8vPLHqt3RLKMaAZkpZ3L5qC8LYQx5luFpG7aDngsg4RwOMrwAm7qOvYjKy31aHU9 7NUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=PeyWZGfG5m9RPsPxYuT/7LYxNer83sv8fULOj7lD0aY=; b=kAovA0+lMZo8G9K4g+8LJ4Xk16Rx60NOM5sCNp7xZ7qewm3EV/7IR9+VoOMj/qwFjR nIWabLONMlZo9c6owezkrzsVgsDPI5qr6NVpOdRIw+EF4I8hz+lN48TbUQQGWORw5eOw U66wR9QyGm/h7crNe05lLb03U5ZtawMRwPy/XgvTjGy31QSUA/SwRX/XD/VYR6TDYZuU xI66l65WStE2wR/G5/i0fpUL75xX7PEQwvqRioh4ke0MzplNEW5njOxRLdp6uX2dsdwy lnYcLJbfhK3DgPchPzvH8RA3m6csW+KjKG8lI+230L0xKzjfri1hBB1DKYFjvp7Q+Iog dYYw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bx7si4397702edb.150.2020.07.01.13.00.25; Wed, 01 Jul 2020 13:00:48 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727057AbgGAT7Y (ORCPT + 99 others); Wed, 1 Jul 2020 15:59:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726021AbgGAT7Y (ORCPT ); Wed, 1 Jul 2020 15:59:24 -0400 Received: from ZenIV.linux.org.uk (zeniv.linux.org.uk [IPv6:2002:c35c:fd02::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20938C08C5C1 for ; Wed, 1 Jul 2020 12:59:24 -0700 (PDT) Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jqit0-003XsD-Up; Wed, 01 Jul 2020 19:59:15 +0000 Date: Wed, 1 Jul 2020 20:59:14 +0100 From: Al Viro To: Linus Torvalds Cc: Josh Poimboeuf , Peter Zijlstra , the arch/x86 maintainers , Linux Kernel Mailing List Subject: Re: objtool clac/stac handling change.. Message-ID: <20200701195914.GK2786714@ZenIV.linux.org.uk> References: <20200701184131.GI2786714@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 01, 2020 at 12:04:36PM -0700, Linus Torvalds wrote: > On Wed, Jul 1, 2020 at 11:41 AM Al Viro wrote: > > > > Rather nasty for ppc; they have separate user_read_access_end() and > > user_write_access_end(). > > That's actually for the access granting. Shutting the access down ends > up always doing the same thing anyway.. #define user_read_access_end prevent_current_read_from_user #define user_write_access_end prevent_current_write_to_user static inline void prevent_current_read_from_user(void) { prevent_user_access(NULL, NULL, ~0UL, KUAP_CURRENT_READ); } static inline void prevent_current_write_to_user(void) { prevent_user_access(NULL, NULL, ~0UL, KUAP_CURRENT_WRITE); } and prevent_user_access() has instances that do care about the direction...