Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4369815ioa; Wed, 27 Apr 2022 02:10:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz7vPwVDi4MHtYtKW+rY9ifcRIFwXS74HZjq10BZUBbVkGJYu9VSZfwlQVQ1OPXvjJMqinm X-Received: by 2002:a05:6a00:ad0:b0:4f7:a357:6899 with SMTP id c16-20020a056a000ad000b004f7a3576899mr28942985pfl.80.1651050636144; Wed, 27 Apr 2022 02:10:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651050636; cv=none; d=google.com; s=arc-20160816; b=uf5RHpEjc/V8urKpLsC90Gc41mjoiW+HLaPDNNB3zvkRQevLolRXfN7mrcl3cNuHFd PoV/RSPjtBa5Xu5tWSOnQx9xZYZRUmPxPqQfmlra+nvtBhvaUVynzZKdaT1KIJRFZQwp nLxTTjGDE6VpUD1OXJ90GgcmmY2wK1Abx+G8xFbD43MAAh+zNj7LYnX0x3Tzx4Uxer50 2Hs0JD/yaTb9Jjge7Wn2LXPi2Du3BTC1nltyS5G6mXND4aYJYTqcek8PuARIH51DrA5E JeAs+dEjm7OuEqDOJt2vkhJvfS2sm/StBdxsfV7TceLJ8qJ06SH8u9RsC+d3VPl3vP5r OTjw== 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=LGw1GMSb1sdzb8JrXjM5hw7tsCPcx5n6lAvLthnSZYU=; b=HSY4/WR3qRRz4KXeYRp51eyAICEtb+MKbiXII6J2EN5Fe8gvvte9BjqIAGfiORtwbM jucgaipL1PMDDvIO0uBEJe+S1xPjLZM2+tOfwpmHaxOe6WRioUs4pkt30biZqVYFTSJ0 EKUCbqaikwtaBul3PlBrHnIjhHMn3boDyE/SFtBCsM8eSBNIY6Gr5hy7MAaXNkR0bguz cI91aJza1YZcCQGSxyK3J99RAvkLt+BJsQvzcwFsXCk3+RnZ0ox7kpCZM1jkzmmZf3/3 sPxXdGKbzBa4Hb6hfoSGYJnBMn9l+wvD0SjWpdjDGywNKSJieoTLZArYj2cmZ4l08+Vv aWCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=fVuWorKx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id l18-20020a170903121200b00153b2d16616si1150414plh.542.2022.04.27.02.10.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 02:10:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=fVuWorKx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3CADB1F7D5C; Wed, 27 Apr 2022 02:01:25 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355289AbiDZVOA (ORCPT + 99 others); Tue, 26 Apr 2022 17:14:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355296AbiDZVN5 (ORCPT ); Tue, 26 Apr 2022 17:13:57 -0400 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BAC771C90E for ; Tue, 26 Apr 2022 14:10:48 -0700 (PDT) Received: by mail-ej1-x636.google.com with SMTP id i19so6874240eja.11 for ; Tue, 26 Apr 2022 14:10:48 -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=LGw1GMSb1sdzb8JrXjM5hw7tsCPcx5n6lAvLthnSZYU=; b=fVuWorKxwMArfubMUdtODgEyfmiOek7W75Rf7CVGnm3dpRdqZffae6/UHfyBbt+XT4 JWgD0bNwxSqBZ2yM2ZULeEcSMxc0tW6ZpnIKffYTW2oAZjynSzoAI3ZPxHtIjwNI7jpz FklTjZTHKBznF23YwgzSe/92iYCpByG81a86BVVZolhXg39YbnR1wQoZrMH9jS0WRJsQ DjgeSUssLO1jAMhxFX3bV9FE6mFoJDRkWWwbebw2nA549SccaAuGwZVlT6u8RVZD0rDF CeNKOYpqyULLXLWuNqqpftWeZSY4lT9eoNrbmfOUN/75+TSXTYjVO2cMaJg579i6tOgj nRgg== 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=LGw1GMSb1sdzb8JrXjM5hw7tsCPcx5n6lAvLthnSZYU=; b=lwWxX3Y2N4qaxjLw3D633OHPyRJVVuj9xSnubrDRlZHXOYN6naiTf2jz60HgQuz4Nr sTC9BrnpP7QnEe8LZGEuhKUrG5NaFi9X0qU/HjMcZPe0F461u5XaWFFijdxf8g29PyR3 MwP2OX/DvBbh8cUuGdh0ytTssdYwOVoaRNCqlVOFuZVFCdXrdWxT7AIC5/YVOqFGPKZV KnZ7YVphoCbxDXC31CI1VnDRnjnFAIhb0jDuSX5+B4CJxEGLuR+N6rtZUQnoakuzKJig 6/mh0a47tyZ4p+/LsPwHL4XX46ewm5xfiW7HBI2g9ygBZtGTLo8+rQPK2e2VM6e4FzOE aKOA== X-Gm-Message-State: AOAM533CcJiAYd5WyorC2gOxs2rZdtp7YFna/8XB5ufMKCUaY4O7fG+Z dMY/FdShk/MrHr68+tuv44MdUi5Ejd4= X-Received: by 2002:a17:906:d550:b0:6ec:9ff:8791 with SMTP id cr16-20020a170906d55000b006ec09ff8791mr23192272ejc.494.1651007447291; Tue, 26 Apr 2022 14:10:47 -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 ha8-20020a170906a88800b006f3bc1f1818sm922496ejb.213.2022.04.26.14.10.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 14:10:45 -0700 (PDT) From: "Fabio M. De Francesco" To: Andrew Morton Cc: Ira Weiny , Catalin Marinas , "Matthew Wilcox (Oracle)" , Peter Collingbourne , linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/highmem: VM_BUG_ON() if offset + len > PAGE_SIZE Date: Tue, 26 Apr 2022 23:10:44 +0200 Message-ID: <5262074.Sb9uPGUboI@leap> In-Reply-To: <20220426134811.63a398ea5d2212dfececfd83@linux-foundation.org> References: <20220426193020.8710-1-fmdefrancesco@gmail.com> <1790890.atdPhlSkOF@leap> <20220426134811.63a398ea5d2212dfececfd83@linux-foundation.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE autolearn=no 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 marted=C3=AC 26 aprile 2022 22:48:11 CEST Andrew Morton wrote: > On Tue, 26 Apr 2022 22:19:57 +0200 "Fabio M. De Francesco"=20 wrote: >=20 > > On marted=C3=AC 26 aprile 2022 21:34:12 CEST Andrew Morton wrote: > > > On Tue, 26 Apr 2022 21:30:20 +0200 "Fabio M. De Francesco"=20 > > wrote: > > >=20 > > > > Add VM_BUG_ON() bounds checking to make sure that, if "offset +=20 len> > > > > PAGE_SIZE", memset() does not corrupt data in adjacent pages. > > > >=20 > > >=20 > > > hm, why? To match all the other functions in there? > > >=20 > > > I suppose that's logical. Or we could just delete all the other > > > VM_BUG_ON()s. Have any of them proven to be at all useful? > > >=20 > > I am not so sure about it being so useful. I just noted that=20 memzero_page()=20 > > is the only function of that family that is implemented with no=20 > > VM_BUG_ON(). I have no actual proofs of usefulness :(=20 > >=20 > > This is why yesterday I sent an "RFC Patch" (please see =20 > > https://lore.kernel.org/lkml/20220424104806.25396-1-fmdefrancesco@gmail= =2Ecom/ > >=20 > > Soon after sending it I thought that VM_WARN_ON_ONCE() could have been= =20 > > better suited, but Ira Weiny wrote to use VM_BUG_ON() for consistency. > >=20 > > Now I could either delete all other VM_BUG_ON() or replace them with=20 > > VM_WARN_ON_ONCE() (or some other macro).=20 > >=20 > > Ah, a third solution might be to leave highmem.h as it is now :) > >=20 > > What do you prefer? >=20 > Merge this patch as-is, I guess. Going through and removing unuseful > VM_BUG_ON()s is a separable activity. >=20 Thanks! While at this, I've just noted that you sent a confirmation which lists all= =20 the patches of mine that are currently in your tree. I see that you took v1 of "Extend and reorganize Highmem's documentation".= =20 I suppose that you missed the v2 of that series at https://lore.kernel.org/lkml/20220425162400.11334-1-fmdefrancesco@gmail.com= /=20 Can you please check it? Thanks, =46abio