From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id A2FE3C4829E for ; Thu, 15 Feb 2024 22:27:21 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1A3F58D0006; Thu, 15 Feb 2024 17:27:21 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 153D68D0001; Thu, 15 Feb 2024 17:27:21 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 01ABC8D0006; Thu, 15 Feb 2024 17:27:20 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id E00278D0001 for ; Thu, 15 Feb 2024 17:27:20 -0500 (EST) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id B19531608AE for ; Thu, 15 Feb 2024 22:27:20 +0000 (UTC) X-FDA: 81795475440.25.01695F6 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf17.hostedemail.com (Postfix) with ESMTP id 10F614000F for ; Thu, 15 Feb 2024 22:27:17 +0000 (UTC) Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=aBCxM7a4; spf=pass (imf17.hostedemail.com: domain of akpm@linux-foundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1708036038; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=U9bIaFK7ZMovwwn9NotAsqZyNreQFeAohy95yTtJVDw=; b=nmHvrS6MamiAADn2YQkfccJzNmJFYe81LsPVg9++aFw7Ge8SNoqpBGhN82VKDkw0o+2awL Nrw5jEAlnb1XoGv/PWEypZVmgpVq63jI8UK2n+WZqU4QYsRNOScloTrLQEQzJ1JQ0lNQp2 Lh6kvyBaDN1qmfPWrcqUQp0U2jnnROo= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1708036038; a=rsa-sha256; cv=none; b=hSNsZ93OIwHsZ96UmojrjoW30okOpd9uw3bQWBelnQsofhx3kgZE5YweVKK+VDQzYDich3 4psxrV4xoFIQ3BvJSOojUYQjtRiJFTnrwfMIBh8AQVlCL6qxaFD4RwrcVo/jeOhKcMWve8 ghEzZAhCaohVxeInBPDfgaNKgCcACzk= ARC-Authentication-Results: i=1; imf17.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=aBCxM7a4; spf=pass (imf17.hostedemail.com: domain of akpm@linux-foundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id E822F61E57; Thu, 15 Feb 2024 22:27:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 459FAC433C7; Thu, 15 Feb 2024 22:27:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1708036036; bh=7Ca+9j+KewaYiUtVmgiA47pdLe1IIt5wtCIV0TdXfpE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=aBCxM7a4rtVxaEOUcFFsYAO/p/D3zFeUe/yHdt6JRYshxv8Znw4FLUfruHwp+de9W 1LFymtNt6oWa9a3bW2h2t+qWswJAiONLseikq0b21dBdbFkv7QrmyIAb62Q7rFeRp5 XkWddzSPWNQJ8+KIngv0yvMw2JbPBnhRJVb4ZcS0= Date: Thu, 15 Feb 2024 14:27:15 -0800 From: Andrew Morton To: Juntong Deng Cc: ryabinin.a.a@gmail.com, glider@google.com, andreyknvl@gmail.com, dvyukov@google.com, vincenzo.frascino@arm.com, kasan-dev@googlegroups.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] kasan: Increase the number of bits to shift when recording extra timestamps Message-Id: <20240215142715.9c9e2c5295d90cc9c7cac4dc@linux-foundation.org> In-Reply-To: References: X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Stat-Signature: f7wck3tyqs3f5thozpk4ppcwu3jk78pr X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 10F614000F X-Rspam-User: X-HE-Tag: 1708036037-470432 X-HE-Meta: U2FsdGVkX19IaAsouMUPTRpX2YA6BiIqXPQ5zkQsWR/nm2WhXdAOnknBTqgH3IVvUyDuwhc8IIzDGPjdK6/Jbzhfs56hpkYP85nXUMdEmrTYtUGJzux/4zp//8KYkC6I0ZPL2APkWTnC9aeD1R6Fzl+6xgiDDf9j0Vde21trOazrKMAdmEjScFf6y72rK4mma3ViiNucIuhg4blRHjqH5A79l5mrQsld6o6rnHlo9NR7YwBE8uAXJCcE5fpaV40K/wrpkSBD9iUJleFcomYE9GB0Sl/hcD2OcgqjOTxpztEOncfu0vPn5J2Q2UGBeL7CfMmU6p3h5WRs9uAzKS5LsfU9RDGEw6lvDREKauMW/b+DfGARbcZhlNuzEIFRbZ74lDzgkhNDopcgXxSvU/H/vdwASSVJC47S7KZCbE9Hq2Fg58g7o8V2PiBKtMfivwnfVXqTOn/Q3y2eQS5l2GAH9im8wV4Cbx3XCISKtC9wcAW5WAEs9nAgYwFEhGZniURluvGCQzCt4svpTmid6d1/ZS1C2yOqg5t21Y09b7kBWKeEaZlMpswWc64OyzUmaq8SpjNFHHAHxkPmkVr2MaELqIn5b2B/lTT24biLXYHqhGxxP6HiwvAML8vleGpkd8BmJmh8ZtcjKS64K7mUUvliv+MxgDsrv5GnRys+HntNfLdOE6YBfdNUmqrQt0ouT2FwKv/kbRDoMowOOvAEKBXNObtmriblFDfj6xH/rll/dbBMlkSxfz4cFEQfFmBk6+TePk3Z4efqFzimTxA/70D6J0IL0M4+HpABHeshgQ0GE8UtJeodcj5BsnMnjxxeTBp+bkqqPaR0Z2ahr1UOYJL9enQo+oM1CmMikZKgdrTxiXP4LtTV65ZTzilZFMK44P0D0evq++apeVQm64NCItRYwHt+idWUn18p5wwVBm+yC3yMGD3F3WNyP6cPq2PJEuGxm86fBAE4XvfIbZ2/5Cf 1du0Ispu +MENJODV1WaYTfdFAlS5jpF3Fr4WRCvj++BXyBIAlim+LiI/ldGX4hYqe3VfZF7sgV466wj66/M8JIzUdrxcY0jZ24rfw61eI92QRgFXVnxM3ippyaIoYEV7TCprIfee1S7JZIt/Rr7Cg2AP+BGBjNjoKXJ4Cytdn0TD7FNd05sTkjsWcFURJ8ydN4xb+sf3gBirvO13DgXE6EC3oElMZzRo+IyTFy+Oe+robO3Vr8TsyRuSIOp50wv0Jfaif6HMMuOgDn735I+T2E0bn/JJK2WwR7d4Ief4xqy0v2Y8WK1gxkS37Pruo7xWZYzjGnR2JxMb9bFluX6qXgWhUpkZ9yOWFpPA0T5xO6uo6NFmGtPKUKVRwi02PhZOsTpI3M8sVt1Eu X-Bogosity: Ham, tests=bogofilter, spamicity=0.004158, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Thu, 15 Feb 2024 18:39:55 +0000 Juntong Deng wrote: > Fix the mistake before, This is rather imprecise ;) I shall add to the changelog: Fixes: 5d4c6ac94694 ("kasan: record and report more information") > I thought printk only display 99999 seconds > at max, but actually printk can display larger number of seconds. > > So increase the number of bits to shift when recording the extra > timestamp (44 bits), without affecting the precision, shift it right by > 9 bits, discarding all bits that do not affect the microsecond part > (nanoseconds will not be shown). > > Currently the maximum time that can be displayed is 9007199.254740s, > because > > 11111111111111111111111111111111111111111111 (44 bits) << 9 > = 11111111111111111111111111111111111111111111000000000 > = 9007199.254740 Another important thing to always changelog is the effect of the bug/shortcoming upon our users. So that a) others can decide whether the issue is serious enough to justify backporting the fix into earlier Long Term Stable kernels and b) people who maintain other kernel trees (of whom there are many) are better able to determine whether this patch is likely to address a report which they have received from their customers. Because 99999 seconds is a very long time, I am assuming that the effect of this upon our users is basically zero, so I shall not be adding Cc: to this patch's changelog.