Page MenuHomeFreeBSD

linuxkpi: Update position after copy in `seq_read()`
ClosedPublic

Authored by dumbbell on Jul 26 2025, 3:54 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 28, 9:22 PM
Unknown Object (File)
Wed, Nov 26, 2:23 AM
Unknown Object (File)
Nov 2 2025, 11:42 PM
Unknown Object (File)
Nov 2 2025, 11:42 PM
Unknown Object (File)
Nov 2 2025, 11:42 PM
Unknown Object (File)
Nov 2 2025, 11:41 PM
Unknown Object (File)
Oct 29 2025, 8:27 AM
Unknown Object (File)
Oct 12 2025, 12:00 PM
Subscribers

Details

Summary

seq_read() is usually called in a loop because the destination buffer might be smaller than the source. The caller relies on the updated position to read what is next.

We also use memcpy() instead of strscpy() because we don't need to append a NUL character.

Sponsored by: The FreeBSD Foundation

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Jul 30 2025, 9:26 AM
dumbbell retitled this revision from linuxkpi: Update posittion after copy in `seq_read()` to linuxkpi: Update position after copy in `seq_read()`.Sat, Dec 13, 8:40 PM