From: Tejun Heo <tj@kernel.org>
To: Harry Zhang <harry.zhang@amd.com>
Cc: jgarzik@pobox.com, linux-ide@vger.kernel.org, shane.Huang@amd.com
Subject: Re: [PATCH 1/2 v4] ahci add "em_buffer" attribute for AHCI hosts
Date: Fri, 23 Apr 2010 08:27:23 +0200 [thread overview]
Message-ID: <4BD13DCB.2090902@kernel.org> (raw)
In-Reply-To: <1271990828.3821.16.camel@zm-desktop>
Hello,
On 04/23/2010 04:47 AM, Harry Zhang wrote:
>> Oh, the PAGE_SIZE limit comes from the way sysfs attributes are
>> implemented. The kernel buffer sysfs uses is PAGE_SIZE so
>> reads/writes can't be larger than that. If you write past PAGE_SIZE
>> from show, you'll corrupt someone else's memory.
> Yes, I know that. I just think the EM read buffer size should not larger
> than the PAGE_SIZE in common, and thus, should not break the sysfs
> attributes r/w buffer limitation. Anyway, I will shorten the comment.
Oh I see.
>> It probably would be better to use ata_port_printk() and
>> printk_ratelimit() the message.
>
> OK. I could not determine which is better. I think the EM buffer is
> belong to the host rather than a port, so I chose the "dev_printk".
> BTW, should this be a warning or an error?
The buffer is per ATA port, so I think it would be better to use
ata_port_printk(). Hmmm... as the read will succeed anyway with
truncated message body, maybe warning is better?
Thanks.
--
tejun
prev parent reply other threads:[~2010-04-23 6:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-22 10:15 [PATCH 1/2 v4] ahci add "em_buffer" attribute for AHCI hosts Harry Zhang
2010-04-22 15:34 ` Tejun Heo
2010-04-23 2:47 ` Harry Zhang
2010-04-23 6:27 ` Tejun Heo [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=4BD13DCB.2090902@kernel.org \
--to=tj@kernel.org \
--cc=harry.zhang@amd.com \
--cc=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
--cc=shane.Huang@amd.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox