Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp3298994ioa; Tue, 26 Apr 2022 00:19:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJya7SFqBj5yrCTOGg26Xh1lp0YGTFHiVJwdulDewlrlXAIz9nLfiHcOcSAcWkgl12+3CD X-Received: by 2002:a17:902:ccd0:b0:156:7ac2:5600 with SMTP id z16-20020a170902ccd000b001567ac25600mr22454078ple.156.1650957576472; Tue, 26 Apr 2022 00:19:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650957576; cv=none; d=google.com; s=arc-20160816; b=o7gE0iQjQDo39p6duCjq/s6BjaJaDsjvf98fyjfoEeLVBQtwv6Q/AFhcRV7dJUTcdF I+Evne7CTaaEXCdhsP+bUyT0Q0qEUs7YWcqHXwjsQH6swW4/a8y89qz4SzJJK5ELwzQy XSmD7U+8YvpWai+TQN5rW9T9V6l2ToSjyvSixrYy0BZGbeUbTKHhVjl2R0hM13+nUd8h kf/fWlHBljK3N+2Ui6gvnJ/XzRZylz9bYN/39h3PrbKzRYbSf3PAIrBUkigGL4fqlMPO qrwBUPG3/ytg3euEwdv3go6AeENHD32p4cS2L/wfM4Ld09MITniGD9f1z7d/HcGbCpRI GpOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Lb5AF8pOqBTQnb+ZwEbBUTl5TVNJNRrybvIcYoGIxmg=; b=zBwqU6jQQF8fWxFJIcHsnvJLXm0M8frnc7POETji2hBacz1qhDSl0EPa2BmlFTTEzi 8ovnKkNYYXiQc1Kgqip8ZJJGkUTgWxnxtxL297X8JDxO+7ltdHPYaH3e3903fY4as0VN FtM4uf39ltBR//diQRW2Rletd1WyubXonjRiiEh4qKj4hkJ1CsseX0K4IH9XrZ+qDpNa ej3r1p2U5yoP+JQa0TYpW7yUwRGgoEEcSJc2q9Hn2bzLAyqgbEoh5Sa/FhkzTt/szCDI dV7CI4BEHcIyqur9SV7WiTEQ9gsMqciuRddS54otixaSlAVwCzXwmjfYIFlQ6NKg1Qs6 U9CA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=JZRgQQ5u; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pc14-20020a17090b3b8e00b001d03c3aae68si1781634pjb.83.2022.04.26.00.19.22; Tue, 26 Apr 2022 00:19:36 -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=@gmail.com header.s=20210112 header.b=JZRgQQ5u; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244235AbiDYUIo (ORCPT + 99 others); Mon, 25 Apr 2022 16:08:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240903AbiDYUIj (ORCPT ); Mon, 25 Apr 2022 16:08:39 -0400 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27A96101DA for ; Mon, 25 Apr 2022 13:05:34 -0700 (PDT) Received: by mail-ed1-x531.google.com with SMTP id d6so14701258ede.8 for ; Mon, 25 Apr 2022 13:05:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Lb5AF8pOqBTQnb+ZwEbBUTl5TVNJNRrybvIcYoGIxmg=; b=JZRgQQ5uFa+mDxsUi5f4rJzM1iIINQYPxxTxq1j6XqBlrBWUKwkoawWLXPRtlCJBJ3 TUxxSPXmmKAgUULv58luBSDMYVRpyqDPSR6xCXDSr8Uh8gj3G5SaTLDb5MSj6H6xB+02 vnPAYfBkyYp/DzbUQHKMuj/Pv2rJcu0MBvLW+jzTWgzLln9eH1Tqn1DvVGicK2vEODKl OD6yd0Azokmi1sz7T5uW0DzjsxskwPuCGKX0iqK+4cBsiST3pxTd4uIkzGCjUsVhYIpU NG/BOTF/DKqYzbFfZZDAnliFiKbcJgaEdQBgReF6ut/jNMHV1lgIGxhxaTKT5IHtZ04d MD8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Lb5AF8pOqBTQnb+ZwEbBUTl5TVNJNRrybvIcYoGIxmg=; b=b0MjrvYiyCjEKS48v486aP7b2oMBa43dg7ggM6Nb9Wt9BYzEw7ZRJBlVZgQQfVdses zb/Kyf/Nx2ZgVvsCATuuaNt4N/yOpQNU4lMTVY0fiLIt0ctBkrhggfCaJTgpaXLmP/Wg ozfbCeJLrHLwLWtBjVXbP56CN74ZPwqmVleNuGOcGJm4bMe3UksF+g/zJrKTkjPK9TtW fyvmS1R5uC3JSuKQTENdLnr12mtjXUuRA1RUWQDgBHsW0+o+NDiRaddDofiR74Yd4tRW sf+lCR4RoGPwNQ5BOXPJbIg9bSv681BlQzXtYNp1oTaKvmsWwmSCFei9T44Iyz0F+iFX xAHA== X-Gm-Message-State: AOAM532hLCi3XD9eFJtJKBMK4T056CO6z79KGj0noU8WexT5M2V9yh5j d6W7YMSK3oOP2fDJTlA39kOP3fjHPd8= X-Received: by 2002:aa7:d651:0:b0:425:c3a4:2291 with SMTP id v17-20020aa7d651000000b00425c3a42291mr17599606edr.54.1650917132662; Mon, 25 Apr 2022 13:05:32 -0700 (PDT) Received: from leap.localnet (host-79-50-86-254.retail.telecomitalia.it. [79.50.86.254]) by smtp.gmail.com with ESMTPSA id h23-20020a0564020e9700b00420fff23180sm4896431eda.41.2022.04.25.13.05.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Apr 2022 13:05:31 -0700 (PDT) From: "Fabio M. De Francesco" To: Ira Weiny Cc: Andrew Morton , "Matthew Wilcox (Oracle)" , Catalin Marinas , Will Deacon , Peter Collingbourne , linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH] mm/highmem: VM_BUG_ON() if offset + len > PAGE_SIZE Date: Mon, 25 Apr 2022 22:05:29 +0200 Message-ID: <2701286.BEx9A2HvPv@leap> In-Reply-To: References: <20220424104806.25396-1-fmdefrancesco@gmail.com> <8929547.CDJkKcVGEf@leap> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_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 luned=C3=AC 25 aprile 2022 18:47:18 CEST Ira Weiny wrote: > On Mon, Apr 25, 2022 at 03:47:38AM +0200, Fabio M. De Francesco wrote: > > On domenica 24 aprile 2022 12:48:06 CEST Fabio M. De Francesco wrote: > > > Call VM_BUG_ON() if offset + len > PAGE_SIZE. > > >=20 > > > This is an RFC patch because I'm not sure if we actually need to=20 > > BUG_ON(), > >=20 > > Actually I considered VM_BUG_ON() for consistency with the other=20 functions=20 > > in highmem.h > >=20 > > What about VM_WARN_ON_ONCE() here and also in memset_page? >=20 > For consistency leave this as a VM_BUG_ON[1] >=20 > I've been down a similar path[2] and there was a long discussion about=20 it.[3] >=20 > In the end we settled on VM_BUG_ON.[4] Thanks for your reply and for providing so many helpful links :) I just read the ones related to VM_BUG_ON() (I don't have time for=20 flush_dcache_page() today). Since the consensus for these kinds of issues=20 is in favor of using VM_BUG_ON(), that's OK for me. I will send a "real" patch by tomorrow. Again, thanks, =46abio > As to the addition of flush_dcache_page(). There was a discussion here. >=20 > https://lore.kernel.org/lkml/CAHk-=3DwiKac4t-fOP_3fAf7nETfFLhT3ShmRmBq2J9= 6y6jAr56Q@mail.gmail.com/ >=20 > Ira >=20 > [1] https://lore.kernel.org/lkml/20210209205249.GB2975576@iweiny-DESK2.sc= =2Eintel.com/ >=20 > [2] https://lore.kernel.org/lkml/20201209022250.GP1563847@iweiny-DESK2.sc= =2Eintel.com/ >=20 > [3] https://lore.kernel.org/lkml/20201208213255.GO1563847@iweiny-DESK2.sc= =2Eintel.com/ >=20 > [4] https://lore.kernel.org/lkml/20210210174928.3156073-1-ira.weiny@intel= =2Ecom/