[PULL 1/2] hw/sd/sdcard: Document out-of-range addresses for SEND_WRITE_PROT

2021-08-03 Thread Philippe Mathieu-Daudé
Per the 'Physical Layer Simplified Specification Version 3.01', Table 4-22: 'Block Oriented Write Protection Commands' SEND_WRITE_PROT (CMD30) If the card provides write protection features, this command asks the card to send the status of the write protection bits [1]. [1] 32 write

[PULL 2/2] hw/sd/sdcard: Fix assertion accessing out-of-range addresses with CMD30

2021-08-03 Thread Philippe Mathieu-Daudé
OSS-Fuzz found sending illegal addresses when querying the write protection bits triggers the assertion added in commit 84816fb63e5 ("hw/sd/sdcard: Assert if accessing an illegal group"): qemu-fuzz-i386-target-generic-fuzz-sdhci-v3: ../hw/sd/sd.c:824: uint32_t sd_wpbits(SDState *, uint64_t):

[PULL 0/2] SD/MMC patches for 2021-08-03

2021-08-03 Thread Philippe Mathieu-Daudé
-20210803 for you to fetch changes up to 4ac0b72bae85cf94ae0e5153b9c2c288c71667d4: hw/sd/sdcard: Fix assertion accessing out-of-range addresses with CMD30 (2021-08-03 19:34:51 +0200) SD/MMC patches queue - sdcard: Fix assertion

Re: [PATCH-for-6.1 v2 0/2] hw/sd/sdcard: Fix assertion accessing out-of-range addresses with CMD30

2021-08-03 Thread Philippe Mathieu-Daudé
On 8/3/21 3:46 PM, Alexander Bulekov wrote: > On 210803 0155, Philippe Mathieu-Daudé wrote: >> Fix an assertion reported by OSS-Fuzz, add corresponding qtest. >> >> The change is (now) simple enough for the next rc. >> >> Since v1: >> - Simplified/corrected following Peter's suggestion >> >>

Re: Failing iotest 206

2021-08-03 Thread Kevin Wolf
Am 20.07.2021 um 10:32 hat Daniel P. Berrangé geschrieben: > On Mon, Jul 19, 2021 at 08:12:58PM -0500, Eric Blake wrote: > > On Mon, Jul 19, 2021 at 10:06:01AM +0200, Thomas Huth wrote: > > > Hi, > > > > > > iotest 206 fails for me with: > > > > > > > > --- 206.out > > > +++ 206.out.bad > > >

Re: [Question] qemu-img convert block alignment

2021-08-03 Thread Eric Blake
On Fri, Apr 02, 2021 at 11:52:25AM +0800, Zhenyu Ye wrote: > Hi all, > > commit 8dcd3c9b91 ("qemu-img: align result of is_allocated_sectors") > introduces block alignment when doing qemu-img convert. However, the > alignment is: > > s.alignment = MAX(pow2floor(s.min_sparse), >

[PULL 1/1] block: Fix in_flight leak in request padding error path

2021-08-03 Thread Kevin Wolf
When bdrv_pad_request() fails in bdrv_co_preadv_part(), bs->in_flight has been increased, but is never decreased again. This leads to a hang when trying to drain the block node. This bug was observed with Windows guests which issue a request that fully uses IOV_MAX during installation, so that

[PULL 0/1] Block layer patches

2021-08-03 Thread Kevin Wolf
The following changes since commit 7f1cab9c628a798ae2607940993771e6300e9e00: Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into staging (2021-08-02 17:21:50 +0100) are available in the Git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for you

Re: [PATCH for-6.1? v2 6/7] mirror: Check job_is_cancelled() earlier

2021-08-03 Thread Kevin Wolf
Am 26.07.2021 um 16:46 hat Max Reitz geschrieben: > We must check whether the job is force-cancelled early in our main loop, > most importantly before any `continue` statement. For example, we used > to have `continue`s before our current checking location that are > triggered by `mirror_flush()`

Re: [PATCH for-6.1? v2 0/7] mirror: Handle errors after READY cancel

2021-08-03 Thread Kevin Wolf
Am 26.07.2021 um 16:46 hat Max Reitz geschrieben: > Hi, > > v1 cover letter: > https://lists.nongnu.org/archive/html/qemu-block/2021-07/msg00705.html > > Changes in v2: > - Added patch 2 (as suggested by Vladimir) > - Patch 4 (ex. 3): Rebase conflicts because of patch 2 > - Patch 5 (ex. 4): >

Re: [PATCH for-6.1? v2 5/7] job: Add job_cancel_requested()

2021-08-03 Thread Kevin Wolf
Am 26.07.2021 um 16:46 hat Max Reitz geschrieben: > Most callers of job_is_cancelled() actually want to know whether the job > is on its way to immediate termination. For example, we refuse to pause > jobs that are cancelled; but this only makes sense for jobs that are > really actually

Re: [PATCH for-6.1? v2 3/7] job: @force parameter for job_cancel_sync{,_all}()

2021-08-03 Thread Kevin Wolf
Am 26.07.2021 um 16:46 hat Max Reitz geschrieben: > Callers should be able to specify whether they want job_cancel_sync() to > force-cancel the job or not. > > In fact, almost all invocations do not care about consistency of the > result and just want the job to terminate as soon as possible, so

Re: [PATCH-for-6.1 v2 0/2] hw/sd/sdcard: Fix assertion accessing out-of-range addresses with CMD30

2021-08-03 Thread Alexander Bulekov
On 210803 0155, Philippe Mathieu-Daudé wrote: > Fix an assertion reported by OSS-Fuzz, add corresponding qtest. > > The change is (now) simple enough for the next rc. > > Since v1: > - Simplified/corrected following Peter's suggestion > > Philippe Mathieu-Daudé (2): > hw/sd/sdcard: Document

[RFC PATCH : v3 2/2] Implementation of nvme-mi plugin in nvme-cli

2021-08-03 Thread Mohit Kapoor
From: mohit kapoor Subject: [RFC PATCH : v3 2/2] Implementation of nvme-mi plugin in nvme-cli The enclosed patch contains the implementation of a new nvme mi(Management Interface) plugin. By adding the mi plugin into the nvme-cli application, users have the ability to test the mi commands,

Re: [PATCH for-6.1? v2 5/7] job: Add job_cancel_requested()

2021-08-03 Thread Vladimir Sementsov-Ogievskiy
02.08.2021 13:23, Max Reitz wrote: On 27.07.21 17:47, Vladimir Sementsov-Ogievskiy wrote: 27.07.2021 18:39, Max Reitz wrote: On 27.07.21 15:04, Vladimir Sementsov-Ogievskiy wrote: 26.07.2021 17:46, Max Reitz wrote: Most callers of job_is_cancelled() actually want to know whether the job is

Re: [PATCH-for-6.1 v2 1/2] hw/sd/sdcard: Document out-of-range addresses for SEND_WRITE_PROT

2021-08-03 Thread Peter Maydell
On Tue, 3 Aug 2021 at 00:55, Philippe Mathieu-Daudé wrote: > > Per the 'Physical Layer Simplified Specification Version 3.01', > Table 4-22: 'Block Oriented Write Protection Commands' > > SEND_WRITE_PROT (CMD30) > > If the card provides write protection features, this command asks > the

Re: [PATCH-for-6.1 v2 2/2] hw/sd/sdcard: Fix assertion accessing out-of-range addresses with CMD30

2021-08-03 Thread Peter Maydell
On Tue, 3 Aug 2021 at 00:55, Philippe Mathieu-Daudé wrote: > > OSS-Fuzz found sending illegal addresses when querying the write > protection bits triggers the assertion added in commit 84816fb63e5 > ("hw/sd/sdcard: Assert if accessing an illegal group"): > >

[RFC PATCH: v3 1/2] add mi device in qemu

2021-08-03 Thread Padmakar Kalghatgi
From: padmakar This patch contains the implementation of certain commands of nvme-mi specification.The MI commands are useful to manage/configure/monitor the device.Eventhough the MI commands can be sent via the inband NVMe-MI send/recieve commands, the idea here is to emulate the sideband