From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6AE85C433F5 for ; Tue, 5 Apr 2022 14:07:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237736AbiDEOJM (ORCPT ); Tue, 5 Apr 2022 10:09:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1382806AbiDEMQ6 (ORCPT ); Tue, 5 Apr 2022 08:16:58 -0400 Received: from Chamillionaire.breakpoint.cc (Chamillionaire.breakpoint.cc [IPv6:2a0a:51c0:0:12e:520::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6277D3ADC for ; Tue, 5 Apr 2022 04:28:51 -0700 (PDT) Received: from fw by Chamillionaire.breakpoint.cc with local (Exim 4.92) (envelope-from ) id 1nbhMg-0004FV-8l; Tue, 05 Apr 2022 13:28:50 +0200 Date: Tue, 5 Apr 2022 13:28:50 +0200 From: Florian Westphal To: Jeremy Sowden Cc: Netfilter Devel Subject: Re: [nf-next PATCH v2 1/5] netfilter: bitwise: keep track of bit-length of expressions Message-ID: <20220405112850.GE12048@breakpoint.cc> References: <20220404120417.188410-1-jeremy@azazel.net> <20220404120417.188410-2-jeremy@azazel.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220404120417.188410-2-jeremy@azazel.net> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org Jeremy Sowden 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.