Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp686259pxu; Thu, 3 Dec 2020 10:04:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJxA+KTsQMM4uGvKTt25uXKdHinMexoMm+3JQO62zxHXs+hpoN6n6A39429EtDuyqF6h8Ib8 X-Received: by 2002:a17:906:31d2:: with SMTP id f18mr3566038ejf.407.1607018693512; Thu, 03 Dec 2020 10:04:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607018693; cv=none; d=google.com; s=arc-20160816; b=x/SRTUCYfkGMyasEetJ64m1Ge3xuXa7woY4vSoaXB4vJMGyWd9mRPoPRHlqUP6bwvq KWBYdy01eaAX2Dv5KpUM3NKoexh23Dc8akH3qPq+50d1t2JYfRakdGH0sAX+vgahJBl1 BtuoDC2IokDMiKZgDtdlEaUMPaKJJm/rCydBuwUxThs4yEoB8gNmGEfq6BWyHdJzlyq+ X74EXvgAYoSZDu9h2xOQYfJuurOzO7oDDoeTX8yp/ya5lcpfCy3xtVjTSgucTCp+AtiV 5XmakiOiDfjmAS4Gr8931MTjXyYsG8m7/eoi3ikEkLPe5ZC9o/w0wRQTBKBkjoBDcJPw SABQ== 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; bh=FABGuImVXsV+nr09JVj+zQ9EBUfuYv8QZ4jBa/qWBac=; b=nKBrBNmeJmw1IWJh1ARaZlOYZ6jdsZ73oH44f766Vi8bsgFZYia2hD43m13S+X1oW4 C4e3haiQpoolsIb/Fwm8TQfq90VeUOFCAKDgCKMMFt3kD0ERsFikObdoci5XgJHreXim k9xy9QZ7/c5i25+54kEbnhuvg1yhLH7mU+UcDBVQxIvefQBHJOrunvdOf+aupX7KvJil PlAdjw887My0ofW0YvaTUPqKbaAiaooOwqNfafpYHZYOEp4X2avsc8YL6pHJbOAqcbxz UJ0P/TSA+eR/tgSzVYYMJ4wib4Q266WkQanBq+5kP9SimO98YQCKZXyQfHB1A9Tam5gk OO2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bt+9JRnh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e16si1527149eja.462.2020.12.03.10.04.29; Thu, 03 Dec 2020 10:04:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bt+9JRnh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1731468AbgLCSB2 (ORCPT + 99 others); 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-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.