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=-1.0 required=3.0 tests=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 879F8C433E0 for ; Wed, 1 Jul 2020 19:59:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6DB8820748 for ; Wed, 1 Jul 2020 19:59:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727066AbgGAT7Z (ORCPT ); Wed, 1 Jul 2020 15:59:25 -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...