* [Qemu-devel] [PULL 0/5] slirp updates
@ 2016-03-28 23:28 Samuel Thibault
2016-03-29 18:54 ` Peter Maydell
0 siblings, 1 reply; 16+ messages in thread
From: Samuel Thibault @ 2016-03-28 23:28 UTC (permalink / raw)
To: qemu-devel, peter.maydell; +Cc: Samuel Thibault, jan.kiszka
Merge remote-tracking branch 'remotes/mdroth/tags/qga-pull-2016-03-21-tag' into staging (2016-03-22 17:39:48 +0000)
are available in the git repository at:
http://people.debian.org/~sthibault/qemu.git tags/samuel-thibault
for you to fetch changes up to d8eb38649587c58d767c3bc6a1075bfeabda9e8a:
Rework ipv6 options (2016-03-29 01:15:43 +0200)
----------------------------------------------------------------
slirp updates
----------------------------------------------------------------
Peter Maydell (1):
Use C99 flexible array instead of 1-byte trailing array
Samuel Thibault (4):
slirp: Fix memory leak on small incoming ipv4 packet
slirp: send icmp6 errors when UDP send failed
Avoid embedding struct mbuf in other structures
Rework ipv6 options
net/slirp.c | 6 +++---
qapi-schema.json | 25 ++++++++++++++++---------
qemu-options.hx | 18 ++++++++++--------
slirp/if.c | 27 ++++++++++++++-------------
slirp/ip_input.c | 2 +-
slirp/mbuf.c | 19 ++++++++++---------
slirp/mbuf.h | 6 ++----
slirp/misc.c | 5 -----
slirp/misc.h | 5 +++++
slirp/slirp.h | 8 +++++---
slirp/udp6.c | 3 +--
11 files changed, 67 insertions(+), 57 deletions(-)
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [PULL 0/5] slirp updates
2016-03-28 23:28 Samuel Thibault
@ 2016-03-29 18:54 ` Peter Maydell
0 siblings, 0 replies; 16+ messages in thread
From: Peter Maydell @ 2016-03-29 18:54 UTC (permalink / raw)
To: Samuel Thibault; +Cc: J. Kiszka, QEMU Developers
On 29 March 2016 at 00:28, Samuel Thibault <samuel.thibault@ens-lyon.org> wrote:
> Merge remote-tracking branch 'remotes/mdroth/tags/qga-pull-2016-03-21-tag' into staging (2016-03-22 17:39:48 +0000)
>
> are available in the git repository at:
>
> http://people.debian.org/~sthibault/qemu.git tags/samuel-thibault
>
> for you to fetch changes up to d8eb38649587c58d767c3bc6a1075bfeabda9e8a:
>
> Rework ipv6 options (2016-03-29 01:15:43 +0200)
>
> ----------------------------------------------------------------
> slirp updates
Applied, thanks. (This does indeed silence the clang sanitizer warnings
about the slirp code.)
-- PMM
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Qemu-devel] [PULL 0/5] slirp updates
@ 2017-02-26 20:27 Samuel Thibault
2017-02-26 20:37 ` no-reply
2017-02-26 22:38 ` Peter Maydell
0 siblings, 2 replies; 16+ messages in thread
From: Samuel Thibault @ 2017-02-26 20:27 UTC (permalink / raw)
To: qemu-devel, peter.maydell; +Cc: Samuel Thibault, stefanha, jan.kiszka
The following changes since commit 685783c5b69c83c942d1fc21679311eeb8f79ab9:
Merge remote-tracking branch 'remotes/thibault/tags/samuel-thibault' into staging (2017-02-26 16:38:40 +0000)
are available in the git repository at:
http://people.debian.org/~sthibault/qemu.git tags/samuel-thibault
for you to fetch changes up to c363a5b7f9ca9e802665587900b7ea1aefcf26ea:
slirp: VMStatify remaining except for loop (2017-02-26 21:16:38 +0100)
----------------------------------------------------------------
slirp updates
----------------------------------------------------------------
Dr. David Alan Gilbert (5):
slirp: VMState conversion; tcpcb
slirp: VMStatify sbuf
slirp: Common lhost/fhost union
slirp: VMStatify socket level
slirp: VMStatify remaining except for loop
slirp/sbuf.h | 4 +-
slirp/slirp.c | 449 ++++++++++++++++++++++++++++----------------------------
slirp/socket.h | 24 ++-
slirp/tcp_var.h | 6 +-
4 files changed, 238 insertions(+), 245 deletions(-)
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [PULL 0/5] slirp updates
2017-02-26 20:27 Samuel Thibault
@ 2017-02-26 20:37 ` no-reply
2017-02-26 22:38 ` Peter Maydell
1 sibling, 0 replies; 16+ messages in thread
From: no-reply @ 2017-02-26 20:37 UTC (permalink / raw)
To: samuel.thibault; +Cc: famz, qemu-devel, peter.maydell, stefanha, jan.kiszka
Hi,
This series seems to have some coding style problems. See output below for
more information:
Message-id: 20170226202709.2114-1-samuel.thibault@ens-lyon.org
Type: series
Subject: [Qemu-devel] [PULL 0/5] slirp updates
=== TEST SCRIPT BEGIN ===
#!/bin/bash
BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0
# Useful git options
git config --local diff.renamelimit 0
git config --local diff.renames True
commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
failed=1
echo
fi
n=$((n+1))
done
exit $failed
=== TEST SCRIPT END ===
Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
- [tag update] patchew/20170224182844.32452-1-dgilbert@redhat.com -> patchew/20170224182844.32452-1-dgilbert@redhat.com
- [tag update] patchew/20170226165345.8757-1-bobby.prani@gmail.com -> patchew/20170226165345.8757-1-bobby.prani@gmail.com
* [new tag] patchew/20170226202709.2114-1-samuel.thibault@ens-lyon.org -> patchew/20170226202709.2114-1-samuel.thibault@ens-lyon.org
Switched to a new branch 'test'
150dc51 slirp: VMStatify remaining except for loop
0f3595f slirp: VMStatify socket level
b584f7a slirp: Common lhost/fhost union
38657f4 slirp: VMStatify sbuf
d064fb9 slirp: VMState conversion; tcpcb
=== OUTPUT BEGIN ===
Checking PATCH 1/5: slirp: VMState conversion; tcpcb...
ERROR: code indent should never use tabs
#212: FILE: slirp/tcp_var.h:51:
+^Iuint8_t t_force;^I^I/* 1 if forcing out a byte */$
ERROR: code indent should never use tabs
#222: FILE: slirp/tcp_var.h:112:
+^Iuint8_t^It_oobflags;^I^I/* have some */$
ERROR: code indent should never use tabs
#223: FILE: slirp/tcp_var.h:113:
+^Iuint8_t^It_iobc;^I^I^I/* input character */$
total: 3 errors, 0 warnings, 195 lines checked
Your patch has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
Checking PATCH 2/5: slirp: VMStatify sbuf...
ERROR: code indent should never use tabs
#26: FILE: slirp/sbuf.h:15:
+^Iuint32_t sb_cc;^I^I/* actual chars in buffer */$
ERROR: code indent should never use tabs
#27: FILE: slirp/sbuf.h:16:
+^Iuint32_t sb_datalen;^I/* Length of data */$
total: 2 errors, 0 warnings, 155 lines checked
Your patch has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
Checking PATCH 3/5: slirp: Common lhost/fhost union...
Checking PATCH 4/5: slirp: VMStatify socket level...
ERROR: if this code is redundant consider removing it
#98: FILE: slirp/slirp.c:1297:
+#if 0
total: 1 errors, 0 warnings, 217 lines checked
Your patch has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
Checking PATCH 5/5: slirp: VMStatify remaining except for loop...
=== OUTPUT END ===
Test command exited with code: 1
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@freelists.org
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [PULL 0/5] slirp updates
2017-02-26 20:27 Samuel Thibault
2017-02-26 20:37 ` no-reply
@ 2017-02-26 22:38 ` Peter Maydell
2017-02-27 9:08 ` Dr. David Alan Gilbert
1 sibling, 1 reply; 16+ messages in thread
From: Peter Maydell @ 2017-02-26 22:38 UTC (permalink / raw)
To: Samuel Thibault
Cc: QEMU Developers, Stefan Hajnoczi, Jan Kiszka,
Dr. David Alan Gilbert
On 26 February 2017 at 20:27, Samuel Thibault
<samuel.thibault@ens-lyon.org> wrote:
> The following changes since commit 685783c5b69c83c942d1fc21679311eeb8f79ab9:
>
> Merge remote-tracking branch 'remotes/thibault/tags/samuel-thibault' into staging (2017-02-26 16:38:40 +0000)
>
> are available in the git repository at:
>
> http://people.debian.org/~sthibault/qemu.git tags/samuel-thibault
>
> for you to fetch changes up to c363a5b7f9ca9e802665587900b7ea1aefcf26ea:
>
> slirp: VMStatify remaining except for loop (2017-02-26 21:16:38 +0100)
>
> ----------------------------------------------------------------
> slirp updates
>
> ----------------------------------------------------------------
> Dr. David Alan Gilbert (5):
> slirp: VMState conversion; tcpcb
> slirp: VMStatify sbuf
> slirp: Common lhost/fhost union
> slirp: VMStatify socket level
> slirp: VMStatify remaining except for loop
I'm afraid this doesn't build on OSX:
/Users/pm215/src/qemu-for-merges/slirp/slirp.c:1291:9: error:
'uint16_t *' (aka 'unsigned short *') and 'typeof (((union
slirp_sockaddr *)0)->ss.ss_family) *' (aka 'unsigned char *') are not
pointers to compatible types
VMSTATE_SS_FAMILY(ss.ss_family, union slirp_sockaddr),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/pm215/src/qemu-for-merges/slirp/slirp.c:1277:33: note: expanded
from macro 'VMSTATE_SS_FAMILY'
#define VMSTATE_SS_FAMILY(f, s) VMSTATE_UINT16(f, s)
^~~~~~~~~~~~~~~~~~~~
/Users/pm215/src/qemu-for-merges/include/migration/vmstate.h:785:5:
note: expanded from macro 'VMSTATE_UINT16'
VMSTATE_UINT16_V(_f, _s, 0)
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/pm215/src/qemu-for-merges/include/migration/vmstate.h:764:5:
note: expanded from macro 'VMSTATE_UINT16_V'
VMSTATE_SINGLE(_f, _s, _v, vmstate_info_uint16, uint16_t)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
note: (skipping 1 expansions in backtrace; use
-fmacro-backtrace-limit=0 to see all)
/Users/pm215/src/qemu-for-merges/include/migration/vmstate.h:300:21:
note: expanded from macro 'VMSTATE_SINGLE_TEST'
.offset = vmstate_offset_value(_state, _field, _type), \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/pm215/src/qemu-for-merges/include/migration/vmstate.h:272:6:
note: expanded from macro 'vmstate_offset_value'
type_check(_type, typeof_field(_state, _field)))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/pm215/src/qemu-for-merges/include/qemu/compiler.h:86:35: note:
expanded from macro 'type_check'
#define type_check(t1,t2) ((t1*)0 - (t2*)0)
~~~~~~ ^ ~~~~~~
1 error generated.
In the OSX headers sockaddr_storage is:
struct sockaddr_storage {
__uint8_t ss_len; /* address length */
sa_family_t ss_family; /* [XSI] address family */
char __ss_pad1[_SS_PAD1SIZE];
__int64_t __ss_align; /* force structure storage alignment */
char __ss_pad2[_SS_PAD2SIZE];
};
and sa_family_t is
typedef __uint8_t sa_family_t;
(NetBSD also defines sa_family_t as an 8 bit type, and
perhaps so do the other BSDs.)
I think we can't get away with having the on-the-wire
type for this field be the same as the in-memory
representation, since the on-the-wire rep. should
be host-OS-independent...
thanks
-- PMM
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [PULL 0/5] slirp updates
2017-02-26 22:38 ` Peter Maydell
@ 2017-02-27 9:08 ` Dr. David Alan Gilbert
0 siblings, 0 replies; 16+ messages in thread
From: Dr. David Alan Gilbert @ 2017-02-27 9:08 UTC (permalink / raw)
To: Peter Maydell
Cc: Samuel Thibault, QEMU Developers, Stefan Hajnoczi, Jan Kiszka
* Peter Maydell (peter.maydell@linaro.org) wrote:
> On 26 February 2017 at 20:27, Samuel Thibault
> <samuel.thibault@ens-lyon.org> wrote:
> > The following changes since commit 685783c5b69c83c942d1fc21679311eeb8f79ab9:
> >
> > Merge remote-tracking branch 'remotes/thibault/tags/samuel-thibault' into staging (2017-02-26 16:38:40 +0000)
> >
> > are available in the git repository at:
> >
> > http://people.debian.org/~sthibault/qemu.git tags/samuel-thibault
> >
> > for you to fetch changes up to c363a5b7f9ca9e802665587900b7ea1aefcf26ea:
> >
> > slirp: VMStatify remaining except for loop (2017-02-26 21:16:38 +0100)
> >
> > ----------------------------------------------------------------
> > slirp updates
> >
> > ----------------------------------------------------------------
> > Dr. David Alan Gilbert (5):
> > slirp: VMState conversion; tcpcb
> > slirp: VMStatify sbuf
> > slirp: Common lhost/fhost union
> > slirp: VMStatify socket level
> > slirp: VMStatify remaining except for loop
>
> I'm afraid this doesn't build on OSX:
>
>
> /Users/pm215/src/qemu-for-merges/slirp/slirp.c:1291:9: error:
> 'uint16_t *' (aka 'unsigned short *') and 'typeof (((union
> slirp_sockaddr *)0)->ss.ss_family) *' (aka 'unsigned char *') are not
> pointers to compatible types
> VMSTATE_SS_FAMILY(ss.ss_family, union slirp_sockaddr),
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Yes, we need to drop 4 and 5; as per the separate thread the problem
is the BSDs just have a char for their ss_family.
Dave
> /Users/pm215/src/qemu-for-merges/slirp/slirp.c:1277:33: note: expanded
> from macro 'VMSTATE_SS_FAMILY'
> #define VMSTATE_SS_FAMILY(f, s) VMSTATE_UINT16(f, s)
> ^~~~~~~~~~~~~~~~~~~~
> /Users/pm215/src/qemu-for-merges/include/migration/vmstate.h:785:5:
> note: expanded from macro 'VMSTATE_UINT16'
> VMSTATE_UINT16_V(_f, _s, 0)
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> /Users/pm215/src/qemu-for-merges/include/migration/vmstate.h:764:5:
> note: expanded from macro 'VMSTATE_UINT16_V'
> VMSTATE_SINGLE(_f, _s, _v, vmstate_info_uint16, uint16_t)
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> note: (skipping 1 expansions in backtrace; use
> -fmacro-backtrace-limit=0 to see all)
> /Users/pm215/src/qemu-for-merges/include/migration/vmstate.h:300:21:
> note: expanded from macro 'VMSTATE_SINGLE_TEST'
> .offset = vmstate_offset_value(_state, _field, _type), \
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /Users/pm215/src/qemu-for-merges/include/migration/vmstate.h:272:6:
> note: expanded from macro 'vmstate_offset_value'
> type_check(_type, typeof_field(_state, _field)))
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /Users/pm215/src/qemu-for-merges/include/qemu/compiler.h:86:35: note:
> expanded from macro 'type_check'
> #define type_check(t1,t2) ((t1*)0 - (t2*)0)
> ~~~~~~ ^ ~~~~~~
> 1 error generated.
>
> In the OSX headers sockaddr_storage is:
>
> struct sockaddr_storage {
> __uint8_t ss_len; /* address length */
> sa_family_t ss_family; /* [XSI] address family */
> char __ss_pad1[_SS_PAD1SIZE];
> __int64_t __ss_align; /* force structure storage alignment */
> char __ss_pad2[_SS_PAD2SIZE];
> };
>
> and sa_family_t is
>
> typedef __uint8_t sa_family_t;
>
> (NetBSD also defines sa_family_t as an 8 bit type, and
> perhaps so do the other BSDs.)
>
> I think we can't get away with having the on-the-wire
> type for this field be the same as the in-memory
> representation, since the on-the-wire rep. should
> be host-OS-independent...
>
> thanks
> -- PMM
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Qemu-devel] [PULL 0/5] slirp updates
@ 2018-01-14 17:20 Samuel Thibault
2018-01-15 11:23 ` Peter Maydell
0 siblings, 1 reply; 16+ messages in thread
From: Samuel Thibault @ 2018-01-14 17:20 UTC (permalink / raw)
To: qemu-devel, peter.maydell; +Cc: Samuel Thibault
warning: redirection vers https://people.debian.org/~sthibault/qemu.git/
The following changes since commit 7398166ddf7c6dbbc9cae6ac69bb2feda14b40ac:
Merge remote-tracking branch 'remotes/kraxel/tags/vnc-20180112-pull-request' into staging (2018-01-12 16:01:30 +0000)
are available in the Git repository at:
http://people.debian.org/~sthibault/qemu.git tags/samuel-thibault
for you to fetch changes up to 318116a6ff36bee13c725a247a9395e80bcfbd6b:
slirp: add in6_dhcp_multicast() (2018-01-14 18:16:13 +0100)
----------------------------------------------------------------
slirp updates
----------------------------------------------------------------
Philippe Mathieu-Daudé (5):
slirp: avoid IN6_IS_ADDR_UNSPECIFIED(), rather use in6_zero()
slirp: remove unused header
slirp: remove unnecessary struct declaration
slirp: removed unused code
slirp: add in6_dhcp_multicast()
slirp/dhcpv6.h | 3 +++
slirp/ip.h | 13 -------------
slirp/ip6_icmp.c | 6 +++---
slirp/libslirp.h | 1 -
slirp/ndp_table.c | 4 ++--
slirp/slirp.h | 1 -
slirp/udp6.c | 2 +-
7 files changed, 9 insertions(+), 21 deletions(-)
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [PULL 0/5] slirp updates
2018-01-14 17:20 Samuel Thibault
@ 2018-01-15 11:23 ` Peter Maydell
0 siblings, 0 replies; 16+ messages in thread
From: Peter Maydell @ 2018-01-15 11:23 UTC (permalink / raw)
To: Samuel Thibault; +Cc: QEMU Developers
On 14 January 2018 at 17:20, Samuel Thibault
<samuel.thibault@ens-lyon.org> wrote:
> warning: redirection vers https://people.debian.org/~sthibault/qemu.git/
> The following changes since commit 7398166ddf7c6dbbc9cae6ac69bb2feda14b40ac:
>
> Merge remote-tracking branch 'remotes/kraxel/tags/vnc-20180112-pull-request' into staging (2018-01-12 16:01:30 +0000)
>
> are available in the Git repository at:
>
> http://people.debian.org/~sthibault/qemu.git tags/samuel-thibault
>
> for you to fetch changes up to 318116a6ff36bee13c725a247a9395e80bcfbd6b:
>
> slirp: add in6_dhcp_multicast() (2018-01-14 18:16:13 +0100)
>
> ----------------------------------------------------------------
> slirp updates
>
> ----------------------------------------------------------------
> Philippe Mathieu-Daudé (5):
> slirp: avoid IN6_IS_ADDR_UNSPECIFIED(), rather use in6_zero()
> slirp: remove unused header
> slirp: remove unnecessary struct declaration
> slirp: removed unused code
> slirp: add in6_dhcp_multicast()
Applied, thanks.
-- PMM
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Qemu-devel] [PULL 0/5] slirp updates
@ 2018-06-08 6:13 Samuel Thibault
2018-06-08 6:13 ` [Qemu-devel] [PULL 1/5] slirp: Fix spurious error report when sending directly Samuel Thibault
` (6 more replies)
0 siblings, 7 replies; 16+ messages in thread
From: Samuel Thibault @ 2018-06-08 6:13 UTC (permalink / raw)
To: qemu-devel, peter.maydell; +Cc: Samuel Thibault, stefanha, jan.kiszka
The following changes since commit 9be4af13305f24d2dabf94bb53e6b65c76d08bb2:
Merge remote-tracking branch 'remotes/thibault/tags/samuel-thibault' into staging (2018-06-01 14:58:53 +0100)
are available in the Git repository at:
https://people.debian.org/~sthibault/qemu.git tags/samuel-thibault
for you to fetch changes up to c22098c74a09164797fae6511c5eaf68f32c4dd8:
slirp: reformat m_inc routine (2018-06-08 09:08:30 +0300)
----------------------------------------------------------------
slirp updates
Prasad J Pandit (2):
slirp: Fix buffer overflow on packet reassembling
Samuel Thibault (3):
slirp: Add Samuel Thibault's staging tree for slirp
slirp: fix domainname version availability
----------------------------------------------------------------
Prasad J Pandit (2):
slirp: correct size computation while concatenating mbuf
slirp: reformat m_inc routine
Samuel Thibault (3):
slirp: Fix spurious error report when sending directly
slirp: Add Samuel Thibault's staging tree for slirp
slirp: fix domainname version availability
MAINTAINERS | 1 +
qapi/net.json | 2 +-
slirp/mbuf.c | 39 ++++++++++++++++++---------------------
slirp/mbuf.h | 8 +++-----
slirp/socket.c | 14 +++++++-------
5 files changed, 30 insertions(+), 34 deletions(-)
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Qemu-devel] [PULL 1/5] slirp: Fix spurious error report when sending directly
2018-06-08 6:13 [Qemu-devel] [PULL 0/5] slirp updates Samuel Thibault
@ 2018-06-08 6:13 ` Samuel Thibault
2018-06-08 6:13 ` [Qemu-devel] [PULL 2/5] slirp: Add Samuel Thibault's staging tree for slirp Samuel Thibault
` (5 subsequent siblings)
6 siblings, 0 replies; 16+ messages in thread
From: Samuel Thibault @ 2018-06-08 6:13 UTC (permalink / raw)
To: qemu-devel, peter.maydell; +Cc: Samuel Thibault, stefanha, jan.kiszka
Move check to where it actually is useful, and reduce scope of 'len'
variable along the way.
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
slirp/socket.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/slirp/socket.c b/slirp/socket.c
index e2a71c9b04..08fe98907d 100644
--- a/slirp/socket.c
+++ b/slirp/socket.c
@@ -340,7 +340,7 @@ sosendoob(struct socket *so)
struct sbuf *sb = &so->so_rcv;
char buff[2048]; /* XXX Shouldn't be sending more oob data than this */
- int n, len;
+ int n;
DEBUG_CALL("sosendoob");
DEBUG_ARG("so = %p", so);
@@ -359,7 +359,7 @@ sosendoob(struct socket *so)
* send it all
*/
uint32_t urgc = so->so_urgc;
- len = (sb->sb_data + sb->sb_datalen) - sb->sb_rptr;
+ int len = (sb->sb_data + sb->sb_datalen) - sb->sb_rptr;
if (len > urgc) {
len = urgc;
}
@@ -374,13 +374,13 @@ sosendoob(struct socket *so)
len += n;
}
n = slirp_send(so, buff, len, (MSG_OOB)); /* |MSG_DONTWAIT)); */
- }
-
#ifdef DEBUG
- if (n != len) {
- DEBUG_ERROR((dfd, "Didn't send all data urgently XXXXX\n"));
- }
+ if (n != len) {
+ DEBUG_ERROR((dfd, "Didn't send all data urgently XXXXX\n"));
+ }
#endif
+ }
+
if (n < 0) {
return n;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [Qemu-devel] [PULL 2/5] slirp: Add Samuel Thibault's staging tree for slirp
2018-06-08 6:13 [Qemu-devel] [PULL 0/5] slirp updates Samuel Thibault
2018-06-08 6:13 ` [Qemu-devel] [PULL 1/5] slirp: Fix spurious error report when sending directly Samuel Thibault
@ 2018-06-08 6:13 ` Samuel Thibault
2018-06-08 6:13 ` [Qemu-devel] [PULL 3/5] slirp: fix domainname version availability Samuel Thibault
` (4 subsequent siblings)
6 siblings, 0 replies; 16+ messages in thread
From: Samuel Thibault @ 2018-06-08 6:13 UTC (permalink / raw)
To: qemu-devel, peter.maydell; +Cc: Samuel Thibault, stefanha, jan.kiszka
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Acked-by: Thomas Huth <thuth@redhat.com>
---
MAINTAINERS | 1 +
1 file changed, 1 insertion(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 41cd3736a9..4c73c16fee 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1675,6 +1675,7 @@ S: Maintained
F: slirp/
F: net/slirp.c
F: include/net/slirp.h
+T: git https://people.debian.org/~sthibault/qemu.git slirp
T: git git://git.kiszka.org/qemu.git queues/slirp
Stubs
--
2.17.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [Qemu-devel] [PULL 3/5] slirp: fix domainname version availability
2018-06-08 6:13 [Qemu-devel] [PULL 0/5] slirp updates Samuel Thibault
2018-06-08 6:13 ` [Qemu-devel] [PULL 1/5] slirp: Fix spurious error report when sending directly Samuel Thibault
2018-06-08 6:13 ` [Qemu-devel] [PULL 2/5] slirp: Add Samuel Thibault's staging tree for slirp Samuel Thibault
@ 2018-06-08 6:13 ` Samuel Thibault
2018-06-08 6:13 ` [Qemu-devel] [PULL 4/5] slirp: correct size computation while concatenating mbuf Samuel Thibault
` (3 subsequent siblings)
6 siblings, 0 replies; 16+ messages in thread
From: Samuel Thibault @ 2018-06-08 6:13 UTC (permalink / raw)
To: qemu-devel, peter.maydell; +Cc: Samuel Thibault, stefanha, jan.kiszka
The change missed the 2.12 deadline.
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
---
qapi/net.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qapi/net.json b/qapi/net.json
index 32681a1af7..6b7d93cb59 100644
--- a/qapi/net.json
+++ b/qapi/net.json
@@ -161,7 +161,7 @@
# to the guest
#
# @domainname: guest-visible domain name of the virtual nameserver
-# (since 2.12)
+# (since 3.0)
#
# @ipv6-prefix: IPv6 network prefix (default is fec0::) (since
# 2.6). The network prefix is given in the usual
--
2.17.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [Qemu-devel] [PULL 4/5] slirp: correct size computation while concatenating mbuf
2018-06-08 6:13 [Qemu-devel] [PULL 0/5] slirp updates Samuel Thibault
` (2 preceding siblings ...)
2018-06-08 6:13 ` [Qemu-devel] [PULL 3/5] slirp: fix domainname version availability Samuel Thibault
@ 2018-06-08 6:13 ` Samuel Thibault
2018-06-08 6:13 ` [Qemu-devel] [PULL 5/5] slirp: reformat m_inc routine Samuel Thibault
` (2 subsequent siblings)
6 siblings, 0 replies; 16+ messages in thread
From: Samuel Thibault @ 2018-06-08 6:13 UTC (permalink / raw)
To: qemu-devel, peter.maydell
Cc: Prasad J Pandit, stefanha, jan.kiszka, Samuel Thibault
From: Prasad J Pandit <pjp@fedoraproject.org>
While reassembling incoming fragmented datagrams, 'm_cat' routine
extends the 'mbuf' buffer, if it has insufficient room. It computes
a wrong buffer size, which leads to overwriting adjacent heap buffer
area. Correct this size computation in m_cat.
Reported-by: ZDI Disclosures <zdi-disclosures@trendmicro.com>
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
---
slirp/mbuf.c | 11 +++++------
slirp/mbuf.h | 8 +++-----
2 files changed, 8 insertions(+), 11 deletions(-)
diff --git a/slirp/mbuf.c b/slirp/mbuf.c
index 5ff24559fd..18cbf759a7 100644
--- a/slirp/mbuf.c
+++ b/slirp/mbuf.c
@@ -138,7 +138,7 @@ m_cat(struct mbuf *m, struct mbuf *n)
* If there's no room, realloc
*/
if (M_FREEROOM(m) < n->m_len)
- m_inc(m,m->m_size+MINCSIZE);
+ m_inc(m, m->m_len + n->m_len);
memcpy(m->m_data+m->m_len, n->m_data, n->m_len);
m->m_len += n->m_len;
@@ -147,7 +147,7 @@ m_cat(struct mbuf *m, struct mbuf *n)
}
-/* make m size bytes large */
+/* make m 'size' bytes large from m_data */
void
m_inc(struct mbuf *m, int size)
{
@@ -158,12 +158,12 @@ m_inc(struct mbuf *m, int size)
if (m->m_flags & M_EXT) {
datasize = m->m_data - m->m_ext;
- m->m_ext = g_realloc(m->m_ext, size);
+ m->m_ext = g_realloc(m->m_ext, size + datasize);
m->m_data = m->m_ext + datasize;
} else {
char *dat;
datasize = m->m_data - m->m_dat;
- dat = g_malloc(size);
+ dat = g_malloc(size + datasize);
memcpy(dat, m->m_dat, m->m_size);
m->m_ext = dat;
@@ -171,8 +171,7 @@ m_inc(struct mbuf *m, int size)
m->m_flags |= M_EXT;
}
- m->m_size = size;
-
+ m->m_size = size + datasize;
}
diff --git a/slirp/mbuf.h b/slirp/mbuf.h
index 893601ff9d..33b84485d6 100644
--- a/slirp/mbuf.h
+++ b/slirp/mbuf.h
@@ -33,8 +33,6 @@
#ifndef MBUF_H
#define MBUF_H
-#define MINCSIZE 4096 /* Amount to increase mbuf if too small */
-
/*
* Macros for type conversion
* mtod(m,t) - convert mbuf pointer to data pointer of correct type
@@ -72,11 +70,11 @@ struct mbuf {
struct mbuf *m_prevpkt; /* Flags aren't used in the output queue */
int m_flags; /* Misc flags */
- int m_size; /* Size of data */
+ int m_size; /* Size of mbuf, from m_dat or m_ext */
struct socket *m_so;
- caddr_t m_data; /* Location of data */
- int m_len; /* Amount of data in this mbuf */
+ caddr_t m_data; /* Current location of data */
+ int m_len; /* Amount of data in this mbuf, from m_data */
Slirp *slirp;
bool resolution_requested;
--
2.17.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [Qemu-devel] [PULL 5/5] slirp: reformat m_inc routine
2018-06-08 6:13 [Qemu-devel] [PULL 0/5] slirp updates Samuel Thibault
` (3 preceding siblings ...)
2018-06-08 6:13 ` [Qemu-devel] [PULL 4/5] slirp: correct size computation while concatenating mbuf Samuel Thibault
@ 2018-06-08 6:13 ` Samuel Thibault
2018-06-08 6:20 ` [Qemu-devel] [PULL 0/5] slirp updates no-reply
2018-06-08 10:40 ` Peter Maydell
6 siblings, 0 replies; 16+ messages in thread
From: Samuel Thibault @ 2018-06-08 6:13 UTC (permalink / raw)
To: qemu-devel, peter.maydell
Cc: Prasad J Pandit, stefanha, jan.kiszka, Samuel Thibault
From: Prasad J Pandit <pjp@fedoraproject.org>
Coding style changes to the m_inc routine and minor refactoring.
Reported-by: ZDI Disclosures <zdi-disclosures@trendmicro.com>
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
---
slirp/mbuf.c | 34 ++++++++++++++++------------------
1 file changed, 16 insertions(+), 18 deletions(-)
diff --git a/slirp/mbuf.c b/slirp/mbuf.c
index 18cbf759a7..0c189e1a7b 100644
--- a/slirp/mbuf.c
+++ b/slirp/mbuf.c
@@ -151,27 +151,25 @@ m_cat(struct mbuf *m, struct mbuf *n)
void
m_inc(struct mbuf *m, int size)
{
- int datasize;
+ int datasize;
- /* some compiles throw up on gotos. This one we can fake. */
- if(m->m_size>size) return;
+ /* some compilers throw up on gotos. This one we can fake. */
+ if (m->m_size > size) {
+ return;
+ }
- if (m->m_flags & M_EXT) {
- datasize = m->m_data - m->m_ext;
- m->m_ext = g_realloc(m->m_ext, size + datasize);
- m->m_data = m->m_ext + datasize;
- } else {
- char *dat;
- datasize = m->m_data - m->m_dat;
- dat = g_malloc(size + datasize);
- memcpy(dat, m->m_dat, m->m_size);
-
- m->m_ext = dat;
- m->m_data = m->m_ext + datasize;
- m->m_flags |= M_EXT;
- }
+ if (m->m_flags & M_EXT) {
+ datasize = m->m_data - m->m_ext;
+ m->m_ext = g_realloc(m->m_ext, size + datasize);
+ } else {
+ datasize = m->m_data - m->m_dat;
+ m->m_ext = g_malloc(size + datasize);
+ memcpy(m->m_ext, m->m_dat, m->m_size);
+ m->m_flags |= M_EXT;
+ }
- m->m_size = size + datasize;
+ m->m_data = m->m_ext + datasize;
+ m->m_size = size + datasize;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [PULL 0/5] slirp updates
2018-06-08 6:13 [Qemu-devel] [PULL 0/5] slirp updates Samuel Thibault
` (4 preceding siblings ...)
2018-06-08 6:13 ` [Qemu-devel] [PULL 5/5] slirp: reformat m_inc routine Samuel Thibault
@ 2018-06-08 6:20 ` no-reply
2018-06-08 10:40 ` Peter Maydell
6 siblings, 0 replies; 16+ messages in thread
From: no-reply @ 2018-06-08 6:20 UTC (permalink / raw)
To: samuel.thibault; +Cc: famz, qemu-devel, peter.maydell, stefanha, jan.kiszka
Hi,
This series seems to have some coding style problems. See output below for
more information:
Type: series
Message-id: 20180608061316.4909-1-samuel.thibault@ens-lyon.org
Subject: [Qemu-devel] [PULL 0/5] slirp updates
=== TEST SCRIPT BEGIN ===
#!/bin/bash
BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
failed=1
echo
fi
n=$((n+1))
done
exit $failed
=== TEST SCRIPT END ===
Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
* [new tag] patchew/20180608061316.4909-1-samuel.thibault@ens-lyon.org -> patchew/20180608061316.4909-1-samuel.thibault@ens-lyon.org
Switched to a new branch 'test'
00a042daa6 slirp: reformat m_inc routine
b2bd5ee65e slirp: correct size computation while concatenating mbuf
c9786d65a1 slirp: fix domainname version availability
4f34ee0609 slirp: Add Samuel Thibault's staging tree for slirp
9159762703 slirp: Fix spurious error report when sending directly
=== OUTPUT BEGIN ===
Checking PATCH 1/5: slirp: Fix spurious error report when sending directly...
ERROR: code indent should never use tabs
#25: FILE: slirp/socket.c:343:
+^Iint n;$
ERROR: code indent should never use tabs
#34: FILE: slirp/socket.c:362:
+^I^Iint len = (sb->sb_data + sb->sb_datalen) - sb->sb_rptr;$
ERROR: code indent should never use tabs
#43: FILE: slirp/socket.c:378:
+^I^Iif (n != len) {$
WARNING: line over 80 characters
#44: FILE: slirp/socket.c:379:
+ DEBUG_ERROR((dfd, "Didn't send all data urgently XXXXX\n"));
ERROR: code indent should never use tabs
#44: FILE: slirp/socket.c:379:
+^I^I^IDEBUG_ERROR((dfd, "Didn't send all data urgently XXXXX\n"));$
ERROR: code indent should never use tabs
#45: FILE: slirp/socket.c:380:
+^I^I}$
total: 5 errors, 1 warnings, 34 lines checked
Your patch has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
Checking PATCH 2/5: slirp: Add Samuel Thibault's staging tree for slirp...
Checking PATCH 3/5: slirp: fix domainname version availability...
Checking PATCH 4/5: slirp: correct size computation while concatenating mbuf...
ERROR: code indent should never use tabs
#25: FILE: slirp/mbuf.c:141:
+^I^Im_inc(m, m->m_len + n->m_len);$
ERROR: code indent should never use tabs
#43: FILE: slirp/mbuf.c:161:
+^I m->m_ext = g_realloc(m->m_ext, size + datasize);$
ERROR: code indent should never use tabs
#49: FILE: slirp/mbuf.c:166:
+^I dat = g_malloc(size + datasize);$
ERROR: code indent should never use tabs
#81: FILE: slirp/mbuf.h:73:
+^Iint^Im_size;^I^I^I/* Size of mbuf, from m_dat or m_ext */$
ERROR: code indent should never use tabs
#86: FILE: slirp/mbuf.h:76:
+^Icaddr_t^Im_data;^I^I^I/* Current location of data */$
WARNING: line over 80 characters
#87: FILE: slirp/mbuf.h:77:
+ int m_len; /* Amount of data in this mbuf, from m_data */
ERROR: code indent should never use tabs
#87: FILE: slirp/mbuf.h:77:
+^Iint^Im_len;^I^I^I/* Amount of data in this mbuf, from m_data */$
total: 6 errors, 1 warnings, 61 lines checked
Your patch has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
Checking PATCH 5/5: slirp: reformat m_inc routine...
=== OUTPUT END ===
Test command exited with code: 1
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Qemu-devel] [PULL 0/5] slirp updates
2018-06-08 6:13 [Qemu-devel] [PULL 0/5] slirp updates Samuel Thibault
` (5 preceding siblings ...)
2018-06-08 6:20 ` [Qemu-devel] [PULL 0/5] slirp updates no-reply
@ 2018-06-08 10:40 ` Peter Maydell
6 siblings, 0 replies; 16+ messages in thread
From: Peter Maydell @ 2018-06-08 10:40 UTC (permalink / raw)
To: Samuel Thibault; +Cc: QEMU Developers, Stefan Hajnoczi, Jan Kiszka
On 8 June 2018 at 07:13, Samuel Thibault <samuel.thibault@ens-lyon.org> wrote:
> The following changes since commit 9be4af13305f24d2dabf94bb53e6b65c76d08bb2:
>
> Merge remote-tracking branch 'remotes/thibault/tags/samuel-thibault' into staging (2018-06-01 14:58:53 +0100)
>
> are available in the Git repository at:
>
> https://people.debian.org/~sthibault/qemu.git tags/samuel-thibault
>
> for you to fetch changes up to c22098c74a09164797fae6511c5eaf68f32c4dd8:
>
> slirp: reformat m_inc routine (2018-06-08 09:08:30 +0300)
>
> ----------------------------------------------------------------
> slirp updates
>
> Prasad J Pandit (2):
> slirp: Fix buffer overflow on packet reassembling
>
> Samuel Thibault (3):
> slirp: Add Samuel Thibault's staging tree for slirp
> slirp: fix domainname version availability
>
Applied, thanks.
-- PMM
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2018-06-08 14:06 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-08 6:13 [Qemu-devel] [PULL 0/5] slirp updates Samuel Thibault
2018-06-08 6:13 ` [Qemu-devel] [PULL 1/5] slirp: Fix spurious error report when sending directly Samuel Thibault
2018-06-08 6:13 ` [Qemu-devel] [PULL 2/5] slirp: Add Samuel Thibault's staging tree for slirp Samuel Thibault
2018-06-08 6:13 ` [Qemu-devel] [PULL 3/5] slirp: fix domainname version availability Samuel Thibault
2018-06-08 6:13 ` [Qemu-devel] [PULL 4/5] slirp: correct size computation while concatenating mbuf Samuel Thibault
2018-06-08 6:13 ` [Qemu-devel] [PULL 5/5] slirp: reformat m_inc routine Samuel Thibault
2018-06-08 6:20 ` [Qemu-devel] [PULL 0/5] slirp updates no-reply
2018-06-08 10:40 ` Peter Maydell
-- strict thread matches above, loose matches on Subject: below --
2018-01-14 17:20 Samuel Thibault
2018-01-15 11:23 ` Peter Maydell
2017-02-26 20:27 Samuel Thibault
2017-02-26 20:37 ` no-reply
2017-02-26 22:38 ` Peter Maydell
2017-02-27 9:08 ` Dr. David Alan Gilbert
2016-03-28 23:28 Samuel Thibault
2016-03-29 18:54 ` Peter Maydell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).