Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp1464314rwb; Fri, 28 Jul 2023 09:44:08 -0700 (PDT) X-Google-Smtp-Source: APBJJlFv3CGVN2AwpGhzxrW6jqGnDS4Odrx+Q7XkfS+IeTJzVCiNzjTp3nzFsmdWNdp/ieu/bUw/ X-Received: by 2002:a05:6a21:66cb:b0:13b:77e6:4fad with SMTP id ze11-20020a056a2166cb00b0013b77e64fadmr1881077pzb.59.1690562648356; Fri, 28 Jul 2023 09:44:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690562648; cv=none; d=google.com; s=arc-20160816; b=mBrCBc/ZGcaCG0KoqOOpdS4q8uLbyhoDiN/mf2TICkI1I0GQ6oP/7rTVqarr9Afe0m 0vvGeyuXWp2w8b9XNjittfQ3NRte9q23v+YcemAN5VjoliayZ//w4baSXM4ocd3sYR7P NErR/TSY7IofxBZpdAxuoplrpOH00armuAzijtWAP8cDCafJr5Os/PppJ3syIdAXD6nN ox0zU4WtM5QcjSQmWYjYizaEKVfEXT9e76X0eeCU5FCXNR8EnyIzB97XLwsrCJoSmaE3 ARChZ1OBszMNKU+q+rkx2NuCPBrslLLs0ZmIH6oE5r+xrFRCyib3vY28E7aE1eg1qMxD zovQ== 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=159Dty1hYL8oTIor9q/do4QgsrGD5rOacyW4EAPbdRA=; fh=UXeNxjAL33o8P1EhfLQkKOrZdmSFTOsfAlOnrRmNUdw=; b=KEq5Is7dezaeqvFamkogR1aTszrjyKLXeDOXKPGCJO6oeJgCqH0hQKV3dqVIajskj5 xpEzN/gitNmV47cQB/ywpIElNKCVWYeDnyn0UAsb+7VAKV4mIMlBFXmAatB8y6ojWI0G NvcD+CP9DIodNVu0jv2J7ljGsiHqcqYXo5cWCr/AerwF0C4ojbEWQxa8DLQMyOgCZvZh yT+KrD2CBprXGW9d26uJZW/QCSfbCCJON1HPLiwyuS5bH6oAxrJ53HVrAPApOzfYqKxi vGQB18TmgvfGdImsIR5zenb0Hxn09NW9r13THs0I3qQBzs0tlauUIM7K3aQDWLn7YPWQ GwuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jvO9hazS; 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 g9-20020a655809000000b0055c14b74a40si3310813pgr.229.2023.07.28.09.43.55; Fri, 28 Jul 2023 09:44:08 -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=jvO9hazS; 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 S234404AbjG1QDd (ORCPT + 99 others); Fri, 28 Jul 2023 12:03:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49156 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236783AbjG1QC5 (ORCPT ); Fri, 28 Jul 2023 12:02:57 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF32F2109; Fri, 28 Jul 2023 09:02:56 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4BC6162199; Fri, 28 Jul 2023 16:02:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CE414C433C7; Fri, 28 Jul 2023 16:02:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690560175; bh=5+J+83TIFs9lZ6wTmxsZgXtKL3q38n2yCo3y8qTZ7N8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jvO9hazSNAGUk8tEio79eCKsYssfSy0geDTTQuH3rVlrLBw9BRzr2W8FKEp1g6GE7 xyyV6wG+/gEhhnojSaYN0xZGYJ7TNz41xrH/5namT+MasnVI6q+netdOigN1p2F8Xs UiajqzXuIHzaW/VQWNXZVjdeHLaWRINZKoWv20D+yd69SZLrcXxn7/VhnVnC6azcV0 uakFy04j7DDn+wgdzr/6qhCxnzBm56Z8AETjHGHt12OebNyGVCIjmiqGlIPoZKq+mE Ysaqt3HMjsRuQ585YU8rA70URXv7n98gIUhFEAPZW6v4toNlPHr90hL3YQ7Jn0OGn5 bbUw1+uTfxHCg== Date: Fri, 28 Jul 2023 11:02:47 -0500 From: Josh Poimboeuf To: Valentin Schneider Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-doc@vger.kernel.org, kvm@vger.kernel.org, linux-mm@kvack.org, bpf@vger.kernel.org, x86@kernel.org, rcu@vger.kernel.org, linux-kselftest@vger.kernel.org, Josh Poimboeuf , Steven Rostedt , Masami Hiramatsu , Jonathan Corbet , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Paolo Bonzini , Wanpeng Li , Vitaly Kuznetsov , Andy Lutomirski , Peter Zijlstra , Frederic Weisbecker , "Paul E. McKenney" , Neeraj Upadhyay , Joel Fernandes , Josh Triplett , Boqun Feng , Mathieu Desnoyers , Lai Jiangshan , Zqiang , Andrew Morton , Uladzislau Rezki , Christoph Hellwig , Lorenzo Stoakes , Jason Baron , Kees Cook , Sami Tolvanen , Ard Biesheuvel , Nicholas Piggin , Juerg Haefliger , Nicolas Saenz Julienne , "Kirill A. Shutemov" , Nadav Amit , Dan Carpenter , Chuang Wang , Yang Jihong , Petr Mladek , "Jason A. Donenfeld" , Song Liu , Julian Pidancet , Tom Lendacky , Dionna Glaze , Thomas =?utf-8?Q?Wei=C3=9Fschuh?= , Juri Lelli , Daniel Bristot de Oliveira , Marcelo Tosatti , Yair Podemsky Subject: Re: [RFC PATCH v2 12/20] objtool: Warn about non __ro_after_init static key usage in .noinstr Message-ID: <20230728160247.multb2csnpa22fgx@treble> References: <20230720163056.2564824-1-vschneid@redhat.com> <20230720163056.2564824-13-vschneid@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20230720163056.2564824-13-vschneid@redhat.com> X-Spam-Status: No, score=-7.1 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 Thu, Jul 20, 2023 at 05:30:48PM +0100, Valentin Schneider wrote: > Later commits will depend on having no runtime-mutable text in early entry > code. (ab)use the .noinstr section as a marker of early entry code and warn > about static keys used in it that can be flipped at runtime. Similar to my comment on patch 13, this could also use a short justification for adding the feature, i.e. why runtime-mutable text isn't going to be allowed in .noinstr. Also, please add a short description of the warning (and why it exists) to tools/objtool/Documentation/objtool.txt. -- Josh