/dev/mem as optional device + associated tidy up
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | drivers: char: mem: Make /dev/mem an optional devicedrivers/ drivers/ | +12 | 0 replies | |
| 2/3 | drivers: char: mem: Simplify DEVKMEM configurationdrivers/ | +1 | 0 replies | |
| 3/3 | drivers: char: mem: Simplify DEVPORT configurationdrivers/ | +1 | 0 replies |
Reviews trailers per patch
None of the 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Arnd Bergmann |
|---|---|
| Series | A-b |
| 1/3 | |
| 2/3 | |
| 3/3 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/3] /dev/mem as optional device + associated tidy up
From: Rob Ward <[email protected]>
Makes the /dev/mem device optional using the CONFIG_DEVMEM option.
This brings /dev/mem in line with /dev/kmem so it can de disabled. Disabling /dev/mem is preferable on devices that do not require direct access to memory in order to improve security. This is especially true on platforms where no restiction is placed on the areas of memory that can be accessed(for example mips) without custom modifcations to the kernel source.
The implementation of this functionality declares the mem_fops structure as __maybe_unused to eliminate the need for #ifdefs throughout the file.
Follow up changes are present to change CONFIG_DEVKMEM and CONFIG_DEVPORT to use __maybe_unused. This simplifies the code and make the implementations consistent.
Rob Ward (3):
drivers: char: mem: Make /dev/mem an optional device
drivers: char: mem: Simplify DEVKMEM configuration
drivers: char: mem: Simplify DEVPORT configuration
drivers/char/Kconfig | 9 +++++++++ drivers/char/mem.c | 18 +++++------------- 2 files changed, 14 insertions(+), 13 deletions(-)
Signature · 1 line
2.0.2