Re: [Cluster-devel] [PATCH] gfs2: move from strlcpy with unused retval to strscpy

2022-08-24 Thread Wolfram Sang
Hi Andy. > > - strlcpy(sdp->sd_proto_name, proto, GFS2_FSNAME_LEN); > > - strlcpy(sdp->sd_table_name, table, GFS2_FSNAME_LEN); > > + strscpy(sdp->sd_proto_name, proto, GFS2_FSNAME_LEN); > > + strscpy(sdp->sd_table_name, table, GFS2_FSNAME_LEN); > > Perhaps the size should be changed to GF

[Cluster-devel] [PATCH net-next] genetlink: start to validate reserved header bytes

2022-08-24 Thread Jakub Kicinski
We had historically not checked that genlmsghdr.reserved is 0 on input which prevents us from using those precious bytes in the future. One use case would be to extend the cmd field, which is currently just 8 bits wide and 256 is not a lot of commands for some core families. To make sure that new