Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp596485ybm; Wed, 27 May 2020 03:20:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxsCUtmSIvWzF/JFKo82XKdODBujawHI8pYGq6212/ouwhO+Tz1j+sDtWIAiVtgxG6/dLZa X-Received: by 2002:a50:fb10:: with SMTP id d16mr22485838edq.46.1590574839428; Wed, 27 May 2020 03:20:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590574839; cv=none; d=google.com; s=arc-20160816; b=cOTIvhn6s/bdfVrY8Dn+GtGB/Rp+PECPVtCRDK63yDLKIszKLUFWrJfnqtlFiIV/OV tXVni5LEB0qB+Uu0rTdtcRKtm8ViNQBAa9VP2bbYLwHHVagA9PPPe70b21/rTvXoFmhs q7plMCzXdQmVBfafb8YwQQxt0H+aBACE2fCToBeehW78qcJr0yBs7fKtZTRUpXAw5Hwm W+laX/M14BmrlNB2n/lYeOAdXHggh4yFsKJxaRxhbx3TeKtddN0tuTFVuutkG8oVDlyD rhJoz0uAMJcg/231MS/JOvZ9HUbNyR9uOHGHTNYLXrMouDLfgCF60BI82WN891YwueN5 +M6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=KCYAjLQT7yMz5OZBRMUUeUR/TkXu5R6JN2SYrRcRGOY=; b=sB5oXYjX00Cey0LL4mEgmb1nJtWBhsMmHeN0sPe1r2GEWrtF2hMvb5V9kkBTp8VWA8 Ny+8RFoUgqmwrE74mV6JvyXlMy4zZBlcxx1MXKYca4vpyQlFEwUDzxBsGQsnFTtSw+2A mxxWFFhFKvrmYj/pk82kHPczY8PqnVTQ4MQ5hVz64XPxRYMDtG90nCIs+ZmezvSANgmc Qx/6xmYZv2jw+0BsL8z+ELhYjanvUi7RzaAwnrxieGqah2qeq2fmJ2oHbzbB6/ZjR0RN h7CH3iDEWcpLJ5ew19QWF1LZZCZLvUMLbob/sGKfUHlcVmvUk7BsZkvQT79AkqVY+sHh bXJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@flygoat.com header.s=vultr header.b=BuYK7QYL; 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=fail (p=NONE sp=NONE dis=NONE) header.from=flygoat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g15si1443006ejo.321.2020.05.27.03.20.16; Wed, 27 May 2020 03:20:39 -0700 (PDT) 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=fail header.i=@flygoat.com header.s=vultr header.b=BuYK7QYL; 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=fail (p=NONE sp=NONE dis=NONE) header.from=flygoat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728709AbgE0Gfn (ORCPT + 99 others); Wed, 27 May 2020 02:35:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725613AbgE0Gfm (ORCPT ); Wed, 27 May 2020 02:35:42 -0400 Received: from vultr.net.flygoat.com (vultr.net.flygoat.com [IPv6:2001:19f0:6001:3633:5400:2ff:fe8c:553]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E10BFC061A0F; Tue, 26 May 2020 23:35:42 -0700 (PDT) Received: from localhost.localdomain (unknown [IPv6:2001:da8:20f:4430:250:56ff:fe9a:7470]) by vultr.net.flygoat.com (Postfix) with ESMTPSA id 2A9A120D16; Wed, 27 May 2020 06:35:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=flygoat.com; s=vultr; t=1590561342; bh=hN3UCNC1oAOyNQFrDq068mmAnFijUJCN0J4zaXVDdZo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BuYK7QYL1Uy/bZ4q2M9Kbcg6Uxcyfx9OFRVbKyI6MCVYJDfJei5BisT8IVUX1vdNY jhwj6IYNu2qDV4FCVT4Sb74pqOGxjwB8rRapEVBVA65gId93R4BXKBnBq5cEq02mWs X45pLMnPIMbGhPFOx+6lmw6jU96J+NB+To203pw4EalDngCSl6AFlPBDxTO8wgZV7r PxgiBZdzGmhJt2bGf8byn8Ugwlleeik3PXhbVLrg8i8thgw1kG88vgApVA6TqQTXOA rtOjQ5bJBXXK2s7Cz2kwLu7lIBlWR10+xCDrQAxhZ3Ofz2pqp1gKxk21dvnz/mTbC5 QBZhupk7DOdLg== From: Jiaxun Yang To: linux-mips@vger.kernel.org Cc: Jiaxun Yang , Thomas Bogendoerfer , Kees Cook , Borislav Petkov , Heiko Carstens , Fangrui Song , linux-kernel@vger.kernel.org Subject: [PATCH v2 1/3] MIPS: head.S: Always jump to kernel_entry at head of text Date: Wed, 27 May 2020 14:34:32 +0800 Message-Id: <20200527063438.391949-2-jiaxun.yang@flygoat.com> X-Mailer: git-send-email 2.27.0.rc0 In-Reply-To: <20200527063438.391949-1-jiaxun.yang@flygoat.com> References: <20200527063438.391949-1-jiaxun.yang@flygoat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Buggy loaders like early version of PMON2000 sometimes ignore elf_entry and goto start of text directly. That would help with dealing with these loaders. Signed-off-by: Jiaxun Yang --- arch/mips/kernel/head.S | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/mips/kernel/head.S b/arch/mips/kernel/head.S index 3b02ffe46304..c7c2795837e7 100644 --- a/arch/mips/kernel/head.S +++ b/arch/mips/kernel/head.S @@ -69,7 +69,6 @@ EXPORT(_stext) -#ifdef CONFIG_BOOT_RAW /* * Give us a fighting chance of running if execution beings at the * kernel load address. This is needed because this platform does @@ -77,7 +76,6 @@ EXPORT(_stext) */ FEXPORT(__kernel_entry) j kernel_entry -#endif /* CONFIG_BOOT_RAW */ __REF -- 2.27.0.rc0