lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20260115140743.f7ada77bc912595a580eaf7c@linux-foundation.org>
Date: Thu, 15 Jan 2026 14:07:43 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Sergey Senozhatsky <senozhatsky@...omium.org>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org, Chris Mason
 <clm@...a.com>
Subject: Re: [PATCH 2/2] zram: fixup read_block_state()

On Thu, 15 Jan 2026 12:30:06 +0900 Sergey Senozhatsky <senozhatsky@...omium.org> wrote:

> ac_time is now in seconds, do not use ktime_to_timespec64()

Please help me out here - which patch introduced the issue which Chris
found?

> Reported-by: Chris Mason <clm@...a.com>

The Closes: link would be helpful.

> Signed-off-by: Sergey Senozhatsky <senozhatsky@...omium.org>
> ---
>  drivers/block/zram/zram_drv.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
> index cc51aa8b6181..912711faa4e4 100644
> --- a/drivers/block/zram/zram_drv.c
> +++ b/drivers/block/zram/zram_drv.c
> @@ -1579,11 +1579,9 @@ static ssize_t read_block_state(struct file *file, char __user *buf,
>  		if (!slot_allocated(zram, index))
>  			goto next;
>  
> -		ts = ktime_to_timespec64(zram->table[index].attr.ac_time);
>  		copied = snprintf(kbuf + written, count,
> -			"%12zd %12lld.%06lu %c%c%c%c%c%c\n",
> -			index, (s64)ts.tv_sec,
> -			ts.tv_nsec / NSEC_PER_USEC,
> +			"%12zd %12u.%06lu %c%c%c%c%c%c\n",
> +			index, zram->table[index].attr.ac_time, 0,

local `ts' is now unused?

>  			test_slot_flag(zram, index, ZRAM_SAME) ? 's' : '.',
>  			test_slot_flag(zram, index, ZRAM_WB) ? 'w' : '.',
>  			test_slot_flag(zram, index, ZRAM_HUGE) ? 'h' : '.',


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ