<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/nfsd/export.c, branch linux-3.14.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.14.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.14.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2013-10-29T21:46:14Z</updated>
<entry>
<title>nfsd: -EINVAL on invalid anonuid/gid instead of silent failure</title>
<updated>2013-10-29T21:46:14Z</updated>
<author>
<name>J. Bruce Fields</name>
</author>
<published>2013-09-13T21:50:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6f6cc3205c5f10129b8a10cdf8abf85d9db48a60'/>
<id>urn:sha1:6f6cc3205c5f10129b8a10cdf8abf85d9db48a60</id>
<content type='text'>
If we're going to refuse to accept these it would be polite of us to at
least say so....

This introduces a slight complication since we need to grandfather in
exportfs's ill-advised use of -1 uid and gid on its test_export.

If it turns out there are other users passing down -1 we may need to
do something else.

Best might be to drop the checks entirely, but I'm not sure if other
parts of the kernel might assume that a task can't run as uid or gid -1.

Cc: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
</content>
</entry>
<entry>
<title>nfsd: return better errors to exportfs</title>
<updated>2013-10-29T21:45:30Z</updated>
<author>
<name>J. Bruce Fields</name>
</author>
<published>2013-09-13T15:08:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=427d6c6646d868fbd3094e7e2e1644d480cd9204'/>
<id>urn:sha1:427d6c6646d868fbd3094e7e2e1644d480cd9204</id>
<content type='text'>
Someone noticed exportfs happily accepted exports that would later be
rejected when mountd tried to give them to the kernel.  Fix this.

This is a regression from 4c1e1b34d5c800ad3ac9a7e2805b0bea70ad2278
"nfsd: Store ex_anon_uid and ex_anon_gid as kuids and kgids".

Cc: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Cc: stable@vger.kernel.org
Reported-by: Yin.JianHong &lt;jiyin@redhat.com&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-3.9' of git://linux-nfs.org/~bfields/linux</title>
<updated>2013-03-01T02:02:55Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2013-03-01T02:02:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b6669737d3db7df79fad07180837c23dbe581db5'/>
<id>urn:sha1:b6669737d3db7df79fad07180837c23dbe581db5</id>
<content type='text'>
Pull nfsd changes from J Bruce Fields:
 "Miscellaneous bugfixes, plus:

   - An overhaul of the DRC cache by Jeff Layton.  The main effect is
     just to make it larger.  This decreases the chances of intermittent
     errors especially in the UDP case.  But we'll need to watch for any
     reports of performance regressions.

   - Containerized nfsd: with some limitations, we now support
     per-container nfs-service, thanks to extensive work from Stanislav
     Kinsbursky over the last year."

Some notes about conflicts, since there were *two* non-data semantic
conflicts here:

 - idr_remove_all() had been added by a memory leak fix, but has since
   become deprecated since idr_destroy() does it for us now.

 - xs_local_connect() had been added by this branch to make AF_LOCAL
   connections be synchronous, but in the meantime Trond had changed the
   calling convention in order to avoid a RCU dereference.

There were a couple of more obvious actual source-level conflicts due to
the hlist traversal changes and one just due to code changes next to
each other, but those were trivial.

* 'for-3.9' of git://linux-nfs.org/~bfields/linux: (49 commits)
  SUNRPC: make AF_LOCAL connect synchronous
  nfsd: fix compiler warning about ambiguous types in nfsd_cache_csum
  svcrpc: fix rpc server shutdown races
  svcrpc: make svc_age_temp_xprts enqueue under sv_lock
  lockd: nlmclnt_reclaim(): avoid stack overflow
  nfsd: enable NFSv4 state in containers
  nfsd: disable usermode helper client tracker in container
  nfsd: use proper net while reading "exports" file
  nfsd: containerize NFSd filesystem
  nfsd: fix comments on nfsd_cache_lookup
  SUNRPC: move cache_detail-&gt;cache_request callback call to cache_read()
  SUNRPC: remove "cache_request" argument in sunrpc_cache_pipe_upcall() function
  SUNRPC: rework cache upcall logic
  SUNRPC: introduce cache_detail-&gt;cache_request callback
  NFS: simplify and clean cache library
  NFS: use SUNRPC cache creation and destruction helper for DNS cache
  nfsd4: free_stid can be static
  nfsd: keep a checksum of the first 256 bytes of request
  sunrpc: trim off trailing checksum before returning decrypted or integrity authenticated buffer
  sunrpc: fix comment in struct xdr_buf definition
  ...
</content>
</entry>
<entry>
<title>SUNRPC: rework cache upcall logic</title>
<updated>2013-02-15T15:43:46Z</updated>
<author>
<name>Stanislav Kinsbursky</name>
</author>
<published>2013-02-04T11:02:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2d4383383b0b04ca380b67aa2d7397d0b399dcbf'/>
<id>urn:sha1:2d4383383b0b04ca380b67aa2d7397d0b399dcbf</id>
<content type='text'>
For most of SUNRPC caches (except NFS DNS cache) cache_detail-&gt;cache_upcall is
redundant since all that it's implementations are doing is calling
sunrpc_cache_pipe_upcall() with proper function address argument.
Cache request function address is now stored on cache_detail structure and
thus all the code can be simplified.
Now, for those cache details, which doesn't have cache_upcall callback (the
only one, which still has is nfs_dns_resolve_template)
sunrpc_cache_pipe_upcall will be called instead.

Signed-off-by: Stanislav Kinsbursky &lt;skinsbursky@parallels.com&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
</content>
</entry>
<entry>
<title>SUNRPC: introduce cache_detail-&gt;cache_request callback</title>
<updated>2013-02-15T15:43:45Z</updated>
<author>
<name>Stanislav Kinsbursky</name>
</author>
<published>2013-02-04T11:02:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=73fb847a44224d5708550e4be7baba9da75e00af'/>
<id>urn:sha1:73fb847a44224d5708550e4be7baba9da75e00af</id>
<content type='text'>
This callback will allow to simplify upcalls in further patches in this
series.

Signed-off-by: Stanislav Kinsbursky &lt;skinsbursky@parallels.com&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
</content>
</entry>
<entry>
<title>nfsd: Store ex_anon_uid and ex_anon_gid as kuids and kgids</title>
<updated>2013-02-13T14:16:08Z</updated>
<author>
<name>Eric W. Biederman</name>
</author>
<published>2013-02-02T14:42:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4c1e1b34d5c800ad3ac9a7e2805b0bea70ad2278'/>
<id>urn:sha1:4c1e1b34d5c800ad3ac9a7e2805b0bea70ad2278</id>
<content type='text'>
Cc: "J. Bruce Fields" &lt;bfields@fieldses.org&gt;
Cc: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
</content>
</entry>
<entry>
<title>nfsd: initialize the exp-&gt;ex_uuid field in svc_export_init</title>
<updated>2013-02-04T14:16:24Z</updated>
<author>
<name>Jeff Layton</name>
</author>
<published>2013-02-02T10:55:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2eeb9b2abc83a7fd02063c7558b8e729f5a3ae00'/>
<id>urn:sha1:2eeb9b2abc83a7fd02063c7558b8e729f5a3ae00</id>
<content type='text'>
commit 885c91f7466 in Bruce's tree was causing oopses for me:

general protection fault: 0000 [#1] SMP
Modules linked in: nfsd(OF) nfs_acl(OF) auth_rpcgss(OF) lockd(OF) sunrpc(OF) kvm_amd kvm microcode i2c_piix4 virtio_net virtio_balloon cirrus drm_kms_helper ttm drm virtio_blk i2c_core
CPU 0
Pid: 564, comm: exportfs Tainted: GF          O 3.8.0-0.rc5.git2.1.fc19.x86_64 #1 Bochs Bochs
RIP: 0010:[&lt;ffffffff811b1509&gt;]  [&lt;ffffffff811b1509&gt;] kfree+0x49/0x280
RSP: 0018:ffff88007a3d7c50  EFLAGS: 00010203
RAX: 01adaf8dadadad80 RBX: 6b6b6b6b6b6b6b6b RCX: 0000000000000001
RDX: ffffffff7fffffff RSI: 0000000000000000 RDI: 6b6b6b6b6b6b6b6b
RBP: ffff88007a3d7c80 R08: 6b6b6b6b6b6b6b6b R09: 0000000000000000
R10: 0000000000000018 R11: 0000000000000000 R12: ffff88006a117b50
R13: ffffffffa01a589c R14: ffff8800631b0f50 R15: 01ad998dadadad80
FS:  00007fcaa3616740(0000) GS:ffff88007fc00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 00007f5d84b6fdd8 CR3: 0000000064db4000 CR4: 00000000000006f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process exportfs (pid: 564, threadinfo ffff88007a3d6000, task ffff88006af28000)
Stack:
 ffff88007a3d7c80 ffff88006a117b68 ffff88006a117b50 0000000000000000
 ffff8800631b0f50 ffff88006a117b50 ffff88007a3d7ca0 ffffffffa01a589c
 ffff880036be1148 ffff88007a3d7cf8 ffff88007a3d7e28 ffffffffa01a6a98
Call Trace:
 [&lt;ffffffffa01a589c&gt;] svc_export_put+0x5c/0x70 [nfsd]
 [&lt;ffffffffa01a6a98&gt;] svc_export_parse+0x328/0x7e0 [nfsd]
 [&lt;ffffffffa016f1c7&gt;] cache_do_downcall+0x57/0x70 [sunrpc]
 [&lt;ffffffffa016f25e&gt;] cache_downcall+0x7e/0x100 [sunrpc]
 [&lt;ffffffffa016f338&gt;] cache_write_procfs+0x58/0x90 [sunrpc]
 [&lt;ffffffffa016f2e0&gt;] ? cache_downcall+0x100/0x100 [sunrpc]
 [&lt;ffffffff8123b0e5&gt;] proc_reg_write+0x75/0xb0
 [&lt;ffffffff811ccecf&gt;] vfs_write+0x9f/0x170
 [&lt;ffffffff811cd089&gt;] sys_write+0x49/0xa0
 [&lt;ffffffff816e0919&gt;] system_call_fastpath+0x16/0x1b
Code: 66 66 66 90 48 83 fb 10 0f 86 c3 00 00 00 48 89 df 49 bf 00 00 00 00 00 ea ff ff e8 f2 12 ea ff 48 c1 e8 0c 48 c1 e0 06 49 01 c7 &lt;49&gt; 8b 07 f6 c4 80 0f 85 1d 02 00 00 49 8b 07 a8 80 0f 84 ee 01
RIP  [&lt;ffffffff811b1509&gt;] kfree+0x49/0x280
 RSP &lt;ffff88007a3d7c50&gt;

I think Majianpeng's patch is correct, but incomplete. In order for it
to be safe to free the ex_uuid unconditionally in svc_export_put, we
need to make sure it's initialized to NULL in the init routine.

Cc: majianpeng &lt;majianpeng@gmail.com&gt;
Signed-off-by: Jeff Layton &lt;jlayton@redhat.com&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
</content>
</entry>
<entry>
<title>nfsd: Fix memleak in svc_export_put</title>
<updated>2013-01-29T21:50:03Z</updated>
<author>
<name>majianpeng</name>
</author>
<published>2013-01-29T05:16:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=885c91f74662404dc179b8775494df383479311c'/>
<id>urn:sha1:885c91f74662404dc179b8775494df383479311c</id>
<content type='text'>
In func svc_export_parse, the uuid which used kmemdup to alloc will be
changed in func export_update.So the later kfree don't free this memory.
And it can't be free in func svc_export_parse because other place still
used.So put this operation in func svc_export_put.

Signed-off-by: Jianpeng Ma &lt;majianpeng@gmail.com&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
</content>
</entry>
<entry>
<title>SUNRPC: service request network namespace helper introduced</title>
<updated>2012-07-27T20:49:21Z</updated>
<author>
<name>Stanislav Kinsbursky</name>
</author>
<published>2012-07-25T12:57:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9695c7057f4887ed54dc1e6c2ef22f72a2be1175'/>
<id>urn:sha1:9695c7057f4887ed54dc1e6c2ef22f72a2be1175</id>
<content type='text'>
This is a cleanup patch - makes code looks simplier.
It replaces widely used rqstp-&gt;rq_xprt-&gt;xpt_net by introduced SVC_NET(rqstp).

Signed-off-by: Stanislav Kinsbursky &lt;skinsbursky@parallels.com&gt;
Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
</content>
</entry>
<entry>
<title>nfsd: add get_uint for u32's</title>
<updated>2012-07-25T13:18:27Z</updated>
<author>
<name>J. Bruce Fields</name>
</author>
<published>2012-06-12T20:54:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a007c4c3e943ecc054a806c259d95420a188754b'/>
<id>urn:sha1:a007c4c3e943ecc054a806c259d95420a188754b</id>
<content type='text'>
I don't think there's a practical difference for the range of values
these interfaces should see, but it would be safer to be unambiguous.

Signed-off-by: J. Bruce Fields &lt;bfields@redhat.com&gt;
</content>
</entry>
</feed>
