Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3202816pxp; Mon, 14 Mar 2022 13:14:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmDvYHC3wXJDWyl4G9UtOQddRPyhKVpudtAKyPdDcuoMK76X2rHQEuYE8uVBQ3dShgHKAX X-Received: by 2002:a17:906:3a41:b0:6ce:374d:adfa with SMTP id a1-20020a1709063a4100b006ce374dadfamr20516262ejf.199.1647288898482; Mon, 14 Mar 2022 13:14:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647288898; cv=none; d=google.com; s=arc-20160816; b=AN4nNf/oDLSVFNd6pz0wpNw70EHpG3UzWZ4MWSr0DymGxcZOhl/TLf+xHAGew+3Aej yB4OaEZ/IA5XNy2xy0PXVINJpkUXMg7E1ZQslhEF33jL+5oANoF3vyxqqvTC3TvVN4fy f0qga09pwnbRtBiz83dzNWE5YkC6wU3Mzlc0btTDcB+yj6g/d0xKVBpjh4xszs64thTR nLJ3W56MAow34pJVCXgtSliIjNIsTx5IVnNpAyaWB6xyKlxGXT54ySwwWnag9XqFiXwN WSxl5VXXyvG3gfSMIGoGHrDTpmD6k7VRPpdIIodXhwxXg6NwZ/rfRgIYUlXUJBuUeRHu 6HLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=xrEVPohozXYETtQ/wk0gnRYVp/5KmPcK+uAjLy1mwVU=; b=aOofKnRlMAulJ/JXDJQGbTLwc3WCMuoIWpXMFUFxvejz6rlEcdwc2LB0crebxe/6g3 TF4h6AJSaU5pil/BpZxH15S1GghBlfP/MeKn+j78U7mp6vG4iHcn5WBzYP+E/RvhmOQh wLQeCE3LP0Sp11wY5DeA84Nw6sjXLcyNCMaVIgVO0Y3bvop4FTMiCjEnfR535xLIdP0Y O0fr+rw+2aM3hJGEPnITuYrp1ezXGAGDJO8Pj8Exf28EvCj2soR1W7gSDtrYp7gWQRFr QdCrVpkCXWF38mFt/226neUFOsDI0d6SDwzQ3DsClr8BwDmwzKBhaqht3jb1jijKlbO4 SAJg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bm23-20020a170906c05700b006b74772845dsi9628407ejb.485.2022.03.14.13.14.29; Mon, 14 Mar 2022 13:14:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237499AbiCNIIi (ORCPT + 99 others); Mon, 14 Mar 2022 04:08:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237585AbiCNIHw (ORCPT ); Mon, 14 Mar 2022 04:07:52 -0400 Received: from cstnet.cn (smtp21.cstnet.cn [159.226.251.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6D2FC41326; Mon, 14 Mar 2022 01:05:43 -0700 (PDT) Received: from localhost.localdomain (unknown [124.16.138.126]) by APP-01 (Coremail) with SMTP id qwCowACHj_s89y5iZXdxAw--.12198S2; Mon, 14 Mar 2022 16:05:18 +0800 (CST) From: Jiasheng Jiang To: gregkh@linuxfoundation.org Cc: stephen@networkplumber.org, kys@microsoft.com, haiyangz@microsoft.com, sthemmin@microsoft.com, wei.liu@kernel.org, decui@microsoft.com, davem@davemloft.net, kuba@kernel.org, ast@kernel.org, daniel@iogearbox.net, hawk@kernel.org, john.fastabend@gmail.com, andrii@kernel.org, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, kpsingh@kernel.org, linux-hyperv@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, Jiasheng Jiang Subject: Re: [PATCH] hv_netvsc: Add check for kvmalloc_array Date: Mon, 14 Mar 2022 16:05:14 +0800 Message-Id: <20220314080514.2501092-1-jiasheng@iscas.ac.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: qwCowACHj_s89y5iZXdxAw--.12198S2 X-Coremail-Antispam: 1UD129KBjvdXoWrCFW8XF1fJw15Zw4xXF1fWFg_yoWxXwbEgw 4UArWYka4kt3W0yF15KFn5Wrsakw47WF1Yqrs8J39IyasxuF4kKFyDCr43Jwnxu3yrAFnI 9r12kF45try29jkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbI8FF20E14v26ryj6rWUM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48ve4kI8w A2z4x0Y4vE2Ix0cI8IcVAFwI0_Xr0_Ar1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI0_Cr0_ Gr1UM28EF7xvwVC2z280aVAFwI0_Cr1j6rxdM28EF7xvwVC2z280aVCY1x0267AKxVW0oV Cq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0 I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r1j6r 4UM4x0Y48IcxkI7VAKI48JM4x0x7Aq67IIx4CEVc8vx2IErcIFxwACI402YVCY1x02628v n2kIc2xKxwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F4 0E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_GFv_Wryl IxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxV AFwI0_Gr0_Cr1lIxAIcVCF04k26cxKx2IYs7xG6rWUJVWrZr1UMIIF0xvEx4A2jsIE14v2 6r1j6r4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr1j6F4UJbIYCTnIWIevJa73UjIFyTuYvj fUOmhFUUUUU X-Originating-IP: [124.16.138.126] X-CM-SenderInfo: pmld2xxhqjqxpvfd2hldfou0/ X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 14, 2022 at 03:33:49PM +0800, Greg KH wrote: >> Thanks, I have tested the patch by kernel_patch_verify, > > What is that? It a Linux kernel patch static verification helper tool. Link: https://github.com/nmenon/kernel_patch_verify >> and all the tests are passed. > > What tests exactly? How did you fail this allocation? The failure of allocation is not included in the tests. And as far as I know, there is not any tool that has the ability to fail the allocation. But I think that for safety, the cost of redundant and harmless check is acceptable. Also, checking after allocation is a good program pattern. Thanks, Jiang