Received: by 2002:a05:6358:795:b0:dc:4c66:fc3e with SMTP id n21csp688363rwj; Sat, 29 Oct 2022 09:14:06 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6Q9eaqDAVhDISh/XbduxCBw6T3H4ycrTVFzYfMrBGS3xTmyrckJnvfzXNqmhy2g/FSKT7p X-Received: by 2002:a17:902:e742:b0:17f:6a44:ee4a with SMTP id p2-20020a170902e74200b0017f6a44ee4amr5215646plf.103.1667060046256; Sat, 29 Oct 2022 09:14:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667060046; cv=none; d=google.com; s=arc-20160816; b=b8xv0qc6uZNorPkds9zDcloda+pbvDDGuIy5dG6S1ZzSVsQiMTsmoZ/PNWjXLb7waz iT1UPkgvs+4j49aibqUkPmrGfwA9aBPA6D23rJZYS+IcYQkMOwzrG6LMN3DWlOhG9r+S sS1m6hS5+smYrBRrDBcbHnqoiQxl/nSoLZVUQBB6c1AbuqG2cfZkbyMS6Uepzz3IszAy KuKukHXh5MHCzKCpPBdL+bTqiHEMbRthCiQnjLnMdGUQIEl6fu9fqBU4ibI1ScxW9+O+ rNt2o+UZjeDPdTVwAHGKLznWdDeKDU7ZfrLFpkQuZnM7HmONLHz029JpKGpxFSQY0ptL dbjQ== 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=3QP4217XSjoncNxKCXGdWbVRVoESiLKewNNuCw3oEtE=; b=E6vRDt+vOIG+O5sdx8N7N/ES77rO6/JabAZn2eiI9/TfAp0Y+wzWnYtJ1nfP0oFxHv Ut8t0hAMm46CAtFHFP7M48wSv+kAm3hq4bZlYVdIDcp3XG0TZm58z9B1NZchM7YwpUV1 1px0mvQ2sUggm3KeiK3b3XfxwcMQhV5v6SdayE57LxgUxCiEfPqgWk3JiuC4FJXoEBlx JnNmIdwhhl8xJ1DT0MOAuyOtkEJrEknS1kAcT5CtMeMR9e9o1Tapx6WKTVxvTRF7MqKM pCQZ2DBxunHvogL5XustEGRQK07QymSHQeSItCa/WhDRuMIY3PkRm9XDCpslhL2Hw7Uh aLew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b="pI/f+rGf"; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fy3-20020a17090b020300b00200a43d4d58si2201387pjb.80.2022.10.29.09.13.54; Sat, 29 Oct 2022 09:14:06 -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; dkim=pass header.i=@google.com header.s=20210112 header.b="pI/f+rGf"; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229647AbiJ2Pf2 (ORCPT + 99 others); Sat, 29 Oct 2022 11:35:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54234 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229515AbiJ2Pf0 (ORCPT ); Sat, 29 Oct 2022 11:35:26 -0400 Received: from mail-yw1-x112f.google.com (mail-yw1-x112f.google.com [IPv6:2607:f8b0:4864:20::112f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E109B53021 for ; Sat, 29 Oct 2022 08:35:23 -0700 (PDT) Received: by mail-yw1-x112f.google.com with SMTP id 00721157ae682-367b8adf788so72299797b3.2 for ; Sat, 29 Oct 2022 08:35:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=3QP4217XSjoncNxKCXGdWbVRVoESiLKewNNuCw3oEtE=; b=pI/f+rGf1YDYc/SB/OUG57K1gfvv4X2Oo/LV65R9kv7k+cLqt9SOZistj/MT9Wl66u Pud7z41bc7lP4OM9Cpa6JvffQM9RKyLOMBBuUYTKxPP8RA3MMZS+32zpeIX4sAirzUrL kg4Ys213X3XmsFnY+gIB824KRn/VxibdKJXJYFtYbfoN+iTVb+FGpKhwyE74fHckqN72 92QS6yCisNlp8EpKux+Z2KC1GU+6subMxxuajBtJO0jJVw3Ht4/wHmoC9x1SiteY+UIX 8lgfvEjvsu/2Tk8n1UcfdgXj7GL+HNK+YBY+IGoq9VZE/EMYSpEuSTyijBE5tsffC8Xz yyGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=3QP4217XSjoncNxKCXGdWbVRVoESiLKewNNuCw3oEtE=; b=sQKyt3He4EHUxACN/2DT+kEvwG/kEVR2793OHcOx7ECuD4NoMC2xVKR/xbFMJq0uVF c7RiVbal7bgVOdV3P7iE16FW3fD8vy8A6sUeJK9J1/fgrZvn3v26Vr357cww2R26n1jj HqGUVjeK6R8M0b9QRtD7ZM0W0ct9zjifgdbaTBDUrYx8Rs/fV8/fmyFWYoCBmYx+3u+s CFPVuo71BswpLRBEYj0Dx81vCe/R+xg2gIulwe4xNXhtPTvCOxyucOWL//SbdfSO50rx jjNZXCPUSV6flx+6idc99Zj0963OB87JIJGV39GxPPLQQy5RcuPJqHXsUACGO9muZGVN TBlQ== X-Gm-Message-State: ACrzQf0mAoEOs+QcuGEv/c2CeO4JOiwkAiPXqPMa/SRWG9abbCnKDTX1 bmettZLbekDqOVm2AuNy216nRqRcCwXOUm9VbSjiyw== X-Received: by 2002:a81:7585:0:b0:368:28bd:9932 with SMTP id q127-20020a817585000000b0036828bd9932mr4360717ywc.332.1667057722785; Sat, 29 Oct 2022 08:35:22 -0700 (PDT) MIME-Version: 1.0 References: <20221029094101.1653855-1-william.xuanziyang@huawei.com> In-Reply-To: <20221029094101.1653855-1-william.xuanziyang@huawei.com> From: Eric Dumazet Date: Sat, 29 Oct 2022 08:35:11 -0700 Message-ID: Subject: Re: [PATCH net v2] net: tun: fix bugs for oversize packet when napi frags enabled To: Ziyang Xuan Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, peterpenkov96@gmail.com, maheshb@google.com, ast@kernel.org, daniel@iogearbox.net, hawk@kernel.org, john.fastabend@gmail.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable 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 Sat, Oct 29, 2022 at 2:41 AM Ziyang Xuan wrote: > > Recently, we got two syzkaller problems because of oversize packet > when napi frags enabled. > > One of the problems is because the first seg size of the iov_iter > from user space is very big, it is 2147479538 which is bigger than > the threshold value for bail out early in __alloc_pages(). And > skb->pfmemalloc is true, __kmalloc_reserve() would use pfmemalloc > reserves without __GFP_NOWARN flag. Thus we got a warning as following: > > Reviewed-by: Eric Dumazet