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 -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html