mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 12:32:56 +01:00
nvme_drv: reject requests with unaligned offset
Since the driver relies on all requests being Nvme::MPS_LOG2 aligned as advertised in its Block::Info the added check will reject any misaligned requests (using 'gpt_write' led to an IOMMU write fault). Issue #4486.
This commit is contained in:
committed by
Christian Helmuth
parent
8d00af1d7b
commit
b8e2b780e3
@@ -1649,6 +1649,9 @@ class Nvme::Driver : Genode::Noncopyable
|
||||
return Response::RETRY;
|
||||
}
|
||||
|
||||
if (!Genode::aligned(request.offset, Nvme::MPS_LOG2))
|
||||
return Response::REJECTED;
|
||||
|
||||
switch (request.operation.type) {
|
||||
case Block::Operation::Type::INVALID:
|
||||
return Response::REJECTED;
|
||||
|
||||
Reference in New Issue
Block a user