Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EF8A2C433F5 for ; Sun, 12 Dec 2021 02:16:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232517AbhLLCQT (ORCPT ); Sat, 11 Dec 2021 21:16:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230381AbhLLCQR (ORCPT ); Sat, 11 Dec 2021 21:16:17 -0500 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2481C061714; Sat, 11 Dec 2021 18:16:17 -0800 (PST) Received: by mail-pj1-x1035.google.com with SMTP id gx15-20020a17090b124f00b001a695f3734aso10637304pjb.0; Sat, 11 Dec 2021 18:16:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ODm5tTBiKjrGbG+xckr2d0+8GcplwxAyRg/WZM+r+ZU=; b=fx/cYQjNTogkQkklLJydR4YdBt6fJXbRKvaeOoIOFI7DBXmRSoXo0ojIGmfZMOZhNr dMcuspsbvAJNb9rzHf1GX3K6IeTIcMC0c5Ymmz1w8LubF7dk50Ur8q+uUrA6KRi+iKp2 khoaI/56VO2lV9pSIdiqQpkeMSJqH/CnS33OQ4Pdjp6CamzXMJn5WI8X29TU2ZV9QU3g q0Rp3c0onPer0gpCnAh2JC5At7NuCfw44RArqd4m/rM6MU6iKPVLYsefDsyQUkNa9gl/ PpeMQ6zdz/DRWduDt0zCfTDFxG56jCFAVH+oB3kTpoTTyZb3ymiN9ChoJG970B9/SETd Hicw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ODm5tTBiKjrGbG+xckr2d0+8GcplwxAyRg/WZM+r+ZU=; b=TDE+5tVKYJdpj2wIjvb7k6EbagpF2VWtx5iDbUd3Okk7vworJq805iF896U+HSu9MS B4sh1ww2paLfs38t59Ea+dqtKPe95exRlDYZlh1DbEALCo6Bn5EsQZnkUxHzgMbq0Hpj +RF07+P0t/JvI7gq9xzWA8FTY/XkTVjrX9l9o6v0+vp+aTym2YxpFWaPKUfi5x/xQ/og r4aaxMsji5vD0TD57rU66TaydgpnFd4Mpvd6lxNd0Mo9QhEISCGhzT8/+c6WInZdamwS ZwnGjvZ9X5VWvmmf4fsr8eqxIwgt/WHB3DaGbLq0cLStBZBy1LUIUBnBFpeOAlxCRvpy 7dsQ== X-Gm-Message-State: AOAM5313fXdBTQqvoaND1yxEgfC4ah/aGKOwPduh6Y6Snszpad/XCakt kcYyu3oAxLnieO6AOK81mpIWSbMQynycxBYbYR0= X-Google-Smtp-Source: ABdhPJxxdL1mGuaBvfT4Vll0Ypm45+kpnKpBj99qjYdQuu116CxUfv0X/VSqia83k0TsstchZ5IoKRVNzzHPr4Xi0dE= X-Received: by 2002:a17:90b:4c03:: with SMTP id na3mr34447607pjb.62.1639275377221; Sat, 11 Dec 2021 18:16:17 -0800 (PST) MIME-Version: 1.0 References: <1639030882-92383-1-git-send-email-jiapeng.chong@linux.alibaba.com> In-Reply-To: <1639030882-92383-1-git-send-email-jiapeng.chong@linux.alibaba.com> From: Alexei Starovoitov Date: Sat, 11 Dec 2021 18:16:06 -0800 Message-ID: Subject: Re: [PATCH] bpf: use kmemdup() to replace kmalloc + memcpy To: Jiapeng Chong Cc: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Nathan Chancellor , Nick Desaulniers , Network Development , bpf , LKML , llvm@lists.linux.dev Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 8, 2021 at 10:22 PM Jiapeng Chong wrote: > > Eliminate the follow coccicheck warning: > > ./kernel/bpf/btf.c:6537:13-20: WARNING opportunity for kmemdup. > > Reported-by: Abaci Robot > Signed-off-by: Jiapeng Chong Applied. Thanks