Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2968939ybv; Mon, 24 Feb 2020 15:30:08 -0800 (PST) X-Google-Smtp-Source: APXvYqwyNMKtXD/3qUfhk94ILiS/fIhk4AAuYs+kHlwBjVwaNRsXg1gCzXVMTp+cnvFCIi8DVvJE X-Received: by 2002:a05:6808:289:: with SMTP id z9mr1211556oic.48.1582587007973; Mon, 24 Feb 2020 15:30:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582587007; cv=none; d=google.com; s=arc-20160816; b=cEdbw3whHokumQU9r7zqa1Djw9Jy1Md+XSHAKdFSK/+qV/Ij15FQkrwhn9iNTJiinJ K0aTsTq6nK/FgSvxhy8KwAtEa3I3C711KBpr3TXDNqMbHSZ85xBjHpCMvW3eDWoxC3eV 3EJFanpG7pjQ3e1lp1P607xGvmX1nCpjkUGb3k43W0WywIrt/cp9QDhHSPPm7zAF9yYj Lmyy1MxoQ2k1DbAMMHXEqS8KuFlSdAw+IAbHIUeEXPImG5fj2WpBvI3VD0q17LZ1wacP tWf2+qDyj8EVH66Nv/LOyrJI6QwL+FKm8TaggJB6ihKdUhKyoqAabBRABUkQ5cDdnqCw kI8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=GAy6f6HwZcvA+vCvtzUtJuDggm1hBgZwofmVHQAmFio=; b=rMkGR8+0O0nOdbR/V91s2RGfWM2/R9WoTVNpyLv67jrbMabJNR4ujSxnavy1BYKUML sadsX74z4d35PJWoOHPPIsYiVLM313mkJ1dIacjNT3XgfuNx55LmJ4J/EZkSzQkRjF6V rhKixZYzF3Ru8jQR7QJ7dNsyWaXfEjNCcFrZtuWPr0GEzC+ZTp8w0u/fwecwvvSEyBQZ f7aLE3wp8erEVHKAHN9Ix/1mc0ixfZC5l60/D54DUxbSHawHdyZynltrbKCm/BdPsn9X cClUdjfW9mEOfhejUVuzBxNmTZ7TcFhwIcSeZO0Bj9o2xpAFpB9mepT65c64Mvlgze7U 5vYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="i/I735s6"; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i7si5440344oib.63.2020.02.24.15.29.55; Mon, 24 Feb 2020 15:30:07 -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=@gmail.com header.s=20161025 header.b="i/I735s6"; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728475AbgBXX2r (ORCPT + 99 others); Mon, 24 Feb 2020 18:28:47 -0500 Received: from mail-ot1-f68.google.com ([209.85.210.68]:36483 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728454AbgBXX2q (ORCPT ); Mon, 24 Feb 2020 18:28:46 -0500 Received: by mail-ot1-f68.google.com with SMTP id j20so10429038otq.3 for ; Mon, 24 Feb 2020 15:28:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=GAy6f6HwZcvA+vCvtzUtJuDggm1hBgZwofmVHQAmFio=; b=i/I735s6mxeQ+bYgCKNvSV+2Ta/apUIoPMAK0Rh038e0Dc/iFJWkRY1CgMaUASM5Z8 DiLXUWxjFBvRH1tS75s0KEyl8a407zmGS2uF/hrqHbEmBw4WLZ11bsmLZ7VB2wMbE26C 6rSBZ+ILGnEiKcCrvvnRngKfQ1oUBTjZv7oeUo/B6uMBM5J8yDm/h97hxBpdp2RJJsV4 ZygrT5pnoh5o3+dEue8Ia38dQt9AjFmXnfn+Cv8uXi5OBvymHWvWNFmvIWWH2ZjwJsJ9 yH89WwLgEurrHaR89LeitdVaSl0zc+N4ahOZMEwk8h7lkqXIEBy1VVEcu+dd40tbgZcZ OaJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=GAy6f6HwZcvA+vCvtzUtJuDggm1hBgZwofmVHQAmFio=; b=qcn28jFqjeFEru9tSLHI8keXnfz45rQimM+sCtApX4q2leWGNhRFvRBfgJ0JrE0Y0O TyhW5nGX1ywlNl5fDij5dV9iIskxu4tH1yPb9RmIwDc/l04zpGFQpjdBSbh257kkT3Ex 8UyXUDDJzXvx/+8nEYPVktJM9aryj0RTbZvF0VFUVhtfQ9ZAjuxhE5AKT93uc6Ijg1B8 7uUaFqMgYmpJLPqkDVzcmrSomaZ4dpyG30fgwdpu7jLVl0K35iL5ZwAhTsC6PEK7Nz8A 9PgTIaVTUiKL9arV3slwQC+VwfgTFucWYxs1DaJbM7lm1pR92WDXP/qXqAS9rqF4aElH NgYg== X-Gm-Message-State: APjAAAXpEXhL77NddJAvJLJcBiTWQd/lI7jIcogW+BuQ4oIYFOsM/lZd UEZaKlp6u86d4WfctEqMBqg= X-Received: by 2002:a9d:48d:: with SMTP id 13mr39635978otm.249.1582586926139; Mon, 24 Feb 2020 15:28:46 -0800 (PST) Received: from ubuntu-m2-xlarge-x86 ([2604:1380:4111:8b00::1]) by smtp.gmail.com with ESMTPSA id m185sm4528897oia.26.2020.02.24.15.28.45 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 Feb 2020 15:28:45 -0800 (PST) Date: Mon, 24 Feb 2020 16:28:44 -0700 From: Nathan Chancellor To: Arvind Sankar , m@ubuntu-m2-xlarge-x86 Cc: Nick Desaulniers , Borislav Petkov , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, LKML , clang-built-linux , Michael Matz , Fangrui Song , Kees Cook , Andy Lutomirski Subject: Re: [PATCH v2 1/2] arch/x86: Use -fno-asynchronous-unwind-tables to suppress .eh_frame sections Message-ID: <20200224232844.GB31729@ubuntu-m2-xlarge-x86> References: <20200224232129.597160-2-nivedita@alum.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200224232129.597160-2-nivedita@alum.mit.edu> User-Agent: Mutt/1.9.4 (2018-02-28) 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 06:21:28PM -0500, Arvind Sankar wrote: > While discussing a patch to discard .eh_frame from the compressed > vmlinux using the linker script, Fangrui Song pointed out [1] that these > sections shouldn't exist in the first place because arch/x86/Makefile > uses -fno-asynchronous-unwind-tables. > > It turns out this is because the Makefiles used to build the compressed > kernel redefine KBUILD_CFLAGS, dropping this flag. > > Add the flag to the Makefile for the compressed kernel, as well as the > EFI stub Makefile to fix this. > > Also add the flag to boot/Makefile and realmode/rm/Makefile so that the > kernel's boot code (boot/setup.elf) and realmode trampoline > (realmode/rm/realmode.elf) won't be compiled with .eh_frame sections, > since their linker scripts also just discard it. > > Signed-off-by: Arvind Sankar > Suggested-By: Fangrui Song > [1] https://lore.kernel.org/lkml/20200222185806.ywnqhfqmy67akfsa@google.com/ My previous review conments still stand, Reviewed-by: Nathan Chancellor Tested-by: Nathan Chancellor