Message ID | 1466531475-13389-2-git-send-email-laurent@vivier.eu (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Ping? Laurent Le 21/06/2016 à 19:51, Laurent Vivier a écrit : > fd_trans_target_to_host_data() and fd_trans_host_to_target_data() must > return the length of processed data. > > Signed-off-by: Laurent Vivier <laurent@vivier.eu> > --- > linux-user/syscall.c | 36 ++++++++++++++++++++++++++++++++---- > 1 file changed, 32 insertions(+), 4 deletions(-) > > diff --git a/linux-user/syscall.c b/linux-user/syscall.c > index 0082762..9a5cd26 100644 > --- a/linux-user/syscall.c > +++ b/linux-user/syscall.c > @@ -2821,12 +2821,26 @@ static TargetFdTrans target_packet_trans = { > #ifdef CONFIG_RTNETLINK > static abi_long netlink_route_target_to_host(void *buf, size_t len) > { > - return target_to_host_nlmsg_route(buf, len); > + abi_long ret; > + > + ret = target_to_host_nlmsg_route(buf, len); > + if (ret < 0) { > + return ret; > + } > + > + return len; > } > > static abi_long netlink_route_host_to_target(void *buf, size_t len) > { > - return host_to_target_nlmsg_route(buf, len); > + abi_long ret; > + > + ret = host_to_target_nlmsg_route(buf, len); > + if (ret < 0) { > + return ret; > + } > + > + return len; > } > > static TargetFdTrans target_netlink_route_trans = { > @@ -2837,12 +2851,26 @@ static TargetFdTrans target_netlink_route_trans = { > > static abi_long netlink_audit_target_to_host(void *buf, size_t len) > { > - return target_to_host_nlmsg_audit(buf, len); > + abi_long ret; > + > + ret = target_to_host_nlmsg_audit(buf, len); > + if (ret < 0) { > + return ret; > + } > + > + return len; > } > > static abi_long netlink_audit_host_to_target(void *buf, size_t len) > { > - return host_to_target_nlmsg_audit(buf, len); > + abi_long ret; > + > + ret = host_to_target_nlmsg_audit(buf, len); > + if (ret < 0) { > + return ret; > + } > + > + return len; > } > > static TargetFdTrans target_netlink_audit_trans = { >
Hi, I've merged the netlink patches the que[1]. I'm waiting to see if we'll get some fixup patches to the fairly substantial changes linux-user has seen in this cycle. Riku [1] https://git.linaro.org/people/riku.voipio/qemu.git/shortlog/refs/heads/linux-user-for-upstream On Tue, Jun 28, 2016 at 06:50:20PM +0200, Laurent Vivier wrote: > Ping? > > Laurent > > Le 21/06/2016 à 19:51, Laurent Vivier a écrit : > > fd_trans_target_to_host_data() and fd_trans_host_to_target_data() must > > return the length of processed data. > > > > Signed-off-by: Laurent Vivier <laurent@vivier.eu> > > --- > > linux-user/syscall.c | 36 ++++++++++++++++++++++++++++++++---- > > 1 file changed, 32 insertions(+), 4 deletions(-) > > > > diff --git a/linux-user/syscall.c b/linux-user/syscall.c > > index 0082762..9a5cd26 100644 > > --- a/linux-user/syscall.c > > +++ b/linux-user/syscall.c > > @@ -2821,12 +2821,26 @@ static TargetFdTrans target_packet_trans = { > > #ifdef CONFIG_RTNETLINK > > static abi_long netlink_route_target_to_host(void *buf, size_t len) > > { > > - return target_to_host_nlmsg_route(buf, len); > > + abi_long ret; > > + > > + ret = target_to_host_nlmsg_route(buf, len); > > + if (ret < 0) { > > + return ret; > > + } > > + > > + return len; > > } > > > > static abi_long netlink_route_host_to_target(void *buf, size_t len) > > { > > - return host_to_target_nlmsg_route(buf, len); > > + abi_long ret; > > + > > + ret = host_to_target_nlmsg_route(buf, len); > > + if (ret < 0) { > > + return ret; > > + } > > + > > + return len; > > } > > > > static TargetFdTrans target_netlink_route_trans = { > > @@ -2837,12 +2851,26 @@ static TargetFdTrans target_netlink_route_trans = { > > > > static abi_long netlink_audit_target_to_host(void *buf, size_t len) > > { > > - return target_to_host_nlmsg_audit(buf, len); > > + abi_long ret; > > + > > + ret = target_to_host_nlmsg_audit(buf, len); > > + if (ret < 0) { > > + return ret; > > + } > > + > > + return len; > > } > > > > static abi_long netlink_audit_host_to_target(void *buf, size_t len) > > { > > - return host_to_target_nlmsg_audit(buf, len); > > + abi_long ret; > > + > > + ret = host_to_target_nlmsg_audit(buf, len); > > + if (ret < 0) { > > + return ret; > > + } > > + > > + return len; > > } > > > > static TargetFdTrans target_netlink_audit_trans = { > >
Le 30/06/2016 à 09:52, Riku Voipio a écrit : > > Hi, > > I've merged the netlink patches the que[1]. I'm waiting to see if > we'll get some fixup patches to the fairly substantial changes > linux-user has seen in this cycle. Perfect. Thanks, Laurent > > Riku > > [1] https://git.linaro.org/people/riku.voipio/qemu.git/shortlog/refs/heads/linux-user-for-upstream > On Tue, Jun 28, 2016 at 06:50:20PM +0200, Laurent Vivier wrote: >> Ping? >> >> Laurent >> >> Le 21/06/2016 à 19:51, Laurent Vivier a écrit : >>> fd_trans_target_to_host_data() and fd_trans_host_to_target_data() must >>> return the length of processed data. >>> >>> Signed-off-by: Laurent Vivier <laurent@vivier.eu> >>> --- >>> linux-user/syscall.c | 36 ++++++++++++++++++++++++++++++++---- >>> 1 file changed, 32 insertions(+), 4 deletions(-) >>> >>> diff --git a/linux-user/syscall.c b/linux-user/syscall.c >>> index 0082762..9a5cd26 100644 >>> --- a/linux-user/syscall.c >>> +++ b/linux-user/syscall.c >>> @@ -2821,12 +2821,26 @@ static TargetFdTrans target_packet_trans = { >>> #ifdef CONFIG_RTNETLINK >>> static abi_long netlink_route_target_to_host(void *buf, size_t len) >>> { >>> - return target_to_host_nlmsg_route(buf, len); >>> + abi_long ret; >>> + >>> + ret = target_to_host_nlmsg_route(buf, len); >>> + if (ret < 0) { >>> + return ret; >>> + } >>> + >>> + return len; >>> } >>> >>> static abi_long netlink_route_host_to_target(void *buf, size_t len) >>> { >>> - return host_to_target_nlmsg_route(buf, len); >>> + abi_long ret; >>> + >>> + ret = host_to_target_nlmsg_route(buf, len); >>> + if (ret < 0) { >>> + return ret; >>> + } >>> + >>> + return len; >>> } >>> >>> static TargetFdTrans target_netlink_route_trans = { >>> @@ -2837,12 +2851,26 @@ static TargetFdTrans target_netlink_route_trans = { >>> >>> static abi_long netlink_audit_target_to_host(void *buf, size_t len) >>> { >>> - return target_to_host_nlmsg_audit(buf, len); >>> + abi_long ret; >>> + >>> + ret = target_to_host_nlmsg_audit(buf, len); >>> + if (ret < 0) { >>> + return ret; >>> + } >>> + >>> + return len; >>> } >>> >>> static abi_long netlink_audit_host_to_target(void *buf, size_t len) >>> { >>> - return host_to_target_nlmsg_audit(buf, len); >>> + abi_long ret; >>> + >>> + ret = host_to_target_nlmsg_audit(buf, len); >>> + if (ret < 0) { >>> + return ret; >>> + } >>> + >>> + return len; >>> } >>> >>> static TargetFdTrans target_netlink_audit_trans = { >>>
Le 30/06/2016 à 09:52, Riku Voipio a écrit : > > Hi, > > I've merged the netlink patches the que[1]. I'm waiting to see if > we'll get some fixup patches to the fairly substantial changes > linux-user has seen in this cycle. > > Riku > > [1] https://git.linaro.org/people/riku.voipio/qemu.git/shortlog/refs/heads/linux-user-for-upstream Ping? Laurent > On Tue, Jun 28, 2016 at 06:50:20PM +0200, Laurent Vivier wrote: >> Ping? >> >> Laurent >> >> Le 21/06/2016 à 19:51, Laurent Vivier a écrit : >>> fd_trans_target_to_host_data() and fd_trans_host_to_target_data() must >>> return the length of processed data. >>> >>> Signed-off-by: Laurent Vivier <laurent@vivier.eu> >>> --- >>> linux-user/syscall.c | 36 ++++++++++++++++++++++++++++++++---- >>> 1 file changed, 32 insertions(+), 4 deletions(-) >>> >>> diff --git a/linux-user/syscall.c b/linux-user/syscall.c >>> index 0082762..9a5cd26 100644 >>> --- a/linux-user/syscall.c >>> +++ b/linux-user/syscall.c >>> @@ -2821,12 +2821,26 @@ static TargetFdTrans target_packet_trans = { >>> #ifdef CONFIG_RTNETLINK >>> static abi_long netlink_route_target_to_host(void *buf, size_t len) >>> { >>> - return target_to_host_nlmsg_route(buf, len); >>> + abi_long ret; >>> + >>> + ret = target_to_host_nlmsg_route(buf, len); >>> + if (ret < 0) { >>> + return ret; >>> + } >>> + >>> + return len; >>> } >>> >>> static abi_long netlink_route_host_to_target(void *buf, size_t len) >>> { >>> - return host_to_target_nlmsg_route(buf, len); >>> + abi_long ret; >>> + >>> + ret = host_to_target_nlmsg_route(buf, len); >>> + if (ret < 0) { >>> + return ret; >>> + } >>> + >>> + return len; >>> } >>> >>> static TargetFdTrans target_netlink_route_trans = { >>> @@ -2837,12 +2851,26 @@ static TargetFdTrans target_netlink_route_trans = { >>> >>> static abi_long netlink_audit_target_to_host(void *buf, size_t len) >>> { >>> - return target_to_host_nlmsg_audit(buf, len); >>> + abi_long ret; >>> + >>> + ret = target_to_host_nlmsg_audit(buf, len); >>> + if (ret < 0) { >>> + return ret; >>> + } >>> + >>> + return len; >>> } >>> >>> static abi_long netlink_audit_host_to_target(void *buf, size_t len) >>> { >>> - return host_to_target_nlmsg_audit(buf, len); >>> + abi_long ret; >>> + >>> + ret = host_to_target_nlmsg_audit(buf, len); >>> + if (ret < 0) { >>> + return ret; >>> + } >>> + >>> + return len; >>> } >>> >>> static TargetFdTrans target_netlink_audit_trans = { >>>
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 0082762..9a5cd26 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -2821,12 +2821,26 @@ static TargetFdTrans target_packet_trans = { #ifdef CONFIG_RTNETLINK static abi_long netlink_route_target_to_host(void *buf, size_t len) { - return target_to_host_nlmsg_route(buf, len); + abi_long ret; + + ret = target_to_host_nlmsg_route(buf, len); + if (ret < 0) { + return ret; + } + + return len; } static abi_long netlink_route_host_to_target(void *buf, size_t len) { - return host_to_target_nlmsg_route(buf, len); + abi_long ret; + + ret = host_to_target_nlmsg_route(buf, len); + if (ret < 0) { + return ret; + } + + return len; } static TargetFdTrans target_netlink_route_trans = { @@ -2837,12 +2851,26 @@ static TargetFdTrans target_netlink_route_trans = { static abi_long netlink_audit_target_to_host(void *buf, size_t len) { - return target_to_host_nlmsg_audit(buf, len); + abi_long ret; + + ret = target_to_host_nlmsg_audit(buf, len); + if (ret < 0) { + return ret; + } + + return len; } static abi_long netlink_audit_host_to_target(void *buf, size_t len) { - return host_to_target_nlmsg_audit(buf, len); + abi_long ret; + + ret = host_to_target_nlmsg_audit(buf, len); + if (ret < 0) { + return ret; + } + + return len; } static TargetFdTrans target_netlink_audit_trans = {
fd_trans_target_to_host_data() and fd_trans_host_to_target_data() must return the length of processed data. Signed-off-by: Laurent Vivier <laurent@vivier.eu> --- linux-user/syscall.c | 36 ++++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-)