Page MenuHomeFreeBSD

lindebugfs: Add `debugfs_create_str()`
Needs ReviewPublic

Authored by dumbbell on Feb 19 2025, 9:33 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Mar 17, 2:43 AM
Unknown Object (File)
Wed, Mar 5, 1:17 PM
Unknown Object (File)
Tue, Mar 4, 4:01 PM
Unknown Object (File)
Tue, Mar 4, 11:10 AM
Unknown Object (File)
Sat, Mar 1, 7:02 PM
Unknown Object (File)
Sat, Mar 1, 1:43 PM
Unknown Object (File)
Fri, Feb 28, 4:59 PM
Unknown Object (File)
Sun, Feb 23, 8:58 PM
Subscribers

Details

Reviewers
bz
Group Reviewers
linuxkpi
Summary

This function is used by the i915 DRM driver starting with Linux 6.8.

This is part of the update of DRM drivers to Linux 6.8.

Sponsored by: The FreeBSD Foundation

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

bz requested changes to this revision.Feb 22 2025, 1:10 PM
bz added a subscriber: bz.
bz added inline comments.
sys/compat/lindebugfs/lindebugfs.c
645

To my understanding this is not going to work.

simple_attr_read uses a 24 byte buffer. That's going to overflow for (assumed) most strings.
Also the default write routine will try to convert the string to a number using strtoq in the end.

This revision now requires changes to proceed.Feb 22 2025, 1:10 PM
sys/compat/lindebugfs/lindebugfs.c
645

You are right, I didn’t look at the implementation of DEFINE_DEBUGFS_ATTRIBUTE() and assumed something more involved :-) I will rework the patch.

Reimplement patch entirely

It depends on D49374.

dumbbell retitled this revision from lindebugfs: Add `debugfs_str_get()` to lindebugfs: Add `debugfs_create_str()`.Sat, Mar 15, 11:39 AM
dumbbell edited the summary of this revision. (Show Details)