From: Jérémie Galarneau Date: Wed, 31 Aug 2016 04:21:14 +0000 (-0400) Subject: Fix: sa_family is of type unsigned short X-Git-Tag: v2.8.1~3 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=d1abf04d3d831c336cab98da07a1d728f833d8c9;p=lttng-modules.git Fix: sa_family is of type unsigned short sa_family is an unsigned short in sockaddr definitions. For instance, the kernel's unix_getname() function sets addrlen to sizeof(short) as it only returns the socket's family. Signed-off-by: Jérémie Galarneau Signed-off-by: Mathieu Desnoyers --- diff --git a/instrumentation/syscalls/headers/x86-64-syscalls-3.10.0-rc7_pointers_override.h b/instrumentation/syscalls/headers/x86-64-syscalls-3.10.0-rc7_pointers_override.h index b262228f..5e910049 100644 --- a/instrumentation/syscalls/headers/x86-64-syscalls-3.10.0-rc7_pointers_override.h +++ b/instrumentation/syscalls/headers/x86-64-syscalls-3.10.0-rc7_pointers_override.h @@ -44,7 +44,7 @@ SC_LTTNG_TRACEPOINT_EVENT_CODE(connect, sc_in(ctf_integer(int, fd, fd)) sc_in(ctf_integer_hex(struct sockaddr *, uservaddr, uservaddr)) sc_in(ctf_integer_hex(int, addrlen, addrlen)) - sc_in(ctf_integer(int, family, tp_locvar->sa_family)) + sc_in(ctf_integer(unsigned short, family, tp_locvar->sa_family)) sc_in(ctf_integer_network(uint16_t, dport, tp_locvar->dport)) sc_in(ctf_sequence_network(uint8_t, v4addr, &tp_locvar->v4addr, unsigned int, tp_locvar->v4addr_len)) sc_in(ctf_sequence_network(uint16_t, v6addr, &tp_locvar->v6addr, unsigned int, tp_locvar->v6addr_len)) @@ -106,7 +106,7 @@ SC_LTTNG_TRACEPOINT_EVENT_CODE(accept, sc_in(ctf_integer(int, fd, fd)) sc_in(ctf_integer_hex(struct sockaddr *, upeer_sockaddr, upeer_sockaddr)) sc_inout(ctf_integer(int, upeer_addrlen, tp_locvar->uaddr_len)) - sc_out(ctf_integer(int, family, tp_locvar->sa_family)) + sc_out(ctf_integer(unsigned short, family, tp_locvar->sa_family)) sc_out(ctf_integer_network(uint16_t, sport, tp_locvar->sport)) sc_out(ctf_sequence_network(uint8_t, v4addr, &tp_locvar->v4addr, unsigned int, tp_locvar->v4addr_len)) sc_out(ctf_sequence_network(uint16_t, v6addr, &tp_locvar->v6addr, unsigned int, tp_locvar->v6addr_len)) @@ -130,7 +130,7 @@ SC_LTTNG_TRACEPOINT_EVENT_CODE(accept4, sc_in(ctf_integer_hex(struct sockaddr *, upeer_sockaddr, upeer_sockaddr)) sc_inout(ctf_integer(int, upeer_addrlen, tp_locvar->uaddr_len)) sc_in(ctf_integer_hex(int, flags, flags)) - sc_out(ctf_integer(int, family, tp_locvar->sa_family)) + sc_out(ctf_integer(unsigned short, family, tp_locvar->sa_family)) sc_out(ctf_integer_network(uint16_t, sport, tp_locvar->sport)) sc_out(ctf_sequence_network(uint8_t, v4addr, &tp_locvar->v4addr, unsigned int, tp_locvar->v4addr_len)) sc_out(ctf_sequence_network(uint16_t, v6addr, &tp_locvar->v6addr, unsigned int, tp_locvar->v6addr_len))