On Tue, Nov 19, 2024 at 01:31:58PM +0100, Pablo Neira Ayuso wrote: > From: Jeremy Sowden <jeremy@xxxxxxxxxx> > > Hitherto, the kernel has required constant values for the `xor` and > `mask` attributes of boolean bitwise expressions. This has meant that > the right-hand operand of a boolean binop must be constant. Now the > kernel has support for AND, OR and XOR operations with right-hand > operands passed via registers, we can relax this restriction. Allow > non-constant right-hand operands if the left-hand operand is not > constant, e.g.: > > ct mark & 0xffff0000 | meta mark & 0xffff > > The kernel now supports performing AND, OR and XOR operations directly, > on one register and an immediate value or on two registers, so we need > to be able to generate and parse bitwise boolean expressions of this > form. > > If a boolean operation has a constant RHS, we continue to send a > mask-and-xor expression to the kernel. > > Add tests for {ct,meta} mark with variable RHS operands. > > JSON support is also included. > > This requires Linux kernel >= 6.13-rc. > > [ Originally posted as patch 1/8 and 6/8 which has been collapsed and > simplified to focus on initial {ct,meta} mark support. Tests have > been extracted from 8/8 including a tests/py fix to payload output > due to incorrect output in original patchset. JSON support has been > extracted from patch 7/8 --pablo] This is now applied.