Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp1197057rdb; Fri, 20 Oct 2023 11:03:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHsttTcA7r/qrIKhnsLBR2uB469lTYhZQKl0mK3tTMtQSjRxya15zWjI1QWgYg8yuB4Mt4k X-Received: by 2002:a17:90a:b903:b0:27d:5504:4cc8 with SMTP id p3-20020a17090ab90300b0027d55044cc8mr2784427pjr.9.1697825000393; Fri, 20 Oct 2023 11:03:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697825000; cv=none; d=google.com; s=arc-20160816; b=LBF3vBQ7T+2JQjhdwj2lRGpicZ0lr6WVL9JjziJEJSadTEys9InAkYeJ9Ewd5JBgE+ 7pO/igX8IAC7GVLINzj1S0s5ykUE+iLc/wO2764bXykUsz93M6oeekiXLHPtK+p7GEky GZBBi20nHgQOkknUTISxBHEURHfo5KFoPw5YCHFHs3Ilocsxm8hX2VS6BXu4ZLvX2gKB dFpamwpzg6flJsGP8BE6I9GZOR4SkcMXk6tfSM7fjaV5beFbYs6/Vcd14efGucMWYym9 dM0j9HKjif+vq+udnD4WgjUEPNV0aqgY0L5IXtkg0B5+k1C9Qxz4mwodHylszt0u/HQI gvjA== 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=iGTGZQqrKlkiySqnwZ/kRv1Pr0porawjxfdtqsoRySM=; fh=P1VS2psMKm1qoebNCN/VWjdBLunsZz0GrSB9Qygct+w=; b=Z1mIO/zhslr1Qf2wv3qXMj/BnvwVR99Zwie5zkZgAjj3D+G2o5xv750HEcOAcWB098 um6hBdfr0RgtaijqhVZxmIF6F9DYNSyld+/0VYIq/Vt5fuNTulOFRgk4N/dOX+NDxKN7 sRXz7ZkP72YXlEV58atorc/c16BIQb9ICxhBuN8DUEcJRI5S++y9w+YAl4+ATx0nMYOI FSMK0ja72gyZ29TVaVTkrZ15EC7NDhSPrx4QVYS+4SzLA8hZ/w8he3qmYmGcPZ18Ioud eSMCgV+qu9FnlaGzwbv2PNFpEC+NTX8VDhCmnZ7M0/keg9HUT0NLil1FaPT4TdmwIXyS L9mA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="cLZAT9s/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id l12-20020a17090a49cc00b00276ea6d9ac3si4917537pjm.182.2023.10.20.11.02.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 11:03:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="cLZAT9s/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 60B648050917; Fri, 20 Oct 2023 11:02:55 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230087AbjJTSCr (ORCPT + 99 others); Fri, 20 Oct 2023 14:02:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230084AbjJTSCq (ORCPT ); Fri, 20 Oct 2023 14:02:46 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B9ADD5A for ; Fri, 20 Oct 2023 11:02:44 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5AFADC433C9; Fri, 20 Oct 2023 18:02:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697824963; bh=0pd8oyJr8Z/2Zw3X/z3kmWzu508WFnpM4EOZnOcv7t8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cLZAT9s/4N6yBnQlsvKopCnL7ulX+4z0p8pH/yEGkOfPF7iqzGCYYJokZa3qR1pup nEsz2gGLNTWvMxLKPQC9uMF0Lcch/uTkeuGzfqfYxiV8snTBoIthW0uIZDS3qrm2nI c4i5fy3Y/tWT+0Sc1m254hXw3N1suzwa2k+ETC0FZ1iwwR9UEHyVN6vJffrbaAW6/V C2ACzK+zKD+62atm7qzQZVzbD7WhGMOLyfO7CrR+8x86rNCm82lD++1isx6cQKnM2/ YB2ZEt8w3lBahnyuMmCohlLy4zqsGVX5Q6AoX/ibOojKyiqMZN0sBhXYCX+4YUNTQ3 Y9dTbzG4UpcyQ== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , damon@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org, acsjakub@amazon.de Subject: Re: [PATCH 0/5] avoid divide-by-zero due to max_nr_accesses overflow Date: Fri, 20 Oct 2023 18:02:42 +0000 Message-Id: <20231020180242.64276-1-sj@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231020103036.027282d16aaf56498230cc12@linux-foundation.org> References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 20 Oct 2023 11:02:55 -0700 (PDT) On Fri, 20 Oct 2023 10:30:36 -0700 Andrew Morton wrote: > On Fri, 20 Oct 2023 17:19:01 +0000 SeongJae Park wrote: > > > On Thu, 19 Oct 2023 19:49:19 +0000 SeongJae Park wrote: > > > > > The maximum nr_accesses of given DAMON context can be calculated by > > > dividing the aggregation interval by the sampling interval. Some logics > > > in DAMON uses the maximum nr_accesses as a divisor. Hence, the value > > > shouldn't be zero. Such case is avoided since DAMON avoids setting the > > > agregation interval as samller than the sampling interval. However, > > > since nr_accesses is unsigned int while the intervals are unsigned long, > > > the maximum nr_accesses could be zero while casting. > > > > Actually, the issue was reported by Jakub, and I didn't add 'Reported-by:' tags > > for him. I sure Andrew could add that on his own, but I want to minimize > > Andrew's load, so will send v2 of this patchset. Andrew, please let me know if > > that doesn't help but only increasing your load. > > Editing the changelogs is far quicker than updating a patch series ;) > > btw, it's now conventional to add a link to the reporter's report. The > new "Closes:" tag, immediately after the Reported-by:. But it's not a > big deal. Surely it is. And in this case, the report was made privately, so no available link. I should have mentioned this early, sorry. Anyway, thank you for your help, Andrew :) Thanks, SJ