Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp626096pxu; Thu, 7 Jan 2021 13:52:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJyqtpzeJsF77x/5t7YKQrBNNgZofU9YTDDVjBY2BS9kYS8c24nQ4Nf4s4ooB33IT8IYpTnU X-Received: by 2002:a50:fc0d:: with SMTP id i13mr3046880edr.171.1610056358593; Thu, 07 Jan 2021 13:52:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610056358; cv=none; d=google.com; s=arc-20160816; b=Pg4R4fihjIQsLPCjPn9aYdH/PpTzl5QO/79M9bD0faQOT77+hFph+bK+6lS9SCa/8T M57lF9bNUT5yIQ41c0jSqivC/99l2z6+avQXTKr8dTO3pVtBoc9w3vxJkNkjDyDGjsPF wAndMeJ8CnqM0/ZcXgYGIKsIElP9m9Dlrs422Es7sWdr+DM7fo9oD0MiGjU3Xl4ItSLS bSm9/VkMec0BbCvsA0D1Dz8q0gIdUH7EIKl6Y3RrrDNI6zCLFo2k1Ci8R42PyG/mjEI4 VuoxhpdEIiOzJSWWDmwH8CwSgdv52NV6zdj/eijqJ+eGr/CCVdRhWlD6b8DmouIHzDET taDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=yHhv4+EFycAJKUbgSa0RmVqcL52Ac+/27NW7fknIfX4=; b=Klor0yQ6fbqwA2r1i14F0+ZpUOOxi0U1YIHBOZsifZEiD8edQ7qHLWP1EWIh45Z7Ap lwzQy1DDEzgRukbR9KbN9J8hBJpTXFhuqUQuSA8AQou//R4q/o4y5sbkWbU6fGDI1TbA oMX+QjTnPaQdMC5byk0ZszUSLjNaKB/V6L8Ge5tCz28jS5stz9z/RONHGbL/nuB+Ly8g VVs83RvjxgHurjbZ8qC2ohKwvnh3rTG2bFTWxOfIUzgPVdeThd2z2MKT7Pnhku92gpR1 dw0JcNTrQt8gRyjdJtfC1hkDyjtxOU7WMOFrFXRMk++L7nk4OTmerReNoXn+cloPZE9s hVyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Y2XXqeUf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id c12si2597578ejb.751.2021.01.07.13.52.15; Thu, 07 Jan 2021 13:52:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Y2XXqeUf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1727873AbhAGVtT (ORCPT + 99 others); Thu, 7 Jan 2021 16:49:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727738AbhAGVtT (ORCPT ); Thu, 7 Jan 2021 16:49:19 -0500 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE3D2C0612F9 for ; Thu, 7 Jan 2021 13:48:38 -0800 (PST) Received: by mail-pj1-x102a.google.com with SMTP id m5so4865258pjv.5 for ; Thu, 07 Jan 2021 13:48:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=yHhv4+EFycAJKUbgSa0RmVqcL52Ac+/27NW7fknIfX4=; b=Y2XXqeUfIvCYmqg67Ss2+YD/MWpHgJN4MY7+G6OuW/4sue+bH4MWRaJ0E36qiS8ijc 0/apWKEJxEca/cjsZm1eMoICPpvm/Eqc4AXKntBwdI2PSIwybKFH0eVgmo32/uOFBo2X HgAskdMD+eDV45lLAa1jifLARZRCxy31lvzsU= 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; bh=yHhv4+EFycAJKUbgSa0RmVqcL52Ac+/27NW7fknIfX4=; b=rjbgXecvCEFfOiB0Fy66XBKfIT0Y2alGxOITkkksRBKC1QesyWegzIouJ0Elwz9tSN tEp7wtg57tRSIIo1gGqRw8WYV3Qlm2ADQ+yIQqTMcm7Kpt/f4OcE+Mgf6Evt5WsD6Cm8 2NaXUIHbak8Pi98bCT8fmGYSLprEtRMYNv3MbfOsvFciJ0W9QVhtcM7ZYlNXhFrRiLEL YApJh8R5dKtsR3yf1SKbJ6rEZLr2w6vzaBxgaofeaw1DaG4H1uq8LzNaXDyoMpALvw84 JUlm/Os0Y6QepzIqeZ+bAMaiRjSYPqyBQUsXmy9+d3kP1aZeIN1urAe6DPbCYPt4Un6p n91A== X-Gm-Message-State: AOAM531cwnnOg8lhBXvCBqoMLx75UelSPsotyNsGzK+adSp0o3E86qMW 84/BGKtwEjaEnQNLcUonHDBIIA== X-Received: by 2002:a17:90b:78d:: with SMTP id l13mr466183pjz.51.1610056118201; Thu, 07 Jan 2021 13:48:38 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id gk4sm2974766pjb.57.2021.01.07.13.48.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 13:48:37 -0800 (PST) Date: Thu, 7 Jan 2021 13:48:36 -0800 From: Kees Cook To: Alexander Lobakin Cc: Thomas Bogendoerfer , Arnd Bergmann , Nathan Chancellor , Nick Desaulniers , Fangrui Song , Huacai Chen , Pei Huang , Jiaxun Yang , Sami Tolvanen , Ingo Molnar , Ralf Baechle , Corey Minyard , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, stable@vger.kernel.org, clang-built-linux@googlegroups.com Subject: Re: [PATCH v4 mips-next 3/7] MIPS: properly stop .eh_frame generation Message-ID: <202101071348.4BA775344@keescook> References: <20210107123331.354075-1-alobakin@pm.me> <20210107123428.354231-1-alobakin@pm.me> <20210107123428.354231-3-alobakin@pm.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210107123428.354231-3-alobakin@pm.me> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 07, 2021 at 12:35:01PM +0000, Alexander Lobakin wrote: > Commit 866b6a89c6d1 ("MIPS: Add DWARF unwinding to assembly") added > -fno-asynchronous-unwind-tables to KBUILD_CFLAGS to prevent compiler > from emitting .eh_frame symbols. > However, as MIPS heavily uses CFI, that's not enough. Use the > approach taken for x86 (as it also uses CFI) and explicitly put CFI > symbols into the .debug_frame section (except for VDSO). > This allows us to drop .eh_frame from DISCARDS as it's no longer > being generated. > > Fixes: 866b6a89c6d1 ("MIPS: Add DWARF unwinding to assembly") > Suggested-by: Kees Cook > Signed-off-by: Alexander Lobakin Reviewed-by: Kees Cook -- Kees Cook