Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp4293229rwb; Mon, 31 Jul 2023 04:57:48 -0700 (PDT) X-Google-Smtp-Source: APBJJlFRM8cyCbVkGxhAjUQpzfVBwB+H3VJlv8QpdPXmo6kWk1cUBdFHXA6BW/MHloIwag5rtNJP X-Received: by 2002:a05:6a00:16c8:b0:666:eaaf:a2af with SMTP id l8-20020a056a0016c800b00666eaafa2afmr10835915pfc.14.1690804668348; Mon, 31 Jul 2023 04:57:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690804668; cv=none; d=google.com; s=arc-20160816; b=BlqIyu/uNvd8esbEIsXAMLesv400c+oNDWPL3QWGbnGIq5pZ+yeT68Fcbbavq633TM xMD1nagNy12zG7fXzIj2gWTENqhbJgSY1ecTH+O1wYu4hntKfjManATf8XDCjyQLEEgl HGRNotBKA+TabZqUvE4uh+6XwDXV5TVeMoChQSmzRcovOtvxMpRaHWkdl/Ech4MAYZ8L LE0Nj9Cuz/SpIfj5pCSX9fIXCq0jgGx0phyUB3oCzPeF59KjgPBhZ5qe8dyJ26AY1EyY kTSiQ7hAfypqoMiNd24BFlq8QC3pzLu1X+VNiVY4PBnyJgDdVbAqVzAg2Mxm0nQec6FK ztFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=Feb3SbI628V0M+Xl6cXNHTwh1emqN1pCsroF1cMMhXw=; fh=Ca6MqPOYSayI4Sg4B/MZBPQOunlFSSul4YyzDiXd33k=; b=urIIGDP2QPBQnceD54uPL1B6r07OLrzn7xHDgedOxEkyp+C6wKqo9p+kr7YgqqObbI GZ2jH49tptSTZzx/urrQR//kMQH+13hyzp0OCThL/b4fddkSZnwQpWfCNE3/DuFbIWvi /XhJYtFxpsgiEQ5YThkAeV0soZ9582aiZo0KbnFcVcQZwGqomVM18caSUggHVsOY4YRh ddXUFjXfTfTL7m+43KBtAepPtdMKzzP6zrJjNy6tR26EsOpSKCfar5qfFijE16FqFikY rz2675beq9dtYVMnM0cMMeOLzsm6Upvr70IR2RFWDuHYfHCvluqzGyrxdjtmfxB8uC24 sD9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=AjbVgfk8; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x32-20020a056a0018a000b006665f0400a7si3803765pfh.197.2023.07.31.04.57.33; Mon, 31 Jul 2023 04:57:48 -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=@redhat.com header.s=mimecast20190719 header.b=AjbVgfk8; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230503AbjGaLTo (ORCPT + 99 others); Mon, 31 Jul 2023 07:19:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229996AbjGaLTl (ORCPT ); Mon, 31 Jul 2023 07:19:41 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 000FC1716 for ; Mon, 31 Jul 2023 04:18:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1690802317; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Feb3SbI628V0M+Xl6cXNHTwh1emqN1pCsroF1cMMhXw=; b=AjbVgfk88nxqiXWtU3Yo1k4F0QexJj9svemDbsh+ohx8+YLsqLLRgeSt38UZ3WpyPKDUO5 REUCC2Ad6ac2tkFEr2PG8Qh89GZzDnhZKnWgPsajy0TOhurskaOeLJpKF2uUoyOOWuMyO2 GbmiN609xfeRBAywrRtQ9KRbbFPcf2o= Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-653-qKUstCA-MJiWvovaEnKvSg-1; Mon, 31 Jul 2023 07:18:35 -0400 X-MC-Unique: qKUstCA-MJiWvovaEnKvSg-1 Received: by mail-qt1-f199.google.com with SMTP id d75a77b69052e-4054bb356a6so31966841cf.1 for ; Mon, 31 Jul 2023 04:18:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690802315; x=1691407115; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Feb3SbI628V0M+Xl6cXNHTwh1emqN1pCsroF1cMMhXw=; b=cPjmGj2ZLeYQ/ylUuQqwwGXvCkskb1SJ/abibxEVIkyZgSmZqKGWEu9h66bjF9Latq Hr8JGfblXm1P+S+Hw70IRDSqwRw9ofTQI2q6ZK2w+CoTRKs85MqyE0QCmnBSmXmds+In uoMh7KKDCfwGaOLtS8SGBLEgEZwVa0rRkazzI5glfnBB/6RVJIxspIhnskLOcuGlP7mT k3dKURHk+oTpSKlbkO7XefeSEoeWvwPlf4EJl9BnMaZ+99NQEjanKEAdloA0tUYh2l/h bQERdF4VN1GBRz+Lxt29k8ubKk02+B4+pDMb1BEyGXLCTNXpdN8TXzPDGKE+q902Or/y 1zeg== X-Gm-Message-State: ABy/qLbPkNcKXJFJie8KlUsiihlm47DDz53uPJddtT4D3yIOBB0t/LYo BiZl05WEnPiM6UkPJJD74LmfY/1LCD+xc+C+xYrDZaZfZfDOyJGo4ALjSMauBMugEV0iqkjRPnO eVtuFHutqGVndw5sJ+w8124Ih X-Received: by 2002:a05:622a:1806:b0:403:b23f:9e16 with SMTP id t6-20020a05622a180600b00403b23f9e16mr13377242qtc.2.1690802314902; Mon, 31 Jul 2023 04:18:34 -0700 (PDT) X-Received: by 2002:a05:622a:1806:b0:403:b23f:9e16 with SMTP id t6-20020a05622a180600b00403b23f9e16mr13377176qtc.2.1690802314653; Mon, 31 Jul 2023 04:18:34 -0700 (PDT) Received: from vschneid.remote.csb ([149.12.7.81]) by smtp.gmail.com with ESMTPSA id e21-20020ac85995000000b003fde3d63d22sm3385798qte.69.2023.07.31.04.18.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Jul 2023 04:18:33 -0700 (PDT) From: Valentin Schneider To: Josh Poimboeuf 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 In-Reply-To: <20230728160247.multb2csnpa22fgx@treble> References: <20230720163056.2564824-1-vschneid@redhat.com> <20230720163056.2564824-13-vschneid@redhat.com> <20230728160247.multb2csnpa22fgx@treble> Date: Mon, 31 Jul 2023 12:18:10 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 28/07/23 11:02, Josh Poimboeuf wrote: > 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. > I had missed this, thanks for the pointer. > -- > Josh