]> git.baikalelectronics.ru Git - kernel.git/commit
xsk: fix to reject invalid options in Tx descriptor
authorBjörn Töpel <bjorn.topel@intel.com>
Fri, 8 Mar 2019 07:57:27 +0000 (08:57 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 8 Mar 2019 20:17:06 +0000 (21:17 +0100)
commit8e8609226a0932cb710fe57e02d024c37fab40d4
treec3e8f92b4cb43f8db6c95003b39106e64c7db1cd
parentdaa23d9bc64ca80f206c7ce597638c660d6e04fd
xsk: fix to reject invalid options in Tx descriptor

Passing a non-existing option in the options member of struct
xdp_desc was, incorrectly, silently ignored. This patch addresses
that behavior, and drops any Tx descriptor with non-existing options.

We have examined existing user space code, and to our best knowledge,
no one is relying on the current incorrect behavior. AF_XDP is still
in its infancy, so from our perspective, the risk of breakage is very
low, and addressing this problem now is important.

Fixes: ed6ca125478b ("xsk: support for Tx")
Signed-off-by: Björn Töpel <bjorn.topel@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
net/xdp/xsk_queue.h