Skip to contentSkip to conversation

AVR32 update for 2.6.18-rc2-mm1

PATCH In review Haavard Skinnemoen 3 participants 12 messages Jul 31, 2006 – Aug 3, 2006 NFS client

lore
Share & tools
lore
#0 lore raw

cover AVR32 update for 2.6.18-rc2-mm1

Hi Andrew,

I'm back from vacation, so I figured I should try to compile the latest -mm for AVR32. It failed immediately, so here's a set of patches to fix the breakage. I guess I should have tried a clean build before submitting the last update, as I would have noticed that include/config/MARKER doesn't exist anymore.

Anyway, 2.6.18-rc2-mm1 boots successfully on my target with these patches, but there's something strange going on with NFS and a few other things that I didn't notice on 2.6.18-rc1. I'll investigate some more and see if I can figure out what's going on.

Do you want me to keep sending incremental patches, by the way? I can fold everything (or at least the trivial stuff) into avr32-arch.patch if you want.

Here's a shortlog of the patches coming up:
AVR32: Use auto.conf instead of MARKER
AVR32: Don't assume anything about MAX_NR_ZONES
AVR32: Add nsproxy definition
AVR32: Add I/O port access primitives
AVR32: Use linux/pfn.h
AVR32: Kill CONFIG_DISCONTIGMEM support completely

Haavard

#1 lore raw
Quoted 4 lines · On Mon, 31 Jul 2006 15:55:15 +0200 Haavard Skinnemoen <[email protected]>…

Anyway, 2.6.18-rc2-mm1 boots successfully on my target with these patches, but there's something strange going on with NFS and a few other things that I didn't notice on 2.6.18-rc1. I'll investigate some more and see if I can figure out what's going on.

All forms of write access to the NFS root file system seem to return -EACCESS. If I leave out git-nfs.patch, the problem goes away, so I'll try bisecting the NFS git tree tomorrow.

Is there anyway to access it via http?

Haavard

#2 lore raw
Quoted 11 lines · Haavard Skinnemoen
Quoted 4 lines · On Mon, 31 Jul 2006 15:55:15 +0200 Haavard Skinnemoen <[email protected]>…

Anyway, 2.6.18-rc2-mm1 boots successfully on my target with these patches, but there's something strange going on with NFS and a few other things that I didn't notice on 2.6.18-rc1. I'll investigate some more and see if I can figure out what's going on.

All forms of write access to the NFS root file system seem to return -EACCESS. If I leave out git-nfs.patch, the problem goes away, so I'll try bisecting the NFS git tree tomorrow.

can you check in /proc/self/mountstats what mount options are set on the root file system?

Quoted 1 line

Is there anyway to access it via http?

The individual patches are archived in

http://client.linux-nfs.org/Linux-2.6.x/2.6.18-rc3/

There is also gitweb access via

http://linux-nfs.org/cgi-bin/gitweb.cgi

Cheers,
Trond

#3 lore raw
Quoted 9 lines · On Mon, 31 Jul 2006 11:40:58 -0700 Trond Myklebust…
Quoted 8 lines · Haavard Skinnemoen
Quoted 4 lines · On Mon, 31 Jul 2006 15:55:15 +0200 Haavard Skinnemoen <[email protected]>…

Anyway, 2.6.18-rc2-mm1 boots successfully on my target with these patches, but there's something strange going on with NFS and a few other things that I didn't notice on 2.6.18-rc1. I'll investigate some more and see if I can figure out what's going on.

Quoted 6 lines
Quoted 3 lines

All forms of write access to the NFS root file system seem to return -EACCESS. If I leave out git-nfs.patch, the problem goes away, so I'll try bisecting the NFS git tree tomorrow.

can you check in /proc/self/mountstats what mount options are set on the root file system?

rw,vers=2,rsize=4096,wsize=4096,acregmin=3,acregmax=60,acdirmin=30, acdirmax=60,hard,nolock,proto=udp,timeo=11,retrans=2,sec=null

Quoted 3 lines
Quoted 1 line

Is there anyway to access it via http?

The individual patches are archived in

Thanks, I cloned the git repository via my home PC so I could do a real bisect, which ended up blaming this patch:

NFS: Share NFS superblocks per-protocol per-server per-FSID

from David Howells. The patch is quite large, so I'm not able to spot anything obvious. Please let me know if you want me to test something.

Haavard

#4 lore raw
Quoted 16 lines · Haavard Skinnemoen
Quoted 13 lines · On Mon, 31 Jul 2006 11:40:58 -0700 Trond Myklebust…
Quoted 11 lines · Haavard Skinnemoen
Quoted 4 lines · On Mon, 31 Jul 2006 15:55:15 +0200 Haavard Skinnemoen <[email protected]>…

Anyway, 2.6.18-rc2-mm1 boots successfully on my target with these patches, but there's something strange going on with NFS and a few other things that I didn't notice on 2.6.18-rc1. I'll investigate some more and see if I can figure out what's going on.

All forms of write access to the NFS root file system seem to return -EACCESS. If I leave out git-nfs.patch, the problem goes away, so I'll try bisecting the NFS git tree tomorrow.

Quoted 5 lines
Quoted 2 lines

can you check in /proc/self/mountstats what mount options are set on the root file system?

rw,vers=2,rsize=4096,wsize=4096,acregmin=3,acregmax=60,acdirmin=30, acdirmax=60,hard,nolock,proto=udp,timeo=11,retrans=2,sec=null

That 'sec=null' would explain why you are seeing a problem, and the attached patch ought to fix it.

Cheers,
Trond

---

 fs/nfs/super.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
fs/nfs/super.c +3 -2
index 867b5dc..d744f63 100644
@@ -471,9 +471,10 @@ static int nfs_validate_mount_data(struc
 						data->version);
 				return -EINVAL;
 			}
-			/* Fill in pseudoflavor for mount version < 5 */
-			data->pseudoflavor = RPC_AUTH_UNIX;
 		case 5:
+			/* Set the pseudoflavor */
+			if (!(data->flags & NFS_MOUNT_SECFLAVOUR))
+				data->pseudoflavor = RPC_AUTH_UNIX;
 			memset(data->context, 0, sizeof(data->context));
 	}
 
#5 lore raw

fs/nfs/super.c static int nfs_validate_mount_data(struc · line 478

Quoted 4 lines · Trond Myklebust
fs/nfs/super.c +3 -0
+			/* Set the pseudoflavor */
+			if (!(data->flags & NFS_MOUNT_SECFLAVOUR))
+				data->pseudoflavor = RPC_AUTH_UNIX;
 			memset(data->context, 0, sizeof(data->context));

Should the memset() conditional also?

David

#6 lore raw
Quoted 8 lines · David Howells

fs/nfs/super.c static int nfs_validate_mount_data(struc · line 478

Quoted 4 lines · Trond Myklebust
fs/nfs/super.c +3 -0
+			/* Set the pseudoflavor */
+			if (!(data->flags & NFS_MOUNT_SECFLAVOUR))
+				data->pseudoflavor = RPC_AUTH_UNIX;
 			memset(data->context, 0, sizeof(data->context));

Should the memset() conditional also?

No. That should be unconditional...

Cheers,
Trond

#7 lore raw
In reply to Trond Myklebust
Quoted 2 lines · Trond Myklebust

That 'sec=null' would explain why you are seeing a problem, and the attached patch ought to fix it.

I've inserted this patch into my patchset (now version #9) at position 32 after my security fix, and posted the new patchset in the usual place. Your git tree carries patches 1-29 currently.

David

#8 lore raw
In reply to Trond Myklebust
Quoted 2 lines · On Tue, 01 Aug 2006 09:47:27 -0700 Trond Myklebust…

That 'sec=null' would explain why you are seeing a problem, and the attached patch ought to fix it.

That does explain it, but unfortunately the patch doesn't fix it because data->version is 6. I added "case 6:" on the line after "case 5:", and it solved the problem.

I don't know what the difference between version 5 and 6 is, but I suspect it has something to do with data->context?

Haavard

#9 lore raw
Quoted 6 lines · Haavard Skinnemoen
Quoted 2 lines · On Tue, 01 Aug 2006 09:47:27 -0700 Trond Myklebust…

That 'sec=null' would explain why you are seeing a problem, and the attached patch ought to fix it.

Quoted 6 lines

That does explain it, but unfortunately the patch doesn't fix it because data->version is 6. I added "case 6:" on the line after "case 5:", and it solved the problem.

I don't know what the difference between version 5 and 6 is, but I suspect it has something to do with data->context?

Argh... You are quite right. We ought to have fixed the pseudoflavour thingy in version 6, and made it mandatory, but we missed the chance...

Revised patch is attached.

Cheers,
Trond

---

 fs/nfs/super.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
fs/nfs/super.c +4 -2
index 867b5dc..97cfb14 100644
@@ -471,12 +471,14 @@ static int nfs_validate_mount_data(struc
 						data->version);
 				return -EINVAL;
 			}
-			/* Fill in pseudoflavor for mount version < 5 */
-			data->pseudoflavor = RPC_AUTH_UNIX;
 		case 5:
 			memset(data->context, 0, sizeof(data->context));
 	}
 
+	/* Set the pseudoflavor */
+	if (!(data->flags & NFS_MOUNT_SECFLAVOUR))
+		data->pseudoflavor = RPC_AUTH_UNIX;
+
 #ifndef CONFIG_NFS_V3
 	/* If NFSv3 is not compiled in, return -EPROTONOSUPPORT */
 	if (data->flags & NFS_MOUNT_VER3) {
#10 lore raw
Quoted 1 line · On Thu, 03 Aug 2006 10:34:21 -0400 Trond Myklebust…

Revised patch is attached.

Fixes the problem. Thanks.

Håvard