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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9CB10E7849A for ; Mon, 2 Oct 2023 06:11:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235481AbjJBGLu (ORCPT ); Mon, 2 Oct 2023 02:11:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235443AbjJBGLt (ORCPT ); Mon, 2 Oct 2023 02:11:49 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1AED49B; Sun, 1 Oct 2023 23:11:47 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id 9DE0168D07; Mon, 2 Oct 2023 08:11:43 +0200 (CEST) Date: Mon, 2 Oct 2023 08:11:43 +0200 From: Christoph Hellwig To: Chris Leech Cc: Greg Kroah-Hartman , Christoph Hellwig , Rasesh Mody , Ariel Elior , Sudarsana Kalluru , Manish Chopra , Nilesh Javali , Manish Rangankar , Jerry Snitselaar , John Meneghini , Lee Duncan , Mike Christie , Hannes Reinecke , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/3] cnic,bnx2,bnx2x: page align uio mmap allocations Message-ID: <20231002061143.GB911@lst.de> References: <20230929170023.1020032-1-cleech@redhat.com> <20230929170023.1020032-3-cleech@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230929170023.1020032-3-cleech@redhat.com> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 29, 2023 at 10:00:22AM -0700, Chris Leech wrote: > Allocations in these drivers that will be mmaped through a uio device > should be made in multiples of PAGE_SIZE to avoid exposing additional > kernel memory unintentionally. dma coherent allocations are always rounded up to a page, although the documentation for that is somewhat obscure and I wouldn't fault anyone for not relying on it.