Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1013231ybi; Fri, 21 Jun 2019 12:06:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqzXYCUMipdi/2LWkDxh6nBNYOpj3pGE1z/sHG6JYjWuQfsGqw/xuRRuxdviR6sQJkKNjl4q X-Received: by 2002:a17:90a:ac14:: with SMTP id o20mr8737236pjq.114.1561144013054; Fri, 21 Jun 2019 12:06:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561144013; cv=none; d=google.com; s=arc-20160816; b=IF4SMSad3JCv6xRaG0BtJj/OXjjmbjky4iNKDiktMo9shOD7Qr/TDu2+teOajBWbG4 tHHqse6T7MyEHsZxssUcjuXnMMNgkhnry3cUJo88hw93KIhC2iAPpSxIjDgW2OmGvg5R Spji3MOZjmIEdmCwlFqPglXj0AU5KkLoO2BwMQgb/yVmkpv5wnV9v55U04HX1igdIJHd 5Y4GP5Wnjh7Vaf0G3awGrW63r93prAcUAkDi/0kTydvK9uUQWFvIzr5h0G/cgw1gjGyY 96Cxhoow+k2ie6PPzKyscnwLJizsxF5oFiqapY813/WtR6+Hp7W9N40uSYb/whgpz/xZ iJSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=2jabc8ETAM1tQvMfNwKY1jPA89l8aJAfxYNUpiE3MoE=; b=ks+93uNdzFtkqaPmehG4E8ORZR2KdXYdnU/lPGYUJ0oVW1g08JzTzt+xia/v5Cw9+l 1kWu+E3gq7YzdiFtF9CPSmYQzY6uH6pXlRCwhJ6lYSEgrzBX1lgY2380f3AVC1vtUF4G cpLTVMFVNDbMnO0gR0qlVbkep5z5iIzJPj3Dett9Cd2GNxcyfsjm0KYi+ooKxxagnagH q5g8qTlZzWu/1eEoNtUpy70vjiTm81shnILtN/SpUhBE6hbUJfVll6+4cLz9cGXk4+su w2lKwEKRJLhDetoPmZyheFG9ztSWhwfSDuqtj0+5KUUkCb+id6RJ/zpR58IFfYLnwfVA tDOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZIvKXK7N; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k38si3234438pgm.500.2019.06.21.12.06.37; Fri, 21 Jun 2019 12:06:53 -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=@gmail.com header.s=20161025 header.b=ZIvKXK7N; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726439AbfFUTGX (ORCPT + 99 others); Fri, 21 Jun 2019 15:06:23 -0400 Received: from mail-qk1-f194.google.com ([209.85.222.194]:34424 "EHLO mail-qk1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725947AbfFUTGW (ORCPT ); Fri, 21 Jun 2019 15:06:22 -0400 Received: by mail-qk1-f194.google.com with SMTP id t8so5256565qkt.1; Fri, 21 Jun 2019 12:06:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2jabc8ETAM1tQvMfNwKY1jPA89l8aJAfxYNUpiE3MoE=; b=ZIvKXK7NiPWeFdhSQgGe4TXu21NsATnkOG6MAI+0GP6gUGQQ1B43qTMbmUPBpFg1iM 8+P1XO8y2mIHUT+XKosHjiVJWm967yPC3isLKtVGsPcaYUwl5pa8T5UKif7CQo2+lFNA 1lYGrr/Va7xBneCcIN9PT8ECGxc+W7VdNFVpHR37k6qlgFUtfZUOaMWhRbiHerp35PyW iYdi8rzrHWpwAjCfAgyBWSKvg6sbBOp1pJrmyUJKrT4ImPXVEe/21BrnC0WPggFSyyCH 4ilJq4Q/8q6fIvvKSfOGrvI1CRmgpxQnWUX2jKZ2AmGP8E83crMx171jna1tH3ojo52Q CrCw== 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=2jabc8ETAM1tQvMfNwKY1jPA89l8aJAfxYNUpiE3MoE=; b=CDCcHu6VdyCTx7bPEdv3NdHhNvIYufdNc8InZz7etY+KXM/qRyg/GFdZL4VlsV5ZuW K21NkrIrJlkOAAbZ00n0Yw9+cciWy670GKDqkU1yJ6VdqfPoHRTLCpWa7xbL80+cF4Jg w653otrs2Hsut6tQ487EsfjHnVwCWLDcIOBEjDPekD6Xl/hZ38o8cLqP+hclvtKaz8bk MXv4esh0mwz+iFP0GKi1QUFQjNFNvR61Db1R/DdxMqmP/q2ojWWEZkCvcFaj0h0kg/3C hLV759FGSo8NYJNN4gU4Ky80JzExmSvRjJOVSl1AwzZUk7d7/ONfWrtFscptQ/aCaS6O CHkA== X-Gm-Message-State: APjAAAUesxvt4aVVvI9RXmp1hyMSkNEfQ0/K7IN3j6n18dn1TzUX6Ms2 qcbIXg9JfijvMAgu5+J76/o8+pvniKWlX2lLmYc= X-Received: by 2002:ae9:d803:: with SMTP id u3mr7089513qkf.437.1561143981730; Fri, 21 Jun 2019 12:06:21 -0700 (PDT) MIME-Version: 1.0 References: <20190621084040.GU7221@shao2-debian> <20190621161039.GF1383@mini-arch> In-Reply-To: <20190621161039.GF1383@mini-arch> From: Andrii Nakryiko Date: Fri, 21 Jun 2019 12:06:10 -0700 Message-ID: Subject: Re: [selftests/bpf] 69d96519db: kernel_selftests.bpf.test_socket_cookie.fail To: Stanislav Fomichev Cc: kernel test robot , Stanislav Fomichev , Daniel Borkmann , Martin Lau , LKML , Stephen Rothwell , bpf , lkp@01.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ) 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. > > > # 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 > > >