Skip to content

Fix copy_from_user_nofault()

Florian Lehner bpf 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 1 replyIn review 1 of 2 applied
  2. v12 patches 1 replySuperseded

Changelog from the cover letter

v1->v2: Addressed comments from Alexei Starovoitov
- move pagefault_disabled() check into first patch
- keep __copy_from_user_inatomic() in copy_from_user_nofault()

[0] https://lore.kernel.org/all/[email protected]/
[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1033398

Patches in v2 1 of 2 applied

#Subject and filesSizeRepliesApplied
1/2mm: Fix copy_from_user_nofault().mm/maccess.c mm/usercopy.c+12 -60 repliesApplied
2/2perf: Fix arch_perf_out_copy_user().arch/x86/include/asm/perf_event.h arch/x86/lib/Makefile arch/x86/lib/usercopy.c +2 more+41 -821 reply

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by.

PatchHsin-Wei HungFlorian Lehner
1/2T-b T-b
2/2

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

Read the v2 thread

Cover letter [v2 bpf-next 0/2] Fix copy_from_user_nofault()

The original patch got submitted by Alexei Starovoitov with [0] and fixes issues that got also reported in [1].

This resubmission adds !pagefault_disabled() to the check in check_heap_object().

Changelog:
v1->v2: Addressed comments from Alexei Starovoitov
- move pagefault_disabled() check into first patch
- keep __copy_from_user_inatomic() in copy_from_user_nofault()

[0] https://lore.kernel.org/all/[email protected]/
[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1033398

Alexei Starovoitov (2):
mm: Fix copy_from_user_nofault().
perf: Fix arch_perf_out_copy_user().

 arch/x86/include/asm/perf_event.h |  2 --
 arch/x86/lib/Makefile             |  2 +-
 arch/x86/lib/usercopy.c           | 55 -------------------------------
 kernel/events/internal.h          | 16 +--------
 mm/maccess.c                      | 52 ++++++++++++++++++++++++-----
 mm/usercopy.c                     |  2 +-
 6 files changed, 47 insertions(+), 82 deletions(-)
 delete mode 100644 arch/x86/lib/usercopy.c
Signature · 1 line
2.39.2