[PATCH 5/6] nvme: also return I/O command effects from nvme_command_effects
Sagi Grimberg
sagi at grimberg.me
Wed Dec 28 05:49:59 PST 2022
>>> + if (ns->head->ids.csi == NVME_CAP_CSS_NVM)
>>> + effects |= nvme_known_nvm_effects(opcode);
>>> if (effects & ~(NVME_CMD_EFFECTS_CSUPP | NVME_CMD_EFFECTS_LBCC))
>>> dev_warn_once(ctrl->device,
>>> - "IO command:%02x has unhandled effects:%08x\n",
>>> + "IO command:%02x has unusual effects:%08x\n",
>>> opcode, effects);
>>> - return 0;
>>> - }
>>> - if (ctrl->effects)
>>> - effects = le32_to_cpu(ctrl->effects->acs[opcode]);
>>> - effects |= nvme_known_admin_effects(opcode);
>>> + /*
>>> + * NVME_CMD_EFFECTS_CSE_MASK causes a freeze all I/O queues,
>>> + * which would deadlock when done on an I/O command. Note that
>>> + * We already warn about an unusual effect above.
>>> + */
>>
>> I think it would be helpful to warn that we are masking it out? The
>> warning above does not directly relate to the cse mask, but rather anthing
>> outside of NVME_CMD_EFFECTS_CSUPP | NVME_CMD_EFFECTS_LBCC ?
>
> Well, all these effects are unusual for I/O commands, and all the
> effects really are hints to the host. But if you think we can do
> better, can you send an incremental fixup? We'll need to get
> these fixes in ASAP to fix the gapping security hole, or just
> revert the unprivileged passthrough for 6.2.
That's fine, No need to hold this for 6.2
More information about the Linux-nvme
mailing list