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=-5.5 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,USER_AGENT_MUTT autolearn=ham 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 DB347C43387 for ; Wed, 16 Jan 2019 22:01:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A7FC7206C2 for ; Wed, 16 Jan 2019 22:01:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=fomichev-me.20150623.gappssmtp.com header.i=@fomichev-me.20150623.gappssmtp.com header.b="DwjxcHzy" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732161AbfAPWBd (ORCPT ); Wed, 16 Jan 2019 17:01:33 -0500 Received: from mail-pl1-f193.google.com ([209.85.214.193]:33055 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732144AbfAPWBd (ORCPT ); Wed, 16 Jan 2019 17:01:33 -0500 Received: by mail-pl1-f193.google.com with SMTP id z23so3674756plo.0 for ; Wed, 16 Jan 2019 14:01:32 -0800 (PST) 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=w6TJR2RYk/vk1mnuHdLRAdl+cwcw/23Bi5DjCF8/AIw=; b=DwjxcHzyhqo+NOeYUaJpweemeYbkMtVkHoHX1IA9XkSPClx8IfXm+mlXFILLnz8zls r2SfX3d2V8+Bc37NHnMa6GN5wSLcWRLavYNZ9aPJgLsYiJKcWU/GzYQb0/IpmegEo3mb 45n9X1Ey8MI2QIxO2jz6YHCBMlnN4rX/Lj47m9purREAnnPg0lrybegYzFfcw//6S6ap oVccY37Y6tcb+DO41+WsI6xF5wR5M9Ub0/33/K6pAWSuVnEzfmtj1KsdMDnov+Mso9AM fed9a0KHSF+9c1msG6Cv8gG73urMk/CEiOT10ZvTWE9LVLiJtvsz+Iaphyh4t5MbktBV oofA== 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=w6TJR2RYk/vk1mnuHdLRAdl+cwcw/23Bi5DjCF8/AIw=; b=cCetkbjuH4jzm43AO0SP9rAwhoA41McKZ5gvo2aPVlrP9ST4LWYYNKUht4IvGpvPfe 1OVN2Okas9+9XpKKz2UL4aRLVT8QjHAdmL8vE2FaXTXVmS+prPornUAFsV1Qc1dEZ1K+ IpHY1g7biAVB9DPq3MK81v9+jjOvPwd1QipH0sZx8/0g7ZwhlV3cr7afKjl0NUp+hyOJ jIP47yGi5wnKAW6GuXSJir2RaPLUGUM2AjNWVTMX73lLkIdTHpAamnDWRwL8adSEm+Nu E/vXlkEESla2N9EUkQNJ/IiKkbMw88XyaWjBuYZUHAZXp/pgHsFaaoqAK+8M6BLW3Nme t9hQ== X-Gm-Message-State: AJcUukddnRbigBggcSkfa2CA7+aIbYPYzT7dEtw3qbFU8ZoIbqAzax3k zv36zrziqfTD0SbmQd9VPtMfRA== X-Google-Smtp-Source: ALg8bN5fiXKMMwpon8H78lsI9d0F2zCuAxmwtjFVT7A6LMoJ6ktPJRIMcH/57fcTPAjGEoa45iSMNA== X-Received: by 2002:a17:902:4d46:: with SMTP id o6mr11688916plh.302.1547676092508; Wed, 16 Jan 2019 14:01:32 -0800 (PST) Received: from localhost ([2601:646:8f00:18d9:d0fa:7a4b:764f:de48]) by smtp.gmail.com with ESMTPSA id m67sm14027088pfb.25.2019.01.16.14.01.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 16 Jan 2019 14:01:31 -0800 (PST) Date: Wed, 16 Jan 2019 14:01:30 -0800 From: Stanislav Fomichev To: Daniel Borkmann Cc: Stanislav Fomichev , netdev@vger.kernel.org, davem@davemloft.net, ast@kernel.org, songliubraving@fb.com Subject: Re: [PATCH bpf v2 1/3] bpf: don't assume build-id length is always 20 bytes Message-ID: <20190116220130.GF726@mini-arch> References: <0FC05078-4DF7-453E-8F36-7C0F5AF81F69@fb.com> <20190116181119.96117-1-sdf@google.com> <6704685c-55f0-0ef2-99bc-d9cb3caf47bc@iogearbox.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6704685c-55f0-0ef2-99bc-d9cb3caf47bc@iogearbox.net> User-Agent: Mutt/1.11.2 (2019-01-07) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 01/16, Daniel Borkmann wrote: > On 01/16/2019 07:11 PM, Stanislav Fomichev wrote: > > Build-id length is not fixed to 20, it can be (`man ld` /--build-id): > > * 128-bit (uuid) > > * 160-bit (sha1) > > * any length specified in ld --build-id=0xhexstring > > > > To fix the issue of missing BPF_STACK_BUILD_ID_VALID for shorter build-ids, > > assume that build-id is somewhere in the range of 1 .. 20. > > Set the remaining bytes to zero. > > > > v2: > > * don't introduce new "len = min(BPF_BUILD_ID_SIZE, nhdr->n_descsz)", > > we already know that nhdr->n_descsz <= BPF_BUILD_ID_SIZE if we enter > > this 'if' condition > > > > Fixes: 615755a77b24 ("bpf: extend stackmap to save binary_build_id+offset instead of address") > > Signed-off-by: Stanislav Fomichev > > Hmm, looks like rest of the v2 series didn't make it to the list. > Please double check; just in case simply resend the full v2 set so > it properly ends up in patchwork. Oh, I didn't send the first two patches because I didn't change them, I'll resend full v2 series in a moment. > > Thanks, > Daniel