7373
7474static void
7575decode_family (struct tcb * const tcp , const uint8_t family ,
76- const kernel_ulong_t addr , const kernel_ulong_t len )
76+ const kernel_ulong_t addr , const unsigned int len )
7777{
7878 tprints ("{family=" );
7979 printxval (addrfams , family , "AF_???" );
@@ -90,7 +90,7 @@ decode_unix_diag_req(struct tcb *const tcp,
9090 const struct nlmsghdr * const nlmsghdr ,
9191 const uint8_t family ,
9292 const kernel_ulong_t addr ,
93- const kernel_ulong_t len )
93+ const unsigned int len )
9494{
9595 struct unix_diag_req req = { .sdiag_family = family };
9696 const size_t offset = sizeof (req .sdiag_family );
@@ -135,11 +135,11 @@ print_meminfo(struct tcb *const tcp,
135135static bool
136136decode_meminfo (struct tcb * const tcp ,
137137 const kernel_ulong_t addr ,
138- const kernel_ulong_t len ,
138+ const unsigned int len ,
139139 const void * const opaque_data )
140140{
141141 uint32_t mem ;
142- size_t nmemb = len / sizeof (mem );
142+ const size_t nmemb = len / sizeof (mem );
143143
144144 if (!nmemb )
145145 return false;
@@ -154,7 +154,7 @@ decode_meminfo(struct tcb *const tcp,
154154static bool
155155decode_unix_diag_vfs (struct tcb * const tcp ,
156156 const kernel_ulong_t addr ,
157- const kernel_ulong_t len ,
157+ const unsigned int len ,
158158 const void * const opaque_data )
159159{
160160 struct unix_diag_vfs uv ;
@@ -185,7 +185,7 @@ print_inode(struct tcb *const tcp,
185185static bool
186186decode_unix_diag_inode (struct tcb * const tcp ,
187187 const kernel_ulong_t addr ,
188- const kernel_ulong_t len ,
188+ const unsigned int len ,
189189 const void * const opaque_data )
190190{
191191 uint32_t inode ;
@@ -203,7 +203,7 @@ decode_unix_diag_inode(struct tcb *const tcp,
203203static bool
204204decode_unix_diag_rqlen (struct tcb * const tcp ,
205205 const kernel_ulong_t addr ,
206- const kernel_ulong_t len ,
206+ const unsigned int len ,
207207 const void * const opaque_data )
208208{
209209 struct unix_diag_rqlen rql ;
@@ -235,7 +235,7 @@ decode_unix_diag_msg(struct tcb *const tcp,
235235 const struct nlmsghdr * const nlmsghdr ,
236236 const uint8_t family ,
237237 const kernel_ulong_t addr ,
238- const kernel_ulong_t len )
238+ const unsigned int len )
239239{
240240 struct unix_diag_msg msg = { .udiag_family = family };
241241 size_t offset = sizeof (msg .udiag_family );
@@ -274,7 +274,7 @@ decode_netlink_diag_req(struct tcb *const tcp,
274274 const struct nlmsghdr * const nlmsghdr ,
275275 const uint8_t family ,
276276 const kernel_ulong_t addr ,
277- const kernel_ulong_t len )
277+ const unsigned int len )
278278{
279279 struct netlink_diag_req req = { .sdiag_family = family };
280280 const size_t offset = sizeof (req .sdiag_family );
@@ -321,7 +321,7 @@ print_group(struct tcb *const tcp,
321321static bool
322322decode_netlink_diag_groups (struct tcb * const tcp ,
323323 const kernel_ulong_t addr ,
324- const kernel_ulong_t len ,
324+ const unsigned int len ,
325325 const void * const opaque_data )
326326{
327327 kernel_ulong_t buf ;
@@ -339,7 +339,7 @@ decode_netlink_diag_groups(struct tcb *const tcp,
339339static bool
340340decode_netlink_diag_ring (struct tcb * const tcp ,
341341 const kernel_ulong_t addr ,
342- const kernel_ulong_t len ,
342+ const unsigned int len ,
343343 const void * const opaque_data )
344344{
345345 struct netlink_diag_ring ndr ;
@@ -361,7 +361,7 @@ decode_netlink_diag_ring(struct tcb *const tcp,
361361static bool
362362decode_netlink_diag_flags (struct tcb * const tcp ,
363363 const kernel_ulong_t addr ,
364- const kernel_ulong_t len ,
364+ const unsigned int len ,
365365 const void * const opaque_data )
366366{
367367 uint32_t flags ;
@@ -389,7 +389,7 @@ decode_netlink_diag_msg(struct tcb *const tcp,
389389 const struct nlmsghdr * const nlmsghdr ,
390390 const uint8_t family ,
391391 const kernel_ulong_t addr ,
392- const kernel_ulong_t len )
392+ const unsigned int len )
393393{
394394 struct netlink_diag_msg msg = { .ndiag_family = family };
395395 size_t offset = sizeof (msg .ndiag_family );
@@ -433,7 +433,7 @@ decode_packet_diag_req(struct tcb *const tcp,
433433 const struct nlmsghdr * const nlmsghdr ,
434434 const uint8_t family ,
435435 const kernel_ulong_t addr ,
436- const kernel_ulong_t len )
436+ const unsigned int len )
437437{
438438 struct packet_diag_req req = { .sdiag_family = family };
439439 const size_t offset = sizeof (req .sdiag_family );
@@ -459,7 +459,7 @@ decode_packet_diag_req(struct tcb *const tcp,
459459static bool
460460decode_packet_diag_info (struct tcb * const tcp ,
461461 const kernel_ulong_t addr ,
462- const kernel_ulong_t len ,
462+ const unsigned int len ,
463463 const void * const opaque_data )
464464{
465465 struct packet_diag_info pinfo ;
@@ -502,7 +502,7 @@ print_packet_diag_mclist(struct tcb *const tcp, void *const elem_buf,
502502static bool
503503decode_packet_diag_mclist (struct tcb * const tcp ,
504504 const kernel_ulong_t addr ,
505- const kernel_ulong_t len ,
505+ const unsigned int len ,
506506 const void * const opaque_data )
507507{
508508 struct packet_diag_mclist dml ;
@@ -520,7 +520,7 @@ decode_packet_diag_mclist(struct tcb *const tcp,
520520static bool
521521decode_packet_diag_ring (struct tcb * const tcp ,
522522 const kernel_ulong_t addr ,
523- const kernel_ulong_t len ,
523+ const unsigned int len ,
524524 const void * const opaque_data )
525525{
526526 struct packet_diag_ring pdr ;
@@ -545,10 +545,10 @@ decode_packet_diag_ring(struct tcb *const tcp,
545545static bool
546546decode_packet_diag_filter (struct tcb * const tcp ,
547547 const kernel_ulong_t addr ,
548- const kernel_ulong_t len ,
548+ const unsigned int len ,
549549 const void * const opaque_data )
550550{
551- const kernel_ulong_t nmemb = len / sizeof (struct sock_filter );
551+ const unsigned int nmemb = len / sizeof (struct sock_filter );
552552 if (!nmemb || (unsigned short ) nmemb != nmemb )
553553 return false;
554554
@@ -573,7 +573,7 @@ decode_packet_diag_msg(struct tcb *const tcp,
573573 const struct nlmsghdr * const nlmsghdr ,
574574 const uint8_t family ,
575575 const kernel_ulong_t addr ,
576- const kernel_ulong_t len )
576+ const unsigned int len )
577577{
578578 struct packet_diag_msg msg = { .pdiag_family = family };
579579 size_t offset = sizeof (msg .pdiag_family );
@@ -627,7 +627,7 @@ print_inet_diag_sockid(const struct inet_diag_sockid *id, const uint8_t family)
627627static void
628628decode_inet_addr (struct tcb * const tcp ,
629629 const kernel_ulong_t addr ,
630- const kernel_ulong_t len ,
630+ const unsigned int len ,
631631 const int family )
632632{
633633 union {
@@ -663,7 +663,7 @@ decode_inet_addr(struct tcb *const tcp,
663663static void
664664decode_inet_diag_hostcond (struct tcb * const tcp ,
665665 const kernel_ulong_t addr ,
666- const kernel_ulong_t len )
666+ const unsigned int len )
667667{
668668 struct inet_diag_hostcond cond ;
669669
@@ -699,7 +699,7 @@ print_inet_diag_bc_op(const struct inet_diag_bc_op *const op)
699699static void
700700decode_inet_diag_markcond (struct tcb * const tcp ,
701701 const kernel_ulong_t addr ,
702- const kernel_ulong_t len )
702+ const unsigned int len )
703703{
704704 struct inet_diag_markcond markcond ;
705705
@@ -715,7 +715,7 @@ decode_inet_diag_markcond(struct tcb *const tcp,
715715static void
716716decode_bytecode_data (struct tcb * const tcp ,
717717 const kernel_ulong_t addr ,
718- const kernel_ulong_t len ,
718+ const unsigned int len ,
719719 const unsigned char code )
720720{
721721 switch (code ) {
@@ -759,7 +759,7 @@ decode_bytecode_data(struct tcb *const tcp,
759759static bool
760760decode_inet_diag_bc_op (struct tcb * const tcp ,
761761 const kernel_ulong_t addr ,
762- const kernel_ulong_t len ,
762+ const unsigned int len ,
763763 const void * const opaque_data )
764764{
765765 struct inet_diag_bc_op op ;
@@ -793,7 +793,7 @@ decode_inet_diag_req_compat(struct tcb *const tcp,
793793 const struct nlmsghdr * const nlmsghdr ,
794794 const uint8_t family ,
795795 const kernel_ulong_t addr ,
796- const kernel_ulong_t len )
796+ const unsigned int len )
797797{
798798 struct inet_diag_req req = { .idiag_family = family };
799799 size_t offset = sizeof (req .idiag_family );
@@ -836,7 +836,7 @@ decode_inet_diag_req_v2(struct tcb *const tcp,
836836 const struct nlmsghdr * const nlmsghdr ,
837837 const uint8_t family ,
838838 const kernel_ulong_t addr ,
839- const kernel_ulong_t len )
839+ const unsigned int len )
840840{
841841 struct inet_diag_req_v2 req = { .sdiag_family = family };
842842 size_t offset = sizeof (req .sdiag_family );
@@ -878,7 +878,7 @@ decode_inet_diag_req(struct tcb *const tcp,
878878 const struct nlmsghdr * const nlmsghdr ,
879879 const uint8_t family ,
880880 const kernel_ulong_t addr ,
881- const kernel_ulong_t len )
881+ const unsigned int len )
882882{
883883 if (nlmsghdr -> nlmsg_type == TCPDIAG_GETSOCK
884884 || nlmsghdr -> nlmsg_type == DCCPDIAG_GETSOCK )
@@ -892,7 +892,7 @@ decode_inet_diag_req(struct tcb *const tcp,
892892static bool
893893decode_inet_diag_meminfo (struct tcb * const tcp ,
894894 const kernel_ulong_t addr ,
895- const kernel_ulong_t len ,
895+ const unsigned int len ,
896896 const void * const opaque_data )
897897{
898898 struct inet_diag_meminfo minfo ;
@@ -914,7 +914,7 @@ decode_inet_diag_meminfo(struct tcb *const tcp,
914914static bool
915915decode_tcpvegas_info (struct tcb * const tcp ,
916916 const kernel_ulong_t addr ,
917- const kernel_ulong_t len ,
917+ const unsigned int len ,
918918 const void * const opaque_data )
919919{
920920 struct tcpvegas_info vegas ;
@@ -936,7 +936,7 @@ decode_tcpvegas_info(struct tcb *const tcp,
936936static bool
937937decode_tcp_dctcp_info (struct tcb * const tcp ,
938938 const kernel_ulong_t addr ,
939- const kernel_ulong_t len ,
939+ const unsigned int len ,
940940 const void * const opaque_data )
941941{
942942 struct tcp_dctcp_info dctcp ;
@@ -959,7 +959,7 @@ decode_tcp_dctcp_info(struct tcb *const tcp,
959959static bool
960960decode_tcp_bbr_info (struct tcb * const tcp ,
961961 const kernel_ulong_t addr ,
962- const kernel_ulong_t len ,
962+ const unsigned int len ,
963963 const void * const opaque_data )
964964{
965965 struct tcp_bbr_info bbr ;
@@ -1003,7 +1003,7 @@ decode_inet_diag_msg(struct tcb *const tcp,
10031003 const struct nlmsghdr * const nlmsghdr ,
10041004 const uint8_t family ,
10051005 const kernel_ulong_t addr ,
1006- const kernel_ulong_t len )
1006+ const unsigned int len )
10071007{
10081008 struct inet_diag_msg msg = { .idiag_family = family };
10091009 size_t offset = sizeof (msg .idiag_family );
@@ -1048,7 +1048,7 @@ decode_smc_diag_req(struct tcb *const tcp,
10481048 const struct nlmsghdr * const nlmsghdr ,
10491049 const uint8_t family ,
10501050 const kernel_ulong_t addr ,
1051- const kernel_ulong_t len )
1051+ const unsigned int len )
10521052{
10531053 struct smc_diag_req req = { .diag_family = family };
10541054 const size_t offset = sizeof (req .diag_family );
@@ -1091,7 +1091,7 @@ print_smc_diag_cursor(const struct smc_diag_cursor *const cursor)
10911091static bool
10921092decode_smc_diag_conninfo (struct tcb * const tcp ,
10931093 const kernel_ulong_t addr ,
1094- const kernel_ulong_t len ,
1094+ const unsigned int len ,
10951095 const void * const opaque_data )
10961096{
10971097 struct smc_diag_conninfo cinfo ;
@@ -1124,7 +1124,7 @@ decode_smc_diag_conninfo(struct tcb *const tcp,
11241124static bool
11251125decode_smc_diag_lgrinfo (struct tcb * const tcp ,
11261126 const kernel_ulong_t addr ,
1127- const kernel_ulong_t len ,
1127+ const unsigned int len ,
11281128 const void * const opaque_data )
11291129{
11301130 struct smc_diag_lgrinfo linfo ;
@@ -1157,7 +1157,7 @@ decode_smc_diag_msg(struct tcb *const tcp,
11571157 const struct nlmsghdr * const nlmsghdr ,
11581158 const uint8_t family ,
11591159 const kernel_ulong_t addr ,
1160- const kernel_ulong_t len )
1160+ const unsigned int len )
11611161{
11621162 struct smc_diag_msg msg = { .diag_family = family };
11631163 size_t offset = sizeof (msg .diag_family );
@@ -1201,7 +1201,7 @@ typedef void (*netlink_diag_decoder_t)(struct tcb *,
12011201 const struct nlmsghdr * ,
12021202 uint8_t family ,
12031203 kernel_ulong_t addr ,
1204- kernel_ulong_t len );
1204+ unsigned int len );
12051205
12061206static const struct {
12071207 const netlink_diag_decoder_t request , response ;
@@ -1220,7 +1220,7 @@ bool
12201220decode_netlink_sock_diag (struct tcb * const tcp ,
12211221 const struct nlmsghdr * const nlmsghdr ,
12221222 const kernel_ulong_t addr ,
1223- const kernel_ulong_t len )
1223+ const unsigned int len )
12241224{
12251225 uint8_t family ;
12261226
0 commit comments