Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp749014rdb; Thu, 15 Feb 2024 14:27:23 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX6lzZQOv+NTfCwGCWi/429cOiwyIl42zwLsQkhs6iPQbT9I77J3NQjDwbB5Q9R2ahrw/0nbxLuFD//PvpVwP9KrbqNHXax+5YgDdOOSw== X-Google-Smtp-Source: AGHT+IFOLnpjGwZfCspUEJi2VdDY37G+AQUZTh3YzDMdO16+vYdwNVHR3OaOTUhhflywIfWLdmgU X-Received: by 2002:a67:ec98:0:b0:46e:d730:4cba with SMTP id h24-20020a67ec98000000b0046ed7304cbamr3695931vsp.18.1708036042774; Thu, 15 Feb 2024 14:27:22 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708036042; cv=pass; d=google.com; s=arc-20160816; b=nNRj1CD8a+kEQdKLa8cRy6byg5B0pk8j4grFmSzfNIqQ/UzAdLD3KCnr+Zqxh/P8oo IgZsXFcu8UmUeOBy8mlGTPeVQ2OHsqiVxl1CoWayq5WyInSYjJAGzUPvJZ9sE5U6+EQ/ g8+M/i4O0SzNO4J3/MwyUnyXM9b5wtmb/RmpDmbhIGkpA6t6lIMKTKrqIZGZGE1UBXMl er+Mc3gxbZm8WFbGqC7oOx9A3cvR8Wc9ARIv72gwvGyLGDCYOVLWt6UhvczP8cXvtWk6 kxZTYrVD2x3whGl3kCF9w+MsgUknt1xKT8WoMbrvCqcmAlpZBX1uap0r7Jvg08RbLCKT H5dA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=U9bIaFK7ZMovwwn9NotAsqZyNreQFeAohy95yTtJVDw=; fh=g8mz3ECiXsrkOXFrbl+E274ZAGdbU0O0UTXp8AFJRgA=; b=UXUh/zxKIigiKPi11/3CXK+QFFtFiZjVOrxEnmMDlhGpbwDKmo6m6L4JKRJw2RdZZR bvfz6n9cqfdZa610n61Wj/X/W5OVYG4lKaph5/rfhR8+Vfhn6fVeFn63/rm4PAH8H7+U Jp4BOJgUwLasBpivHKJMzbJoz0wss1/xJXsmwDbNX/0RkMMIps3KpD6zh3ZzB4yHSpp9 0Ev6OGYjhgc+4lGWPb3OU3aVyhd7HO43ffxf2miI8m1Swbxu1tGOq24yyfM9UArZrpPj YEzlMJ0IkOhp1f5Aww2GE2UO9OIOBDUl/4NgaIh+nJRPn/E0KA1xzuJc2uwzIdQaHdsJ KaDw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=aBCxM7a4; arc=pass (i=1 dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-67776-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67776-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id b9-20020a05622a020900b0042dc7fce24esi2655879qtx.762.2024.02.15.14.27.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 14:27:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-67776-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=aBCxM7a4; arc=pass (i=1 dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-67776-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67776-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 580F81C21DBC for ; Thu, 15 Feb 2024 22:27:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BD30E1420DD; Thu, 15 Feb 2024 22:27:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="aBCxM7a4" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D4A0A13DBA4 for ; Thu, 15 Feb 2024 22:27:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708036037; cv=none; b=mlg9pJJCiMloJc/Xd0661nvNq5kBkSnn2R62MM6lqbxzFywzlrJsMaK4x7gF9QViKV8TlergNqbvFYjkh3/nNoj2gYKqBk9hFctKH48BToFuYq2aLLWPPGTkb7zVtd3gm5FhAn44s3UYfR4a8RF5Yk+pIPLtrsPruMoy+tLF+ow= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708036037; c=relaxed/simple; bh=7Ca+9j+KewaYiUtVmgiA47pdLe1IIt5wtCIV0TdXfpE=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=a3KaN8qFPUoTFhIs3br2u4XAMJbbCWAJQmxNnNyIGRyLBJoUtZatYAqgV3CgBWjXBVdUwAfev9o/THYUH69jJxGtH0hZYwkCzbC+kmZAP8IWnS09Pq5FdwQLa9tR0uyplUVdCWFAJKMsxmMYR9LZSPE6sbs55LYpyEO8VdDyV5c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=aBCxM7a4; arc=none smtp.client-ip=10.30.226.201 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) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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.