Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp344879iog; Wed, 15 Jun 2022 03:31:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzv8l1sh+UZANDTi7Ap366zrQgDLnhwX8hiG4qfxtpuiIj9C14yBw93pXgabkMHDMfOYzU5 X-Received: by 2002:a05:6a00:1788:b0:51b:f462:b16 with SMTP id s8-20020a056a00178800b0051bf4620b16mr9368816pfg.42.1655289084269; Wed, 15 Jun 2022 03:31:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655289084; cv=none; d=google.com; s=arc-20160816; b=I+girKfLRcXjAc/jMb3uNmpKlcvCRvo+4ZxixOQm6NAjtmwd+s3oOjYPJmUk23AQ7f RBdFAF1Jvq9ZJAlMy+h1joLYRdh27O+20yYTg1EHeQdbXiaukyIPxPm4B5IoKgk7OYuJ QRAgjHrh9i8nBZGJ92HaT4B7OMpa/YzVv41XobMEHzlkMQ4hIGLMjT9NkxUtM3UW15fr f78o+80hX2eKhKG+INC8qluBFUSGRSvWhDc6NDT0HClSYmwUmqbGJXOMfFfXQqjvBbU7 FFQP9PYPsSh41BMoU+T0/mzpg/xAaM4KSzDnc/BTDov2oYbUY4otgNj9kTFy9HJCiV7p PS+Q== 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=nKT8PD2DjsLaT7ytA+/+qfCRLDc/nNEqc3+TOdJ6XSs=; b=vD7AJ+nZVm/RmWlCRMsPCjTN3sPlpEfZrLNtzUnqFWJ0sJkBJp6rH0PexY4slGY72t iO/6n3EHv6hBKXICVzQPrKohSbahCTvg8NzCa+fqqsFH1VQobz5E5v7uz31tCdqaoDlt PeLF1gc0X5XAuSdQVeIz8lMyYy12cSwILT314LeRaprNMo/EdUbs12XuxXiiRCekMyla WcOdoYra3LhUe9sntvlzfi/gUirK8jVEOnhO74p4BbDouiH6j2HrygvCWkBcZ85mlLfO zLqNmzD9Qhoy3L6nJ7v4LLKmSX1V0QXcA7WLE/0QUrG0+0VcW4EMq24UxOv2H2UqXoCi N2mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Y7wogYQb; 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 h5-20020a056a00000500b004fa3a8e0053si13269091pfk.266.2022.06.15.03.31.11; Wed, 15 Jun 2022 03:31:24 -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=Y7wogYQb; 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 S1347549AbiFOKV7 (ORCPT + 99 others); Wed, 15 Jun 2022 06:21:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242728AbiFOKVq (ORCPT ); Wed, 15 Jun 2022 06:21:46 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20EFA5130A; Wed, 15 Jun 2022 03:20:39 -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 sin.source.kernel.org (Postfix) with ESMTPS id 626BDCE1EAF; Wed, 15 Jun 2022 10:20:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A222FC3411C; Wed, 15 Jun 2022 10:20:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655288435; bh=ADWNwalPsj7wlzAK4STHI1I3vbvADJHLuzQJhszxX8c=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Y7wogYQbzqKyD6JEqXbaMxzp/l8MWvg+8x9iOIJ+wpI+Ktjxakhgy/0uDZVfe/73b Aq+okQgvH8mxgO8oRvY+kYStktMkS3/ksME5k6wZoo/WN5cgyUgeXEWDLIFRn4gMtZ vIQEymiSa90u/BGkczf9XwvnVz4N2tpkuHjTf7YEnaAufwbuXcH0ym6IaIwYvhF0b1 7ygSeQoPdgvK/1avI8sHeS8nRRAZ0pucud/TEcCijnRkUp8e5K+o8ypNiR2QsKkyz+ oSdFGBlTJMRVEtLSQSdbHiwCjJVt5UvyBKm8GBE2b25/2Qs3eNrg18F4/1fxaX8D6Y lnsfzZkCSi6bw== Received: by mail-ot1-f50.google.com with SMTP id s20-20020a056830439400b0060c3e43b548so8499707otv.7; Wed, 15 Jun 2022 03:20:35 -0700 (PDT) X-Gm-Message-State: AOAM5306pP1JuWW0En0s8WX5ZOa74779Pa/KGiSFZvHv1GTKr7GePTH+ dy6vQS+vm5aNs5eJUujddrZdv5vJJliFKv7s/5c= X-Received: by 2002:a9d:37a3:0:b0:60c:5427:1f56 with SMTP id x32-20020a9d37a3000000b0060c54271f56mr3970819otb.71.1655288434829; Wed, 15 Jun 2022 03:20:34 -0700 (PDT) MIME-Version: 1.0 References: <20220608104512.1176209-1-ardb@kernel.org> <20220608104512.1176209-4-ardb@kernel.org> In-Reply-To: From: Ard Biesheuvel Date: Wed, 15 Jun 2022 12:20:23 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 3/3] jump_label: make initial NOP patching the special case To: Peter Zijlstra Cc: Mark Rutland , Linux Kernel Mailing List , 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=-8.3 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 12:06, Peter Zijlstra wrote: > > 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?) Not really - this just came up when Jason was looking into how to enable jump labels extremely early on every single architecture, but fortunately, that issue got fixed in a different way. I'll respin and resend and leave it to you to apply them whenever convenient.