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  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]
Date:   Thu, 23 Jan 2020 12:15:43 +0100
From:   Jan Kara <jack@...e.cz>
To:     Vasily Averin <vvs@...tuozzo.com>
Cc:     linux-ext4@...r.kernel.org, Theodore Ts'o <tytso@....edu>,
        Jan Kara <jack@...e.com>
Subject: Re: [PATCH 1/1] jbd2_seq_info_next should increase position index

On Thu 23-01-20 12:05:10, Vasily Averin wrote:
> if seq_file .next fuction does not change position index,
> read after some lseek can generate unexpected output.
> 
> Script below generates endless output
>  $ q=;while read -r r;do echo "$((++q)) $r";done </proc/fs/jbd2/DEV/info

I've just tried and this works for me just fine with openSUSE 15.1
(4.12.14-based) kernel. Is it some recent regression?

								Honza

> 
> https://bugzilla.kernel.org/show_bug.cgi?id=206283
> Signed-off-by: Vasily Averin <vvs@...tuozzo.com>
> ---
>  fs/jbd2/journal.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
> index 5e408ee..b3e2433 100644
> --- a/fs/jbd2/journal.c
> +++ b/fs/jbd2/journal.c
> @@ -982,6 +982,7 @@ static void *jbd2_seq_info_start(struct seq_file *seq, loff_t *pos)
>  
>  static void *jbd2_seq_info_next(struct seq_file *seq, void *v, loff_t *pos)
>  {
> +	(*pos)++;
>  	return NULL;
>  }
>  
> -- 
> 1.8.3.1
> 
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists