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:	Sat, 17 Feb 2007 00:03:14 -0600
From:	"Eric Van Hensbergen" <ericvh@...il.com>
To:	"Andrew Morton" <akpm@...ux-foundation.org>
Cc:	linux-kernel@...r.kernel.org, v9fs-developer@...ts.sourceforge.net
Subject: Re: [PATCH] 9p: add write-cache support to loose cache mode (take 4)

On 2/16/07, Andrew Morton <akpm@...ux-foundation.org> wrote:
> On Fri, 16 Feb 2007 18:46:59 -0600
> Eric Van Hensbergen <ericvh@...il.com> wrote:
> > +     if(!PageUptodate(page)) {
> > +             if (to - from != PAGE_CACHE_SIZE) {
> > +                     void *kaddr = kmap_atomic(page, KM_USER0);
> > +                     memset(kaddr, 0, from);
> > +                     memset(kaddr + to, 0, PAGE_CACHE_SIZE - to);
> > +                     flush_dcache_page(page);
> > +                     kunmap_atomic(kaddr, KM_USER0);
> > +             }
> > +             if ((file->f_flags & O_ACCMODE) != O_WRONLY)
> > +                     v9fs_vfs_readpage_worker(file, page);
> > +     }
>
> Seems strange to memset part of the page and to then go and fill the page
> in from backing store.  Perhaps some optimisation is possible here?
>

Just double-checking in an effort to actually get the next patch right
(hopefully) -- seems like there are two cases -- if I can read from
the file, I just call readpage and it'll zero out bits.  If the file
is open write-only, things are a little cloudy -- fs/cifs looks like
they just don't do anything.  In the write-only case, do I need to
zero the unwritten portions of the page, or does this get handled
under the covers?  Looks like NFS just avoids this by only writing the
bits that change, which I suppose has other advantages.  I'll refactor
the writepage code to follow the NFS example versus the CIFS code I
originally based my implementation on.

                      -eric
-
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