Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2898505ybv; Mon, 24 Feb 2020 13:59:18 -0800 (PST) X-Google-Smtp-Source: APXvYqyga/Bd2UR6N1P1xcLXYGtF5DdhY3ghS/NW3ijdws37oeaV+JM1+1ia1TbLgcFiLEG7AsOI X-Received: by 2002:aca:5fc6:: with SMTP id t189mr1015418oib.166.1582581557985; Mon, 24 Feb 2020 13:59:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582581557; cv=none; d=google.com; s=arc-20160816; b=VDoyHBKayzYQYTNwjIL5Sf7Pii3uZ4v8lJetbydNiNimGu1bH6jH1iwkcmmcZ+xKYA 12+upS2IegQS1DVULRxTO3DqR5UipsME0cXVpsedxlZ6LLYjOrU4LsrKlmTsIl67e9GW PSgLxh5HaLTRUh9LM6D6waT4Bp7VxF7Le5YDloukIoylNLbfxdhQNNMhsKjMbJBu5o79 x8jO7HxlTqqoXqONeCqm0YvCrhm1bD6rrutkSLbBrLk8KO4QuhnRzllC3h7winD41JGY Pl8JZxNGicj3TROd81elsWrG3TUO373eVdM4WadRlLRQNwx805x49Za5ePntvW/cqlea m9Mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=AlniHU7g9k96/uUW/5ypNnFyMnufPLmI9nvXsoiLe/g=; b=BqusLnbkDny+tis6qYYzBzLmllR6NYAj4RpIEOmTYJOR/GIpReYT8ayF88jT3/GsgW cKjhc/7nQwgybXxuIJc16JD8UsZA1CnQSu9dHlryn3p7EdPnApp+Uv2oa4wzsS1aShDz M6SiYQZ3kgiLu15p5PjDhUv9itu5+PNuVlmxLfBt2SHxkQ3RYuoepI1fKGME5sEs+CdC I+yAJ/2VH6EbJ4HeFVnSLEB76LPp+sR29sinjRhSYvOWi9O8NZ+FCDnW7ikBzV0hTPfE Y3jp3j9RyuBSWlu7SeNuxP9xm25cNuvtpHLW0t0aoUeDhXPvwWnwtHVW2QTX3lJ0Vbxj /55g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=DpUIx8IN; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u25si4810481oic.160.2020.02.24.13.59.03; Mon, 24 Feb 2020 13:59:17 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=DpUIx8IN; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728010AbgBXV6t (ORCPT + 99 others); Mon, 24 Feb 2020 16:58:49 -0500 Received: from mail-pf1-f194.google.com ([209.85.210.194]:35626 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727796AbgBXV6s (ORCPT ); Mon, 24 Feb 2020 16:58:48 -0500 Received: by mail-pf1-f194.google.com with SMTP id i19so6055919pfa.2 for ; Mon, 24 Feb 2020 13:58:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=AlniHU7g9k96/uUW/5ypNnFyMnufPLmI9nvXsoiLe/g=; b=DpUIx8INd405dnm5VcX8QJ7nbI+ViAejLCkj+OXRG7zPaFMR8n3Zv2BfOEAYdraTBX DOsURALwsVRKQR6m9AW+DQWN+G/jg6g4tpPVnA8XVLmyyV6/3b9ntjfpYCh8Jo0B1owN moBFH9jmFSwRt98lpmA7Wso663+jWPBy5q1WDaQMggthTL7PJmo0rbvu3UyFqsn/gt8A TdP3MCbeyt81rtKb64x7WMcqmqTuszy03WZgH/8v2lmUt4lPDoqo0hCtCqNq7i6qzIh7 cjclWVI6Y4GuJyiOZ5dJTolpcVu/9WVLUcP7LwjGv/ybNjDzzhylU1HHP2+Wn7Sx0Kas D2KQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=AlniHU7g9k96/uUW/5ypNnFyMnufPLmI9nvXsoiLe/g=; b=ENxNkT0MgvmGNtFlO6z8MgxRjo2aZZtq+nhvLCGeBMVWrUSoaM+wXJB8QLAwz4fZTm wWYbMZtZfZdIManBk3+aqc9BJVqFXD3O6HjBtB+vtUxhLL6S+nxubSKZNYhK/jjehWEZ HT28tvKhQazjgQr9tfPm+AUSHkB6mNi2jRW5tk0CjZovoj6UxVQEWlpP05Qrbz5SvlZq 68c+M5SUBjQNlddUFJS14uzJYYlZSovuqB5T6hLhh/rvbp2EMvAVoepyNXIrt0oFmCWD kxK/0aVmTgFD/dR2fYOcWL1Tc/l14Pxi8L0NOCOLzv6qFvfKTDI+oWL2TpcZ2nOl2QUI HrpA== X-Gm-Message-State: APjAAAU7MRc9JOTwOtCYbu1IwJbmey4lhG5YwStueERNuss7USZptwi/ HQkK7Db1qpEp/pQnwYsiu63PH/xShCbpfp9ym9Djog== X-Received: by 2002:aa7:8618:: with SMTP id p24mr54461821pfn.3.1582581526452; Mon, 24 Feb 2020 13:58:46 -0800 (PST) MIME-Version: 1.0 References: <20200222235709.GA3786197@rani.riverdale.lan> <20200223193715.83729-3-nivedita@alum.mit.edu> <20200224213319.GB409112@rani.riverdale.lan> In-Reply-To: <20200224213319.GB409112@rani.riverdale.lan> From: Nick Desaulniers Date: Mon, 24 Feb 2020 13:58:35 -0800 Message-ID: Subject: Re: [PATCH 2/2] arch/x86: Drop unneeded linker script discard of .eh_frame To: Arvind Sankar Cc: Borislav Petkov , Nathan Chancellor , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , LKML , clang-built-linux , Michael Matz , Fangrui Song , Kees Cook , Andy Lutomirski Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 24, 2020 at 1:33 PM Arvind Sankar wrote: > > On Mon, Feb 24, 2020 at 12:45:51PM -0800, Nick Desaulniers wrote: > > > > grepping for eh_frame in arch/x86/ there's a comment in > > arch/x86/include/asm/dwarf2.h: > > 40 #ifndef BUILD_VDSO > > 41 /* > > 42 * Emit CFI data in .debug_frame sections, not .eh_frame > > sections. > > 43 * The latter we currently just discard since we don't do DWARF > > 44 * unwinding at runtime. So only the offline DWARF information is > > 45 * useful to anyone. Note we should not use this directive if > > 46 * vmlinux.lds.S gets changed so it doesn't discard .eh_frame. > > 47 */ > > 48 .cfi_sections .debug_frame > > > > add via: > > commit 7b956f035a9ef ("x86/asm: Re-add parts of the manual CFI infrastructure") > > > > https://sourceware.org/binutils/docs/as/CFI-directives.html#g_t_002ecfi_005fsections-section_005flist > > is the manual's section on .cfi_sections directives, and states `The > > default if this directive is not used is .cfi_sections .eh_frame.`. > > So the comment is slightly stale since we're no longer explicitly > > discarding .eh_frame in arch/x86/kernel/vmlinux.lds.S, rather > > preventing the generation via -fno-asynchronous-unwind-tables in > > KBUILD_CFLAGS (across a few different Makefiles). Would you mind also > > updating the comment in arch/x86/include/asm/dwarf2.h in a V2? The > > rest of this patch LGTM. > > > > i.e. just replace that last sentence with "Note ... if we decide to use > runtime DWARF unwinding again"? Yeah that should be good. Maybe these cleanups could be a separate patch, if you prefer? > > The whole ifdef-ery machinery there is obsolete, all the directives its > checking support for have been there since binutils-2.18, so should > probably also clean it up to just unconditionally define them. arch/x86/Makefile: 184 # do binutils support CFI? 185 cfi := $(call as-instr,.cfi_startproc\n.cfi_rel_offset $(sp-y)$(comma)0\n.cfi_endproc,-DCONFIG_AS_CFI=1) 186 # is .cfi_signal_frame supported too? 187 cfi-sigframe := $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1) 188 cfi-sections := $(call as-instr,.cfi_sections .debug_frame,-DCONFIG_AS_CFI_SECTIONS=1) 2.18? Oh, yeah, we can clean that up to. Documentation/process/changes.rst list binutils 2.21 as the minimum supported version. Then I assume that code that uses those -D flags can go, too. -- Thanks, ~Nick Desaulniers