Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp336330ybb; Wed, 1 Apr 2020 00:36:30 -0700 (PDT) X-Google-Smtp-Source: APiQypI0TFWH36w5faSucfLH3wAC2BlF6Z3PZPKw2FLCC2/a9GAvro5VfSSpnos89mlhIUQPFML2 X-Received: by 2002:aca:ec16:: with SMTP id k22mr1861915oih.177.1585726590786; Wed, 01 Apr 2020 00:36:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585726590; cv=none; d=google.com; s=arc-20160816; b=C79kRSArLpamLFtLrfBGqlBGVAX+NRST6wNYjaSb1FMphBZnvr7hU4f1yqtA5gOvcr 07JLT6ujFM1GfOnZnIOVLwHmnb/FSSenE5uAgAE4d0XUihHP4Rgk4mWo6UHxjB2MKBT1 pCIRh7Koy/+VZo8YhAoZHO8NQeWYMCMOdyEHvhM0tN11WXt+QSpTh0j49f9CUL8N8Ws3 8NeZxPNWr/mtWF9e3+hmJT2NDQZ5YmMjK9YDZmz0Q9UzQtDAh5cnMDoGm3/mPjUf7wlN UpgrNzvJqkI5If9h26DcA2wzs+C+k/nryggtCVdOHTrmRTXaFlBbtQRjFMKDb3+wCFgO R+Mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=e9j0gXLS8BiPnG8hg4KhkQMvt4m3nuldxIMCe99NUSM=; b=KJnq8orMvg9Xt8xDVpMLpcN4cZn9XD1rFUz2gAmhhoF5ly/fD6nXc8kioduM4xKvcM DRK7g20WYVrTdutHia/jjQZm4VJETE3TB/geZ84l/gH2PZbhVSEdRWHLwUZV5lM20ZcV bnhVGzizkOdkmIlddsRa9n54NSldU18uwfbcuvEuuDYJ+oOlMVGEnHKwkBQ1+Zsqsk9I a2Xs48s31A5g1sTQNWQKhcoTPQmU28AtYBYK9ata4TeD7Oyvx8RDtMe3AfUbL0ipJ3WA /9mZbtmx3PC+MKmBRTi3m6NokjOkgzcCZRzQMa1orlvWYl/BI88KCDSy4a+yk16XVb4B uM5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=CzwRDrj2; 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=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l5si561938oic.3.2020.04.01.00.36.18; Wed, 01 Apr 2020 00:36:30 -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=@chromium.org header.s=google header.b=CzwRDrj2; 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=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731965AbgDAHez (ORCPT + 99 others); Wed, 1 Apr 2020 03:34:55 -0400 Received: from mail-pj1-f67.google.com ([209.85.216.67]:40034 "EHLO mail-pj1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731910AbgDAHez (ORCPT ); Wed, 1 Apr 2020 03:34:55 -0400 Received: by mail-pj1-f67.google.com with SMTP id kx8so2321964pjb.5 for ; Wed, 01 Apr 2020 00:34:54 -0700 (PDT) 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=e9j0gXLS8BiPnG8hg4KhkQMvt4m3nuldxIMCe99NUSM=; b=CzwRDrj2h0sa5kX72PUVDeT6L3fY9qudsdi8KkOaBKK9gQI9Rk35RY8a+tf/7T/90X Zl5oGkGuBSVb657tgNqL16cqTQjKM3o1b6z/xqQcfhcf5YAqC/8MEoQ6vJl0xnuS4T1p bLhOvG+N19w8AdK3xAI90GJXQBJzHg/Idzk0c= 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=e9j0gXLS8BiPnG8hg4KhkQMvt4m3nuldxIMCe99NUSM=; b=PhVzvr2Z+20McWwCMSAqF5jJGs7W2iiXVpCeqIvalPAXRZ4X8AfRACkBkp2DKOh3YN 6rsPD0zyF5hhjWHDAsFk+qLWQvDG/JxAlyr9iWa4FuGBdBGkUgWNzpi6qFp0tqdEjUPx IxbNMX13l1GRncF/ScdUooB99+hD/KBJE7HlFf0G2YE9V+2RyIntQpI9w4ds8HHJYhVr L3uLNzlqxz4gkxOXU8PQCKfQN440PXu3Iz06GyxNp4nHVLDZtVOBEXN3ByqJsdgTtptU eyMul13elqmjzCgCocdJhLBUZnBfIYuvLBCdMqHKLUIbP+4OwkCIHBYlXtaJyigxSUpR aZVg== X-Gm-Message-State: AGi0PuZvoe6nHkLtj4Vt+FJizMfAA5vNJWk1tWsIM9BEoaXYUO5dxwZA HM0iOadNSj6JR7IAxsPSYD0YXA== X-Received: by 2002:a17:902:6acc:: with SMTP id i12mr7180158plt.61.1585726494195; Wed, 01 Apr 2020 00:34:54 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id w74sm948693pfd.112.2020.04.01.00.34.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Apr 2020 00:34:53 -0700 (PDT) Date: Wed, 1 Apr 2020 00:34:52 -0700 From: Kees Cook To: Slava Bacherikov Cc: andriin@fb.com, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, jannh@google.com, alexei.starovoitov@gmail.com, daniel@iogearbox.net, kernel-hardening@lists.openwall.com, Liu Yiding Subject: Re: [PATCH v2 bpf] kbuild: fix dependencies for DEBUG_INFO_BTF Message-ID: <202004010033.A1523890@keescook> References: <20200331215536.34162-1-slava@bacher09.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200331215536.34162-1-slava@bacher09.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 01, 2020 at 12:55:37AM +0300, Slava Bacherikov wrote: > 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 > Fixes: e83b9f55448a ("kbuild: add ability to generate BTF type info for vmlinux") > --- > lib/Kconfig.debug | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug > index f61d834e02fe..9ae288e2a6c0 100644 > --- a/lib/Kconfig.debug > +++ b/lib/Kconfig.debug > @@ -223,6 +223,7 @@ config DEBUG_INFO_DWARF4 > config DEBUG_INFO_BTF > bool "Generate BTF typeinfo" > depends on DEBUG_INFO > + depends on !DEBUG_INFO_SPLIT && !DEBUG_INFO_REDUCED && !GCC_PLUGIN_RANDSTRUCT > help > Generate deduplicated BTF type information from DWARF debug info. > Turning this on expects presence of pahole tool, which will convert Please make this: depends on !DEBUG_INFO_SPLIT && !DEBUG_INFO_REDUCED depends on COMPILE_TEST || !GCC_PLUGIN_RANDSTRUCT -Kees -- Kees Cook