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)
Thu, Apr 2, 4:57 PM
Unknown Object (File)
Sun, Mar 29, 1:00 AM
Unknown Object (File)
Sat, Mar 28, 3:39 AM
Unknown Object (File)
Thu, Mar 26, 10:13 AM
Unknown Object (File)
Wed, Mar 25, 6:49 AM
Unknown Object (File)
Tue, Mar 24, 7:15 PM
Unknown Object (File)
Wed, Mar 18, 10:48 PM
Unknown Object (File)
Wed, Mar 18, 10:41 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()`.Dec 13 2025, 8:40 PM