Thread (20 messages) flat view 20 messages, 3 authors, 18d ago

Re: [PATCH v6 13/15] net: qrtr: limit endpoint range to 16 bits on 32-bit machines

From: David Laight <hidden>
Date: 2026-09-05 10:07:30
Also in: linux-arm-msm, lkml

On Sat, 05 Sep 2026 07:21:33 +0300
"Juha-Matti Tilli" [off-list ref] wrote:
On Sat, Sep 5, 2026, at 04:40, Jakub Kicinski wrote:
quoted
On Tue,  1 Sep 2026 16:19:32 +0300 Juha-Matti Tilli wrote:  
quoted
On 64-bit machines, use the full range for endpoint ids, but on 32-bit
machines, use only 16 bits. This gives plenty of endpoints, 65534 to
be specific, apart from the invalid zero value and the local endpoint.

[snip]  
Doesn't build on 32bit x86:

../net/qrtr/af_qrtr.c: In function ‘qrtr_endpoint_register’:
../net/qrtr/af_qrtr.c:28:58: error: ‘UINT16_MAX’ undeclared (first use in this function)
   28 | #define QRTR_ENDPOINT_RANGE XA_LIMIT(qrtr_local_nid + 1, UINT16_MAX)
[snip]  
Indeed, I will later post a new version with UINT16_MAX replaced by
65535.
Makes more sense anyway because it is an arbitrary bound (rather than
ensuring the result will fit in 16 bits.
Indeed, it might be better to use a different limit.

David
I thought I was careful testing these, but now I recall that the
individual patches were test-compiled on 64-bit and only the branch
head with all patches was tested on 32-bit.

Thanks for noticing!

BR, Juha-Matti
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help