diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2018-04-12 10:59:30 +0200 |
---|---|---|
committer | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2018-04-12 11:25:53 +0200 |
commit | 65f2f30cdaf0b14af6fb0c17c6d1fb9d3d36306e (patch) | |
tree | 8ae84293da557847e95c78bc5c8773dbf97fad0f /Silicon | |
parent | 1483d757b3ef698d9183f33444ed3824c560bd5f (diff) |
Silicon/SynQuacer/NetsecDxe: fix buffer allocation bugbuild33-65f2f30c
The receive buffers of the NETSEC driver are owned by the driver itself
(as opposed to the protocol client in the case of the transmit path),
and so the descriptors and the buffers (which are of a fixed size) are
allocated in one go. The idea is that the 'buffer' member of the
descriptor should point to a DMA aligned offset into the same allocation,
but the code in pfdep_alloc_pkt_buf() calculates the value incorrectly,
resulting in corruption of the descriptor metadata if the pool allocation
happens to be DMA aligned.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Diffstat (limited to 'Silicon')
-rw-r--r-- | Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/netsec_for_uefi/pfdep_uefi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/netsec_for_uefi/pfdep_uefi.c b/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/netsec_for_uefi/pfdep_uefi.c index b43d1aaf..0875558c 100644 --- a/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/netsec_for_uefi/pfdep_uefi.c +++ b/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/netsec_for_uefi/pfdep_uefi.c @@ -134,7 +134,7 @@ pfdep_alloc_pkt_buf ( return PFDEP_ERR_ALLOC;
}
- (*pkt_handle_p)->Buffer = ALIGN_POINTER (*pkt_handle_p,
+ (*pkt_handle_p)->Buffer = ALIGN_POINTER (*pkt_handle_p + 1,
mCpu->DmaBufferAlignment);
}
|