From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1764DC433E0 for ; Fri, 5 Feb 2021 08:23:03 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A50FA64FBA for ; Fri, 5 Feb 2021 08:23:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A50FA64FBA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=MpiScMlpM91RpwHePc5Tiek04IKQj4hikIDvAwU4TOQ=; b=Ex0RDEMQ5p9cz3KaY/ETcFMM+ 6VJ5GCPGTOqEO1cWJ4Y2MfzZ5sIrroNmw3/OX0BaKBm7hNQaYz4ijgHV+3G7vmY4SgpF6Sd96MWWg gxGp4pbX0fsZO6SjRIB8W53rApyRmqZT/W4ND8rp9IpcUDANP463OQmB3iPs2fmNexOE3BG51wqH6 1dvc2KEydIiEbr2SZbiIOnNLNycRF2WoiGpfbW/+SLVHsb5GzmhuxaOToQ+cboODDbWEHp/Lj6Qit ozSYSJwJckA2kdmeg6V7t2TL8y6SVQopMhCZT6sTiyxpYYzTCU/AoZBlj4ZD5qmTCNxLun/gBuxHc k761If5MQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l7wNG-0003ay-CW; Fri, 05 Feb 2021 08:21:54 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l7wND-0003a6-3j for linux-arm-kernel@lists.infradead.org; Fri, 05 Feb 2021 08:21:52 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 77C6F64FBE for ; Fri, 5 Feb 2021 08:21:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1612513309; bh=rsgRIu/tvrvOwTftz1wZ70xC7b3dwy15C7K3SpnV89w=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=AqRQWFJfjCFeb7FUX0HIPN9GbRdQmfHw83fulDIk4mk1AGLLOD44h9Dlw2Xo2qMre oWowLBMl0aBWcHM5PjiJjqSQv2ZuM7+q2Dn6ZMw7lWvCualSF301mkM49imkj/dTky Za/ct6SRDzEtW8qJmpIT/lTvrB6wWfnurEeQFh25BPcdIOxClUuy+XzHX1BMfsAkBi m23tVYyjD0k8sfoeTOoRQAFbqsXJ2aodkHZFvjm2VvHBdsNt0gfcyfg6nJ+vtT4nZz 7kiEQHfenwZC0kd8ncBqft4wLyEXcNW5xAmpsYe1ihvFdioUetAHZyd1YzOx6kAAXe VUxEM0p+e9nTw== Received: by mail-oi1-f175.google.com with SMTP id k204so5084884oih.3 for ; Fri, 05 Feb 2021 00:21:49 -0800 (PST) X-Gm-Message-State: AOAM5322SDOdJf+yldW3o22IFxJBZoBPhvlOGyE7fkpT0EsRM2Gh/8Lc U7SEOZnBC48MBiWtdmEyKpf2qx+of51nCS/k3XA= X-Google-Smtp-Source: ABdhPJxK6Fv9qVP05016l+93dXRzK5UMll6W3BnwPgBy7DfTlXtBf0AvHu3ba+EUMdxxXIgGixUjHkdO1+IU5lGSh6w= X-Received: by 2002:aca:b6c1:: with SMTP id g184mr2381863oif.47.1612513308661; Fri, 05 Feb 2021 00:21:48 -0800 (PST) MIME-Version: 1.0 References: <6c65bcef-d4e7-25fa-43cf-2c435bb61bb9@collabora.com> <20210204100601.GT1463@shell.armlinux.org.uk> <46373679-a149-8a3d-e914-780e4c6ff8be@collabora.com> <7c685184-8688-9319-075b-66133cb0b0c3@collabora.com> <20210204181216.GB2989696@localhost> <253b2987-c8e9-fcb6-c1b9-81e765c0cc2a@collabora.com> In-Reply-To: <253b2987-c8e9-fcb6-c1b9-81e765c0cc2a@collabora.com> From: Ard Biesheuvel Date: Fri, 5 Feb 2021 09:21:37 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: next/master bisection: baseline.login on rk3288-rock2-square To: Guillaume Tucker X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210205_032151_329806_B1B1749A X-CRM114-Status: GOOD ( 26.03 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "kernelci-results@groups.io" , Geert Uytterhoeven , Nicolas Pitre , Linus Walleij , Nick Desaulniers , Russell King - ARM Linux admin , Linux Kernel Mailing List , Nathan Chancellor , clang-built-linux , Linux ARM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, 4 Feb 2021 at 22:31, Guillaume Tucker wrote: > > On 04/02/2021 18:23, Nick Desaulniers wrote: > > On Thu, Feb 4, 2021 at 10:12 AM Nathan Chancellor wrote: > >> > >> On Thu, Feb 04, 2021 at 10:06:08AM -0800, 'Nick Desaulniers' via Clang Built Linux wrote: > >>> On Thu, Feb 4, 2021 at 8:02 AM Ard Biesheuvel wrote: > >>>> > >>>> On Thu, 4 Feb 2021 at 16:53, Guillaume Tucker > >>>> wrote: > >>>>> > >>>>> On 04/02/2021 15:42, Ard Biesheuvel wrote: > >>>>>> On Thu, 4 Feb 2021 at 12:32, Guillaume Tucker > >>>>>> wrote: > >>>>>>> > >>>>>>> Essentially: > >>>>>>> > >>>>>>> make -j18 ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- LLVM=1 CC="ccache clang" zImage > >>> > >>> This command should link with BFD (and assemble with GAS; it's only > >>> using clang as the compiler. > >> > >> I think you missed the 'LLVM=1' before CC="ccache clang". That should > >> use all of the LLVM utilities minus the integrated assembler while > >> wrapping clang with ccache. > > > > You're right, I missed `LLVM=1`. Adding `LD=ld.bfd` I think should > > permit fallback to BFD. > > That was close, except we're cross-compiling with GCC for arm. > So I've now built a plain next-20210203 (without Ard's fix) using > this command line: > > make LD=arm-linux-gnueabihf-ld.bfd -j18 ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- LLVM=1 CC="ccache clang" zImage > > I'm using a modified Docker image gtucker/kernelci-build-clang-11 > with the very latest LLVM 11 and gcc-8-arm-linux-gnueabihf > packages added to be able to use the GNU linker. BTW I guess we > should enable this kind of hybrid build setup on kernelci.org as > well. > > Full build log + kernel binaries can be found here: > > https://storage.staging.kernelci.org/gtucker/next-20210203-ard-fix/v5.10-rc4-24722-g58b6c0e507b7-gtucker_single-staging-41/arm/multi_v7_defconfig/clang-11/ > > And this booted fine, which confirms it's really down to how > ld.lld puts together the kernel image. Does it actually solve > the debate whether this is an issue to fix in the assembly code > or at link time? > > Full test job details for the record: > > https://lava.collabora.co.uk/scheduler/job/3176004 > So the issue appears to be in the way the linker generates the _kernel_bss_size symbol, which obviously has an impact, given that the queued fix takes it into account in the cache_clean operation. On GNU ld, I see 479: 00065e14 0 NOTYPE GLOBAL DEFAULT ABS _kernel_bss_size whereas n LLVM ld.lld, I see 433: c1c86e98 0 NOTYPE GLOBAL DEFAULT ABS _kernel_bss_size and adding this value may cause the cache clean to operate on unmapped addresses, or cause the addition to wrap and not perform a cache clean at all. AFAICT, this also breaks the appended DTB case in LLVM, so this needs a separate fix in any case. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel