Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2128995ybb; Thu, 2 Apr 2020 13:45:08 -0700 (PDT) X-Google-Smtp-Source: APiQypLwScVAkoqcojmCH+/DDaeZ1+ogdtlCfzvlJWw8vRv7ntsZnUsDRPVm26pG2XuY5BW935d5 X-Received: by 2002:a9d:d0f:: with SMTP id 15mr4005086oti.161.1585860307996; Thu, 02 Apr 2020 13:45:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585860307; cv=none; d=google.com; s=arc-20160816; b=EFOSTIw8eNT7EtwZwXGJBaKRgmBpLMnkgiccg44Z0j2pVpz6xDfBPMv4X7AY/d2VFF IYUjvcoEoD+W4DCVJwKV1HNwxA88wdiH+FXr3pWOM0r4BjIemegDnfweeCFpXiOR8iG7 DMmt36yejpon1ON8r/tvDsW8ybbfPgsPqTiAPGktzBBIkDk+0TmxmRlCRRM0CMMeEpx7 cMalENQ8Ab62c1W59RU2laSKz/HWpjtO61DsBJkZsmowc4MUC22DhEp61DzE+tKrx6Ki NsE0Fj3KbIbA35WO8DKdrYkoNZ7X76tRkDVzIhVLZ8RrzLXtVSw+o8MIs2QkrQXOYXFj ZZFw== 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:dkim-signature :from; bh=FjEUUecMFmSmjNvMMdOE00B64A4ZBeK571WEZ1itbTo=; b=j66/6uM5T6UI/06A0Z10TyBS7tGxdR09RQFN3aVOgLCwOAT3ygRiIweoz7ZwTALsdK iC6EMYWjzUFD4Rtk1SCxZD0WUdY/6II0IjWKkLzLdU6EUVYM1b2uVaUmLadZP8lnpPNb yQxGD1WyH0+ifXSihgCaoJbjnko7o4LTnZvdl19SC9nXqt7piBV+ac8uYugPdrWkc/cO oCIQtR4unW7XCCJ08Bc8rphmjjuyqqOAp9cSCkj2/AOwgUWd8CX2z+zrpAb8A5mVbxeQ q2riyA8+wn6fZksHBYu1wgisSE5ZBQP/jHPSgHN3EwdzXVATpiAV7WvM+jfAMQLJu4XZ JcVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bacher09.org header.s=reg header.b=vpyvacP4; 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 l20si2995354otk.242.2020.04.02.13.44.55; Thu, 02 Apr 2020 13:45:07 -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=@bacher09.org header.s=reg header.b=vpyvacP4; 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 S2388698AbgDBUmm (ORCPT + 99 others); Thu, 2 Apr 2020 16:42:42 -0400 Received: from pub.regulars.win ([89.163.144.234]:50514 "EHLO pub.regulars.win" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726617AbgDBUmm (ORCPT ); Thu, 2 Apr 2020 16:42:42 -0400 From: Slava Bacherikov DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bacher09.org; s=reg; t=1585860159; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FjEUUecMFmSmjNvMMdOE00B64A4ZBeK571WEZ1itbTo=; b=vpyvacP4IlEQAZZTqSLxAxWKl1ADfLPJ4lur44nnd4UAiN6TqY5XLfICXUQhElx58DN4/F VZ9EmZ9StR/86gGMuuu8ucf+W+sM3/hT+blRRXxoNsndkZhqNTdVksavxWpmqEIaBN3a9P NrZtSC8erogUojOk08ONx4mHH+pr3FE= To: andriin@fb.com Cc: keescook@chromium.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, jannh@google.com, alexei.starovoitov@gmail.com, daniel@iogearbox.net, kernel-hardening@lists.openwall.com, liuyd.fnst@cn.fujitsu.com, kpsingh@google.com, Slava Bacherikov Subject: [PATCH v5 bpf] kbuild: fix dependencies for DEBUG_INFO_BTF Date: Thu, 2 Apr 2020 23:41:39 +0300 Message-Id: <20200402204138.408021-1-slava@bacher09.org> In-Reply-To: <202004021328.E6161480@keescook> References: <202004021328.E6161480@keescook> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam: Yes Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently turning on DEBUG_INFO_SPLIT when DEBUG_INFO_BTF is also enabled will produce invalid btf file, since gen_btf function in link-vmlinux.sh script doesn't handle *.dwo files. Enabling DEBUG_INFO_REDUCED will also produce invalid btf file, and using GCC_PLUGIN_RANDSTRUCT with BTF makes no sense. Signed-off-by: Slava Bacherikov Reported-by: Jann Horn Reported-by: Liu Yiding Acked-by: KP Singh Acked-by: Andrii Nakryiko Reviewed-by: Kees Cook Fixes: e83b9f55448a ("kbuild: add ability to generate BTF type info for vmlinux") --- lib/Kconfig.debug | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index f61d834e02fe..6118d99117da 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -223,6 +223,8 @@ config DEBUG_INFO_DWARF4 config DEBUG_INFO_BTF bool "Generate BTF typeinfo" depends on DEBUG_INFO + depends on !DEBUG_INFO_SPLIT && !DEBUG_INFO_REDUCED + depends on !GCC_PLUGIN_RANDSTRUCT || COMPILE_TEST help Generate deduplicated BTF type information from DWARF debug info. Turning this on expects presence of pahole tool, which will convert