kdbus: Translate new u64-based kernel_cap_t to u32-based kdbus_caps 36/315936/2 accepted/tizen_unified_dev accepted/tizen/unified/20240812.190117 accepted/tizen/unified/dev/20240812.223246 accepted/tizen/unified/x/20240813.112412
authorŁukasz Stelmach <l.stelmach@samsung.com>
Fri, 9 Aug 2024 12:53:37 +0000 (14:53 +0200)
committerŁukasz Stelmach <l.stelmach@samsung.com>
Fri, 9 Aug 2024 14:31:08 +0000 (16:31 +0200)
commitdeeb72f8e7ae8bed01af6719730b282b72843040
tree723f42c42e8f51c6de8cf130a4fd532497663e2e
parente05ca2520d4a16ada3d1205b27a1f5774e141413
kdbus: Translate new u64-based kernel_cap_t to u32-based kdbus_caps

Using kernel_cap_t in kdbus_meta_caps changes the alignment of userland
facing structures which breaks userland code trying to parse the structure
sent in kdbus header. Translate kernel_cap_t to u32 similarly to what's
done in capget(2).

Change-Id: I8c21746dca2972cbc0ad48dfea4dba2216c0669c
Ref: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f122a08b197d076ccf136c73fae0146875812a88
Fixes: e59920a ("kdbus: use u64 capability for v6.3 or later version")
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
kernel/kdbus/metadata.c