Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp11421948rwr; Sat, 13 May 2023 03:19:13 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4NkdjIczUOvh5KANc619ttTAO6bEAC3fuOpULMPxEYkJ0gzPBnXiZV8ORmUqInLK9mO5sU X-Received: by 2002:a05:6a20:918a:b0:105:c74:6a4b with SMTP id v10-20020a056a20918a00b001050c746a4bmr1931881pzd.57.1683973153103; Sat, 13 May 2023 03:19:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683973153; cv=none; d=google.com; s=arc-20160816; b=FpeZI/R+kUUE5JkB5ETUFSCAQgJssAzjuoFRIosdTzgVDzzP04wD+JXdvU/72ZHDVo a4W+0gxfNcHcb2fSruN70GKn4D/hAusJzYfgTVa92o8D4IDWeV5qHRueMpG3aBdUMdzm HoVH+QGsLYH5MgVM4TxLsDAxSx2Yz98PW1bgdlZHpFQzrTzXv6F/ShWU//LsJGMmCSNB PHiwfXAJkcgFuLYmilqaLpnzRd9IxR3DDVcfaCNNEfKQSdlsJtEoXTjZMSxFj6TRsMJX +TeHgRyvgh5q2CrQviIwhlsPEgkaOvJIYjqjpjRw2ZwOkbS++HE3iLMrp/44WvNZNkP8 8Ziw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Gvu2YQtO1fXoskzYJLPyFjmWFVe5dcCE9YZic0d6Zxo=; b=G56/066/NdDkhxK4LDMS2EEZkV6iSbVNh6Vd6qgqI7SMXMpbh4f5vI2b7HZ7o8BBJG iLzV4IBLs7u39vGybf8BRD4Cc2rS/Zy7PczTopFefOSg9iorE40Fu3o8TnL71cwbx8iy 8j+Yhydbp004/S09wxUY3e6iMc98f0Is5+4rH2fKIUT+IIOLEWf8C7t4EeagZmKeKCR6 in3wkMNKN61grNhgPDGbE8e3XqKsTt97TzLdJkCDv3A6eybN3NA8SN5V6yk5S+wnUi9H 05h4zBKVgxyQOIiglhGh5stgUlAmN7+xrdcWF4pv38Ahju4Hzuc4xopZ/qjm2AwXKCoR CnXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=q5ddjGc8; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x15-20020aa7940f000000b006466ef42dafsi12317934pfo.179.2023.05.13.03.18.59; Sat, 13 May 2023 03:19:13 -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=@linuxfoundation.org header.s=korg header.b=q5ddjGc8; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238353AbjEMJvC (ORCPT + 99 others); Sat, 13 May 2023 05:51:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229780AbjEMJvB (ORCPT ); Sat, 13 May 2023 05:51:01 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 59D713C00; Sat, 13 May 2023 02:51:00 -0700 (PDT) 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 D49A26119C; 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-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 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