Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1360608iog; Thu, 16 Jun 2022 04:54:45 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vwWfz1d7KyNfG97t0kG32yAHBE+rHfPd5hIHUFHNnmLVnn0TSrXY/tu5W1ZZSkO7PU9tM2 X-Received: by 2002:a63:511e:0:b0:405:12c1:6e13 with SMTP id f30-20020a63511e000000b0040512c16e13mr4234300pgb.260.1655380485423; Thu, 16 Jun 2022 04:54:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655380485; cv=none; d=google.com; s=arc-20160816; b=pdFmCKZ+6JKyUYqTF211ZabGnVnX2pPBrWVC15+gahsNd8kS83K0xzmTsC4e62pLgE mkcsEThjrw/cLoFRH3eyXKK3tXWrgIrN5lfVG2JlmCIlrGKY8CSsoToiceh+Be8iH8Jv wkYT3XeROfeFzuIdpk9V0VLgXn/WvxVwUxD5A5bdYI1oXt7omZyjerY1GyLF6mESTalA M8hmILpUjLxOn7DysOolx4aPEvrPMwbm+ZG6u1kSegN9mFtw8GSPp+oIKmzs3AR++2yb 1hietnLNlBvSUyyJAYXVumrZtNd7CVoeMLe3xfjXzsmdmgIb0blRbfiMXUvevAk+98/4 lcTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=U3FN5bpqSy256lQafBo2eYvpRKsxzBhfPz30XX5ZLMw=; b=JSIBhvPpt+Rptloe3W/aQV7wFIGRROuQ4gY+KfvYx5q+O202mFavz+UV7gkK6zB13e /8yiupQk3WtPogaOamaVFchL965I6wgU1Lnf22AIIlK9XDlTYVnNY3F9AIPHR+j3+Gx6 UfzlOSDbIWqenwga8jjmYj2PeyMBTWPzjKHGL77K2oyEEJHxPJvtsYhrV8Ng2Lyw9zoz iFSX2lhBFs/1UPAdVhpenGVkQwa0aBI5gKYxTBqh8xgNFzD5gQWcK/3cqIq55XU9F/3A YNiGoh4LN6f6PuYRYL7SmDvT/1W9WI/x82xf7568CXsWuNb8BXJPnLVYepYLmPVkbwAh 3mhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ceqGBWqV; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r8-20020a170902be0800b0015cf4f37e4bsi2100252pls.610.2022.06.16.04.54.31; Thu, 16 Jun 2022 04:54:45 -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=@kernel.org header.s=k20201202 header.b=ceqGBWqV; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376805AbiFPLZU (ORCPT + 99 others); Thu, 16 Jun 2022 07:25:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376442AbiFPLZS (ORCPT ); Thu, 16 Jun 2022 07:25:18 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E849D5DE46; Thu, 16 Jun 2022 04:25:17 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 8F2CAB82360; Thu, 16 Jun 2022 11:25:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 30ACCC34114; Thu, 16 Jun 2022 11:25:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655378715; bh=iIk2YS5z65pjvpfKrUKwRuHJctWgL1FjnG556xx/xV0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=ceqGBWqVUrt6dyOkV2RGVN1XXwmlKVQ4sllwi+WyxWWVVQrAqpZygZBxXykX1FgEp K1wEVpFQHojUm0ufK7sjR3+x6BasaudcVJ6P9GCayrYVDoXLubotPG7kmuheZjQc1k cjid70BIz96LbbYL4dkeijs4bquJuVz7yZ19d9grrB+4WagEjr2xpiwTK5aamv4prw J7xEoyn8lJqdbQGCJAvfVHDFSsmUAehPBSm0h8E9Pxd/mr37jVmEAA5DUKAPmVweGy az2jFmPfO+Cj0JvGhU/9LPwnmcFuG2qoVv126pgUNfdSzR7xCV1ykrNq81PsX4n1si hTmdXSqwlUbjA== Received: by mail-ot1-f54.google.com with SMTP id y16-20020a9d5190000000b0060c1292a5b9so816256otg.3; Thu, 16 Jun 2022 04:25:15 -0700 (PDT) X-Gm-Message-State: AJIora+HNLWsZLLlTda+6E1yFV412SprlGhz1+81WZoszaGIOcoZ3h2A iEETB8jUsMYcgMKdgBdy2DHHgZmLPQk1WkPG2Ww= X-Received: by 2002:a9d:37a3:0:b0:60c:5427:1f56 with SMTP id x32-20020a9d37a3000000b0060c54271f56mr1824706otb.71.1655378714352; Thu, 16 Jun 2022 04:25:14 -0700 (PDT) MIME-Version: 1.0 References: <20220615154142.1574619-1-ardb@kernel.org> <20220615154142.1574619-4-ardb@kernel.org> In-Reply-To: <20220615154142.1574619-4-ardb@kernel.org> From: Ard Biesheuvel Date: Thu, 16 Jun 2022 13:25:02 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 3/3] jump_label: make initial NOP patching the special case To: Linux Kernel Mailing List Cc: Peter Zijlstra , Mark Rutland , Thomas Bogendoerfer , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , "open list:MIPS" , "open list:S390" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,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, 15 Jun 2022 at 17:41, 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 > Acked-by: Mark Rutland > Acked-by: Peter Zijlstra (Intel) > --- > 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, 7 insertions(+), 83 deletions(-) > This needs the following hunk as well, as spotted by the bot: --- a/include/linux/jump_label.h +++ b/include/linux/jump_label.h @@ -220,8 +220,6 @@ extern void jump_label_lock(void); extern void jump_label_unlock(void); extern void arch_jump_label_transform(struct jump_entry *entry, enum jump_label_type type); -extern void arch_jump_label_transform_static(struct jump_entry *entry, - enum jump_label_type type); extern bool arch_jump_label_transform_queue(struct jump_entry *entry, enum jump_label_type type); extern void arch_jump_label_transform_apply(void); Let me know if I need to resend for this.