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] [day] [month] [year] [list]
Date:	Thu, 26 Jun 2014 10:04:02 -0400
From:	Mimi Zohar <zohar@...ux.vnet.ibm.com>
To:	Dmitry Kasatkin <d.kasatkin@...sung.com>
Cc:	linux-ima-devel@...ts.sourceforge.net,
	linux-security-module@...r.kernel.org, viro@...iv.linux.org.uk,
	linux-kernel@...r.kernel.org, dmitry.kasatkin@...il.com
Subject: Re: [PATCH 1/1] ima: fix fallback to use new_sync_read()

On Thu, 2014-06-26 at 16:28 +0300, Dmitry Kasatkin wrote: 
> On 26/06/14 16:20, Dmitry Kasatkin wrote:
> > On 26/06/14 15:49, Mimi Zohar wrote:
> >> On Tue, 2014-06-24 at 16:27 +0300, Dmitry Kasatkin wrote: 
> >>> 3.16 commit aad4f8bb42af06371aa0e85bf0cd9d52c0494985
> >>> 'switch simple generic_file_aio_read() users to ->read_iter()'
> >>> replaced ->aio_read with ->read_iter in most of the file systems
> >>> and introduced new_sync_read() as a replacement for do_sync_read().
> >>>
> >>> Most of file systems set '->read' and ima_kernel_read is not affected.
> >>> When ->read is not set, this patch adopts fallback call changes from the
> >>> vfs_read.
> >> So every time there are changes in vfs_read(), we're going to have to
> >> play catch up.  A better solution would be to refactor vfs_read() so
> >> that we could call it.
> >>
> >> Mimi
> > vfs_read was stable for decade.
> > And next will be the same.
> >
> > I followed the same approach we took to have an own version.
> >
> > Refactoring vfs_read is not the best approach as we have set_fs things
> > there.
> >
> > I would prefer to have "kernel_read_nosec" function along with
> > kernel_read/vfs_read, so changes could be
> > made noticeably together..
> 
> Another thing is that we do not increment system counters.
> That is may be not what public "__kernel_read" want to do...

As reference, look at fs/read_write.c: vfs_write() and __kernel_write().

thanks,

Mimi

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ