Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1648619ybv; Sun, 23 Feb 2020 11:38:27 -0800 (PST) X-Google-Smtp-Source: APXvYqzts4t00MUuHtZ81AO0yHYCBr5vBvsmTOhzfs/GKryd2wkFp/SWGvK882MmIdC/dWgvpiyy X-Received: by 2002:aca:c7ca:: with SMTP id x193mr10104521oif.70.1582486707206; Sun, 23 Feb 2020 11:38:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582486707; cv=none; d=google.com; s=arc-20160816; b=voqJoNIMtL/YTI9v3WoTa/qp8agrotVB5+EFIudL/9Iwa3cev92cDbchDGdj9VxvjA o/dKNCt3hUFQJ3++N+i7CQbM2bfX8Y5dy3aRDf1kj4K2ejImpkANZsguULeNSt5I32pv ldRnzwbwsI3VMbgMADfz5iL7WF/Mqplk/G5FZEYlID9c85RmGnJayo7ixFDycj0/N2i9 U6pDwpK7DICA1K62V3VGaw1e4uBQpqu3VcxrlQLMtP5o70qSuDjEaNtR3a/sUmgVxoPD llW2E1ZLFWQbp9bMnk4dPgGXHGqkx57khziFHl1vX/4++VcE3tzMYd4SaHv+Ympxbe7+ wO5w== 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; bh=DfzkHhlgdItc8s3ky+addnwXQZ/kxyiQG/TmfWXJMrQ=; b=1Dr90ffY2bDwdi6yq38Y4XAD+H5/AoE7iM+XXLbB1MvoiE67PlOecZmoyV6PVxQGbz C+PAo9kgxmCStDKVXBUFLvJBPMpEoPR+EHaAwgtp5ujKjNTWT9O7KI5QEy1XO1YLyzsC gIFb8jToUqR8RekmNUPk43YaLcNwou4ybxdvKFfHzKpTC3pgZNMbITShdI+i5RCxdw/C tG+gxbSHc3PVBHfveVfQCPAymwE2gWM66Xq4AJDeBD8vRtbwUS6QDPtKr7dWkbh5N6iF nCFoy83wnrbR0hOHRJifmwrSIFe4KW37OTglcfhuHTnDRcQ5dWU6OlZ2u2LcPEIUyydL dnOw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p11si5181410ota.300.2020.02.23.11.38.14; Sun, 23 Feb 2020 11:38:27 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727156AbgBWThS (ORCPT + 99 others); Sun, 23 Feb 2020 14:37:18 -0500 Received: from mail-qv1-f66.google.com ([209.85.219.66]:32841 "EHLO mail-qv1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726302AbgBWThS (ORCPT ); Sun, 23 Feb 2020 14:37:18 -0500 Received: by mail-qv1-f66.google.com with SMTP id ek2so3305197qvb.0 for ; Sun, 23 Feb 2020 11:37:18 -0800 (PST) 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:mime-version:content-transfer-encoding; bh=DfzkHhlgdItc8s3ky+addnwXQZ/kxyiQG/TmfWXJMrQ=; b=HK/HXAr7pvuq68Rl3l47JnYgPtM0MDLr+ICk3pBZVwCpBnZWh7t4+aV4ZlMGfgyypv 7kSXT09+v2ITUdotUvmJeaPWqhxWWs1r68ioWSKale11PW1HMgKyCVDa9cRbJNWDi+J5 icKd++qsBHrmc7bZodduWYYPaKw9JBGdN7YGL0pDKzZfAaFTa47Nrl3Drc6MMusJ4M7W Pn9QAnm6NLdmCo+ItWGwJHcCk1gVjWOeA1a8aXyYKsepo4ccslb+8/gJWrdcsXKqxQfj XWtuaxvrraTT68RXU6ytkaJfwyjKD3tZmcSigFhWQn4nGCiumoK+groAdh9lWqVtSp5f +VfQ== X-Gm-Message-State: APjAAAX7kPlzoz7jvkloKK6bY79GbAhU62GAtrSANShYKQO6HFIESv9C nvs2o5b9k/xEoqpmmSAYI6Q= X-Received: by 2002:a05:6214:1933:: with SMTP id es19mr39919830qvb.14.1582486637564; Sun, 23 Feb 2020 11:37:17 -0800 (PST) Received: from rani.riverdale.lan ([2001:470:1f07:5f3::b55f]) by smtp.gmail.com with ESMTPSA id 204sm4780976qkg.74.2020.02.23.11.37.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Feb 2020 11:37:17 -0800 (PST) From: Arvind Sankar To: Arvind Sankar Cc: Nick Desaulniers , Borislav Petkov , Nathan Chancellor , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Michael Matz , Fangrui Song , Kees Cook Subject: [PATCH 0/2] Stop generating .eh_frame sections Date: Sun, 23 Feb 2020 14:37:13 -0500 Message-Id: <20200223193715.83729-1-nivedita@alum.mit.edu> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200222235709.GA3786197@rani.riverdale.lan> References: <20200222235709.GA3786197@rani.riverdale.lan> 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 In three places in the x86 kernel we are currently generating .eh_frame sections only to discard them later via linker script. This is in the boot code (setup.elf), the realmode trampoline (realmode.elf) and the compressed kernel. Implement Fangrui and Nick's suggestion [1] to fix KBUILD_CFLAGS by adding -fno-asynchronous-unwind-tables to avoid generating .eh_frame sections in the first place, rather than discarding it in the linker script. Arvind Sankar (2): arch/x86: Use -fno-asynchronous-unwind-tables to suppress .eh_frame sections arch/x86: Drop unneeded linker script discard of .eh_frame arch/x86/boot/Makefile | 1 + arch/x86/boot/compressed/Makefile | 1 + arch/x86/boot/setup.ld | 1 - arch/x86/kernel/vmlinux.lds.S | 3 --- arch/x86/realmode/rm/Makefile | 1 + arch/x86/realmode/rm/realmode.lds.S | 1 - drivers/firmware/efi/libstub/Makefile | 3 ++- 7 files changed, 5 insertions(+), 6 deletions(-) -- 2.24.1