Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4422117ioa; Wed, 27 Apr 2022 03:36:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJydLcSHG87gMmuoM6ImsXgCUovCst5Sh0njRu+QqeBevQJlyyjY40TxRCHvzRT43gmqxB6f X-Received: by 2002:a17:90a:3486:b0:1d9:3abd:42ed with SMTP id p6-20020a17090a348600b001d93abd42edmr23749350pjb.32.1651055809861; Wed, 27 Apr 2022 03:36:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651055809; cv=none; d=google.com; s=arc-20160816; b=O5/JD1qWZgF9fu5bNZwBDseeRVgZZhyBgb48ypK8JUI0pvwchdcJ9sKEB29zN6Cz03 DPeV4pY22OuXPm9J2qjTekMTrcYItTHrQRhbjfMEN/2ySSdmmS92dDP2TihSDKqV10yX DQPJPj7HhSloBN5yI1zaZW5ndgaw+zvDEdYx4IVGpMXBofbgNhWGQKVb6el411gOsgRy LIpk5Wd24iv6CIhqJqjrvD/zCr+hkSPShDuVsW+8PKPBvnFJ5SafCxFNHmtrWM+9rkwO z4+YDRbyn9Gu00lyXwFwJgK3AaC9F0C0giRt/jzGob9UdwOBkKMmB7dALQJ3ZlgB/lZJ QmTA== 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:subject:cc:to:from:date :dkim-signature; bh=llPDczreJe0P3OZ3aQVQ87CwxGHFwHT3zKOtkxOSQz8=; b=GR7OC4xjXvFNu7O9aAXLPCL8UwLQqQFSz20RkQac1csET/pVUYbgoc9QUWmAginR1J gi/C3mz1a7j1Ut32YVKGFbidk4lElaIlUoVTfJRWzKg3ao2oAt4MMkGKVmueVXsx6zVo YH7QT4Kd2oektyTWEKYh8OmnQa0s5Od7eKXXx7zjnAbCWBlbOu0mY2fpaQZ7e8ofEKL7 kAsMrXOa/Fdw21VaKxgCZ4cRFTtKuzCb2lHBJA4X6PQnl/Y3gixDdECGL/9okR9L8jdP yoUPKKSJN/2T5eZIv8b3wyxHPfKp1G6m7AujnskcyKV/nbLTbj98rxHaI4mAVBUJ8xN9 pT9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=BLJE9Nbs; 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 Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id t5-20020a17090a5d8500b001c72275b573si4595656pji.173.2022.04.27.03.36.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 03:36:49 -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=@linux-foundation.org header.s=korg header.b=BLJE9Nbs; 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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A35183DB5DF; Wed, 27 Apr 2022 02:50:27 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237070AbiDZThi (ORCPT + 99 others); Tue, 26 Apr 2022 15:37:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354273AbiDZThY (ORCPT ); Tue, 26 Apr 2022 15:37:24 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C89EE1A3242 for ; Tue, 26 Apr 2022 12:34:14 -0700 (PDT) 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 dfw.source.kernel.org (Postfix) with ESMTPS id 6021161ADE for ; Tue, 26 Apr 2022 19:34:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 86512C385A0; Tue, 26 Apr 2022 19:34:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1651001653; bh=n31ADtdY32exhbef+u/KKAt0v24R0Zf/uCxWgtn7T0o=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=BLJE9NbslN7afqw7w6RQ2FIW8E8wR1WzpyabnbwH1v0ac2NHYTYNtKDggXPHJGr66 eHIJWSgUCwoXqj9BE91aRU09teTzlY9oaRWvsaFl7f9RBbmiK6Uww2RCOX7g9scMIW 13DoCs49mCd/LKONv5bGeG2pgOe2yLbyk2yBsjdo= Date: Tue, 26 Apr 2022 12:34:12 -0700 From: Andrew Morton To: "Fabio M. De Francesco" 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 Message-Id: <20220426123412.51fb58780a8fe2b32c7814ce@linux-foundation.org> In-Reply-To: <20220426193020.8710-1-fmdefrancesco@gmail.com> References: <20220426193020.8710-1-fmdefrancesco@gmail.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE autolearn=unavailable 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 Tue, 26 Apr 2022 21:30:20 +0200 "Fabio M. De Francesco" wrote: > Add VM_BUG_ON() bounds checking to make sure that, if "offset + len> > PAGE_SIZE", memset() does not corrupt data in adjacent pages. > hm, why? To match all the other functions in there? 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?