Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp356888pxb; Wed, 14 Apr 2021 17:42:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwtatWTFr1d9WsTc02izfDQB0ot9reHU7TT6f260MREKferdWioDwzWO8fd0OT+AnnjH9FG X-Received: by 2002:a17:906:29ca:: with SMTP id y10mr760841eje.250.1618447356858; Wed, 14 Apr 2021 17:42:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618447356; cv=none; d=google.com; s=arc-20160816; b=LV1bTr3fxx8WV64xjWfwvXpqxrUYLHIiMXoH+SiWKlIzXsAJ1I8hGG9BEbzkA+xf/5 k5B30CsnFoCT/RLrrHtr2BjUQl6B4/O5xPjij5ijanWplglcrcU/FL31PZlLLTwn/ojy BD4deMnMzkaU0+HFrorkvl1JyyVrU9goYjLxIqalUQMGDoW7Pn25Pn1t8uf/RFdCnx9d FuGb8ik2dDv/9LmcYORcFqs37jPpwhSIG+ONpmzLtB92zF13Gj2Y6dfT07CxvX0rAHAj y4jLXBNqK6EMJZ/eYagcJ5VKDxJ6FpaMILJchgmZZWVaZuL5NI8NvaTjYAY4MheSrqXn vo9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=GSVZulurztEIDpsvLgnH0S/lLQGg76QIVX9BgE5+U8w=; b=UG2tkKKT8tMLsFp42WXtpo33fLtXFfPVt7DzQpPHOdFg+hVZ+NTQnCBfNyTkBJ5T1l YmYJAgizpQdMgYytxzc6l7UE8stmECaHqWiA/uwRFD87DoLpgIpwx6kjwCT0m+Et2xTa Hg0U+mreDz3zNT3vzLpIybBBO3P3mwGmybrutLMGqURgAXI4kMo612/yQPM+Qvf5poU3 SJ3CzrNe2MPryAYT94MP1VLbKePR1EYsgtrHzjc3lj6gsTYEdOtNbs+YCIISlDKz8PuH Qg2EJTM1yQaKMLv+GF4EI8CGcgH6nfEX2XTmFrpG5cccJu1Eu+TthnnphQC8NLXrDCWV 1B/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=EFpytYWN; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k1si713785ejp.353.2021.04.14.17.42.14; Wed, 14 Apr 2021 17:42:36 -0700 (PDT) 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=@chromium.org header.s=google header.b=EFpytYWN; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352684AbhDNSbJ (ORCPT + 99 others); Wed, 14 Apr 2021 14:31:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352047AbhDNSbC (ORCPT ); Wed, 14 Apr 2021 14:31:02 -0400 Received: from mail-il1-x12c.google.com (mail-il1-x12c.google.com [IPv6:2607:f8b0:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2EE20C061756 for ; Wed, 14 Apr 2021 11:30:41 -0700 (PDT) Received: by mail-il1-x12c.google.com with SMTP id i22so13252883ila.11 for ; Wed, 14 Apr 2021 11:30:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=GSVZulurztEIDpsvLgnH0S/lLQGg76QIVX9BgE5+U8w=; b=EFpytYWN2VnOFuIdwbqUT/TFmTrUeqlTlgURImphJPv1xOxmT2TJNpJMwo/ofmTFms CtAszqE3HIbdYeb434Hs9FGgu34u+WJUZYvvllo7KJF0iPueiFSLDbOBhWryG/DjfvL5 aIoD32p960Ir1xAn4KRqj8s3RahPz/Ro1ba4Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=GSVZulurztEIDpsvLgnH0S/lLQGg76QIVX9BgE5+U8w=; b=FbDSpl40ydGoZgKKxlemisSZszJG7ykd6z+g5iNIX4PW9J0QkILbIWThfOAcVPoUIT dbtCfOxOiJMIi62eb/5mgaDhwounx056ewFSs4ceFLRy4jfvMH4IC6CnVpiz/btP3CKb qlivG5NqLSBvsDVuPPd93YjJAFdcEH+8vNE2W7ezEU0CrMD+wYlAhl+boHAjd5FC4YB7 ++y51lcWgaz/sgf5tSHiCB1rkSpGXxg1xCwOV2DbAVZLyR1BspuGoQusMrlTl2CjrZFm 2mbffrqRsuhpHaNaEc88SYZjVvLSe4E3cihjcGXpEWTBCg859VnC64UdQTXufJxv7T6J RQVA== X-Gm-Message-State: AOAM533qBYirEZzDgL1N4KSW1A8xjBkqM/LEkSgSmGbxNrgxA/X0kTD0 gLjN7546fgdhrAtTvIy8JUTHqZAxmiEX4cGOFAtIew== X-Received: by 2002:a92:ce90:: with SMTP id r16mr203960ilo.220.1618425040629; Wed, 14 Apr 2021 11:30:40 -0700 (PDT) MIME-Version: 1.0 References: <20210412153754.235500-1-revest@chromium.org> <20210412153754.235500-4-revest@chromium.org> In-Reply-To: From: Florent Revest Date: Wed, 14 Apr 2021 20:30:29 +0200 Message-ID: Subject: Re: [PATCH bpf-next v3 3/6] bpf: Add a bpf_snprintf helper To: Geert Uytterhoeven Cc: Andrii Nakryiko , bpf , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Yonghong Song , KP Singh , Brendan Jackman , open list Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hey Geert! :) On Wed, Apr 14, 2021 at 8:02 PM Geert Uytterhoeven wrote: > On Wed, Apr 14, 2021 at 9:41 AM Andrii Nakryiko > wrote: > > On Mon, Apr 12, 2021 at 8:38 AM Florent Revest wrote: > > > + fmt = (char *)fmt_addr + fmt_map_off; > > > + > > > > bot complained about lack of (long) cast before fmt_addr, please address > > (uintptr_t), I assume? (uintptr_t) seems more correct to me as well. However, I just had a look at the rest of verifier.c and (long) casts are already used pretty much everywhere whereas uintptr_t isn't used yet. I'll send a v4 with a long cast for the sake of consistency with the rest of the verifier.