Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp547675rwr; Wed, 19 Apr 2023 09:45:58 -0700 (PDT) X-Google-Smtp-Source: AKy350apwnd+QDRR9k60aWz2MVmfGsJRxWYwZZznLwsl6fkNGhc+z4z40Q6A4jo+B3AO762bSLcM X-Received: by 2002:a17:902:f54a:b0:1a6:523c:8589 with SMTP id h10-20020a170902f54a00b001a6523c8589mr6857041plf.5.1681922758095; Wed, 19 Apr 2023 09:45:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681922758; cv=none; d=google.com; s=arc-20160816; b=wRbs86wWwx/CMbOFttiDdhgNG6HYCUDq+mOVsiYoyg4cCxv5ENsUJJpDWEIG6+27bO fI5bc+5CFt0+s956obx3Sro320wrnkE38Ic/5QTauOo5PeLhHc2zmPfzvQwI0MbvRE6i If0Bn07mhWFLzXVOF90U3jTtnOhKm1dqXJ6MwCtbhlztpxgTb4Xh8mpxawyUQ+HJ+ZpQ /usLWcIz1x/69BG2iGegqcWwmsnggdbO7zqK6/LJzFhJdmPd4ai/DhP9Gr/iNffM02ev KzCNNnOSWOJORIDZmITtZi5pALKnJZo7pSaM2rdCUFO4+KEB7YmRlpvX9XOdO+8YzFSy 6FAw== 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=e/BokGbH2JFpfmtM70ZphaFR/ainEhqX1v9DJo1Qoj8=; b=zs8lAZZp6URW/htxbIO1RvrQGf9To4zKnSkFrRk7S7Nz2oq5yJqUYLWT9NLZ54lhrD /Je5no3nNbt/GvSRfW3Ffoi2/1iGO3kwHj0Tn60lFTkJK/YHpFEDe2duPjHR2Yyz9pAj cs+o6eLGZNxiQDhL+ozm4e7gXU/cmXT4/YUFqQMqVyAfy1hquqZlI1wNlLuklcJjHLj9 74M01Y3xSIUVbNcFDOrvMfBocU1LWl1GEr1jRo3dutUkPEf3FEOIl2N3gnM5uRVGxO8W kE98R8xFc22Tr0KWUycy5nsq32nPoaWSoh8JXUpIH30MmOivcA8xa60V/RouZzORd760 3sbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rDK0T5Lk; 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 c7-20020a170903234700b001893c960ac9si18168645plh.533.2023.04.19.09.45.44; Wed, 19 Apr 2023 09:45:58 -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=rDK0T5Lk; 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 S232004AbjDSQo5 (ORCPT + 99 others); Wed, 19 Apr 2023 12:44:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230522AbjDSQoz (ORCPT ); Wed, 19 Apr 2023 12:44:55 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53D87BB for ; Wed, 19 Apr 2023 09:44:54 -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 dfw.source.kernel.org (Postfix) with ESMTPS id D9825640DF for ; Wed, 19 Apr 2023 16:44:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 00256C433D2; Wed, 19 Apr 2023 16:44:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681922693; bh=H0AAYLCGw3D1xIThJOvHWSbllE3+q0cBwJKUNOtqOik=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rDK0T5Lk6twf+NjxuUroLIFf7NYvgHHpF1XMSq3Kga5ZoppzAe0sqQPTo5leiW8uT DFCrPR4BkzGFBg2DzBEkVRQh8ORkBe6yIBCMA1poR8nziYthdHpTjJ8h+7HSLfvtkb T1SXJOy4VRJOIw7XJ9rotkB/+Vi7DQDCtEPCkaRfvFwz/OtzBoPwVVSjuU1/Qv4Eb+ wFXdOHxu3BWHEsB2vIRSB6O8b2p7Wmp5KirOO3Oz/4/543UDNWGhPNR0xwYto5Kw5E MM/KYzazCH9EO54GKstI44WaxoK9RrwDUBOHiEH/w8pz9I4KofQcN+6+rYpPlnJWmv yo7XeS+4HmUBA== Date: Wed, 19 Apr 2023 09:44:51 -0700 From: Josh Poimboeuf To: Juergen Gross Cc: Borislav Petkov , Linus Torvalds , Peter Zijlstra , x86-ml , lkml Subject: Re: [GIT PULL] x86/urgent for v6.3-rc7 Message-ID: <20230419164451.2vtnawrvbhajrb2g@treble> References: <20230416122913.GCZDvqGVe9TPa5LPRm@fat_crate.local> <20230417090412.GAZD0LjH5ZIaGUdoHH@fat_crate.local> <20230418012435.fhjxd6moaz6tmnep@treble> <20230419155900.GCZEAPxNiOUP31q+/H@fat_crate.local> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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, Apr 19, 2023 at 06:03:53PM +0200, Juergen Gross wrote: > > However, the only call site is in apic_intr_mode_init() which itself is > > __init. So yeah, strictly speaking nothing wrong. > > > > *IF* something calls it later, when __init is gone, then boom. > > > > Dunno, maybe > > > > a) track call sites too but maybe expensive and too much That would indeed be a lot harder to do. > > or > > > > b) make those warnings debug messages in case someone wants to run objtool > > in debug mode, feels really bored and wants to fix potential issues. Possibly, though I suspect nobody's ever going to be that bored ;-) > > Or someone has a better idea. > > > > > Anyway, this is kind of experimental. If any of these warnings don't > > > turn out to be useful I could drop some or all them. > > > > Right, I can certainly see potential and as said, since we're already > > doing objtool massaging of object files, thought this should be pretty > > easy to do. As you've shown. ;-) > > What about splitting the function vectors into __init and non-init parts? > > This would solve above problem automatically, as a non-init function couldn't > deref the __init part of x86_platform. Right, if we moved the __init parts of x86_platform out into a separate struct x86_platform_init which is __initdata, that would solve this particular issue rather cleanly. Though, more generally, if we make the rule that non-init data can't contain references to init data, that would be a much bigger patch set. Which might end up being the reasonable thing to do, but before deciding whether enforcing such a rule would be worth it, we might want to look more deeply at the warnings to figure out what percentage of those (if any) could be real bugs. -- Josh