kcov: improve mmap processing
Status from this message: [merged] kcov-split-ioctl-handling-into-locked-and-unlocked-parts.patch removed from -mm tree
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest2 patches 6 repliesApplied 2/2
- v22 patches 2 repliesSuperseded
Changes in v3 from the cover letter
- The first commit now implements purely non-functional changes.
- No extra function is introduced in the first commit.
Patches in v3 All 2 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | kcov: split ioctl handling into locked and unlocked partskernel/ | +37 | 3 replies | Applied |
| 2/2 | kcov: properly handle subsequent mmap callskernel/ | +15 | 3 replies | Applied |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Dmitry Vyukov | Andrey Konovalov |
|---|---|---|
| 1/2 | R-b | R-b |
| 2/2 | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v3 0/2] kcov: improve mmap processing
Subsequent mmaps of the same kcov descriptor currently do not update the virtual memory of the task and yet return 0 (success). This is counter-intuitive and may lead to unexpected memory access errors.
Also, this unnecessarily limits the functionality of kcov to only the simplest usage scenarios. Kcov instances are effectively forever attached to their first address spaces and it becomes impossible to e.g. reuse the same kcov handle in forked child processes without mmapping the memory first. This is exactly what we tried to do in syzkaller and inadvertently came upon this behavior.
This patch series addresses the problem described above.
v1 of the patch:
https://lore.kernel.org/lkml/[email protected]/
Changes from v1 to v2:
- Split into 2 commits.
- Minor coding style changes.
v2 of the patch:
https://lore.kernel.org/lkml/[email protected]/T/
Changes from v2 to v3:
- The first commit now implements purely non-functional changes.
- No extra function is introduced in the first commit.
Aleksandr Nogikh (2):
kcov: split ioctl handling into locked and unlocked parts
kcov: properly handle subsequent mmap calls
kernel/kcov.c | 98 ++++++++++++++++++++++++++------------------------- 1 file changed, 50 insertions(+), 48 deletions(-)
Signature · 1 line
2.34.1.703.g22d0c6ccf7-goog