Received: by 2002:ac0:950e:0:0:0:0:0 with SMTP id f14csp7364imc; Fri, 15 Mar 2019 15:07:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqxZ7M6zAjJJ2SAN6uspQKvEOavo0M1wtdTA0YTE9fy2VNcdVNxDyaG4Bexaz25WLjH+NmOZ X-Received: by 2002:a17:902:8c8b:: with SMTP id t11mr6496604plo.148.1552687620379; Fri, 15 Mar 2019 15:07:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552687620; cv=none; d=google.com; s=arc-20160816; b=hyHMnkQ71btFkpldAo1Kz8Iw0629FfUjpH2WM958uvD+/7Fe4TXHsioXc45oIB6RJf Z1LAI4l5rRRkqMPCvbC902x5r9ryUhrUw8wbe8SUB49F2P4qrS5OiHsQBC7L4dx1pSWn kyc8eJ/Ou4Z4HFZMP+uJxnAF7diCjOVhDanLEQZjZCsvnaBK3OIZgTmLRWs6cgORukYR 7ktf+rPMCIfh8yPVJ281nbmGjaAMd3qsbBag/V1M5kSHnjBql9ZrJHw+AYvHUp4Efr2y zGVUNM8HZO4KapzvEQRhAKXtZFOtNLgJQldtLlnJdnTjCenCgQZ+H39tzs0SsWIofHSN nGUA== 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=tZR3NvyvgI9FAd6NHSH76G6CMuZEuWEAU0R2dPeChg4=; b=g54kneeSM3jH7gC9/VMTzvOAyEVMU2fQqF1iZGEOmXiiUH6TidZrdFR9UYSfy2NElC bHoN0ooPdGMW3HJpbDFvDUYKiW3SmATzA+3rLcVLV08hIBkNg6UywFKedVcmUKLR+51t XLmAfoM2qgAM7INBlBjUWGBCPHx1rNuvp7u7xR13S96Wax8fBkMx3hETDPWZbXPQMNaY OCtjmJ606SnwY4YktOfEww5j+Kb8ZBju6f3HVB7TJY2HBddBUVpm7+FziN/liLQs/abh gBmPqwa3MsmBbCM0RJna0vqObH/4YzLB8Ag9NIRrM/WNiyEFY3NzhkNHgEjZUTEIMTf0 QlLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fomichev-me.20150623.gappssmtp.com header.s=20150623 header.b=ISb8iLfa; 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 c16si2763209plo.412.2019.03.15.15.06.45; Fri, 15 Mar 2019 15:07:00 -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=ISb8iLfa; 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 S1726973AbfCOWF5 (ORCPT + 99 others); Fri, 15 Mar 2019 18:05:57 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:39146 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726953AbfCOWF4 (ORCPT ); Fri, 15 Mar 2019 18:05:56 -0400 Received: by mail-pf1-f196.google.com with SMTP id i20so7247481pfo.6 for ; Fri, 15 Mar 2019 15:05:56 -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=tZR3NvyvgI9FAd6NHSH76G6CMuZEuWEAU0R2dPeChg4=; b=ISb8iLfa8FTnI885XEbGnSRWKny4r0Nn4JMF0T7kKBzWQ1rjJX9npj78erz3SO3uSD oFmi9NF/9Jaxn0Bqw7lbP3rCWgOef++DEiY1rXTMHfS1DsaEQXEuVj377C0nH6gh+2s7 eDe6/laL3VispluO9nMQnkdCeJATO5+0QvJFWpMqeoinfyHLmTPxV0W46fcpfRyFl57r PCkz1SjCa5812ZGfynTsIp32bILwIv6Owj2b9oTKuU6QCy77kgK79Zc/LiZMEgHKneCm Mb/4Lw8X4szAg8C3nfAAO1pG5bM8HnG1Bs3OO+/rEclUki45hDf25aSN/TV/UFlATtcj UISw== 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=tZR3NvyvgI9FAd6NHSH76G6CMuZEuWEAU0R2dPeChg4=; b=EjS7P4tlvNhdwNAD5q45V1sXTTcRA/mAQzILA+TSzu4cmGvDtkZ0eUeQStOZtDplQ1 Z+NC9ueC0z3S5BXdWmQUAzs7wfgEEl8jEvi3bTtO+sLzejNDXgPrYsX6pxLz1M8zlwcA Gl0aIxFynETVDxJbaLtjXPS+b9SM4/+G1CBOwIkx+2ZNrp17ehD1eyhLyvSMhZTccld3 mAsVm8qCgFR0H8DX53rtpZeipdcCPY1BhIBN2G3v9wl9r+5jPGANqgOYqZ2USkq47Kd3 Jx97FwDJU6pOWpaOyBz0B/aa5irMfTZx5l9hJqN1UMuBds5vWshhv2BUzUeyDyqgNHUS cYVw== X-Gm-Message-State: APjAAAXJp1sQCqvgZmzjeec7bcWTQEDPO5FS0fwqSvKL+Iw3kR5Nzwh/ 6oDSrgCpGbZ/Coqv+FlSiVYAMg== X-Received: by 2002:a65:6554:: with SMTP id a20mr5632137pgw.170.1552687555620; Fri, 15 Mar 2019 15:05:55 -0700 (PDT) Received: from localhost ([2601:646:8f00:18d9:d0fa:7a4b:764f:de48]) by smtp.gmail.com with ESMTPSA id q86sm8761255pfi.171.2019.03.15.15.05.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Mar 2019 15:05:54 -0700 (PDT) Date: Fri, 15 Mar 2019 15:05:54 -0700 From: Stanislav Fomichev To: Ivan Vecera Cc: netdev@vger.kernel.org, Shuah Khan , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , "open list:KERNEL SELFTEST FRAMEWORK" , "open list:BPF (Safe dynamic programs and tools)" , open list Subject: Re: [PATCH net-next] selftests: bpf: modify urandom_read and link it non-statically Message-ID: <20190315220554.GA7431@mini-arch.hsd1.ca.comcast.net> References: <20190315200414.32346-1-ivecera@redhat.com> <20190315200847.GC5481@mini-arch.hsd1.ca.comcast.net> <2dcdc11c-4d04-4b0e-ddb7-04d969d04651@redhat.com> <20190315205652.GD5481@mini-arch.hsd1.ca.comcast.net> <1595006055.9467881.1552686646726.JavaMail.zimbra@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1595006055.9467881.1552686646726.JavaMail.zimbra@redhat.com> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/15, Ivan Vecera wrote: > > ----- Stanislav Fomichev wrote: > > On 03/15, Ivan Vecera wrote: > > > On 15. 03. 19 21:08, Stanislav Fomichev wrote: > > > > On 03/15, Ivan Vecera wrote: > > > > > After some experiences I found that urandom_read does not need to be > > > > > linked statically. When the 'read' syscall call is moved to separate > > > > > non-inlined function then bpf_get_stackid() is able to find > > > > > the executable in stack trace and extract its build_id from it. > > > > But why? Do you have some problems with it being linked statically? > > > > > > > Dependency... you don't need to install static glibc to compile the bpf > > > samples. Shared libc is available everytime. > > Oh, the distros that do -devel _and_ -static packages :-) > > > > So your patch essentially adds a call, that leaves a trace on the stack > > with our build-id. I guess that works as well. > > Without that additional call this does not work and build_id selftest fails. Oh, yeah, I was just trying to clarify why it fails without -static and why your patch makes it work for non-static :-) You can put more details in the commit message; you'd have to resubmit whenever net-next/bpf-next opens anyway. > > I.