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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 71877C77B7F for ; Sat, 13 May 2023 09:51:03 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 031D36B0074; Sat, 13 May 2023 05:51:03 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F21D56B0078; Sat, 13 May 2023 05:51:02 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DE8CD6B007B; Sat, 13 May 2023 05:51:02 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id CDAE76B0074 for ; Sat, 13 May 2023 05:51:02 -0400 (EDT) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 97A2681056 for ; Sat, 13 May 2023 09:51:02 +0000 (UTC) X-FDA: 80784763164.28.8A07299 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf06.hostedemail.com (Postfix) with ESMTP id D7923180002 for ; Sat, 13 May 2023 09:51:00 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=linuxfoundation.org header.s=korg header.b=q5ddjGc8; spf=pass (imf06.hostedemail.com: domain of gregkh@linuxfoundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org; dmarc=pass (policy=none) header.from=linuxfoundation.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1683971461; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Gvu2YQtO1fXoskzYJLPyFjmWFVe5dcCE9YZic0d6Zxo=; b=tsnWOD+P+rsVhXIUOxMgDp/+aVG/YzTz9WKW14lcrqOhOfF1p8vuuH2aOB4yQE1behsixf wBlQt3CCQ5yBdkEExWGng6sxXQMkUMGNYSLmCGiADeexoF+DmDDIsTFvd4kOWO7SGP8pkW MpEBf5n4IBaOMZ5gd8Oj3/v0+3svrN8= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1683971461; a=rsa-sha256; cv=none; b=3CWAueyIw3PQIkpn2zpzTkONvODyER92VN59GqcuODEydStVg1e9ulwKoE1C1KMAY0smKo aKTJdYY4ZPGRaQsSTemzZ8gFEX2ZPK5cBLXxWH1EEFEqqPBsN75yAe4eAmwQJ6rx8gtHVe H/bTE6uVp13h0WbWHvhTVLM5jHNvQVw= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=linuxfoundation.org header.s=korg header.b=q5ddjGc8; spf=pass (imf06.hostedemail.com: domain of gregkh@linuxfoundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org; dmarc=pass (policy=none) header.from=linuxfoundation.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D23B161194; Sat, 13 May 2023 09:50:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 20A2EC433EF; Sat, 13 May 2023 09:50:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1683971459; bh=dMoTQ63RKbecSEixIrO0V2zTmSrM95YztdeqbgXoWZs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=q5ddjGc85xi7cSC/NNfwLHwTpvtjLrXK7IvvdEFi3tNEPzk+42ExMh44gtjKTRrzS fK8huJe61GeBwSqIuabTIUt+ZSJB99e/44+qBQMoVF1pw7vaOEdOZCwVC5IiL6GW1j RbN7A0KyQJVwIKibLnHefJGsLY5HeiUuBcrqqCm0= Date: Sat, 13 May 2023 18:37:52 +0900 From: Greg Kroah-Hartman To: Ruihan Li Cc: Christoph Hellwig , linux-mm@kvack.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Pasha Tatashin , David Hildenbrand , Matthew Wilcox , Andrew Morton Subject: Re: [PATCH 0/4] Fix type confusion in page_table_check Message-ID: <2023051324-attentive-footwork-9dec@gregkh> References: <20230510085527.57953-1-lrh2000@pku.edu.cn> <2023051108-lens-unsocial-8425@gregkh> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: D7923180002 X-Stat-Signature: xgfb9ktczrwqk5ixh6o6xauwfrgajryo X-Rspam-User: X-Rspamd-Server: rspam09 X-HE-Tag: 1683971460-509843 X-HE-Meta: U2FsdGVkX18AlbHIMtR/s2UhZpraOdRe3nJRsPXJ5yat0LsPJtJWm/W9KANRu9oVZ3uwIqsDrF6QK5gKqXq0tfdS/ESIPzBvEnF05CGIJOryTaS9nlu0FyxMPaBU46c2WErg2cPqPAvIlpssfzFJDGFrRTA3bpvMrTHPLDrmdE0cLsud2h3TZVRrKZUoITqqEdbTOUKzT2oJIohkFP/r3o2QoD3Mr16K8yZxbPs2Dl1Kv0oSb++RucVdkVVpCsdWftI/RCkwYlZGmDCZoPDBVOHhPYKL54YOZ+UIksxNukTSKKOnL6ddXc5DYCHiHBkzPYvZKOsNZV9VaS9YQbE8s7NJjJ2seFcWB4bNaRXjObdfky8TghfxCT0XBG2Z2795g5sYqBs43fpvlnHCwQBkALYEnTh0vAuPcOcy1bZcdaKX2nSNJjeSJA9YX7Dtz+3IxqmjlvCSfl8dtniXia2Ph8078O+R8loP/osqDKN5XZFj2Ts4iuhyMZ9WQRMSH1U4yP96C6qGKxrrZfQCz782QaJ8nNfDOvM3U146AJqeinrezeTXEoEhfpfmBYdxFkmrDk5mPpq2I2w1D/wB05HC/IVqTBnHSVPMmuyCkquI/2OPua7SDCxCwAboDgydvLzBDx/+KSWUR/xpMf2W4SVipDo1AcAuxyy8nikNHlTjWVqDm50I3wEhBsQAmBGo3oh7r1EtFxvQTa/vrcLYCU8bxBzzwG7R5r3KqBrRB2T6cVge0jeS5b3MshuJu2yOse1duc/OCeBrV3J6OFW4RPWYn+M10Aw3J8Zk61kctcejE2yghOk4GsHyS/uQG8cX3rlYbwoa6Ty3/DrWkIZBK9mW4NHULiWhxeca4hZD0NB/BMO10zBLkFyPw/2y9sKLJzh2bixU1/RBY8BbQKTu2pxl6ve2r6cLIqNFZSlQuv/xvKD7vrbOySY9D2Pzuy2f5/lhnKXP23P2Tt2E0aFSv4c 4hDpHKv8 lSxOx0q50WF3K1XPc10ULcfbqif9zWUuZCKuwpSUDVjP2wkxa8k4SH5rCNIZl5mKX3DX8C8dqzrixNhfh6t9MlXGMqQQi7EP6hpldQrNIbowj5UH4Tfd8+3OJiG9oFZFpdu+1OLTONleLBQ6x+jCCPdjMOFqXvEMOHWY7yEPIMYDLfMPOaLrZquAwT4mp0k6NpJiViu6khIVQ6NOGxkAXyeY/gWUP3/yhIMqKC+Y2FlQjwHNCDXAHI+wI1UgnOLTA67wMWa0eHWYhH+i5CTdqUdT1osPbIFVFuAmcHdPKe8RMRfNcQsc6HfzD21KOo1ySTM3zY58sWP+ODa1Rp1ikcS/2zwQCoPP3zDjW X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, May 12, 2023 at 12:19:09AM +0800, Ruihan Li wrote: > On Thu, May 11, 2023 at 08:32:01AM -0700, Christoph Hellwig wrote: > > On Thu, May 11, 2023 at 09:44:55PM +0800, Ruihan Li wrote: > > > Christoph's patch perfectly fixes _one_ problem: kmalloc'ed memory > > > cannot be mapped to user space. However, as I detailed in the commit > > > message, this series of patches fixes _three_ problems. > > > > FYI, I agree with you. My simple patch was sent before reading > > your new series, and is a strict subset of it. > > Thank you for the clarification. > > > > I have to say that the original code is quite buggy. In the > > > gen_pool_dma_alloc path, there is no guarantee of page alignment. > > > > I also find this whole interface very problematic to start with, > > but that's a separate discussion for later. > > Yes. I don't think hybrid allocation of DMA memory and normal memory in > one function is a good thing, but currently there is no clear way to fix > this. Mixing memory allocation and page allocation is another bad thing, > and at least, my patch can (hopefully) solve the second (and much > easier) issue. Ok, I'll take these through the usb tree if I can get an ack for the mm-specific patches. Or were you going to send a v2 series? thanks, greg k-h