]> www.infradead.org Git - users/mchehab/rasdaemon.git/commit
rasdaemon: Fix for parsing error when trace event's format file is larger than PAGE_SIZE
authorShiju Jose <shiju.jose@huawei.com>
Thu, 9 Jan 2025 17:16:57 +0000 (17:16 +0000)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 10 Mar 2025 10:22:42 +0000 (11:22 +0100)
commitc4cee52ef7392a259cf76bc24a7aeefaf276cdfb
tree792dcf20507fce4faf6d3cb120eafaf0fd880701
parent13289956fb79ed1095daa2ab27ed183fb7ee11c2
rasdaemon: Fix for parsing error when trace event's format file is larger than PAGE_SIZE

When a trace event's format file is larger than PAGE_SIZE (4096) then
libtraceevent returns parsing failed when rasdaemon reads the fields.
The reason found that tep_parse_event() call in the add_event_handler()
internally fails in libtraceevent because of the incomplete format file
data read. However libtraceevent did not return error in this stage,
which is fixed in the following patch for libtraceevent.
https://lore.kernel.org/all/20250109102338.6128644d@gandalf.local.home/

When rasdaemon reads a trace event format file,the maximum data size
that can be read is limited to PAGE_SIZE by the seq_read() and
seq_read_iter() functions in the kernel. This results in userspace
receiving partial data if the format file is larger than PAGE_SIZE,
requiring fix in the rasdaemon to read the complete data from the
format file.

Add fix for reading trace event format files larger than PAGE_SIZE
in add_event_handler().

Signed-off-by: Shiju Jose <shiju.jose@huawei.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
ras-events.c