Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp237312ybp; Thu, 10 Oct 2019 17:14:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqw5Mi6aOAwlNAegGYs2KDYnGALxoRqmaLUeJJP2vUxNk6EdSMglW4OAp0HRbpsjW+2toDd8 X-Received: by 2002:a17:906:314c:: with SMTP id e12mr10726163eje.140.1570752850998; Thu, 10 Oct 2019 17:14:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570752850; cv=none; d=google.com; s=arc-20160816; b=Cd2uptrY9KwkJxiEvl0Vc/SW/XOckIKeKTjbofbqUotgHjgzzpbJQ4HGZMY5E21W2A HXht9wa5ee5cNzLoZc6US26NvaDWjdGhDUldkRHAT5RyKYUENTQ2/a4YMyRqRvHV2iZi XXvU9dcdX3ySTaEQH9ySc23L8Gkajz4paznKyIhySK9WW8zuq+raaVEm0Yecwy5Hh3Oc BUCCELYZchmMTycwSoCsoXVUqAY3S8y3DNQD/pSiK5vuQuJLm2V7Fm9GK2c5vtwcMsIa VN5i8u0yGbpJ4aSL9eMEuvTba8p4FEabln5OqaOVuhjlK5UCfpGVeYtwMxcA3xFY/RG8 G5bQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=FW8b8NX2lcqvjxUkqurmeLymDZQTO5emHjisNR3IdMA=; b=FM1ZrGyPeD8emDcbDjfr+Pkpm+xjSr75mvaKLo1nCkSfXd5tXm5GYpfwb7qsEApNiU bAQ6ivA5IpdZ9tp5TTIjB1DmuBqNx1hue+praVscrRVFvAMDn0g8F2u4+hk6GYtEQetB /HuBMnxQPUe0hEU+fWLm2MeymyCir+QLU4qk2+l+OAmZHJRHstiyxTpy/lLHt+SDH/uv ikJ772VG1DtLE86/SHNMCErR8nA1Be2A5qiJctyDWtMrnCjgoeNJtm+PNyWGRqinoR0b r5ezFMQHO2ZwTS/6gFil/1RqR4sNS00NbK4Vjb6ffnDSqA8tcrSNwZp4UV6h7o8V58+/ oNgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=P4Fuk21m; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e22si4535512ejm.72.2019.10.10.17.13.47; Thu, 10 Oct 2019 17:14:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=P4Fuk21m; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727718AbfJKANZ (ORCPT + 99 others); Thu, 10 Oct 2019 20:13:25 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:42989 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727463AbfJKANA (ORCPT ); Thu, 10 Oct 2019 20:13:00 -0400 Received: by mail-pf1-f193.google.com with SMTP id q12so4944171pff.9 for ; Thu, 10 Oct 2019 17:13:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=FW8b8NX2lcqvjxUkqurmeLymDZQTO5emHjisNR3IdMA=; b=P4Fuk21mSaKNwFMUmZxSt/IIxNtkXj+Ys/JxlgIct6Hlb4B3yXk/i320iivrHPWx5w hPi5AFgp8NwZicAqmOBJvk6GzGKldRwbd/3LLSi/srLk+eGZ7yRithSSv41nscZhF3Dk GELZr5uH3JzvVYuz2LSeaVERr6mu//7mpofAQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=FW8b8NX2lcqvjxUkqurmeLymDZQTO5emHjisNR3IdMA=; b=bbPZV67b/TXb/2nS8r1YZ19Uxz1jvRAuM7Zuytk7gCZE+jOZ13z86sAHxayR6gKI96 PtuzxrI2SkiajuqNDYrhprbDk0sLUK0MPs0zSESLUrbFyw1HOXJK4EawYrivoo+tcxfF kv8SpEGLUaAXFvMOzhoaBp8SFvL2s07Q6ANXRGCKmgfjmo40lAFnp/VCH7rlyrp22ne3 zrfyh/1w2GXJ5rsBS+EHCIlUOQYn/Xf5MTxsAo/5GoxaYAGGV+ZTv74KEZ34u9joYaMn cEy85y1fjcYnxg1PHC1Vwctoh9EXiLKwJeT6dGjiI+URVzAALZDTabmojF+lCQFfURco HpsQ== X-Gm-Message-State: APjAAAVUZIMPdjoqtXtK8X2YI3/MMVBwC/X0JLGrN9QRU9GQzM27Y+TB 7qjYNk0C0x8sTiXn3sm5vrkhTiB5Occ= X-Received: by 2002:a17:90a:246e:: with SMTP id h101mr14385157pje.133.1570752779910; Thu, 10 Oct 2019 17:12:59 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id 7sm5985112pgx.26.2019.10.10.17.12.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Oct 2019 17:12:56 -0700 (PDT) From: Kees Cook To: Borislav Petkov Cc: Kees Cook , Rick Edgecombe , Dave Hansen , Andy Lutomirski , Arnd Bergmann , Michael Ellerman , Heiko Carstens , Will Deacon , linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-alpha@vger.kernel.org, linux-ia64@vger.kernel.org, linux-s390@vger.kernel.org, linux-c6x-dev@linux-c6x.org, Yoshinori Sato , Michal Simek , linux-parisc@vger.kernel.org, linux-xtensa@linux-xtensa.org, x86@kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 18/29] arm64: Move EXCEPTION_TABLE to RO_DATA segment Date: Thu, 10 Oct 2019 17:05:58 -0700 Message-Id: <20191011000609.29728-19-keescook@chromium.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191011000609.29728-1-keescook@chromium.org> References: <20191011000609.29728-1-keescook@chromium.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since the EXCEPTION_TABLE is read-only, collapse it into RO_DATA. Also removes the redundant ALIGN, which is already present at the end of the RO_DATA macro. Signed-off-by: Kees Cook Acked-by: Will Deacon --- arch/arm64/kernel/vmlinux.lds.S | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S index a4b3e6c0680c..9128a26eb45b 100644 --- a/arch/arm64/kernel/vmlinux.lds.S +++ b/arch/arm64/kernel/vmlinux.lds.S @@ -5,6 +5,8 @@ * Written by Martin Mares */ +#define RO_EXCEPTION_TABLE_ALIGN 8 + #include #include #include @@ -135,10 +137,9 @@ SECTIONS . = ALIGN(SEGMENT_ALIGN); _etext = .; /* End of text section */ - RO_DATA(PAGE_SIZE) /* everything from this point to */ - EXCEPTION_TABLE(8) /* __init_begin will be marked RO NX */ + /* everything from this point to __init_begin will be marked RO NX */ + RO_DATA(PAGE_SIZE) - . = ALIGN(PAGE_SIZE); idmap_pg_dir = .; . += IDMAP_DIR_SIZE; -- 2.17.1