Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2724859rwd; Mon, 22 May 2023 03:28:39 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5ZyEgADfdSLHM5Ysd889NTkPHu5RB7BtbghnDqiR4ZmAIPgN1adTQbkQ/W6BuRnkUHKKNA X-Received: by 2002:a17:902:e847:b0:1af:bfb0:e80b with SMTP id t7-20020a170902e84700b001afbfb0e80bmr631815plg.31.1684751319264; Mon, 22 May 2023 03:28:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684751319; cv=none; d=google.com; s=arc-20160816; b=R1Ph1cCCgo0Qcr2yc7dTBOj7YjO7mw9JwUKW0uSM4i6s7hg1sbY6kE0EWeq6TM4U+i oz3BdBovDyh/iPHU8ArgoIvBMwAZChdYmnf7HtczujGA+KJuc2MaamolMeZUBGz58pJS cxNhGQ3RNiE47DAVcf8PlV4wkGG7NrAJx7YIXJsSTI95TgralIIYnuS9h5EOcmF02vkr Yp3x23CZuZWV1g5LB03y+iUc4pfXnwq9RfgQ9t0YyAsHZpTGZ2rxHoQz7SGIZbbiiDQ7 6TbO49eADJ/Sd254yP1dqdL7ZR2QC/gewZLF4vxVJPvNr/YowVFzWk6VzxYIh5Q87q/0 /FMQ== 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:in-reply-to :references:subject:cc:to:from:dkim-signature; bh=U9B3ebaZGf4WrmfgLRire6S9qvtfSHy2ykiMgEWjdVw=; b=FDlWSueQeeSgYZLsE7M3QXBiQptVq1omO+tPwfUlZCBnsJHNCAr8iSIim1Vtot5ydp iGrd5S0OuVM8wh2c3LhzAyWATXsYlFekn/Y5ycaKHFyrZHXZ4gcUHjLYh9vhrFimBrmN wg51prv61IwUdkcBUIDD0LwC0vlMkwlA5L0NZ9GwkR/59XSKvveRc1N3r3BPT5uh31Ki wiBa97wtBo5wnucroVAajlOWSnSdDE9imw9jU7qg+RoMZgDnXuycjbXnV+b8d0UCQF/m H89XqhnMcvWZgRTZF+ATGFSLkeYHZDDMs4qESk1kux23WY//KJ/S0HL7a5nCUzAsJhKp BCyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=BSK1xoZm; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j7-20020a170902758700b001a6527f6adbsi4225929pll.137.2023.05.22.03.28.26; Mon, 22 May 2023 03:28:39 -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=@collabora.com header.s=mail header.b=BSK1xoZm; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231678AbjEVKJv (ORCPT + 99 others); Mon, 22 May 2023 06:09:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232348AbjEVKJk (ORCPT ); Mon, 22 May 2023 06:09:40 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0ECB9BA for ; Mon, 22 May 2023 03:09:39 -0700 (PDT) Received: from localhost (unknown [IPv6:2a0c:5a83:9203:ad00:c068:e703:1301:7049]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: rcn) by madras.collabora.co.uk (Postfix) with ESMTPSA id 96EB36605706; Mon, 22 May 2023 11:09:37 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1684750177; bh=6rimz3xbCtOIAsgtzqTRf5vqJmiKmuivxmZtfJtFqCI=; h=From:To:Cc:Subject:References:In-reply-to:Date:From; b=BSK1xoZm/IlfL0P2CI3I3YbJsUU8lZSAIrGKGgUQiJ7odBhMH22zguUC+xNsHcdVO 2LCJXoaTEATkpK/ZlNsSisuMThoQdIRp75V85qbkBbXcH5EpULVkY0z6L5vfP4q3rZ LOGRmm+cAQUZFNyeaFkKHi1ANHYn7dF7tscSTYc1hMFgYCwUadXkmfkbrsKMkQdDhU MQrjFsEKl60dR9U0IGPkc4HCUtRhMtSwp4rs7R676LQc7nY2ZahVmAdNmfR/xBuuW8 rIowwyVVqaBa4c/ha/RZaffma63e7jl6O1PTm0uj4o3Yp7Z6Mx4iXmOWrwqyZAsUIS RLihHMT+ezdOg== From: Ricardo =?utf-8?Q?Ca=C3=B1uelo?= To: Nick Desaulniers Cc: Shreeya Patel , Michal Marek , Masahiro Yamada , Linux Kernel Mailing List , clang-built-linux , Bill Wendling , Nathan Chancellor , regressions@lists.linux.dev, "gustavo.padovan\@collabora.com" , Guillaume Charles Tucker , denys.f@collabora.com, kernelci@lists.linux.dev, Greg KH Subject: Re: [PATCH v4] Makefile.compiler: replace cc-ifversion with compiler-specific macros References: <20220919170828.3718437-1-ndesaulniers@google.com> <597ef55f-e7c1-ab60-b4aa-0071ff4b5e0e@collabora.com> <89961dfc-d40f-78e4-5d34-b86b7d152182@collabora.com> <17c91d37-7d9c-0df4-2438-2b30ca0b5777@collabora.com> <878rdlk9bi.fsf@rcn-XPS-13-9305.i-did-not-set--mail-host-address--so-tickle-me> <875y8ok9b5.fsf@rcn-XPS-13-9305.i-did-not-set--mail-host-address--so-tickle-me> In-reply-to: Date: Mon, 22 May 2023 12:09:34 +0200 Message-ID: <87353ok78h.fsf@rcn-XPS-13-9305.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 Content-Type: text/plain 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 vie, may 19 2023 at 08:57:24, Nick Desaulniers wrote: > It could be; if the link order was changed, it's possible that this > target may be hitting something along the lines of: > https://isocpp.org/wiki/faq/ctors#static-init-order i.e. the "static > initialization order fiasco" > > I'm struggling to think of how this appears in C codebases, but I > swear years ago I had a discussion with GKH (maybe?) about this. I > think I was playing with converting Kbuild to use Ninja rather than > Make; the resulting kernel image wouldn't boot because I had modified > the order the object files were linked in. If you were to randomly > shuffle the object files in the kernel, I recall some hazard that may > prevent boot. I thought that was specifically a C++ problem? But then again, the kernel docs explicitly say that the ordering of obj-y goals in kbuild is significant in some instances [1]: --- 3.2 Built-in object goals - obj-y [...] Link order is significant, because certain functions (module_init() / __initcall) will be called during boot in the order they appear. So keep in mind that changing the link order may e.g. change the order in which your SCSI controllers are detected, and thus your disks are renumbered. We'll dig deeper into this. Thanks for your insight. Cheers, Ricardo [1]: https://www.kernel.org/doc/Documentation/kbuild/makefiles.txt