From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1B742C433E0 for ; Thu, 14 Jan 2021 22:04:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E30B623A5E for ; Thu, 14 Jan 2021 22:04:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730010AbhANWEO (ORCPT ); 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