Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1170033ybi; Fri, 21 Jun 2019 15:28:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqyNhmcmsBSOvP1ooV3rtG4IuolxCfGVDeQYLahm5E+V77ifgl7WmSsgb1iNtUdLWEtl6H2b X-Received: by 2002:a17:902:9896:: with SMTP id s22mr4792480plp.4.1561156089480; Fri, 21 Jun 2019 15:28:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561156089; cv=none; d=google.com; s=arc-20160816; b=HriHBFdxtITyO9PTpAYpYdKA+bHI2T0MpdzSj9dYD85NRzgKkbIukqrUDT0y9Bai95 JDrNMU407ubux6ireYb6AcaJxXVZNFu/VV6cHLza2ommmQny8pYCx/hLCIAxPaabqdfv NTPcZ7TQgMzWwrG274iE6aereuAj3HqTpufwR0sB6kYfyI18OByd6I0AOfPrKKaDRTWF QNWzEZ7aEDu5IOm7uomwKQMYWvd4Bl2T9YskwlDYQ9tsie8LAoQ7xyMHQrkEjMjZ4VIB 4vcQkGwKG/uDYjkm2kqBcZBwDbM0CUTzO9v0+U2Of8Vz9tMYkx4u0P3iB6w6Wfj9s4hG iveQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=12Gmw5zKib47jcBiDKW7HN4evhmenszIUvUtcBNVr/w=; b=QbCgQLNe6ZkwzvMzWK85mLKtE+lQYb4Uhfa4WZV9xev50pZSA+FkRr317bDhbrW3Mr WnIHZ05uCF2PYymlgi2L/s721SYRUQQSBHKMxALm9XJVgnocsbtSAh9vcN+CKgts+PG4 JaITlNDe4I3YdjNAL7gHzRV0EcTqw2/gDXcEbf1NBDHH1NN7vyQJRyWvaytaq6Li8O5e 7WOvcLknj0yioHEsTysRm4J04ELnlR898bxgYPn6YS4oiKufAAmckTHeX+6HzaRGozYx Ro3xQkvC+E5f9n3UyCRIBMFFm3mOzL6XOn8pb3x7+K1Rp8T34PAUF37uM7bzRLwivGZI 1AYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fomichev-me.20150623.gappssmtp.com header.s=20150623 header.b=Xf8yOiJS; 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 q19si3617573pgj.42.2019.06.21.15.27.53; Fri, 21 Jun 2019 15:28:09 -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=@fomichev-me.20150623.gappssmtp.com header.s=20150623 header.b=Xf8yOiJS; 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 S1726101AbfFUW1s (ORCPT + 99 others); Fri, 21 Jun 2019 18:27:48 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:35578 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726031AbfFUW1s (ORCPT ); Fri, 21 Jun 2019 18:27:48 -0400 Received: by mail-pf1-f194.google.com with SMTP id d126so4287162pfd.2 for ; Fri, 21 Jun 2019 15:27:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fomichev-me.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=12Gmw5zKib47jcBiDKW7HN4evhmenszIUvUtcBNVr/w=; b=Xf8yOiJSLOSDq8hWrSlqpVXhoLaAmtIuYSuhh/74sBbU3do17BqBGp8WItUeF/yGen 7QyMyUUFMICKWkLKDOjqV9xQzIl8ml5EglhEaZ5q7B7ht6KlF5augdWsLTNIeapnDgwo tsiSht9gHfvxnPm6uEpfxtFooUB4B5AVXpaJNLwYWGHj9n0asq1s+48vQT5N11RUCUam xkooi/XOAN4ALTzwT5nU+13PdxyRVZOvq/9+uocblGa/k3frtWsRIz8BBt1wcobxNprH qQd1iUwf1V6UKbv2VDNdJ/VX+PsCET2klo7Q7Prr2VV0Le1jdGqcfBRVx5BEQbhf/2Ua VkVA== 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:user-agent; bh=12Gmw5zKib47jcBiDKW7HN4evhmenszIUvUtcBNVr/w=; b=K40pmg99OG4jL8EFlqZjAPr5H+4llKJCEIIXoa8nWnSCVb+1AMsQUJD2Nih3ceQUec 7fVIHAf2wjnnZsw3JT+1/+E5nuVQ/o9fpOFjpiFuNFG5+0pWPhSXfs8lzGUBYi98Zfwy wQXGB7Ov3tseWFhcPoMCu+B9slT0si9Rdkh60gJYT+9l/GAQ+f0PU0XV7oEGW92hsqrK kvlp6SOhJRxapmRSebQbvXHEeq98uuCHgHuDfrUEyqf7t6OpmgRVuJkE4311g9qojDwS CTexhXCSa9jUdI/HvvSZxJIkRmfh/WVDyLV2LGu4WhZrMvCCbf/M9a7cCmgBM8D/XLHn NUAw== X-Gm-Message-State: APjAAAVSVURKuP0jATqWF8sXj3RWW9ZiXcmxVSTVOARBrJq8QTn538GD FbB4OK5fdl/ujQHOvUZrBrKh6Q== X-Received: by 2002:a17:90a:9b8a:: with SMTP id g10mr9335809pjp.66.1561156067118; Fri, 21 Jun 2019 15:27:47 -0700 (PDT) Received: from localhost ([2601:646:8f00:18d9:d0fa:7a4b:764f:de48]) by smtp.gmail.com with ESMTPSA id m2sm3241108pgq.48.2019.06.21.15.27.46 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 21 Jun 2019 15:27:46 -0700 (PDT) Date: Fri, 21 Jun 2019 15:27:45 -0700 From: Stanislav Fomichev To: Andrii Nakryiko Cc: kernel test robot , Stanislav Fomichev , Daniel Borkmann , Martin Lau , LKML , Stephen Rothwell , bpf , lkp@01.org Subject: Re: [selftests/bpf] 69d96519db: kernel_selftests.bpf.test_socket_cookie.fail Message-ID: <20190621222745.GH1383@mini-arch> References: <20190621084040.GU7221@shao2-debian> <20190621161039.GF1383@mini-arch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/21, Andrii Nakryiko wrote: > ) > > On Fri, Jun 21, 2019 at 9:11 AM Stanislav Fomichev wrote: > > > > On 06/21, kernel test robot wrote: > > > FYI, we noticed the following commit (built with gcc-7): > > > > > > commit: 69d96519dbf0bfa1868dc8597d4b9b2cdeb009d7 ("selftests/bpf: convert socket_cookie test to sk storage") > > > https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git master > > > > > > in testcase: kernel_selftests > > > with following parameters: > > > > > > group: kselftests-00 > > > > > > test-description: The kernel contains a set of "self tests" under the tools/testing/selftests/ directory. These are intended to be small unit tests to exercise individual code paths in the kernel. > > > test-url: https://www.kernel.org/doc/Documentation/kselftest.txt > > > > > > > > > on test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 4G > > > > > > caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace): > > > > > > > > > If you fix the issue, kindly add following tag > > > Reported-by: kernel test robot > > > > > > # selftests: bpf: test_socket_cookie > > > # libbpf: failed to create map (name: 'socket_cookies'): Invalid > > > # argument > > Another case of old clang trying to create a map that depends on BTF? > > Should we maybe switch those BTF checks in the kernel to return > > EOPNOTSUPP to make it easy to diagnose? > > For older compilers that don't generate DATASEC/VAR, you'll see a clear message: > > libbpf: DATASEC '.maps' not found. > > So this must be something else. I just confirmed with clang version > 7.0.20180201 that for ./test_socket_cookie that's the first line > that's emitted on failure. Thanks for checking, I also took a look at the attached kernel_selftests.xz, here is what it has: 2019-06-21 11:58:35 ln -sf /usr/bin/clang-6.0 /usr/bin/clang 2019-06-21 11:58:35 ln -sf /usr/bin/llc-6.0 /usr/bin/llc ... # BTF libbpf test[1] (test_btf_haskv.o): SKIP. No ELF .BTF found # BTF libbpf test[2] (test_btf_nokv.o): SKIP. No ELF .BTF found ... # Test case #0 (btf_dump_test_case_syntax): test_btf_dump_case:71:FAIL # failed to load test BTF: -2 # Test case #1 (btf_dump_test_case_ordering): test_btf_dump_case:71:FAIL # failed to load test BTF: -2 ... And so on. So there is clearly an old clang that doesn't emit any BTF. And I also don't see your recent abd29c931459 before 69d96519dbf0 in linux-next, that's why it doesn't complain about missing/corrupt BTF. We need to convince lkp people to upgrade clang, otherwise, I suppose, we'll get more of these reportings after your recent df0b77925982 :-( > > > # libbpf: failed to load object './socket_cookie_prog.o' > > > # (test_socket_cookie.c:149: errno: Invalid argument) Failed to load > > > # ./socket_cookie_prog.o > > > # FAILED > > > not ok 15 selftests: bpf: test_socket_cookie > > > > > > > > > > > > > > > To reproduce: > > > > > > # build kernel > > > cd linux > > > cp config-5.2.0-rc2-00598-g69d9651 .config > > > make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 olddefconfig > > > make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 prepare > > > make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 modules_prepare > > > make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 SHELL=/bin/bash > > > make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 bzImage > > > > > > > > > git clone https://github.com/intel/lkp-tests.git > > > cd lkp-tests > > > bin/lkp qemu -k job-script # job-script is attached in this email > > > > > > > > > > > > Thanks, > > > Rong Chen > > > > > > >