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=-17.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 0FC6DC433FE for ; Thu, 3 Dec 2020 18:01:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B480C207C8 for ; Thu, 3 Dec 2020 18:01:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387527AbgLCSB2 (ORCPT ); Thu, 3 Dec 2020 13:01:28 -0500 Received: from mail.kernel.org ([198.145.29.99]:48768 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725987AbgLCSB2 (ORCPT ); Thu, 3 Dec 2020 13:01:28 -0500 X-Gm-Message-State: AOAM5321f7DpYRc/3XljT4snBNXu4t92Z7Cy1NX1ZuuS6hMURgggg1BS q2eCvx4HnYdZH3LWN5wXFxgZ/avBPjK0X/AyUv4= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1607018447; bh=FABGuImVXsV+nr09JVj+zQ9EBUfuYv8QZ4jBa/qWBac=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=bt+9JRnhQoLVYlUpusbbJNU+Ng5xMD90OOXgJXqRmzPVaVUWlSo+PK5EIwXw7LlmJ JrQz8RNpPhriWaWZtESgVLrqIvAZ4A48bS8lYWf7oL+ym7QRzuLtGlfoCLi0rHHEhy 9g5P5balbrxwlRJY3S7h6RZIjrZdxyvD5LIs9DE3PU9m1sFKzRuveJlmz9UwBnWnm9 shff21k87Gv0K/qKvlOhxypWbeINmJZI/RO+9lvo7QjuHmVKrfx14LvGISOzznmfd1 kXPa/+iMg1TcdluFPcA8cVWDLWHflkf9/coRITc0QiIaA4zvPQIIZefBK239cmxJ5k nSKbGd2RGArvw== X-Google-Smtp-Source: ABdhPJww/O/H+p+GzCiMKDAw50e0c47HIgejwRdl9Wx7k1zFogrRwzl/MT69w0GZmNtYyrPjsCHPQjEM6YLRwx8fzP4= X-Received: by 2002:a05:6830:22d2:: with SMTP id q18mr276973otc.305.1607018446511; Thu, 03 Dec 2020 10:00:46 -0800 (PST) MIME-Version: 1.0 References: <20201203170529.1029105-1-maskray@google.com> In-Reply-To: <20201203170529.1029105-1-maskray@google.com> From: Arnd Bergmann Date: Thu, 3 Dec 2020 19:00:30 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] firmware_loader: Align .builtin_fw to 8 To: Fangrui Song Cc: Arnd Bergmann , linux-arch , "linux-kernel@vger.kernel.org" , clang-built-linux , Nathan Chancellor , Nick Desaulniers , kernel test robot Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 3, 2020 at 6:05 PM 'Fangrui Song' via Clang Built Linux wrote: > > arm64 references the start address of .builtin_fw (__start_builtin_fw) > with a pair of R_AARCH64_ADR_PREL_PG_HI21/R_AARCH64_LDST64_ABS_LO12_NC > relocations. The compiler is allowed to emit the > R_AARCH64_LDST64_ABS_LO12_NC relocation because struct builtin_fw in > include/linux/firmware.h is 8-byte aligned. > > The R_AARCH64_LDST64_ABS_LO12_NC relocation requires the address to be a > multiple of 8, which may not be the case if .builtin_fw is empty. > Unconditionally align .builtin_fw to fix the linker error. > > Fixes: 5658c76 ("firmware: allow firmware files to be built into kernel image") > Link: https://github.com/ClangBuiltLinux/linux/issues/1204 > Reported-by: kernel test robot > Signed-off-by: Fangrui Song Acked-by: Arnd Bergmann I found the same thing in randconfig testing, but you beat me to sending the fix.