[PULL 0/1] Block patches

2025-03-05 Thread Stefan Hajnoczi
The following changes since commit 661c2e1ab29cd9c4d268ae3f44712e8d421c0e56: scripts/checkpatch: Fix a typo (2025-03-04 09:30:26 +0800) are available in the Git repository at: https://gitlab.com/stefanha/qemu.git tags/block-pull-request for you to fetch changes up to 2ad638a3d160923ef3dbf87

[PULL 1/1] block/qed: fix use-after-free by nullifying timer pointer after free

2025-03-05 Thread Stefan Hajnoczi
From: Denis Rastyogin This error was discovered by fuzzing qemu-img. In the QED block driver, the need_check_timer timer is freed in bdrv_qed_detach_aio_context, but the pointer to the timer is not set to NULL. This can lead to a use-after-free scenario in bdrv_qed_drain_begin(). The need_check

Re: [PATCH v2 09/11] rust/block: Add read support for block drivers

2025-03-05 Thread Stefan Hajnoczi
On Tue, Feb 18, 2025 at 07:20:17PM +0100, Kevin Wolf wrote: > +/// A request to a block driver > +pub enum Request { > +Read { offset: u64, len: u64 }, > +} > + > +/// The target for a number of guest blocks, e.g. a location in a child node > or the information > +/// that the described blocks

Re: [PATCH v2 10/11] bochs-rs: Add bochs block driver reimplementation in Rust

2025-03-05 Thread Stefan Hajnoczi
On Tue, Feb 18, 2025 at 07:20:18PM +0100, Kevin Wolf wrote: > This adds a separate block driver for the bochs image format called > 'bochs-rs' so that for the moment both the C implementation and the Rust > implementation can be present in the same build. The intention is to > remove the C implemen

Re: [PATCH v2 00/11] rust/block: Add minimal block driver bindings

2025-03-05 Thread Stefan Hajnoczi
On Tue, Feb 18, 2025 at 07:20:08PM +0100, Kevin Wolf wrote: > This series adds minimal bindings for writing block drivers in Rust and > converts the bochs block driver as an example. Some parts (such as the > open functions) are still essentially C written in Rust syntax, while > other parts alread

Re: [PATCH] nbd: Defer trace init until after daemonization

2025-03-05 Thread Eric Blake
On Wed, Mar 05, 2025 at 07:55:48AM +0100, Thomas Huth wrote: > On 27/02/2025 23.06, Eric Blake wrote: > > At least the simple trace backend works by spawning a helper thread, > > and setting up an atexit() handler that coordinates completion with > > the helper thread. But since atexit registratio

[PULL 2/4] iotests: Stop NBD server in test 162 before starting the next one

2025-03-05 Thread Eric Blake
From: Thomas Huth Test 162 recently started failing for me for no obvious reasons (I did not spot any suspicious commits in this area), but looking in the 162.out.bad log file, there was a suspicious message at the end: qemu-nbd: Cannot lock pid file: Resource temporarily unavailable And indee

[PULL 1/4] iotest: Unbreak 302 with python 3.13

2025-03-05 Thread Eric Blake
From: Nir Soffer This test depends on TarFile.addfile() to add tar member header without writing the member data, which we write ourself using qemu-nbd. Python 3.13 changed the function in a backward incompatible way[1] to require a file object for tarinfo with non-zero size, breaking the test:

[PULL 3/4] qapi: merge common parts of NbdServerOptions and nbd-server-start data

2025-03-05 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy Instead of comment "Keep this type consistent with the nbd-server-start arguments", we can simply merge these things. Note that each field of new base already has "since" tag, equal in both original copies. So "since" information is saved. Signed-off-by: Vladi

[PULL 4/4] nbd: Defer trace init until after daemonization

2025-03-05 Thread Eric Blake
At least the simple trace backend works by spawning a helper thread, and setting up an atexit() handler that coordinates completion with the helper thread. But since atexit registrations survive fork() but helper threads do not, this means that qemu-nbd configured to use the simple trace will dead