SYSCTL: Use RCU to avoid races with string sysctls
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest11 patches 11 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/11 | Add rcustring ADT for RCU protected stringsinclude/ lib/ lib/ | +134 | 3 replies | |
| 2/11 | Add a kernel_address() that works for data tooinclude/ kernel/ | +19 | 0 replies | |
| 3/11 | SYSCTL: Add proc_rcu_string to manage sysctls using rcu stringsinclude/ kernel/ kernel/ | +69 | 3 replies | |
| 4/11 | SYSCTL: Use RCU strings for core_pattern sysctlfs/ kernel/ | +7 | 0 replies | |
| 5/11 | SYSCTL: Add call_usermodehelper_cleanup()include/ | +10 | 0 replies | |
| 6/11 | SYSCTL: Convert modprobe_path to proc_rcu_string()kernel/ kernel/ | +30 | 0 replies | |
| 7/11 | SYSCTL: Convert poweroff_command to proc_rcu_stringinclude/ kernel/ kernel/ | +8 | 0 replies | |
| 8/11 | SYSCTL: Convert hotplug helper string to proc_rcu_string()include/ kernel/ lib/ | +34 | 1 reply | |
| 9/11 | SYSCTL: Add a mutex to the page_alloc zone order sysctlmm/ | +7 | 0 replies | |
| 10/11 | SYSCTL: Use RCU protected sysctl for ocfs group add helperfs/ | +13 | 0 replies | |
| 11/11 | SYSCTL: Convert IRDA text sysctl to RCUnet/ net/ | +7 | 0 replies |
Reviews trailers per patch
1 of 11 patches has a Reviewed-by or Acked-by.
| Patch | Greg Kroah-Hartman |
|---|---|
| 1/11 | |
| 2/11 | |
| 3/11 | |
| 4/11 | |
| 5/11 | |
| 6/11 | |
| 7/11 | |
| 8/11 | A-b |
| 9/11 | |
| 10/11 | |
| 11/11 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH] [0/11] SYSCTL: Use RCU to avoid races with string sysctls
With BKL-less sysctls most of the writable string sysctls are racy. There is no locking on the reader side, so a reader could see an inconsistent string or worse miss the terminating null and walk of beyond it.
This patch kit adds a new "rcu string" variant to avoid these problems and convers the racy users. One the writer side the strings are always copied to new memory and the readers use rcu_read_lock() to get a stable view. For readers who access the string over sleeps the reader copies the string.
This is all hidden in a new generic "rcu_string" ADT which can be also used for other purposes.
This finally implements all the letters in RCU, most other users leave out the 'C'.
I also fixed the zone order list sysctl to use a mutex to avoid racing with itself.
I left some obscure users in architectures (sparc, mips) alone and audited all of the others. The sparc reboot_cmd one has references to asm files which I didn't want to touch and the mips variant seemd just too obscure.
All the others are not racy.
-Andi