All of lore.kernel.org
 help / color / mirror / Atom feed
* maintainership question about nfs-utils/util/mount
@ 2007-07-06 20:13 Chuck Lever
  2007-07-16 15:42 ` Jeff Layton
  0 siblings, 1 reply; 3+ messages in thread
From: Chuck Lever @ 2007-07-06 20:13 UTC (permalink / raw)
  To: NFS List

[-- Attachment #1: Type: text/plain, Size: 1215 bytes --]

I'm looking at nfs-utils/utils/mount in order to patch in support for 
passing a string of mount options to the kernel instead of an 
nfs_mount_data.

In mount.c, main() invokes nfsmount() in nfsmount.c.  nfsmount() defines 
a structure on the stack called "data", then returns a pointer to "data" 
which is then passed to the kernel by main().

I think the only way this continues to work is that there are three 1024 
character buffers defined in nfsmount()'s stack frame before "data," 
which places "data" far enough up the stack that subsequent function 
calls in main() don't smash it.

Although this doesn't cause bad behavior today, it needs to be fixed to 
prevent future changes from breaking things badly.

Also found an interesting error message in here:

   permission died - no match for fstab

Should probably be "permission denied".  I'm not really sure what "no 
match for fstab" means, but looking at the context, this message appears 
if a non-root user tries to mount something that isn't already listed in 
/etc/fstab.

What's the current blessed procedure for sending patches and fixes for 
this particular code?  Mail to agud@redhat.com (last touch rule, and 
author of mount.c) is rejected.

[-- Attachment #2: chuck.lever.vcf --]
[-- Type: text/x-vcard, Size: 315 bytes --]

begin:vcard
fn:Chuck Lever
n:Lever;Chuck
org:Oracle Corporation;Corporate Architecture: Linux Projects Group
adr:;;1015 Granger Avenue;Ann Arbor;MI;48104;USA
email;internet:chuck dot lever at nospam oracle dot com
title:Principal Member of Staff
tel;work:+1 248 614 5091
x-mozilla-html:FALSE
version:2.1
end:vcard


[-- Attachment #3: Type: text/plain, Size: 286 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

[-- Attachment #4: Type: text/plain, Size: 140 bytes --]

_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: maintainership question about nfs-utils/util/mount
  2007-07-06 20:13 maintainership question about nfs-utils/util/mount Chuck Lever
@ 2007-07-16 15:42 ` Jeff Layton
  2007-07-16 16:25   ` Chuck Lever
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Layton @ 2007-07-16 15:42 UTC (permalink / raw)
  To: chuck.lever; +Cc: NFS List

On Fri, 06 Jul 2007 16:13:23 -0400
Chuck Lever <chuck.lever@oracle.com> wrote:

> I'm looking at nfs-utils/utils/mount in order to patch in support for 
> passing a string of mount options to the kernel instead of an 
> nfs_mount_data.
> 
> In mount.c, main() invokes nfsmount() in nfsmount.c.  nfsmount() defines 
> a structure on the stack called "data", then returns a pointer to "data" 
> which is then passed to the kernel by main().
> 
> I think the only way this continues to work is that there are three 1024 
> character buffers defined in nfsmount()'s stack frame before "data," 
> which places "data" far enough up the stack that subsequent function 
> calls in main() don't smash it.
> 
> Although this doesn't cause bad behavior today, it needs to be fixed to 
> prevent future changes from breaking things badly.
> 

In the git tree I'm looking at, "data" is declared static. Does that protect
it from getting smashed?

> Also found an interesting error message in here:
> 
>    permission died - no match for fstab
> 
> Should probably be "permission denied".  I'm not really sure what "no 
> match for fstab" means, but looking at the context, this message appears 
> if a non-root user tries to mount something that isn't already listed in 
> /etc/fstab.
> 
> What's the current blessed procedure for sending patches and fixes for 
> this particular code?  Mail to agud@redhat.com (last touch rule, and 
> author of mount.c) is rejected.
> 


-- 
Jeff Layton <jlayton@redhat.com>

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: maintainership question about nfs-utils/util/mount
  2007-07-16 15:42 ` Jeff Layton
@ 2007-07-16 16:25   ` Chuck Lever
  0 siblings, 0 replies; 3+ messages in thread
From: Chuck Lever @ 2007-07-16 16:25 UTC (permalink / raw)
  To: Jeff Layton; +Cc: NFS List

[-- Attachment #1: Type: text/plain, Size: 1124 bytes --]

Jeff Layton wrote:
> On Fri, 06 Jul 2007 16:13:23 -0400
> Chuck Lever <chuck.lever@oracle.com> wrote:
> 
>> I'm looking at nfs-utils/utils/mount in order to patch in support for 
>> passing a string of mount options to the kernel instead of an 
>> nfs_mount_data.
>>
>> In mount.c, main() invokes nfsmount() in nfsmount.c.  nfsmount() defines 
>> a structure on the stack called "data", then returns a pointer to "data" 
>> which is then passed to the kernel by main().
>>
>> I think the only way this continues to work is that there are three 1024 
>> character buffers defined in nfsmount()'s stack frame before "data," 
>> which places "data" far enough up the stack that subsequent function 
>> calls in main() don't smash it.
>>
>> Although this doesn't cause bad behavior today, it needs to be fixed to 
>> prevent future changes from breaking things badly.
>>
> 
> In the git tree I'm looking at, "data" is declared static. Does that protect
> it from getting smashed?

Yes.  For some reason, I missed that entirely the first time I looked at 
it.  Notice that nfs4_mount_data is also declared static in nfs4mount.c.

[-- Attachment #2: chuck.lever.vcf --]
[-- Type: text/x-vcard, Size: 290 bytes --]

begin:vcard
fn:Chuck Lever
n:Lever;Chuck
org:Oracle Corporation;Corporate Architecture: Linux Projects Group
adr:;;1015 Granger Avenue;Ann Arbor;MI;48104;USA
title:Principal Member of Staff
tel;work:+1 248 614 5091
x-mozilla-html:FALSE
url:http://oss.oracle.com/~cel
version:2.1
end:vcard


[-- Attachment #3: Type: text/plain, Size: 286 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

[-- Attachment #4: Type: text/plain, Size: 140 bytes --]

_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-07-16 16:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-06 20:13 maintainership question about nfs-utils/util/mount Chuck Lever
2007-07-16 15:42 ` Jeff Layton
2007-07-16 16:25   ` Chuck Lever

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.