Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp822133ybm; Wed, 27 May 2020 08:49:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyS5EMEByWsNL8UkRngqI5xM76HDSIzn6+yNV+i59ohOySTWVl1w+TVELL0WERPq1JC4+oc X-Received: by 2002:aa7:d3d6:: with SMTP id o22mr23683513edr.310.1590594587872; Wed, 27 May 2020 08:49:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590594587; cv=none; d=google.com; s=arc-20160816; b=gc3HMnKvIlAzAeVsV49O32rLz/hO7nV0Hm0y4l/IdIcspatTy/vfbxTh+NExkWtiW5 mrS2r1rVKEcxmkB1VtnmCD0ii4uskxFQhNWfigS/J9EDVaqJhnW2tXOLkdm4aSW8lO6R w3FOgRzTSLVcF4xdlRT8xnnIb6nO5+4ub+g/qXotp0lk/ZDKwDBP9Jp3kPHquAUT/liT 0EuVae7g3mJMBGmnSU/Sl7fonsAyduGfTbfH9k0PqlKjPmTy56r3MjArtz63fQ35PNjk GZ9r0CcOmvaJMR2Vjk04kIFtM7j/Tl8LMsZNvBahzCsqCZ9ngoMVQc9PTWPeG94n/Ib5 /+eg== 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:subject:cc:to:from:date :dkim-signature; bh=sqFRCqljcgqzOPJXHBoIXcGY5/vUjEkPEW5JpMc4LCE=; b=amCBXysSP1PJo3NQoJUt1pgZMNLwicpgsJZEmVyof//HZsz73fqFtXpIGAVZLuHt2L rWG2jTLB7fzLIuszpSZxO9UayVHRWE5fVNdZe+6iGTCk4Ip92bkkYXiklM9jylj9e4kk Ij0KPCH7mYVZGxGf4DIXvg+PXF+f7a0+TBLPPfIK0vk5MwBkODIqyuLhCsO1UzFeFBFT oVT2JaU+ZzStUyuSVQqKaNO/Vm2TsZdMQVnwpPWs2SyfveTrenoLXJ2QrJTK/53DGufT zDFDBbvxgdl76RQcW5yhOcQpT+4Hkwvro70jmnOJyh+8sezVNuV/WfuQHlv9USuOwuFG sYBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@flygoat.com header.s=vultr header.b=OVUwsCEe; 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 nz19si2198452ejb.495.2020.05.27.08.49.24; Wed, 27 May 2020 08:49:47 -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=OVUwsCEe; 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 S1727105AbgE0MFd (ORCPT + 99 others); Wed, 27 May 2020 08:05:33 -0400 Received: from vultr.net.flygoat.com ([149.28.68.211]:34460 "EHLO vultr.net.flygoat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725859AbgE0MFc (ORCPT ); Wed, 27 May 2020 08:05:32 -0400 Received: from halation.net.flygoat.com (unknown [IPv6:240e:390:496:b320::d68]) by vultr.net.flygoat.com (Postfix) with ESMTPSA id 1B0E720CF4; Wed, 27 May 2020 12:05:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=flygoat.com; s=vultr; t=1590581132; bh=pAfGmsVIfAgalNnpMcQ/Iz794j/8TOn7DIg2APlLWd0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=OVUwsCEe81/Ckpt6f7xlL2qIHkQO7BJ/3MI75tt+dEEvxi8Fnh6TYZLjJIxOXJGm+ UGJZapFMZ1s9SVzsU0MdHvac21Cnv4GNb4MBcS2MbNS4+TV4rYmeM7XFhzT+6NyLIO KxI6R2U7Q3SiiQN5nWZgC+H6CaQSf2XZtLwMp8/UZQpWOAYjAQKaP1XM9sh9U9PuBS QFaf5QWc9XI3fbJB0jvbGiglwpIFj+eVuJ3Dh9RRDDO+TKVMNJas41pIjzvHG1p6T4 7lHio5JQrbZ5tdk9TpAgpgaxdbf1zC9OjbTHHG2QE8NUprWSswis9ShG2vezLSgkmm 47JskCb/cQToQ== Date: Wed, 27 May 2020 20:05:22 +0800 From: Jiaxun Yang To: Thomas Bogendoerfer Cc: linux-mips@vger.kernel.org, Kees Cook , Borislav Petkov , Heiko Carstens , Fangrui Song , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/3] MIPS: Move kernel head into a standalone section Message-ID: <20200527200522.23c4e86f@halation.net.flygoat.com> In-Reply-To: <20200527115354.GC13965@alpha.franken.de> References: <20200527063438.391949-1-jiaxun.yang@flygoat.com> <20200527063438.391949-3-jiaxun.yang@flygoat.com> <20200527115354.GC13965@alpha.franken.de> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 27 May 2020 13:53:54 +0200 Thomas Bogendoerfer wrote: > On Wed, May 27, 2020 at 02:34:33PM +0800, Jiaxun Yang wrote: > > That's what already done by Arm64 and other architectures. > > That would allow us put more things like PE headers safely into > > the header. > > > > Signed-off-by: Jiaxun Yang > > --- > > arch/mips/kernel/head.S | 4 ++-- > > arch/mips/kernel/vmlinux.lds.S | 8 ++++++-- > > 2 files changed, 8 insertions(+), 4 deletions(-) > > > > diff --git a/arch/mips/kernel/head.S b/arch/mips/kernel/head.S > > index c7c2795837e7..8081a905a71c 100644 > > --- a/arch/mips/kernel/head.S > > +++ b/arch/mips/kernel/head.S > > @@ -59,6 +59,8 @@ > > #endif > > .endm > > > > + __HEAD > > +_head: > > #ifndef CONFIG_NO_EXCEPT_FILL > > /* > > * Reserved space for exception handlers. > > I'm adding the missing piece, why this change ist broken: > > * Necessary for machines which link their kernels at KSEG0. > > by putting something in front of that will probably break platforms > making use of "feature". If we can make sure, we don't need it > anymore, we should first remove this and then add __HEAD part. __HEAD is just marking the section of code. It will not add anything to the binary. Btw: I just noticed this patch may break relocatable kernel. I'll delay it for next merge window. Thanks. > > Thomas. > -- Jiaxun Yang