Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp3701483rwe; Mon, 17 Apr 2023 02:06:10 -0700 (PDT) X-Google-Smtp-Source: AKy350aFHsMqfTrza2wRZlsjMZtdflmPGXDJ3SSfm+u67nqLSWM39HsYMRWbcDxwd7qtW/sVXfQ1 X-Received: by 2002:a05:6a20:3ca3:b0:ee:f5a4:c071 with SMTP id b35-20020a056a203ca300b000eef5a4c071mr3350300pzj.62.1681722369900; Mon, 17 Apr 2023 02:06:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681722369; cv=none; d=google.com; s=arc-20160816; b=VizywbFJg1AdbGmRYKGBiDoxkHZadsquEGzkkNDver0/AKZNlTMQVcMwg+SLV9ozuh Rsynp33+CErWPSGPtU/9FecKMq7uljlR0B10+y1EVn5aYaPHbkJw7Lse1NEFNzPaKPfy 4FlQSyv5KySp91NXvWtcBUJBPZh46xuUeYXpm7Zsu0uPGVh3VGRsPHsr642eJ186HLhM PTmEoCTr+oPEL9sHZo0LginMYAv5vT7NFwe20JY1eCGWM6KT14/ls+Gm5T20vmfSX9EK 0vPB70URQzA4XCb/cPQXXph+knvhXtqD/oz0TIgD26x3RVQbd7UjggJehT0FtlghwgKK a2tA== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=rWzkI3qQG/NuXcS/YM+xYmwtbGykjkEqCxWHFmCGjwE=; b=TEIx/MbxnNHxofxEEO6fbFwXcfQd5evqml3GXb9TizgItcTx/Ab2ukBm6SYZNi29Tb Ur0MPzz9uDRQ6WBnua+Z1eEbU+jX5dCsxNPhvW7WWuwIEMex6AXR0EZdioSE71h97rRq gj6PNvqmixviLkSuKFbDRXHV2YClTl6wNZtODyQIyNZesz/qQ7tO/BcpRvLok0TQLrfb M2w0k+kzkcxEUmRx2WFkce4dfMSBYNHZGrpGTLjB2fosI4qJfBu9kwC4SQMJda87gD6L bvt4LM7gpOa3bl4uOpZ/T2U2its+x1VscfwuG7hwK6voEIIS/rlO6IftUVPePPFTZYev EKyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=gf7h+Btd; 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=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i69-20020a638748000000b0051b6613dddesi8425602pge.281.2023.04.17.02.05.54; Mon, 17 Apr 2023 02:06:09 -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=@alien8.de header.s=dkim header.b=gf7h+Btd; 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=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230410AbjDQJE2 (ORCPT + 99 others); Mon, 17 Apr 2023 05:04:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229564AbjDQJEU (ORCPT ); Mon, 17 Apr 2023 05:04:20 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91E05170D for ; Mon, 17 Apr 2023 02:04:19 -0700 (PDT) Received: from zn.tnic (p5de8e687.dip0.t-ipconnect.de [93.232.230.135]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id BD03E1EC0338; Mon, 17 Apr 2023 11:04:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1681722257; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rWzkI3qQG/NuXcS/YM+xYmwtbGykjkEqCxWHFmCGjwE=; b=gf7h+BtdQuRjQ2+8BYQBbPYzPG1x5I7T84Mu0TiqtOtwME/3YeeXOWVSHVkU92oUfrjigD zbJ4jeK87GDVxL4U9w2PtKzKTBdyWcAnJ2Pb1nno1QbGCyrAwd8XpyCUTG3Er0gsNrWG5L cd1a+pfjzRajmqguQ5QXy9oZEa16GW8= Date: Mon, 17 Apr 2023 11:04:12 +0200 From: Borislav Petkov To: Linus Torvalds , Josh Poimboeuf , Peter Zijlstra Cc: x86-ml , lkml Subject: Re: [GIT PULL] x86/urgent for v6.3-rc7 Message-ID: <20230417090412.GAZD0LjH5ZIaGUdoHH@fat_crate.local> References: <20230416122913.GCZDvqGVe9TPa5LPRm@fat_crate.local> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 Sun, Apr 16, 2023 at 10:33:19AM -0700, Linus Torvalds wrote: > On Sun, Apr 16, 2023 at 5:29 AM Borislav Petkov wrote: > > > > - Drop __init annotation from two rtc functions which get called after > > boot is done, in order to prevent a crash > > .. ahh, and our automation to catch these things didn't find it, > because they are only accessed from x86_wallclock_init(), which is > also __init. > > So it all looked superficially good, except for the "oh, we saved them > into a data structure that _isn't_ init". > > It would require automation much smarter than the one we have to catch > that kind of thing. Looking at objdump -D arch/x86/kernel/x86_init.o output, all the info is there in order to check whether a function ptr from a .init section gets assigned to .data section structure. Question is whether this is worth to put into objtool. From all the objtool code I've seen flying by in recent years, we should pretty much have everything needed so it should relatively easy to do. But lemme add Josh and Peter... -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette