Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp9003066rwr; Thu, 11 May 2023 08:45:43 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4X/m6QdtZJc4qwiaZXYkAZRUh0sLuTzwhmJ5UtejQIAyouuYert3kmOwC90B+wKNwlyrRW X-Received: by 2002:a17:90a:9502:b0:250:7ece:4461 with SMTP id t2-20020a17090a950200b002507ece4461mr14282143pjo.34.1683819943577; Thu, 11 May 2023 08:45:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683819943; cv=none; d=google.com; s=arc-20160816; b=dbNmbmTgoJl/AgucpQ0jDt2p8D/FNWKoEji3mRw6Z5AkeXUsHGlXaHZZ8zYSdxlttl QupfETQ9Eiu7cZ+rj4DooA31dxQaas16//npL17wenbrZpxR5a2oNCSIouPJuNI+NaeH tZY5zZezVG6UpTEawMoZMwVRG5VtIBKJxHf9caIKSJVxYXoodYdtjp/T7ynMP6AKTvhH JJTdhtYjWmwkomJfczfEmpF2YH4Utojic57if8JHr22tKHoyajkuMyqlqEcPPsOR3S3d klNpslwQY9J7fF4PCSAUMxgktSdXe333n3tkFnWqPGl4PojHpFKptNA5T1cpoa7JFSpS 4DPw== 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=ukarEjrht7JhMJxsWUDK8oALIr9FUvFh7Sj9Teu/1Wk=; b=sYHR9Gp58pImxq6CyMkOqxDwRpU34+VTiy1hgBH3atFho0Dy2zZtYA2d9kumo4Z7Tr aZAdnAMdLocRLqWN09qS9pz/ghyZdpIgReKDQF/SqNLBz+FTDRD/NNtNcqjvA0tfmCPB iwJQXC2yQplpQE615emTmeP96SXWuVLsm2M+IILDBI7uPtkCmdBB5bq81gob9a0WgBFU 8Cgucw0t6FUfhYyzmYVN0Fmok1cMgL2piaCjwwrfcYY1XjfyZAAUy+xeLleG0i34fXPB hwfgBzEoJoseKr2oNxE/t1r92wprBBpX/FV9Qz5ZqflF2GyjWrinEed8TjG9d+0au6uF HxSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=wEQNUTAc; 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 i6-20020a17090a974600b0023409b3983fsi25487324pjw.99.2023.05.11.08.45.30; Thu, 11 May 2023 08:45:43 -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=@infradead.org header.s=bombadil.20210309 header.b=wEQNUTAc; 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 S238728AbjEKPcP (ORCPT + 99 others); Thu, 11 May 2023 11:32:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238331AbjEKPcO (ORCPT ); Thu, 11 May 2023 11:32:14 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72D6E559F; Thu, 11 May 2023 08:32:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=ukarEjrht7JhMJxsWUDK8oALIr9FUvFh7Sj9Teu/1Wk=; b=wEQNUTAcDAM2o1nSwW8TRDfzef pR2hm2LdCvaF9/3/ZGKV4hA2eHkUo8SRHXan5JeOGeinnWQ4sztTfMDIqVB3bxU5coTLeVs4EKgX4 RyV1i6KPTSC0T26g1h1aio5Zkp4eV/opt7tCMpUOMUtZ+4yudzHlzf1bhb7XYWnHV4cPBSSIrpdcv r9Kq7LlzKTyYnYBPG6Yyf7FXiBlgkGMwPkIFStRNsNISQhY7lb7NaeYOBqUbYb6VY1ANG03l6g4CZ E2NQftm7xEz7YJ4dVuFR0I4WJhtLUEOodbkZ8WCNBdQalIL1pNTEBQKMvvNniuqegBmDKNLp2do+u eG4S7bmQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1px8Gv-009DVp-09; Thu, 11 May 2023 15:32:01 +0000 Date: Thu, 11 May 2023 08:32:01 -0700 From: Christoph Hellwig To: Ruihan Li Cc: Greg Kroah-Hartman , linux-mm@kvack.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Pasha Tatashin , David Hildenbrand , Matthew Wilcox , Andrew Morton , Christoph Hellwig Subject: Re: [PATCH 0/4] Fix type confusion in page_table_check Message-ID: 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-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,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 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. > 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.