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=-2.3 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 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 9B2A5C433E0 for ; Tue, 26 May 2020 12:27:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 70A312068D for ; Tue, 26 May 2020 12:27:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=mojatatu-com.20150623.gappssmtp.com header.i=@mojatatu-com.20150623.gappssmtp.com header.b="SZ2OcLjw" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730107AbgEZM1Q (ORCPT ); Tue, 26 May 2020 08:27:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726437AbgEZM1Q (ORCPT ); Tue, 26 May 2020 08:27:16 -0400 Received: from mail-qv1-xf44.google.com (mail-qv1-xf44.google.com [IPv6:2607:f8b0:4864:20::f44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED246C03E96D for ; Tue, 26 May 2020 05:27:15 -0700 (PDT) Received: by mail-qv1-xf44.google.com with SMTP id fb16so9313367qvb.5 for ; Tue, 26 May 2020 05:27:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mojatatu-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=5bjnTbxSymDBodMQJw+v0RTaXDOExpuPQyJbhorVKU4=; b=SZ2OcLjwMnYMYIBP8p4GRPfKXMjtcrvr+j3A0T+qDw3dCVSw05paeZCeXFIdTfxMIU 0c9hbc7Y8BM6g3RJNl4G6djm44ltWY+8N+h+E3UMzYaEsLkLrZ0ARmN0ccQV+6M4r3wl eicoMQcbU5PzpVAf7nm8ihw1H7IL4LL7yn1xOAp/curRptisSQ9tACJDtUUp4+QjIozG oW8XNpgU5/kLDmgYdtWMeVLxQnghtFx0BQwjuILVbhoVHHZ4IPGFAbwKAuRRQpT9iNfq RbNg/6IHf0RhusKAR5eVzSlidkq4ck9yGF8zBYgRUHsUqiwrONdHQHS1O4BDGWGKdF5X L6KQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=5bjnTbxSymDBodMQJw+v0RTaXDOExpuPQyJbhorVKU4=; b=C6VYI+qrqRaRiignFybmaxz5G48r1tcA1PBr6a/BgtXhuZ7kt74gYbXd6WMN9tZFxZ sV94p32E8m8DSPm79wkBcziGa1sXWnrcx2GnBr/5GYwZuJZQeqMxLxl0ZHl+9DMA154W PbFcUSoVBnlUMp4xG2g+SZzcvVCvC85CaOyATKEjx9z5kgWJXsFR1dlW3BHaCBMlnuis K2LMlEVEOkyqZqQYD2bDcj1PVCelSjsHFJ0pPjM8+SKmacYJcIo37DjKYDgIGMsjYmRx 2GmfpWLNRbyv/eAMTJL3v4usThHGDQzFb/uycCD2Ung2RmLLdZkRLmNI2uNvd9/EAMMC t0Ng== X-Gm-Message-State: AOAM530IMRmERjTd2Nj3QBaIEKX5DJNTnaI7d3HSgbwfwL0wwME9KJlC cK63u3G0z9yNxHhr2NmHYC0WkUAjmKo2kw== X-Google-Smtp-Source: ABdhPJyfWTURvuJnAjCrXqljlJx7seJ3yRiirfvFRctG57kza947P3Q4eDennjGyq5Dz++N2GKPGeQ== X-Received: by 2002:ad4:4a8b:: with SMTP id h11mr20329603qvx.232.1590496035006; Tue, 26 May 2020 05:27:15 -0700 (PDT) Received: from [10.42.0.108] (23-233-27-60.cpe.pppoe.ca. [23.233.27.60]) by smtp.googlemail.com with ESMTPSA id h13sm17842260qti.32.2020.05.26.05.27.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 26 May 2020 05:27:14 -0700 (PDT) Subject: Re: [PATCH iproute2 v3 0/2] bpf: memory access fixes To: Andrea Claudi Cc: Daniel Borkmann , Stephen Hemminger , linux-netdev , David Ahern , asmadeus@codewreck.org References: <20200423175857.20180-1-jhs@emojatatu.com> <125e68f2-2868-34c1-7c13-f3fcdf844835@mojatatu.com> <1d1e025b-346b-d5f7-6c44-da5a64f31a2c@mojatatu.com> From: Jamal Hadi Salim Message-ID: <8559907b-7a39-b719-f8bd-c7851e669372@mojatatu.com> Date: Tue, 26 May 2020 08:27:12 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 2020-05-25 4:53 a.m., Andrea Claudi wrote: > > Reverting c0325b06382c will for sure fix the segfault identified by > Jamal and get rid of the problems highlighted by Daniel and others. > To fix the s[n]printf truncation warning we can simply check for its > return value. From the snprintf man page: > > "a return value of size or more means that the output was truncated." > (caveat: until glibc 2.0.6 ret value for truncation is -1) > > Jamal: if this works for you, I can submit an alternative to this > patch series doing what I proposed above. What do you think? > I am ok with that approach. cheers, jamal