Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1675699pxb; Fri, 1 Apr 2022 22:33:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxup+hGP93ChH/ucNfAFDucLeGv0NfKQf9DOL9t/6jeFqHnq9ika+1x6Zug4aMb84p7n23l X-Received: by 2002:a17:906:6841:b0:6cf:9c02:8965 with SMTP id a1-20020a170906684100b006cf9c028965mr2609115ejs.440.1648877585526; Fri, 01 Apr 2022 22:33:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648877585; cv=none; d=google.com; s=arc-20160816; b=Tfwta4vUu01pQrLk3Ia5lJVH74vdy5WiPc1CKAFf/htoxlgxmNAQcCWFNFUqxXFvwg DCvVFvLqsCdYz0O1fwwhfhxRYPqZCXn2nyAocvPmIhTbfGt/zhYo6fHK4y7yUtX7MpVU 2swuRCm1KRXsdeYKG0+E0u4uEhxDRTXNkfQgqYLaic5iqbimreBX95MO9yBhMMUkCAbj X12ehv2/v3uQx9WE4fZyeLVKf9SsUeo9db8l1kWIOO3Xa51paNl2CWOJwz+Q0EItF8lc K6X+TZ6LMObg2OhuecFu9PUW3p6PEDzu1biQia7aJZ4+WaeP4Djkg68pTDhu3Qf/0C/t x6gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature:dkim-filter; bh=/kI3lQPTgEygcI7vmBN005HvGRQcbjUBTIDFX8fCsok=; b=wyYfRNRYysgySl8rU4+M4wu9pHhvi5roKMP64H2lg6fEZOHQUeF15TN29jCZ6634UF wNKHfvXmm7Nm8czsLt7s+pKTnVZmZSl3cCU8AVsHNp1Yq3xI2racKtJKpy3xSdvxjJE3 a0xm9pKWd/w/b014OG1t7+3WlSUb1ciXvV6lMDK5SQCzbYBISCaFSdQ1FiJR7SAicJ7C cEu10nnp4RJYcE8pdJrlHthS4+/zGGFMDV+VdpK552xevJSU8zFvL6YbkcJqR2khbGX0 nP7lS8S0PAkpz/v7IFld2hMKoCowc7tQfxr5jjhZCVduI5vfHxea+JMh0F8Jxel02kod Cz0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=vlVvQCkO; 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 z4-20020a170906074400b006e1015120f2si2758429ejb.621.2022.04.01.22.32.39; Fri, 01 Apr 2022 22:33:05 -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=@nifty.com header.s=dec2015msa header.b=vlVvQCkO; 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 S1346229AbiDANNb (ORCPT + 99 others); Fri, 1 Apr 2022 09:13:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346351AbiDANNS (ORCPT ); Fri, 1 Apr 2022 09:13:18 -0400 Received: from conssluserg-04.nifty.com (conssluserg-04.nifty.com [210.131.2.83]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15C261D66DE for ; Fri, 1 Apr 2022 06:11:27 -0700 (PDT) Received: from mail-pj1-f42.google.com (mail-pj1-f42.google.com [209.85.216.42]) (authenticated) by conssluserg-04.nifty.com with ESMTP id 231DB4ub028016 for ; Fri, 1 Apr 2022 22:11:05 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-04.nifty.com 231DB4ub028016 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1648818665; bh=/kI3lQPTgEygcI7vmBN005HvGRQcbjUBTIDFX8fCsok=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=vlVvQCkO5HP+kKJ2zs9SP8MYR167xK8MnHYtRrF8iD825i5ZfWXP5RezshrudtHAV ekNu4WL0lCFYRrEgYQEJeIxhAcgstnWdT9D9JoO1wOrJuNKjkOsfXvX3+ERh+ReWR5 HQ6BMJ7JIXAWqsB8Yykil5Ju8sWVTrjS5e0MguhbWdw1vpXoHDwmu1P+gdVoBe5E5s 0KGsc1Of/ErmaSOaQXa9+bic1VtjolCwhJx7rPrHAI4Pk7TUadqCdN87UPnCV04gVq p7QtxVnt43izdvv7CyDDopnwkCa2mkAlsq7wwOzgO+BjeLvZ0oQUmZtjdBYXoDiCm6 Lms+rHpPPX9YA== X-Nifty-SrcIP: [209.85.216.42] Received: by mail-pj1-f42.google.com with SMTP id y16so2368717pju.4 for ; Fri, 01 Apr 2022 06:11:04 -0700 (PDT) X-Gm-Message-State: AOAM532TAH5Pgr0P/SI+uQ9jDItEExr0x0Rqd2JFBl1NvGlwJgLkNIZS XC029v9Q46hiuuGM6dta0E0QmbIK5uDxZmyD+Ug= X-Received: by 2002:a17:902:9887:b0:151:6e1c:7082 with SMTP id s7-20020a170902988700b001516e1c7082mr10211008plp.162.1648818664197; Fri, 01 Apr 2022 06:11:04 -0700 (PDT) MIME-Version: 1.0 References: <20220322173547.677760-1-nathan@kernel.org> In-Reply-To: From: Masahiro Yamada Date: Fri, 1 Apr 2022 22:10:17 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] um: Fix filtering '-mno-global-merge' To: Nathan Chancellor Cc: Richard Weinberger , Anton Ivanov , Johannes Berg , Nick Desaulniers , David Gow , linux-um@lists.infradead.org, Linux Kernel Mailing List , llvm@lists.linux.dev Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_SOFTFAIL, T_SCC_BODY_TEXT_LINE autolearn=no 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, Mar 27, 2022 at 5:00 AM Nathan Chancellor wrote: > > On Sat, Mar 26, 2022 at 12:29:55PM +0900, Masahiro Yamada wrote: > > On Wed, Mar 23, 2022 at 2:39 AM Nathan Chancellor wrote: > > > > > > When booting a clang compiled UML kernel, the kernel panics when trying > > > to run init: > > > > > > wait_stub_done : failed to wait for SIGTRAP, pid = 651294, n = 651294, errno = 0, status = 0xb7f > > > Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b > > > > > > After the commit in Fixes, many flags from KBUILD_CFLAGS do not appear > > > in USER_CFLAGS, likely due to USER_CFLAGS initially being a recursive > > > variable ("VAR =") then being switched to a simple ("VAR :=") variable. > > > For example, diffing arch/x86/um/.ptrace_user.o.cmd shows flags such as > > > '-Os' and '-fno-delete-null-pointer-checks' getting dropped, which both > > > impact code generation. > > > > > > Rework the filtering to use filter-out instead of patsubst, which allows > > > all the patterns that USER_CFLAGS cares about to be excluded in one > > > command and ensures all flags from KBUILD_CFLAGS are transferred over to > > > USER_CFLAGS properly, which resolves the boot issue noted above. > > > > > > Fixes: 6580c5c18fb3 ("um: clang: Strip out -mno-global-merge from USER_CFLAGS") > > > Signed-off-by: Nathan Chancellor > > > > > > > > Can we remove -mno-global-merge entirely? > > > > > > 61163efae02040f66a95 was a very old commit, > > without enough explanation. > > > > Shall we remove -mno-global-merge, and do compile-tests. > > If we are hit by problems for arm/arm64, we can re-add it. > > Yes, I think that was the conversation that we had on the commit that > this fixes: > > https://lore.kernel.org/r/YiD7R2wRxoWxtVq7@dev-arch.thelio-3990X/ > > I can test that on my Raspberry Pi 3 and 4 on Monday, although I would > like for this patch to be picked up in the meantime so that it is > possible to test UML on -next with clang. We can remove > -mno-global-merge in a follow up change, if you do not have any > objections? > > Cheers, > Nathano This patch is unneeded now because I picked up the alternative: https://lore.kernel.org/all/CAK7LNAS6C6Uj9cCQ0o=bYF1F-EVD=VgdR8YYx-1PJc9toX_HZA@mail.gmail.com/ -- Best Regards Masahiro Yamada