Re: [Devel] [PATCH rh7] x86, mm, perf: Allow recursive faults from interrupts

2019-01-24 Thread Andrey Ryabinin
On 1/24/19 6:44 PM, Andrey Ryabinin wrote: > From: Peter Zijlstra > > Waiman managed to trigger a PMI while in a emulate_vsyscall() fault, > the PMI in turn managed to trigger a fault while obtaining a stack > trace. This triggered the sig_on_uaccess_error recursive fault logic > and killed

Re: [Devel] [PATCH rh7] x86, mm, perf: Allow recursive faults from interrupts

2019-01-24 Thread Andrey Ryabinin
This is RK-worthy, please consider. On 1/24/19 6:44 PM, Andrey Ryabinin wrote: > From: Peter Zijlstra > > Waiman managed to trigger a PMI while in a emulate_vsyscall() fault, > the PMI in turn managed to trigger a fault while obtaining a stack > trace. This triggered the sig_on_uaccess_error

[Devel] [PATCH rh7] x86, mm, perf: Allow recursive faults from interrupts

2019-01-24 Thread Andrey Ryabinin
From: Peter Zijlstra Waiman managed to trigger a PMI while in a emulate_vsyscall() fault, the PMI in turn managed to trigger a fault while obtaining a stack trace. This triggered the sig_on_uaccess_error recursive fault logic and killed the process dead. Fix this by explicitly excluding

[Devel] [PATCH 2/2] fs/fuse: fix unsafe killing fiq->pending requests

2019-01-24 Thread Pavel Butsykin
There are two problems related to the lack of fiq locking in fuse_invalidate_files(). The first is an unsafe iteration of fiq->pending list in fuse_kill_requests(). The second problem is the race between __fuse_request_send() and fuse_invalidate_files(): __fuse_request_send():

[Devel] [PATCH 1/2] fs/fuse kio: add FUSE_S_FAIL_IMMEDIATELY check in pcs_fuse_submit()

2019-01-24 Thread Pavel Butsykin
Fuse file with FUSE_S_FAIL_IMMEDIATELY state should not allow to execute new requests. But in case of kio requests it doesn't work because the status check is located behind kio.op->req_send(). To fix this let's add the status check in pcs_fuse_submit(). Signed-off-by: Pavel Butsykin --- Note:

Re: [Devel] [PATCH] fs/fuse: move FUSE_S_FAIL_IMMEDIATELY check before kio req send

2019-01-24 Thread Pavel Butsykin
On 24.01.2019 12:21, Kirill Tkhai wrote: > On 24.01.2019 12:17, Pavel Butsykin wrote: >> Yes, I missed this synchronization idea, the check and list_add should >> be together, will fix. > > Also, __fuse_request_send() may need to be fixed, since it does not look > as having appropriate in

Re: [Devel] [PATCH] fs/fuse: move FUSE_S_FAIL_IMMEDIATELY check before kio req send

2019-01-24 Thread Kirill Tkhai
On 24.01.2019 12:17, Pavel Butsykin wrote: > Yes, I missed this synchronization idea, the check and list_add should > be together, will fix. Also, __fuse_request_send() may need to be fixed, since it does not look as having appropriate in already existing code (I haven't checked deeply). > On

Re: [Devel] [PATCH] fs/fuse: move FUSE_S_FAIL_IMMEDIATELY check before kio req send

2019-01-24 Thread Pavel Butsykin
Yes, I missed this synchronization idea, the check and list_add should be together, will fix. On 24.01.2019 11:45, Kirill Tkhai wrote: > On 23.01.2019 20:22, Pavel Butsykin wrote: >> >> 23.01.2019 16:55, Kirill Tkhai пишет: >>> On 23.01.2019 14:49, Pavel Butsykin wrote: Fuse file with

Re: [Devel] [PATCH] fs/fuse: move FUSE_S_FAIL_IMMEDIATELY check before kio req send

2019-01-24 Thread Kirill Tkhai
On 23.01.2019 20:22, Pavel Butsykin wrote: > > 23.01.2019 16:55, Kirill Tkhai пишет: >> On 23.01.2019 14:49, Pavel Butsykin wrote: >>> Fuse file with FUSE_S_FAIL_IMMEDIATELY state should not allow to execute new >>> requests. But in case of kio requests it doesn't work because the status >>>