lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <607ac04334ce4384f2a5a0f2d5a9f58a848ca7fc.camel@sipsolutions.net>
Date: Wed, 11 Oct 2023 18:37:44 +0200
From: Johannes Berg <johannes@...solutions.net>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Jiri Pirko <jiri@...nulli.us>, netdev@...r.kernel.org, 
 nicolas.dichtel@...nd.com, fw@...len.de, pablo@...filter.org,
 mkubecek@...e.cz,  aleksander.lobakin@...el.com
Subject: Re: [RFC] netlink: add variable-length / auto integers

On Wed, 2023-10-11 at 09:34 -0700, Jakub Kicinski wrote:
> 
> > Now I'm wondering if we should keep ourselves some option of going to
> > even bigger values (128 bits) in some potential future, but I guess
> > that's not really natively supported anywhere in the same way 64-bit is
> > supposed on 32-bit.

s/supposed/supported/, sorry.

> I was wondering the same. And in fact that's what kept me from posting
> this patch for like a year. Initially I was envisioning a Python-style
> bigint, then at least a 128b int, then I gave up.
> 
> The problem is I have no idea how to handle large types in C.
> Would nla_get_uint() then return uint128_t?  YNL also needs to turn the
> value into the max width type and put it in a "parsed response struct".
> Presumably that'd also have to render all uints as uint128_t..
> 
> If we can't make the consumers reliably handle 128b there's no point 
> in pretending that more than 64b can be carried. 
> I'm not even sure if all 32b arches support u128.

Oh, right, I hadn't even thought about that you need to use the max
width type for return values and arguments.

> Given that we have 0 uses of 128b integers in netlink today, I figured
> we're better off crossing that bridge when we get there..

Agreed. It probably means new types at the time, but that might well be
far off anyway.

johannes

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ