All of lore.kernel.org
 help / color / mirror / Atom feed
* declaring large variables
@ 2002-11-16 23:04 dan carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: dan carpenter @ 2002-11-16 23:04 UTC (permalink / raw)
  To: nfs; +Cc: smatch-kbugs

I have a project smatch.sf.net that checks the kernel for certain types of errors.  My newest code checks that functions do not declare too much data to fit on the kernel's 8kB stack.  These functions both use up 2.5kB (16512b) so they're probably not a problem.  But it might be worth declaring nfsctl_export as a pointer and using kmalloc to set aside memory.

linux-2.5.44/fs/nfsd/nfsctl.c 212 write_export 16512
linux-2.5.44/fs/nfsd/nfsctl.c 222 write_unexport 16512

Regards,
dan carpenter
-- 
_______________________________________________
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup

Single & ready to mingle? lavalife.com:  Where singles click. Free to Search!
http://www.lavalife.com/wp.epl?a=2716



-------------------------------------------------------
This sf.net email is sponsored by: To learn the basics of securing 
your web site with SSL, click here to get a FREE TRIAL of a Thawte 
Server Certificate: http://www.gothawte.com/rd524.html
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

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

* declaring large variables
@ 2002-11-16 23:57 dan carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: dan carpenter @ 2002-11-16 23:57 UTC (permalink / raw)
  To: linux-kernel; +Cc: mnalis-umsdos, smatch-kbugs

I have a program (smatch.sf.net) that checks for certain types of kernel coding errors.  I'm working on one that checks for functions that possibly put too much data on the 8kB local variable stack.  The function UMSDOS_ioctl_dir puts less than 2kB of data so it's probably not a problem.  Especially since it doesn't do that for all code paths.  

What should be the upper limit for how much data a function can put on the stack.

linux-2.5.44/fs/umsdos/ioctl.c 439 UMSDOS_ioctl_dir (14432 bits)

Line            Variable                                 Size
79         struct umsdos_ioctl data;                    (4736 bits) 
177                         struct umsdos_dirent entry; (2048 bits)
178                         struct umsdos_info info;    (2304 bits)
250                 struct umsdos_info info;            (2304 bits)
305                 struct umsdos_info info;            (2304 bits)

Regards,
dan carpenter

-- 
_______________________________________________
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup

Single & ready to mingle? lavalife.com:  Where singles click. Free to Search!
http://www.lavalife.com/wp.epl?a=2716


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

end of thread, other threads:[~2002-11-16 23:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-16 23:04 declaring large variables dan carpenter
  -- strict thread matches above, loose matches on Subject: below --
2002-11-16 23:57 dan carpenter

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.