From: Chuck Lever <chuck.lever@oracle.com>
To: Jeff Layton <jlayton@redhat.com>
Cc: NFS List <nfs@lists.sourceforge.net>
Subject: Re: maintainership question about nfs-utils/util/mount
Date: Mon, 16 Jul 2007 12:25:41 -0400 [thread overview]
Message-ID: <469B9C05.3000504@oracle.com> (raw)
In-Reply-To: <20070716114215.81e2ac37.jlayton@redhat.com>
[-- 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
prev parent reply other threads:[~2007-07-16 16:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=469B9C05.3000504@oracle.com \
--to=chuck.lever@oracle.com \
--cc=jlayton@redhat.com \
--cc=nfs@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.