Re: [PATCH] net: netdevsim: fix byte order on ipsec debugfs file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue,  8 Mar 2022 14:51:06 +0100 Kleber Sacilotto de Souza wrote:
> When adding a new xfrm state, the data provided via struct xfrm_state
> is stored in network byte order. This needs to be taken into
> consideration when exporting the SAs data to userspace via debugfs,
> otherwise the content will depend on the system endianness. Fix this by
> converting all multi-byte fields from network to host order.
> 
> Also fix the selftest script which was expecting the data as exported by
> a little-endian system, which was inverted.
> 
> Fixes: 7699353da875 ("netdevsim: add ipsec offload testing")
> Fixes: 2766a11161cc ("selftests: rtnetlink: add ipsec offload API test")
> Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@xxxxxxxxxxxxx>

Then the struct members need to have the correct types, 
as is this patch adds sparse warnings (build with C=1).



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux