Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp360906iog; Wed, 15 Jun 2022 03:54:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx9oSMZ7Ti6zlDhzzAwxcbqkYbt9j/RyT34tlJm3h+iQkjYeYPPeeuKOpEgZN4zAkufPWVH X-Received: by 2002:a05:6a00:114e:b0:51b:8ff5:e05a with SMTP id b14-20020a056a00114e00b0051b8ff5e05amr9419247pfm.37.1655290479408; Wed, 15 Jun 2022 03:54:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655290479; cv=none; d=google.com; s=arc-20160816; b=wuU2WPwir2+fEaj0IUBtJPVHe1QEcrLbamekgEjFqEybPWp5qc7ly19cVtZaxw7nhz 2068Gx4pbmSGVSWDNB/UzOcdYtKprqr7RMq0fdsi64z0D1z9ijrQBQnilZ3iFjOpHRAI Joif+XAA41jgSWPhd4hZaGW0KIb3nPMeXeDe7bTtamWO3dccbiKUB4Bvgg/F69m6pSot ebqdWE7xxSCewYiBnr1J926XBuaudfXc7qVjvrBDVAe/B/g8cWKNbKDDKb8hyKByHiFT zI+XvMKdKmCS8Ov5k13bWISrEcNyVkBo4Z7vBVCgjHOO9bPpJxLPWfmebC8Xgua6o32N im2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=X4eey67g7t7O8BPfmN7/7q5QPXgKgTakp0SBwPI8Wwc=; b=RAdRc+lw+eQHjMsjcp++wpXEs4Ur3Bp4Q1/t0ob2jF8WRBN/R6p2QH+6p/gw26/EjC tLrC+DJ+2F0qnrVxSWvKy3UOkEjq9IwDYui22LMOeg3PFC8j+ZwWU29TT4cmql1IDp0s CHPd1x3Rne8+G0RRZNeCY8WqUq3PPGEmhJZwevpHz28/vSv6U0ZLljYlYwz7/ZYLFICa gx+MKaQRJMHMuMTLYwV57fQhBLqA2CqUpwhON/Nk5axor15CQg2VOkK+nq3HP5gwCDw3 TLa+kkyBEkbD+KZij9gZgDfunXg+GRmvP0yxd/cv8f/7QC8iZZYQ8n5LyJ+/lhoW3o7+ bR2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=A9gwmKAW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g1-20020a170902740100b00161da9616edsi14678972pll.153.2022.06.15.03.54.25; Wed, 15 Jun 2022 03:54:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=A9gwmKAW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244188AbiFOKGx (ORCPT + 99 others); Wed, 15 Jun 2022 06:06:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238275AbiFOKGw (ORCPT ); Wed, 15 Jun 2022 06:06:52 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0E8E3BF8D; Wed, 15 Jun 2022 03:06:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=X4eey67g7t7O8BPfmN7/7q5QPXgKgTakp0SBwPI8Wwc=; b=A9gwmKAW+XiQ9/DOSyqS8RJYDi kLftzCd0j9LecehqiL/heefWcKRALCLCgCI6c1Tu5XFO6iOIW6t+mnQs40w8vhM6UYlb40E5XJBPF lKAnJla+8pJmZnFEzggotql2iqWkR6j9Zs2v1tzI0Tv7jH5KJkwPqo+cyU5aKyalw/pGa4Reo+XZv PEn0pc1fJcgZFYxVz0OgVmIKIZgY6CnfbUvLbCqdGhdjNewgT5wNDSwB5e7Lww1K+HxgKb148dm8C JROyYYP3CAoRJLlfsHBxkBl9Nzc8osG+72C0hwxIGsRVAhBUjT7MU4jDf1dnmODn0sh/dPc9+WyRn +zQOBI0Q==; Received: from dhcp-077-249-017-003.chello.nl ([77.249.17.3] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1o1Pv7-000xmS-0e; Wed, 15 Jun 2022 10:06:41 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 4C5433001C3; Wed, 15 Jun 2022 12:06:39 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 1A817201A4F6D; Wed, 15 Jun 2022 12:06:39 +0200 (CEST) Date: Wed, 15 Jun 2022 12:06:39 +0200 From: Peter Zijlstra To: Mark Rutland Cc: Ard Biesheuvel , linux-kernel@vger.kernel.org, Thomas Bogendoerfer , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , linux-mips@vger.kernel.org, linux-s390@vger.kernel.org Subject: Re: [PATCH 3/3] jump_label: make initial NOP patching the special case Message-ID: References: <20220608104512.1176209-1-ardb@kernel.org> <20220608104512.1176209-4-ardb@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 15, 2022 at 10:52:41AM +0100, Mark Rutland wrote: > On Wed, Jun 08, 2022 at 12:45:12PM +0200, Ard Biesheuvel wrote: > > Instead of defaulting to patching NOP opcodes at init time, and leaving > > it to the architectures to override this if this is not needed, switch > > to a model where doing nothing is the default. This is the common case > > by far, as only MIPS requires NOP patching at init time. On all other > > architectures, the correct encodings are emitted by the compiler and so > > no initial patching is needed. > > > > Signed-off-by: Ard Biesheuvel > > --- > > Documentation/staging/static-keys.rst | 3 --- > > arch/arc/kernel/jump_label.c | 13 ------------- > > arch/arm/kernel/jump_label.c | 6 ------ > > arch/arm64/kernel/jump_label.c | 11 ----------- > > arch/mips/include/asm/jump_label.h | 2 ++ > > arch/parisc/kernel/jump_label.c | 11 ----------- > > arch/riscv/kernel/jump_label.c | 12 ------------ > > arch/s390/kernel/jump_label.c | 5 ----- > > arch/x86/kernel/jump_label.c | 13 ------------- > > kernel/jump_label.c | 14 +++----------- > > 10 files changed, 5 insertions(+), 85 deletions(-) > > I have one minor comment below, but either way this is a nice cleanup (and I'm > always happy to see __weak functions disappear), so FWIW: (I've got a new found hatred for __weak after having had to fix so many objtool issues with it, so yeah, that). > > Acked-by: Mark Rutland With the thing Mark pointed out fixed: Acked-by: Peter Zijlstra (Intel) (although, I'll probably be the one to eventually apply these I suppose, unless they're needed in a different tree?)