Re: [PATCH] PCI: endpoint: Use sysfs_emit() in "show" functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Krzysztof,

Thank you for reviewing.

On 2021/07/19 12:43, Krzysztof Wilczyński wrote:
Hello Hayashi-san,

Thank you for sending the patch over!

Convert sprintf() in sysfs "show" functions to sysfs_emit() in order to
check for buffer overruns in sysfs outputs.

Nice catch!

I actually executed "cat" against configfs to meet the issue and found
your solution in pci-sysfs.


A small nitpick: what you are changing here are technically not sysfs
objects since all of these are related to configfs.  Having said that,
configfs shares the same semantics for normal attributes with sysfs, so
a maximum size of PAGE_SIZE applies here too, and thus sysfs_emit()
would work fine.

Thank you for helpful information.
I understand that applying sysfs_emit() to configfs is no problem.


Thank you for taking care of this!

Reviewed-by: Krzysztof Wilczyński <kw@xxxxxxxxx>

	Krzysztof

Thank you,

---
Best Regards
Kunihiko Hayashi



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux