4.1 secinfo patches
Subsystems (2)
The following patches implement secinfo_no_name and update secinfo to meet a 4.1 requirement.
I'll apply them for 2.6.38 if nobody sees a problem.
They look simple enough. But I don't have a test for them. So they're probably wrong. Two pynfs41 tests would do it:
- send PUTROOTFH+SECINFO_NO_NAME, check that you get back a legal result.
- send PUTROOTFH+SECINFO+GETFH, and/or PUTROOTFH+SECINFO_NO_NAME+GETFH, check that the GETFH returns NOFILEHANDLE.
I'll get around to it some day if nobody volunteers.
There are plenty of little things like this that could use doing or testing before server-side 4.1 is correct; see:
http://wiki.linux-nfs.org/wiki/index.php/Server_4.0_and_4.1_issues
--b.
PATCH 1/3 nfsd4: 4.1 SECINFO should consume filehandle
See the referenced spec language; an attempt by a 4.1 client to use the current filehandle after a secinfo call should result in a NOFILEHANDLE error.
--- fs/nfsd/nfs4proc.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
fs/nfsd/nfs4proc.c +3 -0
@@ -769,6 +769,9 @@ nfsd4_secinfo(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, }else secinfo->si_exp = exp;dput (dentry); +if (cstate->minorversion) +/* See rfc 5661 section 2.6.3.1.1.8 */ +fh_put (&cstate->current_fh);return err; }
Signature · 1 line
1.7.1
PATCH 2/3 nfsd4: move guts of nfsd4_lookupp into helper
In reply to J. Bruce FieldsWe'll reuse this code in secinfo_no_name.
--- fs/nfsd/nfs4proc.c | 16 ++++++++++------ 1 files changed, 10 insertions(+), 6 deletions(-)
fs/nfsd/nfs4proc.c +10 -6
@@ -604,9 +604,7 @@ nfsd4_link(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,return status; } -static __be32 -nfsd4_lookupp (struct svc_rqst *rqstp,struct nfsd4_compound_state *cstate, -void *arg) +static __be32 nfsd4_do_lookupp (struct svc_rqst *rqstp,struct svc_fh *fh) {struct svc_fh tmp_fh;__be32 ret;
@@ -615,13 +613,19 @@ nfsd4_lookupp(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, ret =exp_pseudoroot (rqstp, &tmp_fh);if (ret)return ret; -if (tmp_fh.fh_dentry == cstate->current_fh.fh_dentry) { +if (tmp_fh.fh_dentry == fh->fh_dentry) {fh_put (&tmp_fh);return nfserr_noent; }fh_put (&tmp_fh); -return nfsd_lookup (rqstp, &cstate->current_fh, -".." ,2 , &cstate->current_fh); +return nfsd_lookup (rqstp, fh,".." ,2 , fh); +} + +static __be32 +nfsd4_lookupp (struct svc_rqst *rqstp,struct nfsd4_compound_state *cstate, +void *arg) +{ +return nfsd4_do_lookupp (rqstp, &cstate->current_fh); } static __be32
Signature · 1 line
1.7.1
PATCH 3/3 nfsd4: implement secinfo_no_name
In reply to J. Bruce FieldsImplementation of this operation is mandatory for NFSv4.1.
--- fs/nfsd/nfs4proc.c | 27 +++++++++++++++++++++++++++ fs/nfsd/nfs4xdr.c | 15 +++++++++++++-- fs/nfsd/xdr4.h | 5 +++++ include/linux/nfs4.h | 3 +++ 4 files changed, 48 insertions(+), 2 deletions(-)
fs/nfsd/nfs4proc.c +27 -0
@@ -780,6 +780,29 @@ nfsd4_secinfo(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, }static __be32 +nfsd4_secinfo_no_name (struct svc_rqst *rqstp,struct nfsd4_compound_state *cstate, +struct nfsd4_secinfo_no_name *sin) +{ +__be32 err; + +switch (sin->sin_style) { +case NFS4_SECINFO_STYLE4_CURRENT_FH : +break ; +case NFS4_SECINFO_STYLE4_PARENT : + err =nfsd4_do_lookupp (rqstp, &cstate->current_fh); +if (err) +return err; +break ; +default : +return nfserr_inval; + } +exp_get (cstate->current_fh.fh_export); + sin->sin_exp = cstate->current_fh.fh_export; +fh_put (&cstate->current_fh); +return nfs_ok; +} + +static __be32 nfsd4_setattr (struct svc_rqst *rqstp,struct nfsd4_compound_state *cstate,struct nfsd4_setattr *setattr) {
@@ -1327,6 +1350,10 @@ static struct nfsd4_operation nfsd4_ops[] = { .op_flags = ALLOWED_WITHOUT_FH, .op_name = "OP_RECLAIM_COMPLETE", }, + [OP_SECINFO_NO_NAME] = { + .op_func = (nfsd4op_func)nfsd4_secinfo_no_name, + .op_name = "OP_SECINFO_NO_NAME", + }, };static const char *nfsd4_op_name (unsigned opnum)
fs/nfsd/nfs4xdr.c +13 -2
@@ -847,6 +847,17 @@ nfsd4_decode_secinfo(struct nfsd4_compoundargs *argp, }static __be32 +nfsd4_decode_secinfo_no_name (struct nfsd4_compoundargs *argp, +struct nfsd4_secinfo_no_name *sin) +{ +DECODE_HEAD ; + +READ_BUF (4 ); +READ32 (sin->sin_style); +DECODE_TAIL ; +} + +static __be32 nfsd4_decode_setattr (struct nfsd4_compoundargs *argp,struct nfsd4_setattr *setattr) {__be32 status;
@@ -1358,7 +1369,7 @@ static nfsd4_dec nfsd41_dec_ops[] = { [OP_LAYOUTCOMMIT] = (nfsd4_dec)nfsd4_decode_notsupp, [OP_LAYOUTGET] = (nfsd4_dec)nfsd4_decode_notsupp, [OP_LAYOUTRETURN] = (nfsd4_dec)nfsd4_decode_notsupp, - [OP_SECINFO_NO_NAME] = (nfsd4_dec)nfsd4_decode_notsupp, + [OP_SECINFO_NO_NAME] = (nfsd4_dec)nfsd4_decode_secinfo_no_name, [OP_SEQUENCE] = (nfsd4_dec)nfsd4_decode_sequence, [OP_SET_SSV] = (nfsd4_dec)nfsd4_decode_notsupp, [OP_TEST_STATEID] = (nfsd4_dec)nfsd4_decode_notsupp,
@@ -3162,7 +3173,7 @@ static nfsd4_enc nfsd4_enc_ops[] = { [OP_LAYOUTCOMMIT] = (nfsd4_enc)nfsd4_encode_noop, [OP_LAYOUTGET] = (nfsd4_enc)nfsd4_encode_noop, [OP_LAYOUTRETURN] = (nfsd4_enc)nfsd4_encode_noop, - [OP_SECINFO_NO_NAME] = (nfsd4_enc)nfsd4_encode_noop, + [OP_SECINFO_NO_NAME] = (nfsd4_enc)nfsd4_encode_secinfo, [OP_SEQUENCE] = (nfsd4_enc)nfsd4_encode_sequence, [OP_SET_SSV] = (nfsd4_enc)nfsd4_encode_noop, [OP_TEST_STATEID] = (nfsd4_enc)nfsd4_encode_noop,
fs/nfsd/xdr4.h +5 -0
@@ -311,6 +311,11 @@ struct nfsd4_secinfo {struct svc_export *si_exp;/* response */ }; +struct nfsd4_secinfo_no_name { +u32 sin_style;/* request */ +struct svc_export *sin_exp;/* response */ +}; +struct nfsd4_setattr {stateid_t sa_stateid;/* request */ u32 sa_bmval[3 ];/* request */
include/linux/nfs4.h +3 -0
@@ -136,6 +136,9 @@#define SEQ4_STATUS_CB_PATH_DOWN_SESSION 0x00000200#define SEQ4_STATUS_BACKCHANNEL_FAULT 0x00000400 +#define NFS4_SECINFO_STYLE4_CURRENT_FH 0 +#define NFS4_SECINFO_STYLE4_PARENT 1 +#define NFS4_MAX_UINT64 (~(u64)0)/* An NFS4 sessions server must support at least NFS4_MAX_OPS operations.
Signature · 1 line
1.7.1
Re: [PATCH 3/3] nfsd4: implement secinfo_no_name
Quoted 87 lines · J. Bruce Fields
Implementation of this operation is mandatory for NFSv4.1.
Signed-off-by J. Bruce Fields <[email protected]>--- fs/nfsd/nfs4proc.c | 27 +++++++++++++++++++++++++++ fs/nfsd/nfs4xdr.c | 15 +++++++++++++-- fs/nfsd/xdr4.h | 5 +++++ include/linux/nfs4.h | 3 +++ 4 files changed, 48 insertions(+), 2 deletions(-)fs/nfsd/nfs4proc.c +27
-0@@ -780,6 +780,29 @@ nfsd4_secinfo(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, }static __be32 +nfsd4_secinfo_no_name (struct svc_rqst *rqstp,struct nfsd4_compound_state *cstate, +struct nfsd4_secinfo_no_name *sin) +{ +__be32 err; + +switch (sin->sin_style) { +case NFS4_SECINFO_STYLE4_CURRENT_FH : +break ; +case NFS4_SECINFO_STYLE4_PARENT : + err =nfsd4_do_lookupp (rqstp, &cstate->current_fh); +if (err) +return err; +break ; +default : +return nfserr_inval; + } +exp_get (cstate->current_fh.fh_export); + sin->sin_exp = cstate->current_fh.fh_export; +fh_put (&cstate->current_fh); +return nfs_ok; +} + +static __be32 nfsd4_setattr (struct svc_rqst *rqstp,struct nfsd4_compound_state *cstate,struct nfsd4_setattr *setattr) {@@ -1327,6 +1350,10 @@ static struct nfsd4_operation nfsd4_ops[] = { .op_flags = ALLOWED_WITHOUT_FH, .op_name = "OP_RECLAIM_COMPLETE", }, + [OP_SECINFO_NO_NAME] = { + .op_func = (nfsd4op_func)nfsd4_secinfo_no_name, + .op_name = "OP_SECINFO_NO_NAME", + }, };static const char *nfsd4_op_name (unsigned opnum)fs/nfsd/nfs4xdr.c +12
-1@@ -847,6 +847,17 @@ nfsd4_decode_secinfo(struct nfsd4_compoundargs *argp, }static __be32 +nfsd4_decode_secinfo_no_name (struct nfsd4_compoundargs *argp, +struct nfsd4_secinfo_no_name *sin) +{ +DECODE_HEAD ; + +READ_BUF (4 ); +READ32 (sin->sin_style); +DECODE_TAIL ; +} + +static __be32 nfsd4_decode_setattr (struct nfsd4_compoundargs *argp,struct nfsd4_setattr *setattr) {__be32 status;@@ -1358,7 +1369,7 @@ static nfsd4_dec nfsd41_dec_ops[] = { [OP_LAYOUTCOMMIT] = (nfsd4_dec)nfsd4_decode_notsupp, [OP_LAYOUTGET] = (nfsd4_dec)nfsd4_decode_notsupp, [OP_LAYOUTRETURN] = (nfsd4_dec)nfsd4_decode_notsupp, - [OP_SECINFO_NO_NAME] = (nfsd4_dec)nfsd4_decode_notsupp, + [OP_SECINFO_NO_NAME] = (nfsd4_dec)nfsd4_decode_secinfo_no_name, [OP_SEQUENCE] = (nfsd4_dec)nfsd4_decode_sequence, [OP_SET_SSV] = (nfsd4_dec)nfsd4_decode_notsupp, [OP_TEST_STATEID] = (nfsd4_dec)nfsd4_decode_notsupp,
fs/nfsd/nfs4xdr.c static nfsd4_enc nfsd4_enc_ops[] = { · line 3176
Quoted 5 lines
fs/nfsd/nfs4xdr.c +1
-1@@ -3162,7 +3173,7 @@ static nfsd4_enc nfsd4_enc_ops[] = { [OP_LAYOUTCOMMIT] = (nfsd4_enc)nfsd4_encode_noop, [OP_LAYOUTGET] = (nfsd4_enc)nfsd4_encode_noop, [OP_LAYOUTRETURN] = (nfsd4_enc)nfsd4_encode_noop, - [OP_SECINFO_NO_NAME] = (nfsd4_enc)nfsd4_encode_noop, + [OP_SECINFO_NO_NAME] = (nfsd4_enc)nfsd4_encode_secinfo,
hi Bruce,
When testing this patch, oops appears.
We should implement a nfsd4_encode_secinfo_no_name() instead using nfsd4_encode_secinfo().
With the following patch, kernel will run correctly.
--- fs/nfsd/nfs4xdr.c | 21 +++++++++++++++++---- 1 files changed, 17 insertions(+), 4 deletions(-)
fs/nfsd/nfs4xdr.c +17 -4
@@ -2845,11 +2845,10 @@ nfsd4_encode_rename(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_ }static __be32 -nfsd4_encode_secinfo (struct nfsd4_compoundres *resp,__be32 nfserr, -struct nfsd4_secinfo *secinfo) +nfsd4_do_encode_secinfo (struct nfsd4_compoundres *resp, +__be32 nfserr,struct svc_export *exp) {int i =0 ; -struct svc_export *exp = secinfo->si_exp;u32 nflavs;struct exp_flavor_info *flavs;struct exp_flavor_info def_flavs[2 ];
@@ -2911,6 +2910,20 @@ out:return nfserr; } +static __be32 +nfsd4_encode_secinfo (struct nfsd4_compoundres *resp,__be32 nfserr, +struct nfsd4_secinfo *secinfo) +{ +return nfsd4_do_encode_secinfo (resp, nfserr, secinfo->si_exp); +} + +static __be32 +nfsd4_encode_secinfo_no_name (struct nfsd4_compoundres *resp,__be32 nfserr, +struct nfsd4_secinfo_no_name *secinfo) +{ +return nfsd4_do_encode_secinfo (resp, nfserr, secinfo->sin_exp); +} +/* * The SETATTR encode routine is special -- it always encodes a bitmap, * regardless of the error status.
@@ -3173,7 +3186,7 @@ static nfsd4_enc nfsd4_enc_ops[] = { [OP_LAYOUTCOMMIT] = (nfsd4_enc)nfsd4_encode_noop, [OP_LAYOUTGET] = (nfsd4_enc)nfsd4_encode_noop, [OP_LAYOUTRETURN] = (nfsd4_enc)nfsd4_encode_noop, - [OP_SECINFO_NO_NAME] = (nfsd4_enc)nfsd4_encode_secinfo, + [OP_SECINFO_NO_NAME] = (nfsd4_enc)nfsd4_encode_secinfo_no_name, [OP_SEQUENCE] = (nfsd4_enc)nfsd4_encode_sequence, [OP_SET_SSV] = (nfsd4_enc)nfsd4_encode_noop, [OP_TEST_STATEID] = (nfsd4_enc)nfsd4_encode_noop,
Signature · 43 lines
1.7.3.3 ========================================================================== BUG: unable to handle kernel NULL pointer dereference at 00000044 IP: [<e2bd239a>] nfsd4_encode_secinfo+0x1c/0x1c1 [nfsd] *pdpt = 000000001d59c001 *pde = 0000000000000000 Oops: 0000 [#1] SMP last sysfs file: /sys/kernel/mm/ksm/run Modules linked in: ipt_MASQUERADE iptable_nat nf_nat bridge stp llc nfsd lockd nfs_acl auth_rpcgss exportfs sunrpc ipv6 snd_ens1371 gameport snd_rawmidi snd_ac97_codec ac97_bus snd_seq snd_seq_device ppdev parport_pc snd_pcm snd_timer i2c_piix4 i2c_core snd soundcore snd_page_alloc pcnet32 mii parport microcode pcspkr BusLogic floppy [last unloaded: mperf] Pid: 1285, comm: nfsd Not tainted 2.6.37-rc7+ #50 440BX Desktop Reference Platform/VMware Virtual Platform EIP: 0060:[<e2bd239a>] EFLAGS: 00010246 CPU: 0 EIP is at nfsd4_encode_secinfo+0x1c/0x1c1 [nfsd] EAX: ddd30000 EBX: ddd30000 ECX: 00000000 EDX: 00000000 ESI: ddbaba18 EDI: e2bd237e EBP: dd48befc ESP: dd48bec4 DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068 Process nfsd (pid: 1285, ti=dd48a000 task=dd9d3240 task.ti=dd48a000) Stack: 00000000 deb18198 db078ef8 0fd00000 db07f4c8 00000000 00000000 db07f4c8 de054600 dd48bef8 c04e17af ddd30000 ddbaba18 e2bd237e dd48bf1c e2bd1e2b ddbaba20 e2bd0b0c ddb1c068 ddd30000 ddbaba18 e2bd0b0c dd48bf40 e2bd096c Call Trace: [<c04e17af>] ? dput+0x36/0xfc [<e2bd237e>] ? nfsd4_encode_secinfo+0x0/0x1c1 [nfsd] [<e2bd1e2b>] ? nfsd4_encode_operation+0x56/0x11b [nfsd] [<e2bd0b0c>] ? nfsd4_secinfo_no_name+0x0/0x4a [nfsd] [<e2bd0b0c>] ? nfsd4_secinfo_no_name+0x0/0x4a [nfsd] [<e2bd096c>] ? nfsd4_proc_compound+0x252/0x370 [nfsd] [<e2bc42de>] ? nfsd_dispatch+0xd1/0x19d [nfsd] [<e248912f>] ? svc_process_common+0x283/0x46c [sunrpc] [<e24894dd>] ? svc_process+0xde/0xf1 [sunrpc] [<e2bc47cf>] ? nfsd+0xd6/0x115 [nfsd] [<e2bc46f9>] ? nfsd+0x0/0x115 [nfsd] [<c0454d22>] ? kthread+0x62/0x67 [<c0454cc0>] ? kthread+0x0/0x67 [<c0409a3e>] ? kernel_thread_helper+0x6/0x10 Code: 83 c0 04 89 01 31 c0 83 c4 14 5b 5e 5f 5d c3 55 89 e5 57 56 53 89 c3 83 ec 2c 85 d2 89 55 c8 8b 49 08 89 4d dc 0f 85 68 01 00 00 <8b> 41 44 85 c0 74 0b 83 c1 48 89 4d d4 89 45 d8 eb 4d 8b 55 dc EIP: [<e2bd239a>] nfsd4_encode_secinfo+0x1c/0x1c1 [nfsd] SS:ESP 0068:dd48bec4 CR2: 0000000000000044 ---[ end trace 9c31555ffcc1f3e8 ]--- thanks, Mi Jinlong
Re: [PATCH 3/3] nfsd4: implement secinfo_no_name
Quoted 6 lines · Mi Jinlong
When testing this patch, oops appears.
We should implement a
nfsd4_encode_secinfo_no_name()instead usingnfsd4_encode_secinfo().With the following patch, kernel will run correctly.
Whoops, yes, you're correct. I've applied your patch. Thanks!
(What are you using for testing?)
--b.
Quoted 103 lines
Signed-off-by Mi Jinlong <[email protected]>--- fs/nfsd/nfs4xdr.c | 21 +++++++++++++++++---- 1 files changed, 17 insertions(+), 4 deletions(-)fs/nfsd/nfs4xdr.c +17
-4@@ -2845,11 +2845,10 @@ nfsd4_encode_rename(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_ }static __be32 -nfsd4_encode_secinfo (struct nfsd4_compoundres *resp,__be32 nfserr, -struct nfsd4_secinfo *secinfo) +nfsd4_do_encode_secinfo (struct nfsd4_compoundres *resp, +__be32 nfserr,struct svc_export *exp) {int i =0 ; -struct svc_export *exp = secinfo->si_exp;u32 nflavs;struct exp_flavor_info *flavs;struct exp_flavor_info def_flavs[2 ];@@ -2911,6 +2910,20 @@ out:return nfserr; } +static __be32 +nfsd4_encode_secinfo (struct nfsd4_compoundres *resp,__be32 nfserr, +struct nfsd4_secinfo *secinfo) +{ +return nfsd4_do_encode_secinfo (resp, nfserr, secinfo->si_exp); +} + +static __be32 +nfsd4_encode_secinfo_no_name (struct nfsd4_compoundres *resp,__be32 nfserr, +struct nfsd4_secinfo_no_name *secinfo) +{ +return nfsd4_do_encode_secinfo (resp, nfserr, secinfo->sin_exp); +} +/* * The SETATTR encode routine is special -- it always encodes a bitmap, * regardless of the error status. @@ -3173,7 +3186,7 @@ static nfsd4_enc nfsd4_enc_ops[] = { [OP_LAYOUTCOMMIT] = (nfsd4_enc)nfsd4_encode_noop, [OP_LAYOUTGET] = (nfsd4_enc)nfsd4_encode_noop, [OP_LAYOUTRETURN] = (nfsd4_enc)nfsd4_encode_noop, - [OP_SECINFO_NO_NAME] = (nfsd4_enc)nfsd4_encode_secinfo, + [OP_SECINFO_NO_NAME] = (nfsd4_enc)nfsd4_encode_secinfo_no_name, [OP_SEQUENCE] = (nfsd4_enc)nfsd4_encode_sequence, [OP_SET_SSV] = (nfsd4_enc)nfsd4_encode_noop, [OP_TEST_STATEID] = (nfsd4_enc)nfsd4_encode_noop,Signature · 48 lines
1.7.3.3 ========================================================================== BUG: unable to handle kernel NULL pointer dereference at 00000044 IP: [<e2bd239a>] nfsd4_encode_secinfo+0x1c/0x1c1 [nfsd] *pdpt = 000000001d59c001 *pde = 0000000000000000 Oops: 0000 [#1] SMP last sysfs file: /sys/kernel/mm/ksm/run Modules linked in: ipt_MASQUERADE iptable_nat nf_nat bridge stp llc nfsd lockd nfs_acl auth_rpcgss exportfs sunrpc ipv6 snd_ens1371 gameport snd_rawmidi snd_ac97_codec ac97_bus snd_seq snd_seq_device ppdev parport_pc snd_pcm snd_timer i2c_piix4 i2c_core snd soundcore snd_page_alloc pcnet32 mii parport microcode pcspkr BusLogic floppy [last unloaded: mperf] Pid: 1285, comm: nfsd Not tainted 2.6.37-rc7+ #50 440BX Desktop Reference Platform/VMware Virtual Platform EIP: 0060:[<e2bd239a>] EFLAGS: 00010246 CPU: 0 EIP is at nfsd4_encode_secinfo+0x1c/0x1c1 [nfsd] EAX: ddd30000 EBX: ddd30000 ECX: 00000000 EDX: 00000000 ESI: ddbaba18 EDI: e2bd237e EBP: dd48befc ESP: dd48bec4 DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068 Process nfsd (pid: 1285, ti=dd48a000 task=dd9d3240 task.ti=dd48a000) Stack: 00000000 deb18198 db078ef8 0fd00000 db07f4c8 00000000 00000000 db07f4c8 de054600 dd48bef8 c04e17af ddd30000 ddbaba18 e2bd237e dd48bf1c e2bd1e2b ddbaba20 e2bd0b0c ddb1c068 ddd30000 ddbaba18 e2bd0b0c dd48bf40 e2bd096c Call Trace: [<c04e17af>] ? dput+0x36/0xfc [<e2bd237e>] ? nfsd4_encode_secinfo+0x0/0x1c1 [nfsd] [<e2bd1e2b>] ? nfsd4_encode_operation+0x56/0x11b [nfsd] [<e2bd0b0c>] ? nfsd4_secinfo_no_name+0x0/0x4a [nfsd] [<e2bd0b0c>] ? nfsd4_secinfo_no_name+0x0/0x4a [nfsd] [<e2bd096c>] ? nfsd4_proc_compound+0x252/0x370 [nfsd] [<e2bc42de>] ? nfsd_dispatch+0xd1/0x19d [nfsd] [<e248912f>] ? svc_process_common+0x283/0x46c [sunrpc] [<e24894dd>] ? svc_process+0xde/0xf1 [sunrpc] [<e2bc47cf>] ? nfsd+0xd6/0x115 [nfsd] [<e2bc46f9>] ? nfsd+0x0/0x115 [nfsd] [<c0454d22>] ? kthread+0x62/0x67 [<c0454cc0>] ? kthread+0x0/0x67 [<c0409a3e>] ? kernel_thread_helper+0x6/0x10 Code: 83 c0 04 89 01 31 c0 83 c4 14 5b 5e 5f 5d c3 55 89 e5 57 56 53 89 c3 83 ec 2c 85 d2 89 55 c8 8b 49 08 89 4d dc 0f 85 68 01 00 00 <8b> 41 44 85 c0 74 0b 83 c1 48 89 4d d4 89 45 d8 eb 4d 8b 55 dc EIP: [<e2bd239a>] nfsd4_encode_secinfo+0x1c/0x1c1 [nfsd] SS:ESP 0068:dd48bec4 CR2: 0000000000000044 ---[ end trace 9c31555ffcc1f3e8 ]--- thanks, Mi Jinlong -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 3/3] nfsd4: implement secinfo_no_name
J. Bruce Fields:
Quoted 11 lines · Mi Jinlong
Quoted 6 lines
When testing this patch, oops appears.
We should implement a
nfsd4_encode_secinfo_no_name()instead usingnfsd4_encode_secinfo().With the following patch, kernel will run correctly.
Whoops, yes, you're correct. I've applied your patch. Thanks!
(What are you using for testing?)
Hi Bruce:
I test it by the pynfs41 at your tree, and add some simple test case as following.
I have a question about the op.secinfo_no_name(), should it take a argument?
Right now, maybe it always request with NFS4_SECINFO_STYLE4_CURRENT_FH, or I can't find how to set the argument.
thanks,
Mi Jinlong
Quoted 1 line
From
31ae25c04295888fa54ea531cdfaa4cfdefbe877Mon Sep 17 00:00:00 2001
From: Mi Jinlong <[email protected]>
Date: Wed, 29 Dec 2010 17:23:35 +0800
Subject: [PATCH] CLNT: Add some simple secinfo_no_name tests
Add two simple secinfo_no_name tests as Bruce said:
- send PUTROOTFH+SECINFO_NO_NAME, check that you get back a legal result.
- send PUTROOTFH+SECINFO+GETFH, and/or PUTROOTFH+SECINFO_NO_NAME+GETFH, check that the GETFH returns NOFILEHANDLE.
--- nfs4.1/server41tests/__init__.py | 1 + nfs4.1/server41tests/st_secinfo_no_name.py | 35 ++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 0 deletions(-) create mode 100644 nfs4.1/server41tests/st_secinfo_no_name.py
nfs4.1/server41tests/__init__.py +1 -0
@@ -2,6 +2,7 @@ __all__ = ["st_exchange_id.py", # draft 21 "st_compound.py", "st_create_session.py", "st_destroy_session.py", + "st_secinfo_no_name.py", "st_sequence.py", "st_trunking.py", "st_open.py",
nfs4.1/server41tests/st_secinfo_no_name.py new file +35 -0
@@ -0,0 +1,35 @@ +from st_create_session import create_session +from nfs4_const import * +from environment import check, fail, bad_sessionid, create_file +from nfs4_type import channel_attrs4 +import nfs4_ops as op +import nfs4lib + +def testSupported(t, env): + """Do a simple SECINFO_NO_NAME + send PUTROOTFH+SECINFO_NO_NAME, check is result legal + + FLAGS: all + CODE: SECNN1 + """ + c = env.c1.new_client(env.testname(t)) + sess = c.create_session() + res = sess.compound([op.putrootfh(), op.secinfo_no_name()]) + check(res); + +def testSupported2(t, env): + """GETFH after do a SECINFO_NO_NAME or SECINFO + result in a NOFILEHANDLE error, See rfc 5661 section 2.6.3.1.1.8 + + FLAGS: all + CODE: SECNN2 + """ + c = env.c1.new_client(env.testname(t)) + sess = c.create_session() + res = sess.compound([op.putrootfh(), op.secinfo_no_name(), op.getfh()]) + print res + check(res, NFS4ERR_NOFILEHANDLE); + + res = sess.compound([op.putrootfh(), op.secinfo("tree"), op.getfh()]) + print res + check(res, NFS4ERR_NOFILEHANDLE);
Signature · 1 line
1.7.3.3
Re: [PATCH 3/3] nfsd4: implement secinfo_no_name
Quoted 17 lines · Mi Jinlong
J. Bruce Fields:
Quoted 11 lines · Mi Jinlong
Quoted 6 lines
When testing this patch, oops appears.
We should implement a
nfsd4_encode_secinfo_no_name()instead usingnfsd4_encode_secinfo().With the following patch, kernel will run correctly.
Whoops, yes, you're correct. I've applied your patch. Thanks!
(What are you using for testing?)
Hi Bruce:
Quoted 7 lines
I test it by the pynfs41 at your tree, and add some simple test case as following.
I have a question about the
op.secinfo_no_name(), should it take a argument?
Right now, maybe it always request withNFS4_SECINFO_STYLE4_CURRENT_FH, or I can't find how to set the argument.
Hm, I don't know, I guess I'd look at how arguments are passed to some of the other operations when constructing compounds in other tests....
--b.
Quoted 79 lines
thanks,
Mi JinlongQuoted 1 line
From
31ae25c04295888fa54ea531cdfaa4cfdefbe877Mon Sep 17 00:00:00 2001From: Mi Jinlong <[email protected]>
Date: Wed, 29 Dec 2010 17:23:35 +0800
Subject: [PATCH] CLNT: Add some simplesecinfo_no_nametestsAdd two simple
secinfo_no_nametests as Bruce said:
- send PUTROOTFH+SECINFO_NO_NAME, check that you get back a legal result.
- send PUTROOTFH+SECINFO+GETFH, and/or PUTROOTFH+SECINFO_NO_NAME+GETFH, check that the GETFH returns NOFILEHANDLE.Signed-off-by Mi Jinlong <[email protected]>--- nfs4.1/server41tests/__init__.py | 1 + nfs4.1/server41tests/st_secinfo_no_name.py | 35 ++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 0 deletions(-) create mode 100644 nfs4.1/server41tests/st_secinfo_no_name.pynfs4.1/server41tests/__init__.py +1
-0@@ -2,6 +2,7 @@ __all__ = ["st_exchange_id.py", # draft 21 "st_compound.py", "st_create_session.py", "st_destroy_session.py", + "st_secinfo_no_name.py", "st_sequence.py", "st_trunking.py", "st_open.py",nfs4.1/server41tests/st_secinfo_no_name.py new file +35
-0@@ -0,0 +1,35 @@ +from st_create_session import create_session +from nfs4_const import * +from environment import check, fail, bad_sessionid, create_file +from nfs4_type import channel_attrs4 +import nfs4_ops as op +import nfs4lib + +def testSupported(t, env): + """Do a simple SECINFO_NO_NAME + send PUTROOTFH+SECINFO_NO_NAME, check is result legal + + FLAGS: all + CODE: SECNN1 + """ + c = env.c1.new_client(env.testname(t)) + sess = c.create_session() + res = sess.compound([op.putrootfh(), op.secinfo_no_name()]) + check(res); + +def testSupported2(t, env): + """GETFH after do a SECINFO_NO_NAME or SECINFO + result in a NOFILEHANDLE error, See rfc 5661 section 2.6.3.1.1.8 + + FLAGS: all + CODE: SECNN2 + """ + c = env.c1.new_client(env.testname(t)) + sess = c.create_session() + res = sess.compound([op.putrootfh(), op.secinfo_no_name(), op.getfh()]) + print res + check(res, NFS4ERR_NOFILEHANDLE); + + res = sess.compound([op.putrootfh(), op.secinfo("tree"), op.getfh()]) + print res + check(res, NFS4ERR_NOFILEHANDLE);Signature · 1 line
1.7.3.3
Re: [PATCH 3/3] nfsd4: implement secinfo_no_name
Quoted 18 lines · J. Bruce Fields
Quoted 17 lines · Mi Jinlong
J. Bruce Fields:
Quoted 11 lines · Mi Jinlong
Quoted 6 lines
When testing this patch, oops appears.
We should implement a
nfsd4_encode_secinfo_no_name()instead usingnfsd4_encode_secinfo().With the following patch, kernel will run correctly.
Whoops, yes, you're correct. I've applied your patch. Thanks!
(What are you using for testing?)
Hi Bruce:
Quoted 8 lines
Quoted 7 lines
I test it by the pynfs41 at your tree, and add some simple test case as following.
I have a question about the
op.secinfo_no_name(), should it take a argument?
Right now, maybe it always request withNFS4_SECINFO_STYLE4_CURRENT_FH, or I can't find how to set the argument.
There was a bug in how the op.secinfo_no_name() function was auto constructed. I've pushed a fix to
my tree at git://linux-nfs.org/~iisaman/newpynfs.git.
Fred
Quoted 89 lines
Hm, I don't know, I guess I'd look at how arguments are passed to some of the other operations when constructing compounds in other tests....
--b.
Quoted 77 lines
thanks,
Mi JinlongQuoted 1 line
From
31ae25c04295888fa54ea531cdfaa4cfdefbe877Mon Sep 17 00:00:00 2001From: Mi Jinlong <[email protected]>
Date: Wed, 29 Dec 2010 17:23:35 +0800
Subject: [PATCH] CLNT: Add some simplesecinfo_no_nametestsAdd two simple
secinfo_no_nametests as Bruce said:
- send PUTROOTFH+SECINFO_NO_NAME, check that you get back a legal result.
- send PUTROOTFH+SECINFO+GETFH, and/or PUTROOTFH+SECINFO_NO_NAME+GETFH, check that the GETFH returns NOFILEHANDLE.Signed-off-by Mi Jinlong <[email protected]>---
nfs4.1/server41tests/__init__.py | 1 +nfs4.1/server41tests/st_secinfo_no_name.py| 35 ++++++++++++++++++++++++++++2 files changed, 36 insertions(+), 0 deletions(-)create mode 100644
nfs4.1/server41tests/st_secinfo_no_name.pynfs4.1/server41tests/__init__.py +1
-0@@ -2,6 +2,7 @@ __all__ = ["st_exchange_id.py", # draft 21 "st_compound.py", "st_create_session.py", "st_destroy_session.py", + "st_secinfo_no_name.py", "st_sequence.py", "st_trunking.py", "st_open.py",nfs4.1/server41tests/st_secinfo_no_name.py new file +35
-1@@ -0,0 +1,35 @@ +from st_create_session import create_session +from nfs4_const import * +from environment import check, fail, bad_sessionid, create_file +from nfs4_type import channel_attrs4 +import nfs4_ops as op +import nfs4lib + +def testSupported(t, env): + """Do a simple SECINFO_NO_NAME + send PUTROOTFH+SECINFO_NO_NAME, check is result legal + + FLAGS: all + CODE: SECNN1 + """ + c = env.c1.new_client(env.testname(t)) + sess = c.create_session() + res = sess.compound([op.putrootfh(), op.secinfo_no_name()]) + check(res); + +def testSupported2(t, env): + """GETFH after do a SECINFO_NO_NAME or SECINFO + result in a NOFILEHANDLE error, See rfc 5661 section 2.6.3.1.1.8 + + FLAGS: all + CODE: SECNN2 + """ + c = env.c1.new_client(env.testname(t)) + sess = c.create_session() + res = sess.compound([op.putrootfh(), op.secinfo_no_name(), op.getfh()]) + print res + check(res, NFS4ERR_NOFILEHANDLE); + + res = sess.compound([op.putrootfh(), op.secinfo("tree"), op.getfh()]) + print res + check(res, NFS4ERR_NOFILEHANDLE); --Quoted 2 lines
1.7.3.3
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 3/3] nfsd4: implement secinfo_no_name
Quoted 28 lines · Fred Isaman
Quoted 18 lines · J. Bruce Fields
Quoted 17 lines · Mi Jinlong
J. Bruce Fields:
Quoted 11 lines · Mi Jinlong
Quoted 6 lines
When testing this patch, oops appears.
We should implement a
nfsd4_encode_secinfo_no_name()instead usingnfsd4_encode_secinfo().With the following patch, kernel will run correctly.
Whoops, yes, you're correct. I've applied your patch. Thanks!
(What are you using for testing?)
Hi Bruce:
Quoted 8 lines
Quoted 7 lines
I test it by the pynfs41 at your tree, and add some simple test case as following.
I have a question about the
op.secinfo_no_name(), should it take a argument?
Right now, maybe it always request withNFS4_SECINFO_STYLE4_CURRENT_FH, or I can't find how to set the argument.
Quoted 3 lines
There was a bug in how the
op.secinfo_no_name()function was auto constructed. I've pushed a fix to
my tree atgit://linux-nfs.org/~iisaman/newpynfs.git.
Thanks, Fred. I've pulled that into my repository too.
--b.
Quoted 92 lines
Fred
Quoted 89 lines
Hm, I don't know, I guess I'd look at how arguments are passed to some of the other operations when constructing compounds in other tests....
--b.
Quoted 77 lines
thanks,
Mi JinlongQuoted 1 line
From
31ae25c04295888fa54ea531cdfaa4cfdefbe877Mon Sep 17 00:00:00 2001From: Mi Jinlong <[email protected]>
Date: Wed, 29 Dec 2010 17:23:35 +0800
Subject: [PATCH] CLNT: Add some simplesecinfo_no_nametestsAdd two simple
secinfo_no_nametests as Bruce said:
- send PUTROOTFH+SECINFO_NO_NAME, check that you get back a legal result.
- send PUTROOTFH+SECINFO+GETFH, and/or PUTROOTFH+SECINFO_NO_NAME+GETFH, check that the GETFH returns NOFILEHANDLE.Signed-off-by Mi Jinlong <[email protected]>---
nfs4.1/server41tests/__init__.py | 1 +nfs4.1/server41tests/st_secinfo_no_name.py| 35 ++++++++++++++++++++++++++++2 files changed, 36 insertions(+), 0 deletions(-)create mode 100644
nfs4.1/server41tests/st_secinfo_no_name.pynfs4.1/server41tests/__init__.py +1
-0@@ -2,6 +2,7 @@ __all__ = ["st_exchange_id.py", # draft 21 "st_compound.py", "st_create_session.py", "st_destroy_session.py", + "st_secinfo_no_name.py", "st_sequence.py", "st_trunking.py", "st_open.py",nfs4.1/server41tests/st_secinfo_no_name.py new file +35
-1@@ -0,0 +1,35 @@ +from st_create_session import create_session +from nfs4_const import * +from environment import check, fail, bad_sessionid, create_file +from nfs4_type import channel_attrs4 +import nfs4_ops as op +import nfs4lib + +def testSupported(t, env): + """Do a simple SECINFO_NO_NAME + send PUTROOTFH+SECINFO_NO_NAME, check is result legal + + FLAGS: all + CODE: SECNN1 + """ + c = env.c1.new_client(env.testname(t)) + sess = c.create_session() + res = sess.compound([op.putrootfh(), op.secinfo_no_name()]) + check(res); + +def testSupported2(t, env): + """GETFH after do a SECINFO_NO_NAME or SECINFO + result in a NOFILEHANDLE error, See rfc 5661 section 2.6.3.1.1.8 + + FLAGS: all + CODE: SECNN2 + """ + c = env.c1.new_client(env.testname(t)) + sess = c.create_session() + res = sess.compound([op.putrootfh(), op.secinfo_no_name(), op.getfh()]) + print res + check(res, NFS4ERR_NOFILEHANDLE); + + res = sess.compound([op.putrootfh(), op.secinfo("tree"), op.getfh()]) + print res + check(res, NFS4ERR_NOFILEHANDLE); --Quoted 2 lines
1.7.3.3
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 3/3] nfsd4: implement secinfo_no_name
Quoted 29 lines · J. Bruce Fields
Quoted 28 lines · Fred Isaman
Quoted 26 lines · J. Bruce Fields
Quoted 24 lines · Mi Jinlong
J. Bruce Fields:
Quoted 11 lines · Mi Jinlong
Quoted 6 lines
When testing this patch, oops appears.
We should implement a
nfsd4_encode_secinfo_no_name()instead usingnfsd4_encode_secinfo().With the following patch, kernel will run correctly.
Whoops, yes, you're correct. I've applied your patch. Thanks!
(What are you using for testing?)
Hi Bruce:
I test it by the pynfs41 at your tree, and add some simple test case as following.
I have a question about the
op.secinfo_no_name(), should it take a argument?
Right now, maybe it always request withNFS4_SECINFO_STYLE4_CURRENT_FH, or I can't find how to set the argument.
Quoted 5 lines
Quoted 3 lines
There was a bug in how the
op.secinfo_no_name()function was auto constructed. I've pushed a fix to
my tree atgit://linux-nfs.org/~iisaman/newpynfs.git.Thanks, Fred. I've pulled that into my repository too.
But then these secinfo_no_name tests don't work ("TypeError:
data.opsecinfo_no_name == None"); Mi Jinlong, would you mind looking into that?
--b.
Quoted 95 lines
--b.
Quoted 92 lines
Fred
Quoted 89 lines
Hm, I don't know, I guess I'd look at how arguments are passed to some of the other operations when constructing compounds in other tests....
--b.
Quoted 77 lines
thanks,
Mi JinlongQuoted 1 line
From
31ae25c04295888fa54ea531cdfaa4cfdefbe877Mon Sep 17 00:00:00 2001From: Mi Jinlong <[email protected]>
Date: Wed, 29 Dec 2010 17:23:35 +0800
Subject: [PATCH] CLNT: Add some simplesecinfo_no_nametestsAdd two simple
secinfo_no_nametests as Bruce said:
- send PUTROOTFH+SECINFO_NO_NAME, check that you get back a legal result.
- send PUTROOTFH+SECINFO+GETFH, and/or PUTROOTFH+SECINFO_NO_NAME+GETFH, check that the GETFH returns NOFILEHANDLE.Signed-off-by Mi Jinlong <[email protected]>---
nfs4.1/server41tests/__init__.py | 1 +nfs4.1/server41tests/st_secinfo_no_name.py| 35 ++++++++++++++++++++++++++++2 files changed, 36 insertions(+), 0 deletions(-)create mode 100644
nfs4.1/server41tests/st_secinfo_no_name.pynfs4.1/server41tests/__init__.py +1
-0@@ -2,6 +2,7 @@ __all__ = ["st_exchange_id.py", # draft 21 "st_compound.py", "st_create_session.py", "st_destroy_session.py", + "st_secinfo_no_name.py", "st_sequence.py", "st_trunking.py", "st_open.py",nfs4.1/server41tests/st_secinfo_no_name.py new file +35
-1@@ -0,0 +1,35 @@ +from st_create_session import create_session +from nfs4_const import * +from environment import check, fail, bad_sessionid, create_file +from nfs4_type import channel_attrs4 +import nfs4_ops as op +import nfs4lib + +def testSupported(t, env): + """Do a simple SECINFO_NO_NAME + send PUTROOTFH+SECINFO_NO_NAME, check is result legal + + FLAGS: all + CODE: SECNN1 + """ + c = env.c1.new_client(env.testname(t)) + sess = c.create_session() + res = sess.compound([op.putrootfh(), op.secinfo_no_name()]) + check(res); + +def testSupported2(t, env): + """GETFH after do a SECINFO_NO_NAME or SECINFO + result in a NOFILEHANDLE error, See rfc 5661 section 2.6.3.1.1.8 + + FLAGS: all + CODE: SECNN2 + """ + c = env.c1.new_client(env.testname(t)) + sess = c.create_session() + res = sess.compound([op.putrootfh(), op.secinfo_no_name(), op.getfh()]) + print res + check(res, NFS4ERR_NOFILEHANDLE); + + res = sess.compound([op.putrootfh(), op.secinfo("tree"), op.getfh()]) + print res + check(res, NFS4ERR_NOFILEHANDLE); --Quoted 2 lines
1.7.3.3
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 3/3] nfsd4: implement secinfo_no_name
Quoted 25 lines · J. Bruce Fields
Quoted 24 lines · J. Bruce Fields
Quoted 23 lines · Fred Isaman
Quoted 22 lines · J. Bruce Fields
Quoted 21 lines · Mi Jinlong
J. Bruce Fields:
Quoted 10 lines · Mi Jinlong
Quoted 6 lines
When testing this patch, oops appears.
We should implement a
nfsd4_encode_secinfo_no_name()instead usingnfsd4_encode_secinfo().With the following patch, kernel will run correctly.
Whoops, yes, you're correct. I've applied your patch. Thanks!
(What are you using for testing?)
Hi Bruce:
I test it by the pynfs41 at your tree, and add some simple test case as following.
I have a question about the
op.secinfo_no_name(), should it take a argument?
Right now, maybe it always request withNFS4_SECINFO_STYLE4_CURRENT_FH, or I can't find how to set the argument.
Quoted 8 lines
Quoted 4 lines
Quoted 3 lines
There was a bug in how the
op.secinfo_no_name()function was auto constructed. I've pushed a fix to
my tree atgit://linux-nfs.org/~iisaman/newpynfs.git.Thanks, Fred. I've pulled that into my repository too.
But then these
secinfo_no_nametests don't work ("TypeError:
data.opsecinfo_no_name == None"); Mi Jinlong, would you mind looking into that?
After Fred's patch, we should rebuild the test site at pynfs41 dir with "python setup.py build".
And update test case, call op.secinfo_no_name() with 0 as following.
thanks,
Mi Jinlong
Quoted 1 line
From
344f0ee9a625d43b918be5dfc4fc9df8e8cbac28Mon Sep 17 00:00:00 2001
From: Mi Jinlong <[email protected]>
Date: Thu, 30 Dec 2010 12:13:27 +0800
Subject: [PATCH] CLNT: Add some simple secinfo_no_name tests
Add two simple secinfo_no_name tests as Bruce said:
- send PUTROOTFH+SECINFO_NO_NAME, check that you get back a legal result.
- send PUTROOTFH+SECINFO+GETFH, and/or PUTROOTFH+SECINFO_NO_NAME+GETFH, check that the GETFH returns NOFILEHANDLE.
--- nfs4.1/server41tests/__init__.py | 1 + nfs4.1/server41tests/st_secinfo_no_name.py | 35 ++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 0 deletions(-) create mode 100644 nfs4.1/server41tests/st_secinfo_no_name.py
nfs4.1/server41tests/__init__.py +1 -0
@@ -2,6 +2,7 @@ __all__ = ["st_exchange_id.py", # draft 21 "st_compound.py", "st_create_session.py", "st_destroy_session.py", + "st_secinfo_no_name.py", "st_sequence.py", "st_trunking.py", "st_open.py",
nfs4.1/server41tests/st_secinfo_no_name.py new file +35 -0
@@ -0,0 +1,35 @@ +from st_create_session import create_session +from nfs4_const import * +from environment import check, fail, bad_sessionid, create_file +from nfs4_type import channel_attrs4 +import nfs4_ops as op +import nfs4lib + +def testSupported(t, env): + """Do a simple SECINFO_NO_NAME + send PUTROOTFH+SECINFO_NO_NAME, check is result legal + + FLAGS: all + CODE: SECNN1 + """ + c = env.c1.new_client(env.testname(t)) + sess = c.create_session() + res = sess.compound([op.putrootfh(), op.secinfo_no_name(0)]) + check(res); + +def testSupported2(t, env): + """GETFH after do a SECINFO_NO_NAME or SECINFO + result in a NOFILEHANDLE error, See rfc 5661 section 2.6.3.1.1.8 + + FLAGS: all + CODE: SECNN2 + """ + c = env.c1.new_client(env.testname(t)) + sess = c.create_session() + res = sess.compound([op.putrootfh(), op.secinfo_no_name(0), op.getfh()]) + print res + check(res, NFS4ERR_NOFILEHANDLE); + + res = sess.compound([op.putrootfh(), op.secinfo("tree"), op.getfh()]) + print res + check(res, NFS4ERR_NOFILEHANDLE);
Signature · 1 line
1.7.3.4
Re: [PATCH 3/3] nfsd4: implement secinfo_no_name
Quoted 33 lines · Mi Jinlong
Quoted 30 lines · J. Bruce Fields
Quoted 28 lines · J. Bruce Fields
Quoted 19 lines · Fred Isaman
Quoted 18 lines · J. Bruce Fields
Quoted 17 lines · Mi Jinlong
J. Bruce Fields:
Quoted 10 lines · Mi Jinlong
Quoted 6 lines
When testing this patch, oops appears.
We should implement a
nfsd4_encode_secinfo_no_name()instead usingnfsd4_encode_secinfo().With the following patch, kernel will run correctly.
Whoops, yes, you're correct. I've applied your patch. Thanks!
(What are you using for testing?)
Hi Bruce:
I test it by the pynfs41 at your tree, and add some simple test case as following.
Quoted 7 lines
Quoted 4 lines
Quoted 4 lines
I have a question about the
op.secinfo_no_name(), should it take a argument?
Right now, maybe it always request withNFS4_SECINFO_STYLE4_CURRENT_FH, or I can't find how to set the argument.There was a bug in how the
op.secinfo_no_name()function was auto constructed. I've pushed a fix to
my tree atgit://linux-nfs.org/~iisaman/newpynfs.git.Thanks, Fred. I've pulled that into my repository too.
Quoted 8 lines
Quoted 3 lines
But then these
secinfo_no_nametests don't work ("TypeError:
data.opsecinfo_no_name == None"); Mi Jinlong, would you mind looking into that?After Fred's patch, we should rebuild the test site at pynfs41 dir with "python
setup.pybuild".And update test case, call
op.secinfo_no_name()with 0 as following.
Thanks!
Could I ask for a few changes?:
- The second half of testSupported2 should go into a separate test in a separate st_secinfo file. (It will be a very small file for now! But we can port some of the 4.0 tests to it some day.)
- That test should create a file in the same way that e.g. the st_open tests do instead of assuming a file named "/tree" exists.
--b.
Quoted 79 lines
thanks,
Mi JinlongQuoted 1 line
From
344f0ee9a625d43b918be5dfc4fc9df8e8cbac28Mon Sep 17 00:00:00 2001From: Mi Jinlong <[email protected]>
Date: Thu, 30 Dec 2010 12:13:27 +0800
Subject: [PATCH] CLNT: Add some simplesecinfo_no_nametestsAdd two simple
secinfo_no_nametests as Bruce said:
- send PUTROOTFH+SECINFO_NO_NAME, check that you get back a legal result.
- send PUTROOTFH+SECINFO+GETFH, and/or PUTROOTFH+SECINFO_NO_NAME+GETFH, check that the GETFH returns NOFILEHANDLE.Signed-off-by Mi Jinlong <[email protected]>--- nfs4.1/server41tests/__init__.py | 1 + nfs4.1/server41tests/st_secinfo_no_name.py | 35 ++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 0 deletions(-) create mode 100644 nfs4.1/server41tests/st_secinfo_no_name.pynfs4.1/server41tests/__init__.py +1
-0@@ -2,6 +2,7 @@ __all__ = ["st_exchange_id.py", # draft 21 "st_compound.py", "st_create_session.py", "st_destroy_session.py", + "st_secinfo_no_name.py", "st_sequence.py", "st_trunking.py", "st_open.py",nfs4.1/server41tests/st_secinfo_no_name.py new file +35
-0@@ -0,0 +1,35 @@ +from st_create_session import create_session +from nfs4_const import * +from environment import check, fail, bad_sessionid, create_file +from nfs4_type import channel_attrs4 +import nfs4_ops as op +import nfs4lib + +def testSupported(t, env): + """Do a simple SECINFO_NO_NAME + send PUTROOTFH+SECINFO_NO_NAME, check is result legal + + FLAGS: all + CODE: SECNN1 + """ + c = env.c1.new_client(env.testname(t)) + sess = c.create_session() + res = sess.compound([op.putrootfh(), op.secinfo_no_name(0)]) + check(res); + +def testSupported2(t, env): + """GETFH after do a SECINFO_NO_NAME or SECINFO + result in a NOFILEHANDLE error, See rfc 5661 section 2.6.3.1.1.8 + + FLAGS: all + CODE: SECNN2 + """ + c = env.c1.new_client(env.testname(t)) + sess = c.create_session() + res = sess.compound([op.putrootfh(), op.secinfo_no_name(0), op.getfh()]) + print res + check(res, NFS4ERR_NOFILEHANDLE); + + res = sess.compound([op.putrootfh(), op.secinfo("tree"), op.getfh()]) + print res + check(res, NFS4ERR_NOFILEHANDLE);Signature · 1 line
1.7.3.4
Re: [PATCH 3/3] nfsd4: implement secinfo_no_name
Quoted 41 lines · J. Bruce Fields
Quoted 29 lines · Mi Jinlong
Quoted 27 lines · J. Bruce Fields
Quoted 26 lines · J. Bruce Fields
Quoted 25 lines · Fred Isaman
Quoted 14 lines · J. Bruce Fields
Quoted 13 lines · Mi Jinlong
J. Bruce Fields:
Quoted 10 lines · Mi Jinlong
Quoted 6 lines
When testing this patch, oops appears.
We should implement a
nfsd4_encode_secinfo_no_name()instead usingnfsd4_encode_secinfo().With the following patch, kernel will run correctly.
Whoops, yes, you're correct. I've applied your patch. Thanks!
(What are you using for testing?)
Hi Bruce:
Quoted 7 lines
Quoted 7 lines
I test it by the pynfs41 at your tree, and add some simple test case as following.
I have a question about the
op.secinfo_no_name(), should it take a argument?
Right now, maybe it always request withNFS4_SECINFO_STYLE4_CURRENT_FH, or I can't find how to set the argument.There was a bug in how the
op.secinfo_no_name()function was auto constructed. I've pushed a fix to
my tree atgit://linux-nfs.org/~iisaman/newpynfs.git.Quoted 8 lines
Quoted 4 lines
Quoted 1 line
Thanks, Fred. I've pulled that into my repository too.
But then these
secinfo_no_nametests don't work ("TypeError:
data.opsecinfo_no_name == None"); Mi Jinlong, would you mind looking into that?After Fred's patch, we should rebuild the test site at pynfs41 dir with "python
setup.pybuild".And update test case, call
op.secinfo_no_name()with 0 as following.Thanks!
Quoted 8 lines
Could I ask for a few changes?:
- The second half of testSupported2 should go into a separate test in a separatest_secinfofile. (It will be a very small file for now! But we can port some of the 4.0 tests to it some day.)
- That test should create a file in the same way that e.g. thest_opentests do instead of assuming a file named "/tree" exists.
Is the following one OK?
thanks,
Mi Jinlong
Quoted 1 line
From
480d5d5272dd6d3c7bd15adafd62a4a9d2431db2Mon Sep 17 00:00:00 2001
From: Mi Jinlong <[email protected]>
Date: Sun, 2 Jan 2011 17:59:20 +0800
Subject: [PATCH] CLNT: Add some simple secinfo_no_name and secinfo tests
Add two simple secinfo_no_name tests as Bruce said:
- send PUTROOTFH+SECINFO_NO_NAME, check that you get back a legal result.
- send PUTROOTFH+SECINFO+GETFH, and/or PUTROOTFH+SECINFO_NO_NAME+GETFH, check that the GETFH returns NOFILEHANDLE.
also add two simple secinfo tests case.
--- nfs4.1/server41tests/__init__.py | 2 + nfs4.1/server41tests/st_secinfo.py | 57 ++++++++++++++++++++++++++++ nfs4.1/server41tests/st_secinfo_no_name.py | 35 +++++++++++++++++ 3 files changed, 94 insertions(+), 0 deletions(-) create mode 100644 nfs4.1/server41tests/st_secinfo.py create mode 100644 nfs4.1/server41tests/st_secinfo_no_name.py
nfs4.1/server41tests/__init__.py +2 -0
@@ -2,6 +2,8 @@ __all__ = ["st_exchange_id.py", # draft 21 "st_compound.py", "st_create_session.py", "st_destroy_session.py", + "st_secinfo_no_name.py", + "st_secinfo.py", "st_sequence.py", "st_trunking.py", "st_open.py",
nfs4.1/server41tests/st_secinfo.py new file +57 -0
57 lines not on this page · raw message
nfs4.1/server41tests/st_secinfo_no_name.py new file +35 -0
@@ -0,0 +1,35 @@ +from st_create_session import create_session +from nfs4_const import * +from environment import check, fail, bad_sessionid, create_file +from nfs4_type import channel_attrs4 +import nfs4_ops as op +import nfs4lib + +def testSupported(t, env): + """Do a simple SECINFO_NO_NAME + send PUTROOTFH+SECINFO_NO_NAME, check is result legal + + FLAGS: all + CODE: SECNN1 + """ + c = env.c1.new_client(env.testname(t)) + sess = c.create_session() + + # Do a simple SECINFO_NO_NAME + res = sess.compound([op.putrootfh(), op.secinfo_no_name(0)]) + check(res) + +def testSupported2(t, env): + """GETFH after do a SECINFO_NO_NAME or SECINFO + result in a NOFILEHANDLE error, See rfc 5661 section 2.6.3.1.1.8 + + FLAGS: all + CODE: SECNN2 + """ + c = env.c1.new_client(env.testname(t)) + sess = c.create_session() + + # GETFH after do a SECINFO_NO_NAME should get error NFS4ERR_NOFILEHANDLE + res = sess.compound([op.putrootfh(), op.secinfo_no_name(0), op.getfh()]) + print res + check(res, NFS4ERR_NOFILEHANDLE)
Signature · 1 line
1.7.3.4
Re: [PATCH 3/3] nfsd4: implement secinfo_no_name
Quoted 12 lines · Mi Jinlong
Quoted 8 lines · J. Bruce Fields
Could I ask for a few changes?:
- The second half of testSupported2 should go into a separate test in a separatest_secinfofile. (It will be a very small file for now! But we can port some of the 4.0 tests to it some day.)
- That test should create a file in the same way that e.g. thest_opentests do instead of assuming a file named "/tree" exists.
Quoted 1 line
Is the following one OK?
Yes, applied.
Thanks again for the pynfs help, getting these new features tested is important.
--b.
Quoted 149 lines
thanks,
Mi JinlongQuoted 1 line
From
480d5d5272dd6d3c7bd15adafd62a4a9d2431db2Mon Sep 17 00:00:00 2001From: Mi Jinlong <[email protected]>
Date: Sun, 2 Jan 2011 17:59:20 +0800
Subject: [PATCH] CLNT: Add some simplesecinfo_no_nameand secinfo testsAdd two simple
secinfo_no_nametests as Bruce said:
- send PUTROOTFH+SECINFO_NO_NAME, check that you get back a legal result.
- send PUTROOTFH+SECINFO+GETFH, and/or PUTROOTFH+SECINFO_NO_NAME+GETFH, check that the GETFH returns NOFILEHANDLE.also add two simple secinfo tests case.
Signed-off-by Mi Jinlong <[email protected]>--- nfs4.1/server41tests/__init__.py | 2 + nfs4.1/server41tests/st_secinfo.py | 57 ++++++++++++++++++++++++++++ nfs4.1/server41tests/st_secinfo_no_name.py | 35 +++++++++++++++++ 3 files changed, 94 insertions(+), 0 deletions(-) create mode 100644 nfs4.1/server41tests/st_secinfo.py create mode 100644 nfs4.1/server41tests/st_secinfo_no_name.pynfs4.1/server41tests/__init__.py +2
-0@@ -2,6 +2,8 @@ __all__ = ["st_exchange_id.py", # draft 21 "st_compound.py", "st_create_session.py", "st_destroy_session.py", + "st_secinfo_no_name.py", + "st_secinfo.py", "st_sequence.py", "st_trunking.py", "st_open.py",nfs4.1/server41tests/st_secinfo.py new file +57
-0@@ -0,0 +1,57 @@ +from st_create_session import create_session +from nfs4_const import * +from environment import check, fail, use_obj, bad_sessionid, create_file +from nfs4_type import channel_attrs4 +import nfs4_ops as op +import nfs4lib + +def testSupported(t, env): + """Do a simple SECINFO + + FLAGS: all + CODE: SEC1 + """ + name = env.testname(t) + c = env.c1.new_client(env.testname(t)) + sess = c.create_session() + + # Create a tmpfile for testing + owner = "owner_%s" % name + path = sess.c.homedir + [name] + res = create_file(sess, owner, path, access=OPEN4_SHARE_ACCESS_WRITE) + check(res) + + # Get the filehandle of the tmpfile's parent dir + res = sess.compound(use_obj(sess.c.homedir) + [op.getfh()]) + check(res) + fh = res.resarray[-1].object + + # Just do a simple SECINFO + res = sess.compound([op.putfh(fh), op.secinfo(name)]) + check(res) + +def testSupported2(t, env): + """GETFH after do a SECINFO_NO_NAME or SECINFO + result in a NOFILEHANDLE error, See rfc 5661 section 2.6.3.1.1.8 + + FLAGS: all + CODE: SEC2 + """ + name = env.testname(t) + c = env.c1.new_client(env.testname(t)) + sess = c.create_session() + + # Create a tmpfile for testing + owner = "owner_%s" % name + path = sess.c.homedir + [name] + res = create_file(sess, owner, path, access=OPEN4_SHARE_ACCESS_WRITE) + check(res) + + # Get the filehandle of the tmpfile's parent dir + res = sess.compound(use_obj(sess.c.homedir) + [op.getfh()]) + check(res) + fh = res.resarray[-1].object + + # GETFH after do a SECINFO should get error NFS4ERR_NOFILEHANDLE + res = sess.compound([op.putfh(fh), op.secinfo(name), op.getfh()]) + check(res, NFS4ERR_NOFILEHANDLE)nfs4.1/server41tests/st_secinfo_no_name.py new file +35
-0@@ -0,0 +1,35 @@ +from st_create_session import create_session +from nfs4_const import * +from environment import check, fail, bad_sessionid, create_file +from nfs4_type import channel_attrs4 +import nfs4_ops as op +import nfs4lib + +def testSupported(t, env): + """Do a simple SECINFO_NO_NAME + send PUTROOTFH+SECINFO_NO_NAME, check is result legal + + FLAGS: all + CODE: SECNN1 + """ + c = env.c1.new_client(env.testname(t)) + sess = c.create_session() + + # Do a simple SECINFO_NO_NAME + res = sess.compound([op.putrootfh(), op.secinfo_no_name(0)]) + check(res) + +def testSupported2(t, env): + """GETFH after do a SECINFO_NO_NAME or SECINFO + result in a NOFILEHANDLE error, See rfc 5661 section 2.6.3.1.1.8 + + FLAGS: all + CODE: SECNN2 + """ + c = env.c1.new_client(env.testname(t)) + sess = c.create_session() + + # GETFH after do a SECINFO_NO_NAME should get error NFS4ERR_NOFILEHANDLE + res = sess.compound([op.putrootfh(), op.secinfo_no_name(0), op.getfh()]) + print res + check(res, NFS4ERR_NOFILEHANDLE)Signature · 1 line
1.7.3.4