Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp2139929rwb; Thu, 19 Jan 2023 21:51:44 -0800 (PST) X-Google-Smtp-Source: AMrXdXvXc6RnuUMjoHDvAMH3yxBmJDh2Fq0qa+3De/bPckgN8CmijRTUp4nC3s+D0eZCuSDEvfYn X-Received: by 2002:a05:6a20:c193:b0:b8:4066:8ecb with SMTP id bg19-20020a056a20c19300b000b840668ecbmr14982500pzb.0.1674193904416; Thu, 19 Jan 2023 21:51:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674193904; cv=none; d=google.com; s=arc-20160816; b=m2iE+5iCi/LC62JHmpW+95fE7UdyJ9Qx9SnUjO0zBcIPt0SUmPoMHISZ05JTQTYAd2 REhCC9SL+1fd5I5abqiLs9rvtxvRLqx8/HkoKzEcjlx1i63WMJFZhrUDT6Gg/IzfWCvh AtLZ01bq+QpvIoEgGLPmwrZ6qYN7r7O0P/PVOSQOcmo1m8taOMcq/O4MDkfmnymVrpoC 9Ai3UWg0Rn4QUZRh784j4Tqj0ygxHAOVHCsIJNEKh9YXRn04asK8zJtKHMWxOUQVx0w7 lObvWRoIz/ytHeSe6leqObZoaE4wdCcmOpeY6dOauOq6LxEMfxn614gwVKKpxc1hunKz PK4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Cov0rXHHoLE4f+kl9R89J62b4kSvWbnh7UW1AJK9oFk=; b=lCXNvvX9oWLnYJrHrcUu2ZDa0rJVYJ0ER5XSGMv5B51EPrMqLNwjOWwoNRtvLqmety SSUuDj+3KThzoI7Gr7Ve8eIHsXzB81emUVSs6y3RgvCYsAMFlS5HFGauQU93Sc2iKIe6 UO8nrYpXW5faDYWaCfxmhlOHyLQ7bTQncvQgxjR/6j0a9CHDZcGCZqZ8RAD8OzMlzu9l g4BXEDcJqvt8b8+40yPGScLKxgycSNihBAQmqqruXmzfs/aEduX/YDi/u/wFzi7cwLFW cZTk6qwRGJPuyXApLdtov7tdEn5kWbcQumntjguJRCXeSHI7hpev7GnjLNxluuL2SKw0 evlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b="fd/Fa82p"; 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=zeniv.linux.org.uk Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y18-20020a634b12000000b0043adff6d43dsi40598443pga.583.2023.01.19.21.51.38; Thu, 19 Jan 2023 21:51:44 -0800 (PST) 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=@linux.org.uk header.s=zeniv-20220401 header.b="fd/Fa82p"; 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=zeniv.linux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229727AbjATFAh (ORCPT + 47 others); Fri, 20 Jan 2023 00:00:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231177AbjATE7k (ORCPT ); Thu, 19 Jan 2023 23:59:40 -0500 Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [IPv6:2a03:a000:7:0:5054:ff:fe1c:15ff]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1CD9873ED4; Thu, 19 Jan 2023 20:48:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Cov0rXHHoLE4f+kl9R89J62b4kSvWbnh7UW1AJK9oFk=; b=fd/Fa82p/WURC4xtDBGJlEnjNk P+W1YpsqDnMKJRTzWBju+9CRa90zk1D3D8puiwFkAVT8PCiBVUJEDAzh4Jbw8hc3JLfNh50C5wGTx qGx3VH3l9C8wqaIT8Y7/L2LWQLDwX6x/t7TBiFwjhdSZd4zIy3BbnKtK0vM+nc1yC+fBmTg20nRHn S8+/nV5Z3jM+vmet9ZuuK9TgrgzE6JP+Hh6ckcBDS6aQ0FcCD5IYL/yUVwAXl/lHFYx1GZLVtLWXR XufUARJ+l3QPAlA1+UIsKjOoCMrlH1ObmNAFBnQNNzT65/KhSwg4mztJWCZJnD68JvwPv/z8lWflE MznE6u9g==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.96 #2 (Red Hat Linux)) id 1pIjHB-002vQx-1p; Fri, 20 Jan 2023 04:45:17 +0000 Date: Fri, 20 Jan 2023 04:45:17 +0000 From: Al Viro To: Matthew Wilcox Cc: "Fabio M. De Francesco" , Christoph Hellwig , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Ira Weiny Subject: Re: [PATCH v3 4/4] fs/sysv: Replace kmap() with kmap_local_page() Message-ID: References: <20230119153232.29750-1-fmdefrancesco@gmail.com> <20230119153232.29750-5-fmdefrancesco@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Al Viro X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE 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, Jan 20, 2023 at 04:28:12AM +0000, Matthew Wilcox wrote: > On Fri, Jan 20, 2023 at 04:21:06AM +0000, Al Viro wrote: > > On Thu, Jan 19, 2023 at 04:32:32PM +0100, Fabio M. De Francesco wrote: > > > > > -inline void dir_put_page(struct page *page) > > > +inline void dir_put_page(struct page *page, void *page_addr) > > > { > > > - kunmap(page); > > > + kunmap_local(page_addr); > > > > ... and that needed to be fixed - at some point "round down to beginning of > > page" got lost in rebasing... > > You don't need to round down in kunmap(). See: > > void kunmap_local_indexed(const void *vaddr) > { > unsigned long addr = (unsigned long) vaddr & PAGE_MASK; > Sure, but... there's also this: static inline void __kunmap_local(const void *addr) { #ifdef ARCH_HAS_FLUSH_ON_KUNMAP kunmap_flush_on_unmap(addr); #endif } Are you sure that the guts of that thing will be happy with address that is not page-aligned? I've looked there at some point, got scared of parisc (IIRC) MMU details and decided not to rely upon that...