aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/check-perf-trace.py
diff options
context:
space:
mode:
authorDavid Howells <[email protected]>2023-05-26 12:34:54 +0100
committerPaolo Abeni <[email protected]>2023-05-30 10:01:06 +0200
commit020c69c1a793ed29d28793808eddd75210c858dd (patch)
tree8e4499c758f061207c072036b9a61abaca810362 /tools/perf/scripts/python/check-perf-trace.py
parent34dfde4ad87b84d21278a7e19d92b5b2c68e6c4d (diff)
rxrpc: Truncate UTS_RELEASE for rxrpc version
UTS_RELEASE has a maximum length of 64 which can cause rxrpc_version to exceed the 65 byte message limit. Per the rx spec[1]: "If a server receives a packet with a type value of 13, and the client-initiated flag set, it should respond with a 65-byte payload containing a string that identifies the version of AFS software it is running." The current implementation causes a compile error when WERROR is turned on and/or UTS_RELEASE exceeds the length of 49 (making the version string more than 64 characters). Fix this by generating the string during module initialisation and limiting the UTS_RELEASE segment of the string does not exceed 49 chars. We need to make sure that the 64 bytes includes "linux-" at the front and " AF_RXRPC" at the back as this may be used in pattern matching. Fixes: 44ba06987c0b ("RxRPC: Handle VERSION Rx protocol packets") Reported-by: Kenny Ho <[email protected]> Link: https://lore.kernel.org/r/[email protected]/ Signed-off-by: David Howells <[email protected]> Acked-by: Kenny Ho <[email protected]> cc: Marc Dionne <[email protected]> cc: Andrew Lunn <[email protected]> cc: David Laight <[email protected]> cc: "David S. Miller" <[email protected]> cc: Eric Dumazet <[email protected]> cc: Jakub Kicinski <[email protected]> cc: Paolo Abeni <[email protected]> cc: [email protected] cc: [email protected] Link: https://web.mit.edu/kolya/afs/rx/rx-spec [1] Reviewed-by: Simon Horman <[email protected]> Reviewed-by: Jeffrey Altman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/check-perf-trace.py')
0 files changed, 0 insertions, 0 deletions