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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 143FBC433FE for ; Wed, 26 Oct 2022 06:54:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=jgKT/T97BJQioJrQugolhyoy7j7nevZa3ksj7UdTSec=; b=1BkudMHkDClPk6 kfwoMSGcxshv2vc2ALVvnuXtktkNVm9Zks1lZ/Eqb3t5PuflQcgjqbxWLl3zM0nulrAYAFk+qFGxx QbdVsLlrrMyEyRzSUJdis55UG2Ty4V0xLu599y0SQYpdN0qs9+EloMQgpFNi+aPbOidSfLjkmZ2rw NDjb1e1RI45tREvnH4c2zZ7eCcDjE4Sn96E52WApaTj5/WxfC5EMFnEkUy8NUQ85qGjoXvXSRUXLE mtA3QJAQ9tvkMAsj69WAKl6K8lnDWL8UcwPG9tItby8u8VpemUXOhiYScS+CCARLvHw+j9zYSx2q1 H9lWHdq5pP33xBFz80pA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1onaIA-008KbH-UW; Wed, 26 Oct 2022 06:53:35 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1onaI5-008KaI-6A for linux-arm-kernel@lists.infradead.org; Wed, 26 Oct 2022 06:53:33 +0000 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 ams.source.kernel.org (Postfix) with ESMTPS id 78464B82116; Wed, 26 Oct 2022 06:53:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 85B01C433C1; Wed, 26 Oct 2022 06:53:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666767206; bh=rCvWVoSsjxNZoT/rLJSbP3vsvzUwK8xeZr0oV8v2dew=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=0OnNK7PvKMzyTarkN3gWiQ21QIuGixWY50WlEwThZFWIFQDbCe8uVCngpTlVK42Pc n0h6GTJ8pyGxFrVkNsVfeR9ODowq54eYiuj2tKzylb/PDF0vsGOYhWqFrGZ7S5nuru 7MSAofEsG1IUJGeCD0c5jTsHQiK0AJH7zM2Q6ul4= Date: Wed, 26 Oct 2022 08:54:19 +0200 From: Greg Kroah-Hartman To: Catalin Marinas Cc: Linus Torvalds , Arnd Bergmann , Will Deacon , Marc Zyngier , Andrew Morton , Herbert Xu , Ard Biesheuvel , Christoph Hellwig , Isaac Manjarres , Saravana Kannan , linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2 0/2] mm: Allow kmalloc() allocations below ARCH_KMALLOC_MINALIGN Message-ID: References: <20221025205247.3264568-1-catalin.marinas@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20221025205247.3264568-1-catalin.marinas@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221025_235329_391370_7FE900E3 X-CRM114-Status: GOOD ( 14.27 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Oct 25, 2022 at 09:52:45PM +0100, Catalin Marinas wrote: > To me, the ideal approach would be __dma annotations on pointers aimed > at DMA and using kernel tools like sparse to identify them. As a reviewer of drivers, and a subsystem maintainer, yes, I too would like this instead. It would make it much more obvious what is happening. > dma_kmalloc() would return such pointers. However, things get muddier > with scatterlists since functions like sg_set_page() don't have any such > pointer information (can we mark the offset as __dma instead?). Drivers don't always call dma_kmalloc() for pointers to pass to dma controllers. Heck, I doubt the majority do that at all today, that's the main problem overall that you are having. We can take the time and move the kernel to do this, perhaps that is the real solution that will work best over time here? thanks, greg k-h _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel