~mreed8855/ubuntu/+source/linux/+git/jammy:lp_1989990_nvme_tcp

Last commit made on 2022-09-22
Get this branch:
git clone -b lp_1989990_nvme_tcp https://git.launchpad.net/~mreed8855/ubuntu/+source/linux/+git/jammy
Only Michael Reed can upload to this branch. If you are Michael Reed please log in for upload directions.

Branch merges

Branch information

Name:
lp_1989990_nvme_tcp
Repository:
lp:~mreed8855/ubuntu/+source/linux/+git/jammy

Recent commits

3c1ccfd... by Daniel Wagner <email address hidden>

nvmet: expose max queues to configfs

Allow to set the max queues the target supports. This is useful for
testing the reconnect attempt of the host with changing numbers of
supported queues.

Signed-off-by: Daniel Wagner <email address hidden>
Reviewed-by: Hannes Reinecke <email address hidden>
Signed-off-by: Christoph Hellwig <email address hidden>
(cherry picked from commit 3e980f5995e0bb4d86fef873a9c9ad66721580d0)
Signed-off-by: Michael Reed <email address hidden>

BugLink: https://bugs.launchpad.net/bugs/1989990

908e21f... by Daniel Wagner <email address hidden>

nvme-rdma: handle number of queue changes

On reconnect, the number of queues might have changed.

In the case where we have more queues available than previously we try
to access queues which are not initialized yet.

The other case where we have less queues than previously, the
connection attempt will fail because the target doesn't support the
old number of queues and we end up in a reconnect loop.

Thus, only start queues which are currently present in the tagset
limited by the number of available queues. Then we update the tagset
and we can start any new queue.

Signed-off-by: Daniel Wagner <email address hidden>
Reviewed-by: Sagi Grimberg <email address hidden>
Reviewed-by: Hannes Reinecke <email address hidden>
Signed-off-by: Christoph Hellwig <email address hidden>
(cherry picked from commit 1c467e259599864ec925d5b85066a0960320fb3c)
Signed-off-by: Michael Reed <email address hidden>

BugLink: https://bugs.launchpad.net/bugs/1989990

6c8ff15... by Daniel Wagner <email address hidden>

nvme-tcp: handle number of queue changes

On reconnect, the number of queues might have changed.

In the case where we have more queues available than previously we try
to access queues which are not initialized yet.

The other case where we have less queues than previously, the
connection attempt will fail because the target doesn't support the
old number of queues and we end up in a reconnect loop.

Thus, only start queues which are currently present in the tagset
limited by the number of available queues. Then we update the tagset
and we can start any new queue.

Signed-off-by: Daniel Wagner <email address hidden>
Reviewed-by: Sagi Grimberg <email address hidden>
Reviewed-by: Hannes Reinecke <email address hidden>
Signed-off-by: Christoph Hellwig <email address hidden>
(cherry picked from commit 09035f86496d8dea7a05a07f6dcb8083c0a3d885)
Signed-off-by: Michael Reed <email address hidden>

BugLink: https://bugs.launchpad.net/bugs/1989990

d2afeff... by Amit Engel <email address hidden>

nvme-fabrics: parse nvme connect Linux error codes

This fixes the assumption that errval is an unsigned nvme error

Signed-off-by: Amit Engel <email address hidden>
Signed-off-by: Christoph Hellwig <email address hidden>
(cherry picked from commit ec9e96b5230148294c7abcaf3a4c592d3720b62d)
Signed-off-by: Michael Reed <email address hidden>

BugLink: https://bugs.launchpad.net/bugs/1989990

6ed20c7... by Stefan Bader

UBUNTU: Ubuntu-5.15.0-50.56

Signed-off-by: Stefan Bader <email address hidden>

df8efa6... by Stefan Bader

UBUNTU: link-to-tracker: update tracking bug

BugLink: https://bugs.launchpad.net/bugs/1990148
Properties: no-test-build
Signed-off-by: Stefan Bader <email address hidden>

e52a6fd... by Pavel Begunkov <email address hidden>

io_uring: fix UAF due to missing POLLFREE handling

[ upstream commmit 791f3465c4afde02d7f16cf7424ca87070b69396 ]

Fixes a problem described in 50252e4b5e989
("aio: fix use-after-free due to missing POLLFREE handling")
and copies the approach used there.

In short, we have to forcibly eject a poll entry when we meet POLLFREE.
We can't rely on io_poll_get_ownership() as can't wait for potentially
running tw handlers, so we use the fact that wqs are RCU freed. See
Eric's patch and comments for more details.

Reported-by: Eric Biggers <email address hidden>
Link: https://<email address hidden>
Reported-and-tested-by: <email address hidden>
Fixes: 221c5eb233823 ("io_uring: add support for IORING_OP_POLL")
Signed-off-by: Pavel Begunkov <email address hidden>
Link: https://lore.kernel.org/r/4ed56b6f548f7ea337603a82315750449412748a<email address hidden>
[axboe: drop non-functional change from patch]
Signed-off-by: Jens Axboe <email address hidden>
[pavel: backport]
Signed-off-by: Pavel Begunkov <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>
(cherry picked from commit e9d7ca0c4640cbebe6840ee3bac66a25a9bacaf5 linux-5.15.y)
CVE-2022-3176
Signed-off-by: Thadeu Lima de Souza Cascardo <email address hidden>
Acked-by: Stefan Bader <email address hidden>
Acked-by: Kamal Mostafa <email address hidden>
Signed-off-by: Stefan Bader <email address hidden>

1383e35... by Pavel Begunkov <email address hidden>

io_uring: fix wrong arm_poll error handling

[ upstream commmit 9d2ad2947a53abf5e5e6527a9eeed50a3a4cbc72 ]

Leaving ip.error set when a request was punted to task_work execution is
problematic, don't forget to clear it.

Fixes: aa43477b04025 ("io_uring: poll rework")
Signed-off-by: Pavel Begunkov <email address hidden>
Link: https://lore.kernel.org/r/a6c84ef4182c6962380aebe11b35bdcb25b0ccfb<email address hidden>
Signed-off-by: Jens Axboe <email address hidden>
[pavel: backport]
Signed-off-by: Pavel Begunkov <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>
(cherry picked from commit 182dc3aa5ae2f6e2ec6a95667845a819179a78e8 linux-5.15.y)
CVE-2022-3176
Signed-off-by: Thadeu Lima de Souza Cascardo <email address hidden>
Acked-by: Stefan Bader <email address hidden>
Acked-by: Kamal Mostafa <email address hidden>
Signed-off-by: Stefan Bader <email address hidden>

cfb1f1b... by Pavel Begunkov <email address hidden>

io_uring: fail links when poll fails

[ upstream commmit c487a5ad48831afa6784b368ec40d0ee50f2fe1b ]

Don't forget to cancel all linked requests of poll request when
__io_arm_poll_handler() failed.

Fixes: aa43477b04025 ("io_uring: poll rework")
Signed-off-by: Pavel Begunkov <email address hidden>
Link: https://lore.kernel.org/r/a78aad962460f9fdfe4aa4c0b62425c88f9415bc<email address hidden>
Signed-off-by: Jens Axboe <email address hidden>
[pavel: backport]
Signed-off-by: Pavel Begunkov <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>
(cherry picked from commit 6c7259c83773f22f05159db51ca64d05057259f3 linux-5.15.y)
CVE-2022-3176
Signed-off-by: Thadeu Lima de Souza Cascardo <email address hidden>
Acked-by: Stefan Bader <email address hidden>
Acked-by: Kamal Mostafa <email address hidden>
Signed-off-by: Stefan Bader <email address hidden>

17098de... by axboe

io_uring: bump poll refs to full 31-bits

[ upstream commmit e2c0cb7c0cc72939b61a7efee376206725796625 ]

The previous commit:

1bc84c40088 ("io_uring: remove poll entry from list when canceling all")

removed a potential overflow condition for the poll references. They
are currently limited to 20-bits, even if we have 31-bits available. The
upper bit is used to mark for cancelation.

Bump the poll ref space to 31-bits, making that kind of situation much
harder to trigger in general. We'll separately add overflow checking
and handling.

Fixes: aa43477b0402 ("io_uring: poll rework")
Signed-off-by: Jens Axboe <email address hidden>
[pavel: backport]
Signed-off-by: Pavel Begunkov <email address hidden>
Signed-off-by: Greg Kroah-Hartman <email address hidden>
(cherry picked from commit c41e79a0c46457dc87d56db59c4dc93be2e38568 linux-5.15.y)
CVE-2022-3176
Signed-off-by: Thadeu Lima de Souza Cascardo <email address hidden>
Acked-by: Stefan Bader <email address hidden>
Acked-by: Kamal Mostafa <email address hidden>
Signed-off-by: Stefan Bader <email address hidden>