History

char: raw: do not leak CONFIG_MAX_RAW_DEVS to userspace

include/uapi/linux/raw.h leaks CONFIG_MAX_RAW_DEVS to userspace. Userspace programs cannot use MAX_RAW_MINORS since CONFIG_MAX_RAW_DEVS is not available anyway. Remove the MAX_RAW_MINORS definition from the exported header, and use CONFIG_MAX_RAW_DEVS in drivers/char/raw.c While I was here, I converted printk(KERN_WARNING ...) to pr_warn(...) and stretched the warning message.

Masahiro Yamada committed 6 years ago

Commit 04aaca11 parent 51d501e3 files · +4 −7Browse files

Showing the changes to include/uapi/linux (1 of 3 files). Show all

Unified · Split

include/uapi/linux/raw.h+0−2
@@ -14,6 +14,4 @@ struct raw_config_request · 13 unmodified lines
14 __u64 block_minor;14 __u64 block_minor;
15};15};
16 16
17#define MAX_RAW_MINORS CONFIG_MAX_RAW_DEVS
18
19#endif /* __LINUX_RAW_H */17#endif /* __LINUX_RAW_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t