Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp611314pxb; Thu, 14 Jan 2021 14:06:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJyaOOxCZDbhbSXX44swVWV1a8iqv6XNWnXGqL4TEXKLbkVU1UzZ+PjXSu8J8eXZ19FJAnCn X-Received: by 2002:a17:906:af75:: with SMTP id os21mr6906329ejb.330.1610661972567; Thu, 14 Jan 2021 14:06:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610661972; cv=none; d=google.com; s=arc-20160816; b=w+OOhkzc7LJ7uy7Xu+p0EyJ2D7L3k2zHrDvUyVNxObHzjRaERDb44Smf/avRWh0O3q XSfaBcC99nLMWUNPhlej1KELon+sRaaQBHeqbofw4dm1i2nNqyxCvBDbCXALwHaBuKy6 Ggz4Xn34eJf4pbgcgGO/XWRCVwjRoiyjimSqtTKM1Bx6obp3A2NPYN+3ylrqjao8xVk2 awOsNj7ZSi00imU07UglHY/btNlHfOGFl/ToL5M2tmqGplCX4rgAyUgYBRubWXYf3qRJ 8wPOocxYC3iKaINMqdMIPP9c4Umt2+Sd8+2odTam2nLzI6KoTIz4RKNbXU5wkoLi+jGr 18bQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=fMwPX+DDLgd8G3X//6EUSPXEB+1/G7CVebPJVxT8KLc=; b=IAjX6mNTcvO5AGo2GqL+c0Kxd34OAmiR/5iIoJigcOaeRYkaDxqCGLm0WDZJB8rPJp jnQNk+N2ABQLWWVPAhQsyi0RHsv6D7z5/NS+bxA2EEtCUIxiM6zUW3d5840sCU7mIo3K nwNzUsoru2eWifZruxdyeOkY236Pc1e8xExHObB1PiMpRmzhfratv+dPIJMAgd6zU9Zc bkWQjaGvjhwVBDqJEA2EMtKUT/a8Oo7H2Q+lYlHSVtA0a+zMlfZKpK7vnAhSxBR8J77G szlSd/CcmEfoXLBcY/EnWiE+4qSSDxYdpSyvRw1kDEVlNoi/ShC3Sy0ePuBWy4PbQP+q HA2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Lgfirvh/"; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h15si3107806ejq.383.2021.01.14.14.05.48; Thu, 14 Jan 2021 14:06:12 -0800 (PST) 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=@redhat.com header.s=mimecast20190719 header.b="Lgfirvh/"; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729891AbhANWEO (ORCPT + 99 others); Thu, 14 Jan 2021 17:04:14 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:39762 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726614AbhANWEM (ORCPT ); Thu, 14 Jan 2021 17:04:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610661766; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=fMwPX+DDLgd8G3X//6EUSPXEB+1/G7CVebPJVxT8KLc=; b=Lgfirvh/321uz2eYcai6sdGk05qqsevzZrPOUOR7c57WkShxDYfMFhwHDylz3JbwQEZ8jZ Q554iBuAHbhnCWBL1tK+3JVtSvTHw/Bp9rp1qZm2CwmlJW6RdeABsMJOWboOBtdiNUZjKC w0KYAp1lEpqePBtc1si6DVHuupY7tKM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-173-JNKb26mrOfWSg4KP1xCjRw-1; Thu, 14 Jan 2021 17:02:42 -0500 X-MC-Unique: JNKb26mrOfWSg4KP1xCjRw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9DFA18066E0; Thu, 14 Jan 2021 22:02:39 +0000 (UTC) Received: from krava (unknown [10.40.195.188]) by smtp.corp.redhat.com (Postfix) with SMTP id 8C39E5D739; Thu, 14 Jan 2021 22:02:35 +0000 (UTC) Date: Thu, 14 Jan 2021 23:02:34 +0100 From: Jiri Olsa To: Yonghong Song Cc: Jiri Olsa , Arnaldo Carvalho de Melo , Alexei Starovoitov , Song Liu , lkml , bpf@vger.kernel.org, Peter Zijlstra , Ingo Molnar , Mark Rutland , Namhyung Kim , Alexander Shishkin , Michael Petlan , Ian Rogers , Stephane Eranian , Alexei Budankov , Andi Kleen , Adrian Hunter Subject: Re: [PATCH bpf-next 2/3] bpf: Add size arg to build_id_parse function Message-ID: <20210114220234.GA1456269@krava> References: <20210114134044.1418404-1-jolsa@kernel.org> <20210114134044.1418404-3-jolsa@kernel.org> <19f16729-96d6-cc8e-5bd5-c3f5940365d4@fb.com> <20210114200120.GF1416940@krava> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 14, 2021 at 01:05:33PM -0800, Yonghong Song wrote: > > > On 1/14/21 12:01 PM, Jiri Olsa wrote: > > On Thu, Jan 14, 2021 at 10:56:33AM -0800, Yonghong Song wrote: > > > > > > > > > On 1/14/21 5:40 AM, Jiri Olsa wrote: > > > > It's possible to have other build id types (other than default SHA1). > > > > Currently there's also ld support for MD5 build id. > > > > > > Currently, bpf build_id based stackmap does not returns the size of > > > the build_id. Did you see an issue here? I guess user space can check > > > the length of non-zero bits of the build id to decide what kind of > > > type it is, right? > > > > you can have zero bytes in the build id hash, so you need to get the size > > > > I never saw MD5 being used in practise just SHA1, but we added the > > size to be complete and make sure we'll fit with build id, because > > there's only limited space in mmap2 event > > I am asking to check whether we should extend uapi struct > bpf_stack_build_id to include build_id_size as well. I guess > we can delay this until a real use case. right, we can try make some MD5 build id binaries and check if it explodes with some bcc tools, but I don't expect that.. I'll try to find some time for that perf tool uses build ids in .debug cache as file links, and we had few isues there jirka