Received: by 2002:a05:6520:2f93:b029:af:d4db:7a05 with SMTP id 19csp2366635lkf; Fri, 5 Feb 2021 11:15:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJx5RzAXjtxqgibYizgeCH4E/xnVXCugnWAg3UX8YhQK1n+zQ026ArXUFMKpb91pxZuxFrg8 X-Received: by 2002:a05:6402:d0a:: with SMTP id eb10mr5049930edb.249.1612552532393; Fri, 05 Feb 2021 11:15:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612552532; cv=none; d=google.com; s=arc-20160816; b=FFreUkfll3uN6LQz2cqZLtpaqgsD8AC8brZbtIYbEzfL+/IXePw37BsGlNoW6VX8c5 JAzZTBnqricbkfNVU3zFZDpoGxMAN0ST09ZQPQ4lpsPzyKugsZ2p6TkHbXeWbVX0KkNv gMTi43YXXhiVgZK3dHR1yoR2RI4u7i++E82Q44FostwjodPbz4ETUzod4li1nRCMWRWP TKHNV7BKIg/OTg3RYLuOEhQKLnE43IKfLVPU/CDwpXtcqwVtULXqfPhZV8B8GWOAhRBx MJdWHe9dKP5bO5llpxBAdELxp1IUBJNwpzzgahCoXNNyL/2025p7UAL5snjcYslw29Eo NpXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=62f3R+pAtKUtzhxvfaYpL5Vqa/UePjuMFbHPZveDXzY=; b=KcKbGmRfJTSyQ6L28QqzerLNI8XK5uI7o3YZE2ndbrwtBDxifVK8PtDSR+XayZX3nv O1Sgt6ddq0a26bolfhHEwsjRat4Wl/lvdm2ToLyr+hwHHaU/AmKyD7g8cpQJXWL2c1fc 728uOe+uC7Lb5AQLjsy81687icHKH0YeYJQce5BtENbz3P5LC8XApva3C/Q2skGrxY+5 87Qbh0yrPgCSXNKUCYPD3bbGOHHf2gy6Wx477lbbJY9aAfDdjku6m9JStpUczVqL4teT rwc6knQRPZS0EUT9dB4YcjTWn3NEJdLIlCCa5GWYKQoDNwKf6JC2UnJ90lrC5nvUMWc0 icrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="GkA3/HcZ"; 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 e9si6114845eds.558.2021.02.05.11.15.07; Fri, 05 Feb 2021 11:15:32 -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="GkA3/HcZ"; 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 S233454AbhBER3G (ORCPT + 99 others); Fri, 5 Feb 2021 12:29:06 -0500 Received: from mail.kernel.org ([198.145.29.99]:52398 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230196AbhBER0z (ORCPT ); Fri, 5 Feb 2021 12:26:55 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 022EA64E06; Fri, 5 Feb 2021 19:08:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1612552117; bh=724MQJqAQF7oc36R/fYyo3wNqiT4pC1sx82OvhBGFMs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=GkA3/HcZ/GmC3KoC5bXO08ehPJ9iRWkRvtKvpoEaMdC1xk2tJQESqq151U7YIGG5q Cbk6hZN/Y5MiXNjj+Q9leD51S74ow4CtFOY87Wnp1bZhqZWVHbNNlDAGv0UZR9Rgpq XprGCq/FXR19Td1GuWU23BgraFE/OIk6Bz/VDplG1EAaHNRmf+0zfK81WzXl/x85Fh t1BBaaFWGlbC2AsI2cXsdooe7A56ZTFo6C1hSXegKp8hsOCVHtDdAXwNWZkY1V46BL 2mO/dJpYTurfLLXEBwi8unvloVvk8Krb/UPbLhPJmu/xQx4Alp1gXcL/rSBJxDZVai xehma5ufAq+4Q== Date: Fri, 5 Feb 2021 12:08:34 -0700 From: Nathan Chancellor To: Andrew Morton Cc: Arnd Bergmann , linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Nick Desaulniers , kernel test robot , Fangrui Song Subject: Re: [PATCH v2] firmware_loader: Align .builtin_fw to 8 Message-ID: <20210205190834.GC461042@localhost> References: <20201203202737.7c4wrifqafszyd5y@google.com> <20201208054646.2913063-1-maskray@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201208054646.2913063-1-maskray@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 07, 2020 at 09:46:46PM -0800, Fangrui Song 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. 32-bit > architectures could use ALIGN(4) but that would add unnecessary > complexity, so just use ALIGN(8). > > 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 Acked-by: Nathan Chancellor Andrew, is there any way to get this picked up with the following tags for 5.11? Tested-by: Douglas Anderson Reviewed-by: Nick Desaulniers Tested-by: Nick Desaulniers If not, please let me know and I can try to shuffle this along to Linus next week. > > --- > Change in v2: > * Use output section alignment instead of inappropriate ALIGN_FUNCTION() > --- > include/asm-generic/vmlinux.lds.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h > index b2b3d81b1535..b97c628ad91f 100644 > --- a/include/asm-generic/vmlinux.lds.h > +++ b/include/asm-generic/vmlinux.lds.h > @@ -459,7 +459,7 @@ > } \ > \ > /* Built-in firmware blobs */ \ > - .builtin_fw : AT(ADDR(.builtin_fw) - LOAD_OFFSET) { \ > + .builtin_fw : AT(ADDR(.builtin_fw) - LOAD_OFFSET) ALIGN(8) { \ > __start_builtin_fw = .; \ > KEEP(*(.builtin_fw)) \ > __end_builtin_fw = .; \ > -- > 2.29.2.576.ga3fc446d84-goog >