From: Markus Lidel <Markus.Lidel@shadowconnect.com>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/5] I2O subsystem fixing and cleanup for 2.6 - i2o-passthru.patch
Date: Wed, 05 May 2004 10:33:03 +0200 [thread overview]
Message-ID: <4098A6BF.4090507@shadowconnect.com> (raw)
In-Reply-To: <4097DEA2.7000808@pobox.com>
Hello,
Jeff Garzik wrote:
>> +struct sg_simple_element {
>> + u32 flag_count;
>> + u32 addr_bus;
>> +};
> if this is truly the structure, then S/G to a 64-bit address looks
> impossible.
The structure is only used for the management software. This is only
used, because there is no sg_io() function for char devices like it is
for block devices.
>> + get_user(reply_size, &user_reply[0]);
> unchecked return val?
That's true, i'll fix this.
>> + memset(reply, 0, REPLY_FRAME_SIZE*4);
>> + sg_offset = (msg[0]>>4)&0x0f;
>> + msg[2] = (u32)i2o_cfg_context;
>> + msg[3] = (u32)reply;
> when filling in message, you should probably be using cpu_to_le32()
AFAIK the msg[2] and msg[3] is not used by the I2O controller itself. It
is only used by the driver to track messages (when a reply message comes
back). So it should be save to not use the cpu_to_le32() here.
>> + memset(sg_list,0, sizeof(sg_list[0])*SG_TABLESIZE);
>> + if(sg_offset) {
>> + // TODO 64bit fix
>> + struct sg_simple_element *sg = (struct sg_simple_element*)
>> (msg+sg_offset);
>> + sg_count = (size - sg_offset*4) / sizeof(struct
>> sg_simple_element);
> You're de-refencing based on a userland-supplied value, without checking
> the bounds of the variable for proper range.
Okay, i'll try fix this too.
Thank you very much that you take time to review my patch.
Best regards,
Markus Lidel
------------------------------------------
Markus Lidel (Senior IT Consultant)
Shadow Connect GmbH
Carl-Reisch-Weg 12
D-86381 Krumbach
Germany
Phone: +49 82 82/99 51-0
Fax: +49 82 82/99 51-11
E-Mail: Markus.Lidel@shadowconnect.com
URL: http://www.shadowconnect.com
prev parent reply other threads:[~2004-05-05 8:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-29 20:31 [PATCH 2/5] I2O subsystem fixing and cleanup for 2.6 - i2o-passthru.patch Markus Lidel
2004-05-04 18:19 ` Jeff Garzik
2004-05-05 8:33 ` Markus Lidel [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=4098A6BF.4090507@shadowconnect.com \
--to=markus.lidel@shadowconnect.com \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@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.