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:   Fri, 26 Jun 2020 14:05:12 -0700
From:   Kees Cook <keescook@...omium.org>
To:     Matthew Wilcox <willy@...radead.org>
Cc:     Christoph Hellwig <hch@....de>, Al Viro <viro@...iv.linux.org.uk>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Luis Chamberlain <mcgrof@...nel.org>,
        Iurii Zaikin <yzaikin@...gle.com>,
        linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH 8/9] fs: don't allow kernel reads and writes without iter
 ops

On Fri, Jun 26, 2020 at 02:51:47PM +0100, Matthew Wilcox wrote:
> On Fri, Jun 26, 2020 at 09:58:35AM +0200, Christoph Hellwig wrote:
> > +static void warn_unsupported(struct file *file, const char *op)
> > +{
> > +	char pathname[128], *path;
> > +
> > +	path = file_path(file, pathname, sizeof(pathname));
> > +	if (IS_ERR(path))
> > +		path = "(unknown)";
> > +	pr_warn_ratelimited(
> > +		"kernel %s not supported for file %s (pid: %d comm: %.20s)\n",
> > +		op, path, current->pid, current->comm);
> > +}
> > +
> 
> how about just:
> 
> 	pr_warn_ratelimited(
> 		"kernel %s not supported for file %pD4 (pid: %d comm: %.20s)\n",
> 			op, file, current->pid, current->comm);
> 
> also, is the pid really that interesting?

Yes, pid matters, especially when there may be many of something running
(e.g. rsync).

-- 
Kees Cook

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ