From: Phillip Lougher <phillip@lougher.demon.co.uk>
To: linux-fsdevel@vger.kernel.org
Subject: Re: [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values
Date: Fri, 5 Jan 2007 06:37:27 -0800 (PST) [thread overview]
Message-ID: <8178968.post@talk.nabble.com> (raw)
In-Reply-To: <459C3E45.7090306@redhat.com>
Eric Sandeen wrote:
>but Al felt that it was probably better to create an EIO-returner for each
>actual op signature. Since so few ops share a signature, I just went ahead
>& created an EIO function for each individual file & inode op that returns
>a value.
Hmm, the problem with this is it bloats bad_inode.o with lots of empty
functions that return -EIO. Even though we're not interested in the
parameters, GCC doesn't know this, and doesn't fold the functions into only
the couple of definitions that return different types.
Text size of original bad_inode.o:
Idx Name Size VMA LMA File off Algn
0 .text 0000006c 00000000 00000000 00000034 2**2
== 108 bytes
Size with patch applied:
Idx Name Size VMA LMA File off Algn
0 .text 0000016b 00000000 00000000 00000034 2**2 patch
applied:
== 363 bytes, or over three times larger!
>I originally had coded up the fix by creating a return_EIO_<TYPE> macro
>for each return type,
This adds two extra functions (return for ssize_t and long), which gives an
increase in size of only 12 bytes:
Idx Name Size VMA LMA File off Algn
0 .text 00000078 00000000 00000000 00000034 2**2
== 120 bytes.
Isn't this better?
Thanks
Phillip
--
View this message in context: http://www.nabble.com/-UPDATED-PATCH--fix-memory-corruption-from-misinterpreted-bad_inode_ops-return-values-tf2916716.html#a8178968
Sent from the linux-fsdevel mailing list archive at Nabble.com.
next prev parent reply other threads:[~2007-01-05 15:01 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-03 23:37 [UPDATED PATCH] fix memory corruption from misinterpreted bad_inode_ops return values Eric Sandeen
2007-01-03 23:46 ` Eric Sandeen
2007-01-05 14:37 ` Phillip Lougher [this message]
2007-01-05 15:11 ` phillip
-- strict thread matches above, loose matches on Subject: below --
2007-01-03 23:46 Eric Sandeen
2007-01-04 0:26 ` Andrew Morton
2007-01-04 17:51 ` Eric Sandeen
2007-01-04 18:26 ` Andrew Morton
2007-01-04 18:33 ` Eric Sandeen
2007-01-04 18:54 ` Andrew Morton
2007-01-04 19:09 ` Linus Torvalds
2007-01-04 19:14 ` Al Viro
2007-01-04 19:22 ` Al Viro
2007-01-04 19:32 ` Linus Torvalds
2007-01-07 2:14 ` Roman Zippel
2007-01-04 19:30 ` Linus Torvalds
2007-01-04 20:24 ` Al Viro
2007-01-04 21:00 ` Andrew Morton
2007-01-04 21:04 ` Eric Sandeen
2007-01-04 21:10 ` Andrew Morton
2007-01-04 21:18 ` Eric Sandeen
2007-01-04 21:30 ` Linus Torvalds
2007-01-04 21:50 ` Eric Sandeen
2007-01-04 21:52 ` Al Viro
2007-01-04 22:38 ` Mitchell Blank Jr
2007-01-04 22:35 ` Linus Torvalds
2007-01-04 22:48 ` Eric Sandeen
2007-01-04 23:06 ` Andrew Morton
2007-01-04 23:17 ` Linus Torvalds
2007-01-04 23:28 ` Eric Sandeen
2007-01-04 23:21 ` Mitchell Blank Jr
2007-01-04 23:52 ` Al Viro
2007-01-05 15:40 ` Arjan van de Ven
2007-01-04 19:23 Mikael Pettersson
[not found] <7zo1U-ht-9@gated-at.bofh.it>
[not found] ` <7zoEG-1kW-19@gated-at.bofh.it>
[not found] ` <7zF2R-1wJ-33@gated-at.bofh.it>
[not found] ` <7zFvU-2p5-21@gated-at.bofh.it>
[not found] ` <7zFFr-2AP-1@gated-at.bofh.it>
[not found] ` <7zFYY-31i-19@gated-at.bofh.it>
[not found] ` <7zGie-3Ji-17@gated-at.bofh.it>
[not found] ` <7zGif-3Ji-21@gated-at.bofh.it>
[not found] ` <7zGBC-49g-39@gated-at.bofh.it>
[not found] ` <7zHnX-5rJ-25@gated-at.bofh.it>
[not found] ` <7zI0B-6x2-5@gated-at.bofh.it>
[not found] ` <7zI0B-6x2-3@gated-at.bofh.it>
[not found] ` <7zIak-6JF-15@gated-at.bofh.it>
[not found] ` <7zIak-6JF-13@gated-at.bofh.it>
2007-01-05 16:33 ` Bodo Eggert
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=8178968.post@talk.nabble.com \
--to=phillip@lougher.demon.co.uk \
--cc=linux-fsdevel@vger.kernel.org \
/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.