Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2400352pxk; Sat, 3 Oct 2020 20:42:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJcU/3eduRWwuTkDDU0pCpxOT+0l0UMfgczkco9BaI7RwXO9kMtvN9bQkAIBIj2ysJ3/Hm X-Received: by 2002:a05:6402:b53:: with SMTP id bx19mr11305697edb.161.1601782943884; Sat, 03 Oct 2020 20:42:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601782943; cv=none; d=google.com; s=arc-20160816; b=YqlvKO72apjp/itLd73qDQlp/anrjlrDyRC1DdS6+tomKX/gr75SgiL6znIKvDxZjw MoZ9iFftKfpeZD86vjLV35iiGs+at7KLSeKMszCzaL4RqOZ3rfYQCyW7dLqFqMa/vCT+ +x6Zjt4hQzPZBTCuBDl9kgukL1MnHaiPwj49+cuf2pd2Fmjr4zh4J03XFqqUHYiSxEe0 d6/YdGx8ZJRBL4k0y1xnnuPiq5T0tLwnGpH+KPyfcGoS9499BUDoAFqLqpbkWABmLz8k /KVEqtOoEm6sKuRPnsyP2D696rvMZQyOLhjRyn0ephxI7elGgSk1qQjE0inSIYzAPIGz ibxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:autocrypt:from :references:cc:to:subject; bh=wZyGK9b2eGTL4YQCmiMk1cgxzsVxV0pW43YPL73i5yk=; b=f63z5NUCimfdorAm3zCvdkbAAS3q7mwbQr8wWeIAVu6YaeEVnCBRlpsMqZr9GooNu6 lQ0sK67wYsKVPfEuFBgpwiFyOuj4GPXeloOMuawjEjtT/kJTlE67baBFevjD055xsJDW RipYl3rg7ODcucIOnr24KVVKP/LNEgRYWsUmWHXlETiShWrYMRrB1yPcN9CyK05QCS2x lxUQXkSmp7JZ9o2tY+x2BkUrBmpRESSRSISc8f2wsX71zwucFbtibm9jH/ajExWBiMdx F2gt1EmT6Z6CkJO0Zik+TnIa9Mr3EyvnCc2RSp2C3qtrdSG2ZtcFIOKjk6yQ0+x0oXiO Hn0A== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x21si4316394eds.237.2020.10.03.20.41.45; Sat, 03 Oct 2020 20:42:23 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726407AbgJDDjE (ORCPT + 99 others); Sat, 3 Oct 2020 23:39:04 -0400 Received: from mx2.suse.de ([195.135.220.15]:35212 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726263AbgJDDjD (ORCPT ); Sat, 3 Oct 2020 23:39:03 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 491A0AC54; Sun, 4 Oct 2020 03:39:01 +0000 (UTC) Subject: Re: [PATCH v10 0/7] Introduce sendpage_ok() to detect misused sendpage in network related drivers To: David Miller Cc: linux-block@vger.kernel.org, linux-nvme@lists.infradead.org, netdev@vger.kernel.org, open-iscsi@googlegroups.com, linux-scsi@vger.kernel.org, ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org, chaitanya.kulkarni@wdc.com, cleech@redhat.com, hch@lst.de, amwang@redhat.com, eric.dumazet@gmail.com, hare@suse.de, idryomov@gmail.com, jack@suse.com, jlayton@kernel.org, axboe@kernel.dk, lduncan@suse.com, michaelc@cs.wisc.edu, mskorzhinskiy@solarflare.com, philipp.reisner@linbit.com, sagi@grimberg.me, vvs@virtuozzo.com, vbabka@suse.com References: <20201002082734.13925-1-colyli@suse.de> <20201002.152829.1002796270145913943.davem@davemloft.net> From: Coly Li Autocrypt: addr=colyli@suse.de; keydata= mQINBFYX6S8BEAC9VSamb2aiMTQREFXK4K/W7nGnAinca7MRuFUD4JqWMJ9FakNRd/E0v30F qvZ2YWpidPjaIxHwu3u9tmLKqS+2vnP0k7PRHXBYbtZEMpy3kCzseNfdrNqwJ54A430BHf2S GMVRVENiScsnh4SnaYjFVvB8SrlhTsgVEXEBBma5Ktgq9YSoy5miatWmZvHLFTQgFMabCz/P j5/xzykrF6yHo0rHZtwzQzF8rriOplAFCECp/t05+OeHHxjSqSI0P/G79Ll+AJYLRRm9til/ K6yz/1hX5xMToIkYrshDJDrUc8DjEpISQQPhG19PzaUf3vFpmnSVYprcWfJWsa2wZyyjRFkf J51S82WfclafNC6N7eRXedpRpG6udUAYOA1YdtlyQRZa84EJvMzW96iSL1Gf+ZGtRuM3k49H 1wiWOjlANiJYSIWyzJjxAd/7Xtiy/s3PRKL9u9y25ftMLFa1IljiDG+mdY7LyAGfvdtIkanr iBpX4gWXd7lNQFLDJMfShfu+CTMCdRzCAQ9hIHPmBeZDJxKq721CyBiGAhRxDN+TYiaG/UWT 7IB7LL4zJrIe/xQ8HhRO+2NvT89o0LxEFKBGg39yjTMIrjbl2ZxY488+56UV4FclubrG+t16 r2KrandM7P5RjR+cuHhkKseim50Qsw0B+Eu33Hjry7YCihmGswARAQABtBhDb2x5IExpIDxj b2x5bGlAc3VzZS5kZT6JAlYEEwEIAEACGyMHCwkIBwMCAQYVCAIJCgsEFgIDAQIeAQIXgBYh BOo+RS/0+Uhgjej60Mc5B5Nrffj8BQJcR84dBQkY++fuAAoJEMc5B5Nrffj8ixcP/3KAKg1X EcoW4u/0z+Ton5rCyb/NpAww8MuRjNW82UBUac7yCi1y3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 2020 11:38:49 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20201002.152829.1002796270145913943.davem@davemloft.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/10/3 06:28, David Miller wrote: > From: Coly Li > Date: Fri, 2 Oct 2020 16:27:27 +0800 > >> As Sagi Grimberg suggested, the original fix is refind to a more common >> inline routine: >> static inline bool sendpage_ok(struct page *page) >> { >> return (!PageSlab(page) && page_count(page) >= 1); >> } >> If sendpage_ok() returns true, the checking page can be handled by the >> concrete zero-copy sendpage method in network layer. > > Series applied. > >> The v10 series has 7 patches, fixes a WARN_ONCE() usage from v9 series, > ... > > I still haven't heard from you how such a fundamental build failure > was even possible. > Hi David, Here is the detail steps how I leaked this uncompleted patch to you, 1) Add WARN_ONCE() as WARN_ON() to kernel_sendpage(). Maybe I was still hesitating when I typed WARN_ONCE() on keyboard. 2) Generate the patches, prepare to post 3) Hmm, compiling failed, oh it is WARN_ONCE(). Yeah, WARN_ONCE() might be more informative and better. 4) Modify to use WARN_ONCE() and compile and try, looks fine. 5) Re-generate the patches to overwrite the previous ones. 6) Post the patches. The missing part was, before I post the patches, I should do rebase and commit the change, but (interrupted by other stuffs) it skipped in my mind. Although I regenerated the series but the change was not included. The result was, uncompleted patch posted and the second-half change still stayed in my local file. > If the v9 patch series did not even compile, how in the world did you > perform functional testing of these changes? > Only 0002-net-add-WARN_ONCE-in-kernel_sendpage-for-improper-ze.patch was tested in v9 series, other tests were done in previous versions. > Please explain this to me, instead of just quietly fixing it and > posting an updated series. And not all the patches in the series were tested. Here is the testing coverage of the series: The following ones were tested and verified to break nothing and avoid the mm corruption and panic, 0001-net-introduce-helper-sendpage_ok-in-include-linux-ne.patch 0002-net-add-WARN_ONCE-in-kernel_sendpage-for-improper-ze.patch 0003-nvme-tcp-check-page-by-sendpage_ok-before-calling-ke.patch 0006-scsi-libiscsi-use-sendpage_ok-in-iscsi_tcp_segment_m.patch The following ones were not tested, due to complicated environment setup, 0005-drbd-code-cleanup-by-using-sendpage_ok-to-check-page.patch 0007-libceph-use-sendpage_ok-in-ceph_tcp_sendpage.patch This patch I didn't explicitly test, due to lack of knowledge to modify network code to trigger a buggy condition. It just went with other tested patches, 0004-tcp-use-sendpage_ok-to-detect-misused-.sendpage.patch Back to the built failure, I don't have excuse for leaking this uncompleted version to you. Of cause I will try to avoid to inefficiently occupy maintainer's time by such silly mess up. Thanks for your review and the thorough maintenance. Coly Li