Re: [PATCH bpf] xsk: Fix unaligned descriptor validation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/3/23 11:25 PM, Magnus Karlsson wrote:
On Mon, 3 Apr 2023 at 16:38, Kal Conley <kal.conley@xxxxxxxxxxx> wrote:

Make sure unaligned descriptors that straddle the end of the UMEM are
considered invalid. Currently, descriptor validation is broken for
zero-copy mode which only checks descriptors at page granularity.
Descriptors that cross the end of the UMEM but not a page boundary may
be therefore incorrectly considered valid. The check needs to happen
before the page boundary and contiguity checks in
xp_desc_crosses_non_contig_pg. Do this check in
xp_unaligned_validate_desc instead like xp_check_unaligned already does.

Thanks for catching this Kal.

Acked-by: Magnus Karlsson <magnus.karlsson@xxxxxxxxx>

Is this case covered by an existing test?




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux