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.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 BA1BDC433EF for ; Tue, 14 Sep 2021 15:42:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9B77A61130 for ; Tue, 14 Sep 2021 15:42:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234883AbhINPnm (ORCPT ); Tue, 14 Sep 2021 11:43:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234879AbhINPnl (ORCPT ); Tue, 14 Sep 2021 11:43:41 -0400 Received: from mail-io1-xd30.google.com (mail-io1-xd30.google.com [IPv6:2607:f8b0:4864:20::d30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 274F7C061574 for ; Tue, 14 Sep 2021 08:42:24 -0700 (PDT) Received: by mail-io1-xd30.google.com with SMTP id b10so17670158ioq.9 for ; Tue, 14 Sep 2021 08:42:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=7PGgA6rNKVMvN4CZBXssmkU+Fy1XHZSQqwZCGLqixxY=; b=if360Kq6KpsAn9khW3rpsO6qtJnfvENdE/OJr5N2zJRVM6oTi1J1Jpb1/gd/Etud/V G4vwa+dYYeE6VI5iUdDN9rDg6V1ocnfKIaCBJByTG7qxUcGhNoHPHdAYc5WKxHB2Yev6 b/xZ5SKTdD3Qk/jpZ6g4gKYEK5jC6QZrEfx2dB3LGkXuuZ2KlxwhGuL47A+S8dKD1M2S VFpzotM4paxlHQN7jcTfZOplgdJKsqnjGRvoYRwMjrTGZA4fsDR0DFxAFDKpHhyYIvRW Zl17yH43yBhv0z5c3ajOTLYzXHQaafL15dX/mPPxN+B2z9LFf4Nj53+WAXipeOISDgib bDWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=7PGgA6rNKVMvN4CZBXssmkU+Fy1XHZSQqwZCGLqixxY=; b=YJK/0jxv4MVYLgXlp+482JPCqoHCm/5hChQS/HRBDxmP8lGBN2/a8lNht33GtnY6y4 sMW7/W/UFeHCptGsM7AhNl/LdRtwRS62Mwg77EQeCHQ4wxi9dsEVJK+vhnv5wjaZvkMa VyjaROrZ669SXnr8pVa9v661VMx9aW2obxiBsDaey/cHGm+Kj3YxjgnNYQN2H7qA57uA 8K7UK68cPWagx3PoysZsWiSrNCMI4pQooZKKWpP4aMM5O/SF5mgcvLRYDpvc8fZzSxtS BVemLiLg3nmXi9+QgM2oVc+2yArOeaIBCy0FnLkb0U5/ciR9PFCd8bDylSzBJ9ogdYZD pfyA== X-Gm-Message-State: AOAM5305zqP9x6Oda5SA4T1+IumTT3f3tAoZXQRTQMWLQ+8vqKEvvL0F QsFUXKTcB2IkYrbfihFBIjP1tZaMoVg8 X-Google-Smtp-Source: ABdhPJyf6UdL3vuKvGbNmt0bFN9VvbvR8BR3LknKQow5oxpujG1bd3D+yyls0G4SRg34Xr9WAne3Ow== X-Received: by 2002:a05:6638:50f:: with SMTP id i15mr15213560jar.79.1631634143576; Tue, 14 Sep 2021 08:42:23 -0700 (PDT) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com. [66.111.4.227]) by smtp.gmail.com with ESMTPSA id v8sm1031562ilg.25.2021.09.14.08.42.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Sep 2021 08:42:22 -0700 (PDT) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailauth.nyi.internal (Postfix) with ESMTP id 127CF27C0054; Tue, 14 Sep 2021 11:42:22 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Tue, 14 Sep 2021 11:42:22 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudegledgledtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurheptggguffhjgffgffkfhfvofesthhqmhdthhdtjeenucfhrhhomheptfgrfhgr vghlucffrghvihguucfvihhnohgtohcuoehrrghfrggvlhguthhinhhotghosehgmhgrih hlrdgtohhmqeenucggtffrrghtthgvrhhnpeekueffheekieehkeefjeeiieeukeelieej feetfffgfeffvdfhtdeuhfelheeuhfenucevlhhushhtvghrufhiiigvpedtnecurfgrrh grmhepmhgrihhlfhhrohhmpehrrghfrggvlhguthhinhhotghoodhmvghsmhhtphgruhht hhhpvghrshhonhgrlhhithihqdduudeltdekieeffeeiqddvheehkeejleefiedqrhgrfh grvghlughtihhnohgtoheppehgmhgrihhlrdgtohhmseduvdefmhgrihhlrdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 14 Sep 2021 11:42:21 -0400 (EDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: Re: [PATCH bpf-next v5] libbpf: introduce legacy kprobe events support From: Rafael David Tinoco In-Reply-To: Date: Tue, 14 Sep 2021 12:42:20 -0300 Cc: Andrii Nakryiko , bpf X-Mao-Original-Outgoing-Id: 653326939.998656-403853ac99b89575ca16038c4967a7c4 Content-Transfer-Encoding: quoted-printable Message-Id: <7500F71C-79CF-449C-819E-7734B6B62EA5@gmail.com> References: <20210912064844.3181742-1-rafaeldtinoco@gmail.com> <1EEF48CB-0164-40B3-8D56-06EDDAFC5B1E@gmail.com> To: "sunyucong@gmail.com" X-Mailer: Apple Mail (2.3654.120.0.1.13) Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org > On 14 Sep 2021, at 11:27 AM, sunyucong@gmail.com wrote: >=20 >> +static int poke_kprobe_events(bool add, const char *name, bool = retprobe, uint64_t offset) >> +{ >> + int fd, ret =3D 0; >=20 > This patch introduced a warning/error in CI >=20 > libbpf.c: In function =E2=80=98poke_kprobe_events=E2=80=99: > 648 libbpf.c:9063:37: error: =E2=80=98%s=E2=80=99 directive output may = be truncated > writing up to 127 bytes into a region of size between 62 and 189 > [-Werror=3Dformat-truncation=3D] > 649 9063 | snprintf(cmd, sizeof(cmd), "%c:%s %s", > 650 | ^~ > 651 In file included from /usr/include/stdio.h:867, > 652 from libbpf.c:17: > 653 /usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: > =E2=80=98__builtin___snprintf_chk=E2=80=99 output between 4 and 258 = bytes into a > destination of size 192 > 654 67 | return __builtin___snprintf_chk (__s, __n, = __USE_FORTIFY_LEVEL - 1, > 655 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 656 68 | __bos (__s), __fmt, __va_arg_pack ()); > 657 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ That happened because: + char cmd[192] =3D {}, probename[128] =3D {}, probefunc[128] =3D = {}; was changed from original patch without initializing those to '\0' = instead.