Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2124187ybb; Thu, 2 Apr 2020 13:38:20 -0700 (PDT) X-Google-Smtp-Source: APiQypIf2E04fE2sTNA/FrU++1rigytLoFuoKXKRjFGGUc3+wGwNsVMxhqRmGQ6aeZQL7M1bMvic X-Received: by 2002:a05:6830:1bef:: with SMTP id k15mr3770077otb.372.1585859900103; Thu, 02 Apr 2020 13:38:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585859900; cv=none; d=google.com; s=arc-20160816; b=Ls2bDrzJD+GmfgHjvmfO1Sy+T9DEBlMNOF+/rA4on/CXTdfsd57384w9hJH7CiW3Y3 LCdusRoKvyWpgLYFmEZSXzrSC49x+2Pj0Upd5WISmZNHweuXfCaH9EkmzR7bwNCl+U1h egeKUhZ2QGfz9Z5boeWPsXIr3QC0SmtkTzp5XpQrOJUqNYpWrI9X5aPBFMsa97WqLA/B UeZ62S6W0k7ahij7VyQK2Mm5Yu3KvSYpA1eqXJHsbpx0hBh3QXEPekzs+88edtfer/J4 eXEwSBpbd9JrEl8d4hlreLng4ICdNdcWWjsM7KalCjVVAg/VQwnshY+LbJcbOGJq4aqk QuhA== 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=yY13RK0cKLrRjyvVBZully+r67kfxos978vIN0ruhpk=; b=ZOvOiBnmhx7tnFfX+/jcpT7TPK82lpQPQeyW7YkSWM8iq6iWA+oZGL5g4msOW0JYX6 lwRpm3WmY0yMeDgwhZBEpWPTfrGucRjqgvoUBWDxRymQOb5PTw51LhKHXSQ78J62YLzv umTTgiB1fiUcuXnsJ+ROHdalL6o3drvS5ScRa88ycbJxwxODqB1dk/tuDguEqLIi4/hr FtsGxBwaV59Dq6qiHuONrYxVhVELX6YfwYpPExrpDdLKVUgJVs9bauVfcL0Y5nGJYb9a W5awDYYoarFqrHTL9PED19FZ7SrMSik5fe870KO8iwzb3MrabmLl9D0lm9t5leKt3YyY RgNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=KM2DmTOw; 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 s4si2771556oom.84.2020.04.02.13.38.07; Thu, 02 Apr 2020 13:38:20 -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=KM2DmTOw; 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 S2389558AbgDBUef (ORCPT + 99 others); Thu, 2 Apr 2020 16:34:35 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:36468 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389521AbgDBUee (ORCPT ); Thu, 2 Apr 2020 16:34:34 -0400 Received: by mail-pg1-f194.google.com with SMTP id c23so2392512pgj.3 for ; Thu, 02 Apr 2020 13:34:34 -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=yY13RK0cKLrRjyvVBZully+r67kfxos978vIN0ruhpk=; b=KM2DmTOwPos0F7tLttvMAVY1LIa4ppIAmoFp2MqTGkdJDILQMA+dZFGoZUczJkP06n tIY11T4DiaYxZ3XpYIcaUADijDTLfmnhM6w5KLWiXD/U/5E644jQ7tBWEtkWTvI15PEr VVKHw3OqKjW7vcSabDsfT8G6FUxq86I+tgWHI= 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=yY13RK0cKLrRjyvVBZully+r67kfxos978vIN0ruhpk=; b=QKw+RACQb+QLrcj+TYEq085a+3sgVhxkJra5rthr+wBCJP29OUmz1Bl2xdWF9gIZnH qmBTeFv0vOR2YPNS3MYKSO9JL9djtMsLPqGUlZ9b0wrkXrGLub70XFY6vLdBosQuzXlN Sw+ggo6mRVFEHnSFUlVeAN6Eg/StHHk2d2GVbmSXld6ROr7DuQAtAY9nakXUS2Wy1zvS hD9rC1WdFXWJc8CXCc+9HCziNT3uXXVrKdAOQxD3/txWNWVbYAxLZKyifaDWed3FEIsA C6oi7sn76yFz9Kc1eX4o/e3xgTTGCApiIlXik3lN9E4WYWQTv1xXtzyv4fdKlyTM/J70 DybA== X-Gm-Message-State: AGi0PuYhL+rmnFw4TNbZCk12WzY0W0f7NEwnSBPYYqFUDhINKfIqe2X4 4doWmaK1o4e7RDWYOxfyYvTN4Q== X-Received: by 2002:a63:8f17:: with SMTP id n23mr5078110pgd.417.1585859673922; Thu, 02 Apr 2020 13:34:33 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id e126sm4276397pfa.122.2020.04.02.13.34.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Apr 2020 13:34:33 -0700 (PDT) Date: Thu, 2 Apr 2020 13:34:32 -0700 From: Kees Cook To: Andrii Nakryiko Cc: Slava Bacherikov , Andrii Nakryiko , bpf , open list , Jann Horn , Alexei Starovoitov , Daniel Borkmann , Kernel Hardening , Liu Yiding , kpsingh@google.com Subject: Re: [PATCH v4 bpf] kbuild: fix dependencies for DEBUG_INFO_BTF Message-ID: <202004021328.E6161480@keescook> References: <202004010849.CC7E9412@keescook> <20200402153335.38447-1-slava@bacher09.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 02, 2020 at 12:31:36PM -0700, Andrii Nakryiko wrote: > On Thu, Apr 2, 2020 at 8:40 AM Slava Bacherikov wrote: > > > > > > > > 02.04.2020 18:33, Slava Bacherikov wrote: > > > + depends on DEBUG_INFO || COMPILE_TEST > > > > Andrii are you fine by this ? > > I think it needs a good comment explaining this weirdness, at least. > As I said, if there is no DEBUG_INFO, there is not point in doing > DWARF-to-BTF conversion, even more -- it actually might fail, I > haven't checked what pahole does in that case. So I'd rather drop > GCC_PLUGIN_RANDSTRUCT is that's the issue here. DEBUG_INFO_SPLIT and > DEBUG_INFO_REDUCED look good. The DEBUG_INFO is separate, AIUI -- it sounds like BTF may entirely break on a compile with weird DWARF configs. The GCC_PLUGIN_RANDSTRUCT issue is separate: it doesn't make sense to run a kernel built with BTF and GCC_PLUGIN_RANDSTRUCT. But they should have nothing to do with each other with regard to compilation. So, to keep GCC_PLUGIN_RANDSTRUCT disable for "real" builds but leave it on for all*config, randconfig, etc, I'd like to keep the || COMPILE_TEST, otherwise GCC_PLUGIN_RANDSTRUCT won't be part of the many CIs doing compilation testing. And FWIW, I'm fine to let GCC_PLUGIN_RANDSTRUCT and BTF build together. But if they want to be depends-conflicted, I wanted to keep the test compile trap door. -- Kees Cook