mbox series

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

Message ID 20230410174345.4376-1-dev@der-flo.net (mailing list archive)
Headers show
Series Fix copy_from_user_nofault() | expand

Message

Florian Lehner April 10, 2023, 5:43 p.m. UTC
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/20230118051443.78988-1-alexei.starovoitov@gmail.com/
[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

Comments

patchwork-bot+netdevbpf@kernel.org April 13, 2023, 12:50 a.m. UTC | #1
Hello:

This series was applied to bpf/bpf-next.git (master)
by Alexei Starovoitov <ast@kernel.org>:

On Mon, 10 Apr 2023 19:43:43 +0200 you wrote:
> 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()
> 
> [...]

Here is the summary with links:
  - [v2,bpf-next,1/2] mm: Fix copy_from_user_nofault().
    https://git.kernel.org/bpf/bpf-next/c/d319f344561d
  - [v2,bpf-next,2/2] perf: Fix arch_perf_out_copy_user().
    (no matching commit)

You are awesome, thank you!