Re: [nf-next PATCH v2 1/5] netfilter: bitwise: keep track of bit-length of expressions

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

 



On 2022-04-05, at 13:28:50 +0200, Florian Westphal wrote:
> Jeremy Sowden <jeremy@xxxxxxxxxx> wrote:
> > Some bitwise operations are generated in user space when munging
> > paylod expressions.  During delinearization, user space attempts to
> > eliminate these operations.  However, it does this before deducing
> > the byte-order or the correct length in bits of the operands, which
> > means that it doesn't always handle multi-byte host-endian
> > operations correctly.  Therefore, add support for storing the
> > bit-length of the expression, even though the kernel doesn't use it,
> > in order to be able to pass it back to user space.
> 
> Can rule udata be used for this, or is that too much work?
> The udata infra is already used to store comments and it would not
> need kernel changes.

It wouldn't be straightforward.  Expression udata might make more sense
than adding a new bitwise attribute, but that doesn't currently exist.
Would it be worth adding?  I seem to recall considering something along
those lines for passing type information with expressions as a way to
implement casting.

J.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux