Skip to content

/proc/kmem fixes and hwpoison bits v2

Wu Fengguang linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 4 repliesIn review

Changes since v1 from the cover letter

- change vread()/vwrite() prototype (proposed by Kame)
- include Kame's is_vmalloc_or_module_addr() check and use Hugh's -ENXIO.
- I decided not to use __GFP_ZERO, since the buf will be reused in the loop, so it would be better for vread to zero-fill it each time.
- removed the hwpoison checks for vmalloc pages. It seems that vread/vwrite could be simplified to handle one single page, and the hwpoison bits can be considered after that.

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3devmem: change vread()/vwrite() prototype to return success or error codedrivers/char/mem.c fs/proc/kcore.c include/linux/vmalloc.h +2 more+40 -583 replies
2/3devmem: check vmalloc address on kmem read/writedrivers/char/mem.c+8 -01 reply
3/3HWPOISON: prevent /dev/kmem users from accessing hwpoison pagesdrivers/char/mem.c+14 -40 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchKAMEZAWA Hiroyuki
1/3A-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] /proc/kmem fixes and hwpoison bits v2

Hi Andrew and Kame,

Here are the 3 updated bug fix/cleanup patches for kmem. Comments are welcome.

Changes since v1:
- change vread()/vwrite() prototype (proposed by Kame)
- include Kame's is_vmalloc_or_module_addr() check and use Hugh's -ENXIO.
- I decided not to use __GFP_ZERO, since the buf will be reused in the loop, so it would be better for vread to zero-fill it each time.
- removed the hwpoison checks for vmalloc pages. It seems that vread/vwrite could be simplified to handle one single page, and the hwpoison bits can be considered after that.

Thanks,
Fengguang
--