From patchwork Thu Feb 3 11:30:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sungbo Eo X-Patchwork-Id: 1587964 X-Patchwork-Delegate: mans0n@gorani.run Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=zegk9y5E; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gorani.run header.i=@gorani.run header.a=rsa-sha256 header.s=MBO0001 header.b=oRHHp+hR; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JqGpN74TTz9s8s for ; Thu, 3 Feb 2022 22:36:28 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=f3TNF5iO6Vi3dfOXQ44e4pAJnwdlXTsahR1I+kL5Wxk=; b=zegk9y5Eb1dYa1 /je7RtoVBn8JG4JVASiFYCdaBVt8+WaT3fuagPZGj81FW0r5R5V8CPbw2lEluNu8HoWRU+NHAX3XN rKY4ktGyiaUkOIexMJF6o8fxHXJBYVHhgxNf6SrEQzELy3vxbSCB9RSp8s1jwiwDfsYlBd3Bj3cVw aIXxSYRPd/7Ir0Oa174B+z9eN99HXPSkfeQFXxvH+sYLIh7ah4uFZAzm7N3M7ShuoFcmi6XvTgYKy 8fQmM5M3RNwJMoccu0uO1HtxbQa+u4SKDpQSpDAr/k+n7YH9KpycJLBtWtJn78JSKo8uIw+VzpL+t ObX5a0/qxqvR4p/gNVpQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nFaKk-000zKw-0B; Thu, 03 Feb 2022 11:31:26 +0000 Received: from mout-p-201.mailbox.org ([2001:67c:2050::465:201]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nFaKf-000zHQ-Kh for openwrt-devel@lists.openwrt.org; Thu, 03 Feb 2022 11:31:23 +0000 Received: from smtp102.mailbox.org (smtp102.mailbox.org [80.241.60.233]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4JqGhG0qDMz9smr; Thu, 3 Feb 2022 12:31:10 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gorani.run; s=MBO0001; t=1643887867; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=3D+3JXkOEGMCfZcUt8iDg227QGnBHS8S9rjFG42N/7c=; b=oRHHp+hRL6jyraemSTJPQw8E9KgM4dWUoMVmx0AwfykrHqadmgOjYMPiU5uKHoj9u6mRmS /uVTchjfvNHwsBPPNsQrUUVStcADMYheAP7585VjOXWRoudxyYyTr6D0a/X/dB0AMuDTkT 2/M2lTOffPnpjVteZykdXP+aMb7PeIZg5ul4hhU9GwGTS+kADc22GtBqoUKg1/sV8m6ZZW BKUJdNvY8ThdHUAbF2xKHTDSlqvnsV08eZ4/ObFSVBt9xY+YGwwRfaMlAS0jl9xUjQ/RLA VgfmgIOH9T/lcbP9fDMcIVNDvPmfn3s8rqaReLwwcucJRMbeZlgw56JRCtoGcg== From: Sungbo Eo To: openwrt-devel@lists.openwrt.org Cc: Sungbo Eo Subject: [PATCH] ramips: move KERNEL_LOADADDR into Device/Default Date: Thu, 3 Feb 2022 20:30:52 +0900 Message-Id: <20220203113052.928472-1-mans0n@gorani.run> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220203_033121_943324_7414D532 X-CRM114-Status: GOOD ( 10.67 ) X-Spam-Score: -0.9 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Commit f4a79148f8cb ("ramips: add support for ipTIME AX2004M") was reverted due to KERNEL_LOADADDR leakage, and it seems the problem can be mitigated by moving the variable definition into Device/Defa [...] Content analysis details: (-0.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [2001:67c:2050:0:0:0:465:201 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Commit f4a79148f8cb ("ramips: add support for ipTIME AX2004M") was reverted due to KERNEL_LOADADDR leakage, and it seems the problem can be mitigated by moving the variable definition into Device/Default. By this, KERNEL_LOADADDR redefined in a device recipe will not be leaked into the subsequent device recipes anymore and thus will remain as a per-device variable. Ref: cd6a6e3030ff ("Revert "ramips: add support for ipTIME AX2004M"") Signed-off-by: Sungbo Eo --- I have not tested this on actual devices (yet), but I've successfully reproduced (bit-for-bit identical) device images in all mt7621 and mt7620 subtargets with this patch and the offending device recipe in f4a79148f8cb applied. (...except for humax,e10 factory image, which I try to solve in [1]) [1] https://github.com/openwrt/openwrt/pull/5026 --- target/linux/ramips/image/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile index 241b620941..f481e6e447 100644 --- a/target/linux/ramips/image/Makefile +++ b/target/linux/ramips/image/Makefile @@ -22,7 +22,6 @@ ldrplatform-$(CONFIG_TARGET_ramips_mt7621) := mt7621 ldrflashstart-y := 0x1c000000 ldrflashstart-$(CONFIG_TARGET_ramips_mt7621) := 0x1fc00000 -KERNEL_LOADADDR := $(loadaddr-y) LOADER_PLATFORM := $(ldrplatform-y) LOADER_FLASH_START := $(ldrflashstart-y) @@ -176,6 +175,7 @@ endef define Device/Default PROFILES = Default KERNEL := $(KERNEL_DTB) | uImage lzma + KERNEL_LOADADDR := $(loadaddr-y) SOC := $(DEFAULT_SOC) DEVICE_DTS_DIR := ../dts DEVICE_DTS = $$(SOC)_$(1)