Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1179275pxk; Fri, 2 Oct 2020 03:11:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw4tRbHMbckr+AMLi4Yua+fcbhfwpgbJcnfXUItvzR3xM3/WvU4UsFgT9Z9H5YnF5aT6oFJ X-Received: by 2002:a17:906:7d52:: with SMTP id l18mr1472848ejp.220.1601633516222; Fri, 02 Oct 2020 03:11:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601633516; cv=none; d=google.com; s=arc-20160816; b=icTcMGWB2hj9MVNYyx87ndrMPlw199tau63MoxwaTTCRcMNNuTNPByeIK37Qcu6QgV 1bHqL++jt7H0dqwlCKysOryXFRslT2PAV/PiVtWconmEmCr+ffTUXfsBrhO5z1dzJZwG WI0w7pRuAqUzuRf0WIGzE9CC0Wgd0Z0mfqIUiqWy85Hx5fE1kLPRr7VZ/GdqFtqAPCIM 6m2+Dy0/E1+6m374dsWvCAbCtk9Gzg03zux7xdJhOFxss+LkIx2VfSV0tAxnYnuPmy07 SmALviki4odfJ9KYyYpnMYFK45cAKJvbRVHc/cf748UrvnC9XOtqMHosgVpB8OkymLS+ RJag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=OWYUsZ+0jSI+bzR+U/Opb/r+h29XMQ6OibUPAn5KgDU=; b=BSLL3bNvsQZvbz2bWp5eWtdoi9V4/6qiP/hoZM1zCF1mmZ81PQ9wQF0Z4ngySxycnm lr6yXfQu3npRxI0IM+jI9icLUvTnTiHTvAtWr+jgABvWR0y4sFUesc3rhxronGIa/D7Q g+OMD3sDg/Jo1x19l274joLR+7xnDaC3C+d10S0mR3qk5UirkeZR/GazMaG3inknE7kE MFXv91pO6HapbjcKBioemcJQwVeQeggvRENiIpKvrYjCijLTQrJ4BEzApqXIAM2jy7Z1 BB2aqwCP2KbSuf1t5NJPX4jum+fy2CJOP2/6sBwSnnhbbDFMCkXNm1Vf4GOZTaTtGW7C NDsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cloudflare.com header.s=google header.b=o7V4Ert5; 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=REJECT sp=REJECT dis=NONE) header.from=cloudflare.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r20si608731edy.251.2020.10.02.03.11.33; Fri, 02 Oct 2020 03:11:56 -0700 (PDT) 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=@cloudflare.com header.s=google header.b=o7V4Ert5; 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=REJECT sp=REJECT dis=NONE) header.from=cloudflare.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387749AbgJBKIQ (ORCPT + 99 others); Fri, 2 Oct 2020 06:08:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387726AbgJBKIQ (ORCPT ); Fri, 2 Oct 2020 06:08:16 -0400 Received: from mail-oo1-xc43.google.com (mail-oo1-xc43.google.com [IPv6:2607:f8b0:4864:20::c43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75721C0613E4 for ; Fri, 2 Oct 2020 03:08:16 -0700 (PDT) Received: by mail-oo1-xc43.google.com with SMTP id h8so200685ooc.12 for ; Fri, 02 Oct 2020 03:08:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudflare.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=OWYUsZ+0jSI+bzR+U/Opb/r+h29XMQ6OibUPAn5KgDU=; b=o7V4Ert5THuV208ZrTVLXy9I6K5MtKtKfL97eluip4dXo5wrNSzqZOFdA61OxeBZdF +0sDtnWTrKMU2EyF3sU05PklgBIgEr9VudLtUJ3VGUdiPp1p6SCDlWNKteN+kFZ+fPDX WtxmCVPPFeGStQHm7e7rsN0pF8YjBqtA/PWcI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=OWYUsZ+0jSI+bzR+U/Opb/r+h29XMQ6OibUPAn5KgDU=; b=P7E+mh0Y/0Den8xJ6Yw75a/sYodbxXoCH8btT1j4rL30FIkcLjXo1H4NAAMtMNlt9Y 3dKZD7LYSHhccFaNbajWYSWJjA9EfKB7AjWRALRpPkOCljREGKA+jvGJ6tZvP64XkP79 bcjZ+JKqM/B9ATacgayHTrPCyHBoAOlp9cN+1ip0MnuGrsE4H/rmk4dt5aykzmlT13yj 52WUJXCxUYKfq5bXBWePsIXxK+mX9yCFuqfuTFX9GhmiAqY8BksVtf43Xipe5ybnrUDC kcwn4zLJQ4SMzENU7GDArmUPC9lNu1gLrG5WlRIAio7lsRYYwnKgIR9IS9RoejT5MyQy c8Cg== X-Gm-Message-State: AOAM531V0vDmvh+C6OQUgTDimmIj/xjbBASrKW0n+BmTiTL9XTjKBuhg UDyn/CmVRLxO2xgSAjJkEAQBQDYG30z5cvlqr6RQqw== X-Received: by 2002:a4a:81:: with SMTP id 123mr1287156ooh.80.1601633295629; Fri, 02 Oct 2020 03:08:15 -0700 (PDT) MIME-Version: 1.0 References: <20200928090805.23343-1-lmb@cloudflare.com> <20200928090805.23343-3-lmb@cloudflare.com> <20200929055851.n7fa3os7iu7grni3@kafai-mbp> <20201001072348.hxhpuoqmeln6twxw@ast-mbp.dhcp.thefacebook.com> In-Reply-To: From: Lorenz Bauer Date: Fri, 2 Oct 2020 11:08:04 +0100 Message-ID: Subject: Re: [PATCH bpf-next v2 2/4] selftests: bpf: Add helper to compare socket cookies To: Alexei Starovoitov Cc: Andrii Nakryiko , Martin KaFai Lau , Shuah Khan , Alexei Starovoitov , Daniel Borkmann , kernel-team , "open list:KERNEL SELFTEST FRAMEWORK" , Network Development , bpf , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 1 Oct 2020 at 18:11, Alexei Starovoitov wrote: > > > > I think this might be the same problem I fixed for libbpf with [0]. > > Turns out, GCC explicitly calls out (somewhere in their docs) that > > uninitialized variable warnings work only when compiled in optimized > > mode, because some internal data structures used to detect this are > > only maintained in optimized mode build. > > > > Laurenz, can you try compiling your example with -O2? > > All of my experiments I did with -O2. If anybody wants to play with this more: https://godbolt.org/z/77P6P9 Seems like red hat GCC has some special sauce that fixes this behaviour? -- Lorenz Bauer | Systems Engineer 6th Floor, County Hall/The Riverside Building, SE1 7PB, UK www.cloudflare.com