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:	Tue, 5 Aug 2014 11:20:25 +0200 (CEST)
From:	Fabian Frederick <fabf@...net.be>
To:	Zach Brown <zab@...bo.net>
Cc:	Josef Bacik <jbacik@...com>, linux-kernel@...r.kernel.org,
	linux-btrfs@...r.kernel.org, Chris Mason <clm@...com>
Subject: Re: [PATCH 1/1] Btrfs: fix sparse warning



> On 04 August 2014 at 20:31 Zach Brown <zab@...bo.net> wrote:
>
>
> On Sat, Aug 02, 2014 at 02:24:49PM +0200, Fabian Frederick wrote:
> > On Thu, 17 Jul 2014 12:01:52 -0700
> > Zach Brown <zab@...bo.net> wrote:
> >
> > > > > > @@ -515,7 +515,8 @@ static int write_buf(struct file *filp, const
> > > > > > void *buf,
> > > > > > u32 len, loff_t *off)
> > > > >
> > > > > Though this probably wants to be rewritten in terms of kernel_write().
> > > > > That'd give an opportunity to get rid of the sctx->send_off and have
> > > > > it
> > > > > use f_pos in the filp.
> > > >
> > > > Do you mean directly call kernel_write from send_cmd/send_header ?
> > > > I guess that loop around vfs_write in write_buf is there for something
> > > > ...
> > >
> > > write_buf() could still exist to iterate over the buffer in the case of
> > > partial writes but it doesn't need to muck around with set_fs() and
> > > forcing casts.
> > >
> > > - z
> >
> > Hello Zach,
> >
> >     Here's an untested patch which
>
> Try testing it.  It's easy with virtualization and xfstests.
>
> You'll find that sending to a file fails because each individual file
> write call that makes up a send starts at offset 0 -- at the start of
> the file.
>
> Getting this right means getting the semantics around updating the send
> descriptors f_pos right.  It requires having a bit of a think about send
> semantics and f_pos update locking.

Thanks for those informations Zach,

I've tried btrfs test scripts related to ioctl in xfstests (tests/btrfs/025,
035, 052, 055)
but was not able to trigger that problem. Do I have to create another script,
use some generic one
or maybe use big test/scratch devices ?

Regards,
Fabian
>
> - z
--
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