Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp2381054ybn; Thu, 26 Sep 2019 11:01:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqzznGId9jLmjW0MEIy+BXSdo6VAyujFU7olUFfcVUugeO2Ud9fmo4CK0WK8lg5LYZM9FRjH X-Received: by 2002:a1c:f602:: with SMTP id w2mr3886558wmc.145.1569520908548; Thu, 26 Sep 2019 11:01:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569520908; cv=none; d=google.com; s=arc-20160816; b=TMdfep6tgRrTLbQJTX31uoFQkKKbkIXDZQ1I7at3z0jyqpcJwpgysEVbYkFrt5Wb/p nvze2Gvpv5zPqgS6CBhni8AHCTHJ1VfGDN9Zl01f+lZnLq/0BuMGHBmcUtrfQiQS9n8C ETXJJMjU85bYO3yadNfgvSRgKOin/gcKK662OIX6zZgGGM1PMwr16PMzhcWhGIhrFVwI ChCGQ6Mlp9wDfNMsKRqIS9drUfrsd5nJy3P7MlUA4Zqxh1ANanQSpAK4JR33irF8G8Re 8u8BrO8eVpOMYchRwib8coRk1FXrG4srCbbEmTOwT5hm2esN5ryzO4F2CHFVFbA7L389 Pvwg== 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=sVPOVPq0jGnDyk9BlFn1nbib25butANPcZ2psxH1XQk=; b=IeZTqlyL9fxLLrtNpmqA0Cdx1Cdiprd3gfeuvewApPkYLzvZfXfNZR7KiuMkMrOgJk gXCJWJyiu7mJrnWTv+Fb/AIPl3bw227qvJlZktZjJr5ynkROu3efgTnD4K80x3Q0Ae6v 0W8MxQgBx+kk132C6m3VCuZtvKiiqRhXmRNEtx65oj1IuSpgFxtH2dJQf1NiwLObrXox 8NmNT8rNIyeywXy+EBKQTKJOBrSDG1C8dl74hYAA9l2xymdvVt4K/9qlUELDUx6V5I1H VkRHd2CckBhF7SyA2mGfJOy2FnZp30c4yu1QCb9WOU4YtXn40GFhS94Qwg5myRQgHyTF QBfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=odBS6czN; 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 g20si1402697eje.364.2019.09.26.11.01.23; Thu, 26 Sep 2019 11:01:48 -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=odBS6czN; 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 S1728345AbfIZR5S (ORCPT + 99 others); Thu, 26 Sep 2019 13:57:18 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:39542 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728102AbfIZR42 (ORCPT ); Thu, 26 Sep 2019 13:56:28 -0400 Received: by mail-pf1-f196.google.com with SMTP id v4so2257593pff.6 for ; Thu, 26 Sep 2019 10:56:28 -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=sVPOVPq0jGnDyk9BlFn1nbib25butANPcZ2psxH1XQk=; b=odBS6czNjAFbywCHRPpPNeXtF6OPc2mmJ7PZLPLZJwd6gvLuxf+a4qKWHGXqogA0yi p2vEtxVP/XOxYN9zPFrI5aP6IZ37YGa0bwxcd1Y/fvdWegAkmT28yuhfe+dV29/aNHth 17TyUbj6jzLSgZ65Pr6zSq3TqTL6Z/E1LQYkg= 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=sVPOVPq0jGnDyk9BlFn1nbib25butANPcZ2psxH1XQk=; b=pq89ALlxj2uWx2IrWvk9WTsBaSjepZTr6u5rwHB7JWRg7WjN+BD+YLDLV0b/Y05bKl Mo9HPOvrlfEH6ZjNTYGQ6Bpc9TsQz3SdIlkY2n4Y3JArHhhCZ0eSfEPczDBh+Y73DzOw gTaP1xe8GTKrsRAfrAXovhEZCQgLnG0nxXjqBNxSv+jrC9h/o3rxVsooErLBujOAC2Yx 2p3cZ1hgi4TXJuYEZ2r+G6O+UCto7IrGQ91pqI+Gfub9xIt04ja/pxkijdoGvbDwBu+q cy7WhOY2fyexzs/EUMLL+hiwe87Tlo97wxOfpO2JZZqmcfgt5a0fhOVq2s0PZLGMmRvD a/EQ== X-Gm-Message-State: APjAAAV64kXKUbYOOCEs6EJq2NsXurOR0Zap/9BsKkPdWcT+Lt2QAAnx bmwGJcX0CIfR6/2qXwO1HH6nGg== X-Received: by 2002:a17:90a:2481:: with SMTP id i1mr4939410pje.77.1569520587801; Thu, 26 Sep 2019 10:56:27 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id v19sm3224270pff.46.2019.09.26.10.56.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Sep 2019 10:56:26 -0700 (PDT) From: Kees Cook To: Thomas Gleixner Cc: Kees Cook , Rick Edgecombe , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Dave Hansen , Andy Lutomirski , Arnd Bergmann , linux-arch@vger.kernel.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 18/29] arm64: Move EXCEPTION_TABLE to RO_DATA segment Date: Thu, 26 Sep 2019 10:55:51 -0700 Message-Id: <20190926175602.33098-19-keescook@chromium.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190926175602.33098-1-keescook@chromium.org> References: <20190926175602.33098-1-keescook@chromium.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The EXCEPTION_TABLE is read-only, so collapse it into RO_DATA. Signed-off-by: Kees Cook --- arch/arm64/kernel/vmlinux.lds.S | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S index 81d94e371c95..c6ba2eee0ee8 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_DATA_EXCEPTION_TABLE_ALIGN 8 + #include #include #include @@ -135,8 +137,8 @@ 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 = .; -- 2.17.1