2024-03-05 16:33:46

by Christian Brauner

[permalink] [raw]
Subject: Re: [PATCH] coredump: get machine check errors early rather than during iov_iter

On Tue, 05 Mar 2024 21:33:36 +0800, Tong Tiangen wrote:
> The commit f1982740f5e7 ("iov_iter: Convert iterate*() to inline funcs")
> leads to deadloop in generic_perform_write()[1], due to return value of
> copy_page_from_iter_atomic() changed from non-zero value to zero.
>
> The code logic of the I/O performance-critical path of the iov_iter is
> mixed with machine check[2], actually, there's no need to complicate it,
> a more appropriate method is to get the error as early as possible in
> the coredump process instead of during the I/O process. In addition,
> the iov_iter performance-critical path can have clean logic.
>
> [...]

I'll send this together with two other fixes we have pending.

---

Applied to the vfs.fixes branch of the vfs/vfs.git tree.
Patches in the vfs.fixes branch should appear in linux-next soon.

Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.

It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.

Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.

tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs.fixes

[1/1] coredump: get machine check errors early rather than during iov_iter
https://git.kernel.org/vfs/vfs/c/da1085a16551


2024-03-05 17:03:11

by Jens Axboe

[permalink] [raw]
Subject: Re: [PATCH] coredump: get machine check errors early rather than during iov_iter

On 3/5/24 9:33 AM, Christian Brauner wrote:
> On Tue, 05 Mar 2024 21:33:36 +0800, Tong Tiangen wrote:
>> The commit f1982740f5e7 ("iov_iter: Convert iterate*() to inline funcs")
>> leads to deadloop in generic_perform_write()[1], due to return value of
>> copy_page_from_iter_atomic() changed from non-zero value to zero.
>>
>> The code logic of the I/O performance-critical path of the iov_iter is
>> mixed with machine check[2], actually, there's no need to complicate it,
>> a more appropriate method is to get the error as early as possible in
>> the coredump process instead of during the I/O process. In addition,
>> the iov_iter performance-critical path can have clean logic.
>>
>> [...]
>
> I'll send this together with two other fixes we have pending.

For what it's worth, checking the two patches, it's basically the one
that Linus sent. I think it should have a From: based on that, and I
also do not see Linus actually signing off on the patch, though that
has been added to this one.

Would probably be sane to get this one resent before applying, properly
done.

Missed that in the first look...

--
Jens Axboe



2024-03-05 18:00:20

by Linus Torvalds

[permalink] [raw]
Subject: Re: [PATCH] coredump: get machine check errors early rather than during iov_iter

On Tue, 5 Mar 2024 at 08:39, Jens Axboe <[email protected]> wrote:
>
> For what it's worth, checking the two patches, it's basically the one
> that Linus sent. I think it should have a From: based on that, and I
> also do not see Linus actually signing off on the patch, though that
> has been added to this one.
>
> Would probably be sane to get this one resent before applying, properly
> done.

I have a sign-off in my own test-tree, so it's all ok.

Sending my changelog just in case somebody wants to mix-and-match the two.

Linus


Attachments:
0001-iov_iter-get-rid-of-copy_mc-flag.patch (8.44 kB)

2024-03-06 09:08:40

by Christian Brauner

[permalink] [raw]
Subject: Re: [PATCH] coredump: get machine check errors early rather than during iov_iter

> Sending my changelog just in case somebody wants to mix-and-match the two.

Did that. Thanks!

2024-03-06 09:38:19

by Christian Brauner

[permalink] [raw]
Subject: Re: [PATCH] coredump: get machine check errors early rather than during iov_iter

> For what it's worth, checking the two patches, it's basically the one
> that Linus sent. I think it should have a From: based on that, and I

Yeah, fixed that.