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]
Date:   Sun, 21 Feb 2021 16:52:33 +0000
From:   Al Viro <viro@...iv.linux.org.uk>
To:     Luo Longjun <luolongjun@...wei.com>
Cc:     jlayton@...nel.org, bfields@...ldses.org,
        linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
        sangyan@...wei.com, luchunhua@...wei.com
Subject: Re: [PATCH] fs/locks: print full locks information

On Sat, Feb 20, 2021 at 01:32:50AM -0500, Luo Longjun wrote:
>  
> @@ -2844,7 +2845,13 @@ static void lock_get_status(struct seq_file *f, struct file_lock *fl,
>  	if (fl->fl_file != NULL)
>  		inode = locks_inode(fl->fl_file);
>  
> -	seq_printf(f, "%lld:%s ", id, pfx);
> +	seq_printf(f, "%lld: ", id);
> +	for (i = 1; i < repeat; i++)
> +		seq_puts(f, " ");
> +
> +	if (repeat)
> +		seq_printf(f, "%s", pfx);

RTFCStandard(printf, %*s), please

> +static int __locks_show(struct seq_file *f, struct file_lock *fl, int level)
> +{
> +	struct locks_iterator *iter = f->private;
> +	struct file_lock *bfl;
> +
> +	lock_get_status(f, fl, iter->li_pos, "-> ", level);
> +
> +	list_for_each_entry(bfl, &fl->fl_blocked_requests, fl_blocked_member)
> +		__locks_show(f, bfl, level + 1);

Er...  What's the maximal depth, again?  Kernel stack is very much finite...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ