Re: [Qemu-devel] [PATCH v2] usb: Remove legacy -usbdevice option

2018-01-04 Thread Samuel Thibault
Paolo Bonzini, on jeu. 04 janv. 2018 18:11:00 +0100, wrote: > On 04/01/2018 16:56, Samuel Thibault wrote: > >> However, adding magic to "-device usb-braille" that creates both a > >> front-end and a back-end is completely the opposite of sane... > > Well, this

Re: [Qemu-devel] [PATCH v2] usb: Remove legacy -usbdevice option

2018-01-04 Thread Samuel Thibault
Paolo Bonzini, on jeu. 04 janv. 2018 16:47:16 +0100, wrote: > The point of deprecation is not to make the interface simpler, it is to > avoid cases where one option is doing too much and/or crossing > abstraction boundaries, for example -net creating both a device and a > hub port. > > "-serial"

Re: [Qemu-devel] [PATCH v2] usb: Remove legacy -usbdevice option

2018-01-04 Thread Samuel Thibault
Paolo Bonzini, on jeu. 04 janv. 2018 16:28:27 +0100, wrote: > On 04/01/2018 16:24, Samuel Thibault wrote: > >> Maybe we can add "-braille" instead. > > I guess such legacy-looking option would be frowned up :) > > Not really. As long as it doesn't propagate ever

Re: [Qemu-devel] [PATCH v2] usb: Remove legacy -usbdevice option

2018-01-04 Thread Samuel Thibault
Hello, Paolo Bonzini, on jeu. 04 janv. 2018 16:19:02 +0100, wrote: > On 04/01/2018 15:21, Samuel Thibault wrote: > > Samuel Thibault, on jeu. 04 janv. 2018 15:15:24 +0100, wrote: > >> I'm however still unable to make usb-serial and usb-braille work, as > >>

Re: [Qemu-devel] [PATCH] usb: Remove legacy -usbdevice option

2018-01-04 Thread Samuel Thibault
Hello, Thomas Huth, on jeu. 04 janv. 2018 16:01:24 +0100, wrote: > On 04.01.2018 15:23, Samuel Thibault wrote: > > Thomas Huth, on jeu. 04 janv. 2018 15:22:25 +0100, wrote: > >> On 04.01.2018 14:26, Samuel Thibault wrote: > >> I think it's more common to not

Re: [Qemu-devel] [PATCH] usb: Remove legacy -usbdevice option

2018-01-04 Thread Samuel Thibault
Thomas Huth, on jeu. 04 janv. 2018 15:22:25 +0100, wrote: > On 04.01.2018 14:26, Samuel Thibault wrote: > I think it's more common to not do any magic default setup with > "-device", but if you think this should be the case here, it can > certainly be added again Yes, please

Re: [Qemu-devel] [PATCH v2] usb: Remove legacy -usbdevice option

2018-01-04 Thread Samuel Thibault
Samuel Thibault, on jeu. 04 janv. 2018 15:15:24 +0100, wrote: > I'm however still unable to make usb-serial and usb-braille work, as > mentioned in my other mail :) Ah, now with the documentation I understand, one has to also pass -chardev braille,chardev=foobar, and then -device usb-b

Re: [Qemu-devel] [PATCH v2] usb: Remove legacy -usbdevice option

2018-01-04 Thread Samuel Thibault
Thomas Huth, on jeu. 04 janv. 2018 15:12:56 +0100, wrote: > On 04.01.2018 15:09, Samuel Thibault wrote: > > Thomas Huth, on jeu. 04 janv. 2018 14:15:52 +0100, wrote: > >> -@item host:@var{bus}.@var{addr} > >> -Pass through the host device identified by @var{bus}.@

Re: [Qemu-devel] [PATCH v2] usb: Remove legacy -usbdevice option

2018-01-04 Thread Samuel Thibault
Thomas Huth, on jeu. 04 janv. 2018 14:15:52 +0100, wrote: > -@item host:@var{bus}.@var{addr} > -Pass through the host device identified by @var{bus}.@var{addr} (Linux only). > - > -@item host:@var{vendor_id}:@var{product_id} > -Pass through the host device identified by

Re: [Qemu-devel] [PATCH] usb: Remove legacy -usbdevice option

2018-01-04 Thread Samuel Thibault
Hello, I'm afraid I can't even work out how to replace -usbdevice braille (or -usbdevice serial, all questions below apply, except making chardev default to braille): ... -usbdevice braille -usbdevice braille: '-usbdevice' is deprecated, please use '-device usb-...' instead but -device

[Qemu-devel] [PATCH] linux-user: Fix sched_get/setaffinity conversion

2017-12-28 Thread Samuel Thibault
sched_get/setaffinity linux-user syscalls were missing conversions for little/big endian, which is hairy since longs may not be the same size either. For simplicity, this just introduces loops to convert bit by bit like is done for select. Signed-off-by: Samuel Thibault <samuel.thiba...@

Re: [Qemu-devel] [PATCH] linux-user: Fix sched_get/setaffinity conversion

2017-12-28 Thread Samuel Thibault
Laurent Vivier, on jeu. 28 déc. 2017 18:50:14 +0100, wrote: > > +for (j = 0; j < abi_ubits; j++, bit++) { > > +if (mask[bit / ubits] & (1UL << (bit % ubits))) { > > You should use __CPUMASK() and introduce a TARGET_CPUMASK(). Err, do we really want to

[Qemu-devel] [PATCH] linux-user: Add getcpu() support

2017-12-28 Thread Samuel Thibault
Signed-off-by: Samuel Thibault <samuel.thiba...@ens-lyon.org> --- linux-user/syscall.c | 16 1 file changed, 16 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 8ec7de96ce..bb8cb726f5 100644 --- a/linux-user/syscall.c +++ b/linux-user/sys

[Qemu-devel] [PATCH] linux-user: Fix sched_get/setaffinity conversion

2017-12-28 Thread Samuel Thibault
sched_get/setaffinity linux-user syscalls were missing conversions for little/big endian, which is hairy since longs may not be the same size either. For simplicity, this just introduces loops to convert bit by bit like is done for select. Signed-off-by: Samuel Thibault <samuel.thiba...@

Re: [Qemu-devel] [PATCH for-2.12 2/2] net: Remove the deprecated -tftp, -bootp, -redir and -smb options

2017-12-11 Thread Samuel Thibault
heir scripts to the new syntax. Time to remove the > old parameters now. > > Signed-off-by: Thomas Huth <th...@redhat.com> Reviewed-by: Samuel Thibault <samuel.thiba...@ens-lyon.org> > --- > include/net/net.h | 3 --- > include/net/sli

Re: [Qemu-devel] [PATCH for-2.12 1/2] net: Remove the legacy "-net channel" parameter

2017-12-11 Thread Samuel Thibault
Thomas Huth, on jeu. 07 déc. 2017 19:02:34 +0100, wrote: > It has never been documented, so hardly anybody knows about this > parameter, and it is marked as deprecated since QEMU v2.6. > Time to let it go now. > > Signed-off-by: Thomas Huth <th...@redhat.com> Reviewe

Re: [Qemu-devel] [PATCH] baum: Truncate braille device size to 84x1

2017-12-11 Thread Samuel Thibault
Eric Blake, on lun. 11 déc. 2017 08:30:39 -0600, wrote: > On 12/10/2017 06:19 PM, Samuel Thibault wrote: > > Baum device bigger than 84 do not actually exist, some guest drivers > > would be upset by such sizes. > > > > Signed-off-by: Samuel Thibault &l

[Qemu-devel] [PATCH] baum: Truncate braille device size to 84x1

2017-12-10 Thread Samuel Thibault
Baum device bigger than 84 do not actually exist, some guest drivers would be upset by such sizes. Signed-off-by: Samuel Thibault <samuel.thiba...@ens-lyon.org> --- chardev/baum.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/chardev/baum.c b/chardev/baum.c

Re: [Qemu-devel] [PULL 0/1] baum braille device update

2017-12-04 Thread Samuel Thibault
Peter Maydell, on lun. 04 déc. 2017 15:36:32 +, wrote: > On 4 December 2017 at 15:26, Samuel Thibault <samuel.thiba...@gnu.org> wrote: > > Peter Maydell, on lun. 04 déc. 2017 15:21:48 +, wrote: > >> On 4 December 2017 at 15:17, Samuel Thibault > >> <

Re: [Qemu-devel] [PULL 0/1] baum braille device update

2017-12-04 Thread Samuel Thibault
Hello, Peter Maydell, on lun. 04 déc. 2017 15:21:48 +, wrote: > On 4 December 2017 at 15:17, Samuel Thibault > <samuel.thiba...@ens-lyon.org> wrote: > > warning: redirection vers https://people.debian.org/~sthibault/qemu.git/ > > The follow

[Qemu-devel] [PULL 1/1] baum: Truncate braille device size to 84x1

2017-12-04 Thread Samuel Thibault
Baum device bigger than 84 do not actually exist, some guest drivers would be upset by such sizes. Signed-off-by: Samuel Thibault <samuel.thiba...@ens-lyon.org> --- chardev/baum.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/chardev/baum.c b/chardev/baum.c

[Qemu-devel] [PULL 0/1] baum braille device update

2017-12-04 Thread Samuel Thibault
warning: redirection vers https://people.debian.org/~sthibault/qemu.git/ The following changes since commit 7edaf99759017d3e175e37cffc3536e86a3bd380: Merge remote-tracking branch 'remotes/thibault/tags/samuel-thibault' into staging (2017-11-13 13:54:59 +) are available in the Git

Re: [Qemu-devel] [PATCH] slirp: don't zero ti_i since we access it later.

2017-11-09 Thread Samuel Thibault
Tao Wu(吴涛@Eng), on jeu. 09 nov. 2017 10:48:27 -0800, wrote: > Thanks. Actually this is a follow up with my previous effort to fix this bug. > I was busy on something else and then got lost in that old thread. Now I just > checked some my local patch > to see if they've merged to upstream and then

[Qemu-devel] [PULL 0/1] slirp update

2017-11-09 Thread Samuel Thibault
/~sthibault/qemu.git tags/samuel-thibault for you to fetch changes up to 990132cda9baa27bdc558df6c9c15aacb0322d2c: slirp: don't zero the whole ti_i when m == NULL (2017-11-09 18:59:22 +0100) slirp updates

[Qemu-devel] [PULL 1/1] slirp: don't zero the whole ti_i when m == NULL

2017-11-09 Thread Samuel Thibault
fields. This should fix some rare cases (some RST cases, keep alive probes) where packets would be sent to 0.0.0.0. Signed-off-by: Tao Wu <lep...@google.com> Signed-off-by: Samuel Thibault <samuel.thiba...@ens-lyon.org> --- slirp/tcp_subr.c | 11 ++- 1 file changed, 10 inserti

Re: [Qemu-devel] [PATCH] slirp: don't zero ti_i since we access it later.

2017-11-09 Thread Samuel Thibault
Hello, Tao Wu, on mer. 08 nov. 2017 14:53:40 -0800, wrote: > The current code looks buggy, we zero ti_i while we access > ti_dst/ti_src later. Mmm, indeed, looking again at how it was introduced, it was too much. Samuel

Re: [Qemu-devel] [PATCH 36/88] SLIRP: use g_new() family of functions

2017-10-08 Thread Samuel Thibault
Hello, Philippe Mathieu-Daudé, on ven. 06 oct. 2017 20:49:31 -0300, wrote: > --- a/net/slirp.c > +++ b/net/slirp.c > @@ -869,7 +869,7 @@ net_init_slirp_configs(const StringList *fwd, int flags) > while (fwd) { > struct slirp_config_str *config; > > -config =

[Qemu-devel] [PULL 3/3] slirp: Add a special case for the NULL socket

2017-09-24 Thread Samuel Thibault
field to the same session. Signed-off-by: Kevin Cernekee <cerne...@chromium.org> Signed-off-by: Samuel Thibault <samuel.thiba...@ens-lyon.org> --- slirp/if.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/slirp/if.c b/slirp/if.c index 6262

[Qemu-devel] [PULL 1/3] slirp: Add explanation for hostfwd parsing failure

2017-09-24 Thread Samuel Thibault
address) Signed-off-by: Dr. David Alan Gilbert <dgilb...@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4...@amsat.org> Signed-off-by: Samuel Thibault <samuel.thiba...@ens-lyon.org> --- net/slirp.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git

[Qemu-devel] [PULL 2/3] slirp: Fix intermittent send queue hangs on a socket

2017-09-24 Thread Samuel Thibault
seen on long-running Chromium OS VM tests[1] which rapidly create and destroy ssh connections through hostfwd. [0] https://pastebin.com/NNy6LreF [1] https://bugs.chromium.org/p/chromium/issues/detail?id=766323 Signed-off-by: Kevin Cernekee <cerne...@chromium.org> Signed-off-by: Samuel Thib

[Qemu-devel] [PULL 0/3] slirp updates

2017-09-24 Thread Samuel Thibault
at: http://people.debian.org/~sthibault/qemu.git tags/samuel-thibault for you to fetch changes up to 13146a83951e045c810c37c5c11c2a016ebc0663: slirp: Add a special case for the NULL socket (2017-09-24 20:04:09 +0200) slirp

Re: [Qemu-devel] [PATCH 2/2] slirp: Add a special case for the NULL socket

2017-09-24 Thread Samuel Thibault
Kevin Cernekee, on mer. 20 sept. 2017 13:42:05 -0700, wrote: > NULL sockets are used for NDP, BOOTP, and other critical operations. > If the topmost mbuf in a NULL session is blocked pending resolution, > it may cause problems if it blocks other packets with a NULL socket. > So do not add mbufs

Re: [Qemu-devel] [PATCH 1/2] slirp: Fix intermittent send queue hangs on a socket

2017-09-24 Thread Samuel Thibault
Hello, Kevin Cernekee, on mer. 20 sept. 2017 13:42:04 -0700, wrote: > if_output() originally sent one mbuf per call and used the slirp->next_m > variable to keep track of where it left off. But nowadays it tries to > send all of the mbufs from the fastq, and one mbuf from each session on > the

Re: [Qemu-devel] [PATCH] slirp: Add explanation for hostfwd parsing failure

2017-09-09 Thread Samuel Thibault
Philippe Mathieu-Daudé, on ven. 08 sept. 2017 13:19:56 -0300, wrote: > Hi David, > > On 09/08/2017 12:53 PM, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > e.g. > > ./x86_64-softmmu/qemu-system-x86_64 -nographic -netdev > >

Re: [Qemu-devel] [PATCH] slirp: fix clearing ifq_so from pending packets

2017-08-30 Thread Samuel Thibault
Thomas Huth, on mer. 30 août 2017 09:50:45 +0200, wrote: > On 26.08.2017 00:37, Samuel Thibault wrote: > > The if_fastq and if_batchq contain not only packets, but queues of packets > > for the same socket. When sofree frees a socket, it thus has to clear ifq_so > > from

Re: [Qemu-devel] [PULL 0/1] slirp updates

2017-08-29 Thread Samuel Thibault
Peter Maydell, on mar. 29 août 2017 16:31:03 +0100, wrote: > On 29 August 2017 at 10:22, Samuel Thibault <samuel.thiba...@gnu.org> wrote: > > Peter Maydell, on mar. 29 août 2017 10:20:31 +0100, wrote: > >> On 28 August 2017 at 00:05, Samuel Thibault > >> <

Re: [Qemu-devel] [PULL 0/1] slirp updates

2017-08-29 Thread Samuel Thibault
Peter Maydell, on mar. 29 août 2017 10:20:31 +0100, wrote: > On 28 August 2017 at 00:05, Samuel Thibault > <samuel.thiba...@ens-lyon.org> wrote: > > warning: redirection vers https://people.debian.org/~sthibault/qemu.git/ > > The follow

Re: [Qemu-devel] [PULL 1/1] slirp: fix clearing ifq_so from pending packets

2017-08-28 Thread Samuel Thibault
Samuel Thibault, on lun. 28 août 2017 17:44:55 +0200, wrote: > Eric Blake, on lun. 28 août 2017 10:43:48 -0500, wrote: > > This is a pull request, but missed 2.10-rc4, which makes it really hard > > to justify for inclusion in 2.10 proper. Is it okay that this doesn't >

Re: [Qemu-devel] [PULL 1/1] slirp: fix clearing ifq_so from pending packets

2017-08-28 Thread Samuel Thibault
Hello, Eric Blake, on lun. 28 août 2017 10:43:48 -0500, wrote: > This is a pull request, but missed 2.10-rc4, which makes it really hard > to justify for inclusion in 2.10 proper. Is it okay that this doesn't > go in until 2.11? Well, AIUI we have been living with the issue for years

[Qemu-devel] [PULL 0/1] slirp updates

2017-08-27 Thread Samuel Thibault
/~sthibault/qemu.git tags/samuel-thibault for you to fetch changes up to 04d74e07b4542aad5aa4ad03951b38b767f5314a: slirp: fix clearing ifq_so from pending packets (2017-08-26 01:04:12 +0200) slirp updates

[Qemu-devel] [PULL 1/1] slirp: fix clearing ifq_so from pending packets

2017-08-27 Thread Samuel Thibault
The if_fastq and if_batchq contain not only packets, but queues of packets for the same socket. When sofree frees a socket, it thus has to clear ifq_so from all the packets from the queues, not only the first. Signed-off-by: Samuel Thibault <samuel.thiba...@ens-lyon.org> Reviewed-by: Ph

Re: [Qemu-devel] [PATCH] slirp: fix clearing ifq_so from pending packets

2017-08-25 Thread Samuel Thibault
Samuel Thibault, on sam. 26 août 2017 01:05:04 +0200, wrote: > So Wjjzhang and PJP, can you confirm that this fixes your uses? PJP, can you forward it to Wjjzhang? I keep getting <wjjzh...@tencent.com>: host cloudmx.qq.com[113.108.11.188] said: 550 Mail content denied.

Re: [Qemu-devel] [PATCH] slirp: fix clearing ifq_so from pending packets

2017-08-25 Thread Samuel Thibault
Hello, So Wjjzhang and PJP, can you confirm that this fixes your uses? Samuel Samuel Thibault, on sam. 26 août 2017 00:37:21 +0200, wrote: > The if_fastq and if_batchq contain not only packets, but queues of packets > for the same socket. When sofree frees a socket, it thus has to clear

[Qemu-devel] [PATCH] slirp: fix clearing ifq_so from pending packets

2017-08-25 Thread Samuel Thibault
The if_fastq and if_batchq contain not only packets, but queues of packets for the same socket. When sofree frees a socket, it thus has to clear ifq_so from all the packets from the queues, not only the first. Signed-off-by: Samuel Thibault <samuel.thiba...@ens-lyon.org> Acked-by: Ph

Re: [Qemu-devel] A use-after-free in slirp

2017-08-24 Thread Samuel Thibault
Hello, Thanks for the reproducer you sent me offline. Here is a fix which makes a lot of sense and fixes the reproducer. Could you try it with your whole testcase? Could somebody also review the patch? Samuel commit 1a3a763509fad895c907e6978ea034a5c19ee370 Author: Samuel Thibault

Re: [Qemu-devel] A use-after-free in slirp

2017-08-23 Thread Samuel Thibault
Hello, P J P, on jeu. 03 août 2017 17:45:06 +0530, wrote: > ==31922==ERROR: AddressSanitizer: heap-use-after-free on address > 0x6141ff8c at pc 0x56485de28ea0 bp 0x7f00f44fc950 sp 0x7f00f44fc940 > READ of size 4 at 0x6141ff8c thread T2 > #0 0x56485de28e9f in if_start slirp/if.c:230 >

Re: [Qemu-devel] SLIRP warning messages displayed while compiling

2017-08-12 Thread Samuel Thibault
Eric Blake, on sam. 12 août 2017 06:41:30 -0500, wrote: > Here's an idea: Instead of using struct ip6 { ... } QEMU_PACKED, use > > struct ip6 { > ... > }; > QEMU_BUG_ON(sizeof(struct ip6) != 32); That's an interesting way indeed. I however wonder whether there may be not-so-uncommon systems

Re: [Qemu-devel] SLIRP warning messages displayed while compiling

2017-08-12 Thread Samuel Thibault
Peter Maydell, on sam. 12 août 2017 12:18:16 +0100, wrote: > On 12 August 2017 at 12:04, Samuel Thibault <samuel.thiba...@gnu.org> wrote: > > Peter Maydell, on sam. 12 août 2017 11:53:20 +0100, wrote: > >> The utility of the warning is that it means you get told > >

Re: [Qemu-devel] SLIRP warning messages displayed while compiling

2017-08-12 Thread Samuel Thibault
Peter Maydell, on sam. 12 août 2017 11:53:20 +0100, wrote: > The utility of the warning is that it means you get told > about stuff that might break on other architectures. Sure, I understand that. But here all fields are aligned on their size inside the packed structure. So there can't be

Re: [Qemu-devel] SLIRP warning messages displayed while compiling

2017-08-11 Thread Samuel Thibault
Hello, Programmingkid, on jeu. 10 août 2017 16:44:19 -0400, wrote: > While compiling I saw these error messages: > > slirp/ip6_icmp.c:79:32: warning: taking address of packed member 'ip_src' of > class or > structure 'ip6' may result in an unaligned pointer value >

[Qemu-devel] [PULL 0/2] slirp updates

2017-08-02 Thread Samuel Thibault
/~sthibault/qemu.git tags/samuel-thibault for you to fetch changes up to 413d463f43fbc4dd3a601e80a5724aa384a265a0: slirp: check len against dhcp options array end (2017-08-03 00:26:44 +0200) slirp updates

Re: [Qemu-devel] [PULL 2/2] slirp: check len against dhcp options array end

2017-08-02 Thread Samuel Thibault
Samuel Thibault, on jeu. 03 août 2017 00:26:07 +0200, wrote: > From: Prasad J Pandit <p...@fedoraproject.org> > > While parsing dhcp options string in 'dhcp_decode', if an options' > length 'len' appeared towards the end of 'bp_vend' array, ensuing > read could lead to an OO

[Qemu-devel] [PULL 1/2] slirp: fill error when failing to initialize user network

2017-08-02 Thread Samuel Thibault
network Signed-off-by: Hervé Poussineau <hpous...@reactos.org> Signed-off-by: Samuel Thibault <samuel.thiba...@ens-lyon.org> --- net/slirp.c | 134 ++-- 1 file changed, 94 insertions(+), 40 deletions(-) diff --git a/net/slirp.c b/

[Qemu-devel] [PULL 2/2] slirp: check len against dhcp options array end

2017-08-02 Thread Samuel Thibault
: Reno Robert <renorob...@gmail.com> Signed-off-by: Prasad J Pandit <p...@fedoraproject.org> Signed-off-by: Samuel Thibault <samuel.thiba...@ens-lyon.org> --- slirp/bootp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/slirp/bootp.c b/slirp/bootp.c index 5a4646c182..5dd1a

[Qemu-devel] [PULL 1/2] slirp: fill error when failing to initialize user network

2017-08-02 Thread Samuel Thibault
network Signed-off-by: Hervé Poussineau <hpous...@reactos.org> Signed-off-by: Samuel Thibault <samuel.thiba...@ens-lyon.org> --- net/slirp.c | 134 ++-- 1 file changed, 94 insertions(+), 40 deletions(-) diff --git a/net/slirp.c b/

[Qemu-devel] [PULL 0/2] slirp updates

2017-08-02 Thread Samuel Thibault
/~sthibault/qemu.git tags/samuel-thibault for you to fetch changes up to 2fe00b96b750f8c7a48dd3a98c5cb7370947264e: slirp: check len against dhcp options array end (2017-08-03 00:24:31 +0200) slirp updates

[Qemu-devel] [PULL 2/2] slirp: check len against dhcp options array end

2017-08-02 Thread Samuel Thibault
gmail.com> Signed-off-by: Prasad J Pandit <p...@fedoraproject.org> Signed-off-by: Samuel Thibault <samuel.thiba...@ens-lyon.org> --- slirp/bootp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/slirp/bootp.c b/slirp/bootp.c index 5a4646c182..5dd1a415b5 100644 --- a/slirp/boo

Re: [Qemu-devel] [PATCH] slirp: check len against dhcp options array end

2017-07-17 Thread Samuel Thibault
Reno Robert, on lun. 17 juil. 2017 23:10:02 +0530, wrote: > +if (p + len > p_end) { > > Shouldn't this be (p + len >= p_end) ? No: if p_end-p is 1, len being 1 is fine. Samuel

Re: [Qemu-devel] [PATCH] slirp: check len against dhcp options array end

2017-07-17 Thread Samuel Thibault
P J P, on lun. 17 juil. 2017 17:33:26 +0530, wrote: > From: Prasad J Pandit > > While parsing dhcp options string in 'dhcp_decode', if an options' > length 'len' appeared towards the end of 'bp_vend' array, ensuing > read could lead to an OOB memory access issue. Add

Re: [Qemu-devel] [PATCH] slirp: fill error when failing to initialize user network

2017-07-15 Thread Samuel Thibault
HEllo, Hervé Poussineau, on sam. 15 juil. 2017 18:43:50 +0200, wrote: > With "-netdev user,id=net0,dns=1.2.3.4" > error was: > qemu-system-i386: -netdev user,id=net0,dns=1.2.3.4: Device 'user' could not > be initialized > > Error is now: > qemu-system-i386: -netdev user,id=net0,dns=1.2.3.4: DNS

[Qemu-devel] [PULL 1/4] slirp: use DIV_ROUND_UP

2017-07-15 Thread Samuel Thibault
From: Marc-André Lureau <marcandre.lur...@redhat.com> I used the clang-tidy qemu-round check to generate the fix: https://github.com/elmarco/clang-tools-extra Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Signed-off-by: Samuel Thibault <samuel.thiba...@ens-lyon.

[Qemu-devel] [PULL 0/4] slirp updates

2017-07-15 Thread Samuel Thibault
/~sthibault/qemu.git tags/samuel-thibault for you to fetch changes up to 75cb298d905030fca897ea1d80e409c7f7e3e5ea: slirp: Handle error returns from sosendoob() (2017-07-15 14:28:25 +0200) slirp updates

[Qemu-devel] [PULL 3/4] slirp: Handle error returns from slirp_send() in sosendoob()

2017-07-15 Thread Samuel Thibault
tually written. (None of the callers check this return value currently, though.) Signed-off-by: Peter Maydell <peter.mayd...@linaro.org> Reviewed-by: Dr. David Alan Gilbert <dgilb...@redhat.com> Signed-off-by: Samuel Thibault <samuel.thiba...@ens-lyon.org>

[Qemu-devel] [PULL 4/4] slirp: Handle error returns from sosendoob()

2017-07-15 Thread Samuel Thibault
return value -- we should handle a write failure in sosendoob() the same way we handle a write failure for the normal data. Signed-off-by: Peter Maydell <peter.mayd...@linaro.org> Reviewed-by: Dr. David Alan Gilbert <dgilb...@redhat.com> Signed-off-by: Samuel Thibault <samuel.

[Qemu-devel] [PULL 2/4] slirp: fork_exec(): Don't close() a negative number in fork_exec()

2017-07-15 Thread Samuel Thibault
Peter Maydell <peter.mayd...@linaro.org> Reviewed-by: Dr. David Alan Gilbert <dgilb...@redhat.com> Signed-off-by: Samuel Thibault <samuel.thiba...@ens-lyon.org> --- slirp/misc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/slirp/misc.c b/slirp/misc.c inde

Re: [Qemu-devel] [PATCH v2 2/2] slirp: Handle error returns from sosendoob()

2017-07-15 Thread Samuel Thibault
Dr. David Alan Gilbert, on ven. 14 juil. 2017 15:24:19 +0100, wrote: > * Peter Maydell (peter.mayd...@linaro.org) wrote: > > sosendoob() can return a failure code, but all its callers ignore it. > > This is OK in sbappend(), as the comment there states -- we will try > > again later in sowrite().

Re: [Qemu-devel] [1/2] slirp: Handle error returns from slirp_send() in sosendoob()

2017-07-11 Thread Samuel Thibault
Peter Maydell, on lun. 05 juin 2017 17:19:35 +0100, wrote: > The code in sosendoob() assumes that slirp_send() always > succeeds, but it might return an OS error code (for instance > if the other end has disconnected). Catch these and return > the caller either -1 on error or the number of urgent

Re: [Qemu-devel] [2/2] slirp: Handle error returns from sosendoob()

2017-07-11 Thread Samuel Thibault
Peter Maydell, on lun. 05 juin 2017 17:19:36 +0100, wrote: > diff --git a/slirp/socket.c b/slirp/socket.c > index a17caa9..84cf13a 100644 > --- a/slirp/socket.c > +++ b/slirp/socket.c > @@ -404,7 +404,14 @@ sowrite(struct socket *so) > DEBUG_ARG("so = %p", so); > > if (so->so_urgc) {

Re: [Qemu-devel] [PATCH] slirp: fork_exec(): Don't close() a negative number in fork_exec()

2017-07-11 Thread Samuel Thibault
Peter Maydell, on dim. 09 juil. 2017 18:54:22 +0100, wrote: > In a fork_exec() error path we try to closesocket(s) when s might > be a negative number because the thing that failed was the > qemu_socket() call. Add a guard so we don't do this. > > (Spotted by Coverity: CID 1005727 issue 1 of 2.)

Re: [Qemu-devel] [PATCH 0/2] slirp: handle errors in sosendoob()

2017-07-09 Thread Samuel Thibault
Peter Maydell, on dim. 09 juil. 2017 22:21:01 +0100, wrote: > Ping^2 ? I'm sorry I'm still too busy ATM, it's still far in my mbox. Samuel

Re: [Qemu-devel] [PATCH 12/31] slirp: use DIV_ROUND_UP

2017-06-22 Thread Samuel Thibault
Marc-André Lureau, on jeu. 22 juin 2017 14:41:45 +0200, wrote: > I used the clang-tidy qemu-round check to generate the fix: > https://github.com/elmarco/clang-tools-extra > > Signed-off-by: Marc-André Lureau Applied to my tree, thanks! > --- > slirp/ip6.h | 6

[Qemu-devel] [PULL 0/3] slirp updates

2017-05-27 Thread Samuel Thibault
The following changes since commit 9964e96dccf7f7c936ee854a795415d19b60: Merge remote-tracking branch 'jasowang/tags/net-pull-request' into staging (2017-05-23 15:01:31 +0100) are available in the git repository at: http://people.debian.org/~sthibault/qemu.git tags/samuel-thibault

[Qemu-devel] [PULL 3/3] Fix total IP header length in forwarded TCP packets

2017-05-27 Thread Samuel Thibault
en <sj...@sjorsgielen.nl> Signed-off-by: Samuel Thibault <samuel.thiba...@ens-lyon.org> --- slirp/tcp_subr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/slirp/tcp_subr.c b/slirp/tcp_subr.c index ed16e1807f..dc8b4bbb50 100644 --- a/slirp/tcp_subr.c +++

[Qemu-devel] [PULL 1/3] slirp: Fix wrong mss bug.

2017-05-27 Thread Samuel Thibault
From: Tao Wu <ytht@gmail.com> This bug was introduced by https://github.com/qemu/qemu/commit/98c6305 Signed-off-by: Tao Wu <lep...@google.com> Reviewed-by: Philippe Mathieu-Daudé <f4...@amsat.org> Signed-off-bu: Samuel Thibault <samuel.thiba...@ens-lyon.org> --

[Qemu-devel] [PULL 2/3] slirp: fix leak

2017-05-27 Thread Samuel Thibault
m> Signed-off-by: Samuel Thibault <samuel.thiba...@ens-lyon.org> --- slirp/socket.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/slirp/socket.c b/slirp/socket.c index 86927722e1..3b49a69a93 100644 --- a/slirp/socket.c +++ b/slirp/socket.c @@ -100,6 +100,9 @@ sofree(struct so

Re: [Qemu-devel] [PATCH] [SLIRP] Fix total IP header length in forwarded TCP packets

2017-05-27 Thread Samuel Thibault
Sjors Gielen, on mer. 24 mai 2017 17:51:12 +, wrote: > When forwarding TCP packets, the internal tcpiphdr struct length was wrongly > used inside the IP header. This commit changes the behaviour to what is used > by tcp_output.c, using the correct full IP header + payload length. Indeed,

Re: [Qemu-devel] [PATCH] migration: remove register_savevm()

2017-05-24 Thread Samuel Thibault
have to free it then. > > Signed-off-by: Laurent Vivier <lviv...@redhat.com> Acked-by: Samuel Thibault <samuel.thiba...@ens-lyon.org> > --- > hw/net/vmxnet3.c| 8 ++-- > hw/s390x/s390-skeys.c | 9 +++-- > hw/s390x/s390-virtio-ccw.c | 8 ++

Re: [Qemu-devel] [PATCH v2] tests/libqtest: Print error instead of aborting when env variable is missing

2017-05-23 Thread Samuel Thibault
Thomas Huth, on mar. 23 mai 2017 09:25:30 +0200, wrote: > > /tmp/qemu-test/src/slirp/tcp_input.c: In function ‘tcp_input’: > > /tmp/qemu-test/src/slirp/tcp_input.c:219: warning: ‘save_ip.ip_p’ may be > > used uninitialized in this function > > I've never seen these warnings in tcp_input.c before

Re: [Qemu-devel] [PATCH v5 0/1] slirp: add SOCKS5 support

2017-05-09 Thread Samuel Thibault
Hello, Laurent Vivier, on mar. 09 mai 2017 21:31:11 +0200, wrote: > This patch implements the SOCKS5 client part for "-net user" backend. Thanks for the changes! It seems from the bot result that windows doesn't define in_port_t. Could you post a revised patch which uses sizeof(uint16_t)

Re: [Qemu-devel] [PATCH v4 1/1] slirp: add SOCKS5 support

2017-05-09 Thread Samuel Thibault
Hello, Laurent Vivier, on mar. 09 mai 2017 09:21:09 +0200, wrote: > Le 08/05/2017 à 22:09, Samuel Thibault a écrit : > > Laurent Vivier, on sam. 06 mai 2017 15:19:44 +0200, wrote: > >>> Laurent Vivier, on sam. 06 mai 2017 00:48:33 +0200, wrote: > >>

Re: [Qemu-devel] [PATCH v4 1/1] slirp: add SOCKS5 support

2017-05-08 Thread Samuel Thibault
Hello, Laurent Vivier, on sam. 06 mai 2017 15:19:44 +0200, wrote: > > Laurent Vivier, on sam. 06 mai 2017 00:48:33 +0200, wrote: > >> @@ -617,6 +622,10 @@ void slirp_pollfds_poll(GArray *pollfds, int > >> select_error) > >> * Check sockets for reading > >> */

Re: [Qemu-devel] [PATCH 1/1] slirp: don't zero ti_i since we acccess it later.

2017-05-08 Thread Samuel Thibault
Hello, lepton, on lun. 08 mai 2017 12:08:55 -0700, wrote: > 1.  For some reason, caller didn't setup anything in tcpiphdr, so there is > random data inside it. > 2.  For some reason, caller setup correct src/dst address in tcpiphdr but > don't > zero ix_h1 > If you still think this doesn't look

Re: [Qemu-devel] dns server not working in QEMU using usermode networking (SLIRP)

2017-05-06 Thread Samuel Thibault
FONNEMANN Mark, on sam. 06 mai 2017 04:18:52 +, wrote: > >That's so weird there's no packet log. Does your guest perhaps have the > >strace tool? Or perhaps you >can manage to copy it over from another VM, > >since it only depends on libc. > > See attached file. Ok, so for some reason it

Re: [Qemu-devel] dns server not working in QEMU using usermode networking (SLIRP)

2017-05-05 Thread Samuel Thibault
FONNEMANN Mark, on sam. 06 mai 2017 01:06:31 +, wrote: > root@qemu:~# /initrd/bin/nslookup www.google.com 10.0.2.3 > Server:10.0.2.3 > Address 1: 10.0.2.3 > > nslookup: can't resolve 'www.google.com' That's so weird there's no

Re: [Qemu-devel] dns server not working in QEMU using usermode networking (SLIRP)

2017-05-05 Thread Samuel Thibault
FONNEMANN Mark, on sam. 06 mai 2017 00:33:40 +, wrote: > >The attached patch should be dumping the same kind of information. > > Nslookup does not produce any output in curses or in logfile (-D logfile.txt). Uh. So qemu can't be the culprit since it doesn't receive anything :) >

Re: [Qemu-devel] [PATCH v5 4/5] slirp: fix leak

2017-05-05 Thread Samuel Thibault
Applied to my tree, thanks!

Re: [Qemu-devel] [PATCH v4 1/1] slirp: add SOCKS5 support

2017-05-05 Thread Samuel Thibault
Hello, Laurent Vivier, on sam. 06 mai 2017 00:48:33 +0200, wrote: > @@ -617,6 +622,10 @@ void slirp_pollfds_poll(GArray *pollfds, int > select_error) > * Check sockets for reading > */ > else if (revents & (G_IO_IN | G_IO_HUP | G_IO_ERR)) { >

Re: [Qemu-devel] dns server not working in QEMU using usermode networking (SLIRP)

2017-05-05 Thread Samuel Thibault
FONNEMANN Mark, on ven. 05 mai 2017 22:38:20 +, wrote: > >Could you run tcpdump inside the guest so we are sure what the nslookup call > >emits? > > Is there another way to determine this info? My guest OS is an embedded > system with BusyBox 1.25 and not much else. The attached patch

Re: [Qemu-devel] [PATCH 1/1] slirp: don't zero ti_i since we acccess it later.

2017-05-04 Thread Samuel Thibault
Hello, lepton, on mer. 03 mai 2017 11:35:05 -0700, wrote: > It sounds like a bug that  caller set up a > right src and dst address and without set right ih_x1. I wouldn't bet on that. ih_x1 is only a filler, the caller can be using the structure only as a C structure, and it's only here just

Re: [Qemu-devel] dns server not working in QEMU using usermode networking (SLIRP)

2017-04-30 Thread Samuel Thibault
FONNEMANN Mark, on dim. 30 avril 2017 12:42:41 +, wrote: > root@qemu:~# nslookup www.google.com >*** Unknown host > >nslookup: www.google.com: Unknown host Could you run tcpdump inside the guest so we are sure what the nslookup call emits? Samuel

Re: [Qemu-devel] dns server not working in QEMU using usermode networking (SLIRP)

2017-04-30 Thread Samuel Thibault
FONNEMANN Mark, on sam. 29 avril 2017 23:15:08 +, wrote: > [mfonnemann@desktopPC qemu]$ /usr/local/bin/qemu-system-i386 -display curses > -readconfig NG.cfg --enable-kvm Could you show us your NG.cfg, your guest /sbin/ifconfig and /sbin/route output and /etc/resolv.conf content for that

Re: [Qemu-devel] dns server not working in QEMU using usermode networking (SLIRP)

2017-04-29 Thread Samuel Thibault
FONNEMANN Mark, on sam. 29 avril 2017 20:06:09 +, wrote: > [mfonnemann@localhost qemu]$ /usr/local/bin/qemu-system-i386 -display curses > -readconfig qemu.cfg -D logfile Ah, you are using curses... I've been putting logs onto stderr for simplicity, not the proper qemu logs. Here is a fixed

Re: [Qemu-devel] dns server not working in QEMU using usermode networking (SLIRP)

2017-04-29 Thread Samuel Thibault
FONNEMANN Mark, on sam. 29 avril 2017 18:25:26 +, wrote: > 0 packets received by filter Ok, so nothing going out from qemu. Could you try to apply the attached patch to qemu-2.9 and see what it makes qemu print when you resolve a domain from the guest? Samuel --- a/slirp/socket.c +++

Re: [Qemu-devel] dns server not working in QEMU using usermode networking (SLIRP)

2017-04-29 Thread Samuel Thibault
FONNEMANN Mark, on sam. 29 avril 2017 15:32:35 +, wrote: > >When running with a Linux host (since that's what I'm most familiar with), > >what do you have in /etc/resolv.conf? > > [mfonnemann@localhost ~]$ cat /etc/resolv.conf > # Generated by NetworkManager > nameserver 4.2.2.1 > nameserver

[Qemu-devel] [PULL 8/9] slirp: VMStatify socket level

2017-04-29 Thread Samuel Thibault
vid Alan Gilbert <dgilb...@redhat.com> Signed-off-by: Samuel Thibault <samuel.thiba...@ens-lyon.org> --- slirp/slirp.c | 219 + slirp/socket.h | 6 +- 2 files changed, 145 insertions(+), 80 deletions(-) diff --git a/slirp/s

[Qemu-devel] [PULL 9/9] slirp: VMStatify remaining except for loop

2017-04-29 Thread Samuel Thibault
From: "Dr. David Alan Gilbert" <dgilb...@redhat.com> This converts the remaining components, except for the top level loop, to VMState. Signed-off-by: Dr. David Alan Gilbert <dgilb...@redhat.com> Reviewed-by: Juan Quintela <quint...@redhat.com> Signed-off-by: Samuel T

[Qemu-devel] [PULL 5/9] slirp: VMState conversion; tcpcb

2017-04-29 Thread Samuel Thibault
n Gilbert <dgilb...@redhat.com> Reviewed-by: Samuel Thibault <samuel.thiba...@ens-lyon.org> Reviewed-by: Juan Quintela <quint...@redhat.com> Signed-off-by: Samuel Thibault <samuel.thiba...@ens-lyon.org> --- slirp/slirp.c | 149 --

[Qemu-devel] [PULL 6/9] slirp: VMStatify sbuf

2017-04-29 Thread Samuel Thibault
iewed-by: David Gibson <da...@gibson.dropbear.id.au> Reviewed-by: Juan Quintela <quint...@redhat.com> Signed-off-by: Samuel Thibault <samuel.thiba...@ens-lyon.org> --- slirp/sbuf.h | 4 +- slirp/slirp.c | 116 ++ 2 files

[Qemu-devel] [PULL 7/9] slirp: Common lhost/fhost union

2017-04-29 Thread Samuel Thibault
d-by: Philippe Mathieu-Daudé <f4...@amsat.org> Reviewed-by: Juan Quintela <quint...@redhat.com> Signed-off-by: Samuel Thibault <samuel.thiba...@ens-lyon.org> --- slirp/socket.h | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/slirp/so

[Qemu-devel] [PULL 4/9] slirp: fix pinging the virtual ipv4 DNS server

2017-04-29 Thread Samuel Thibault
so that people do not think it is not working at least basically. Signed-off-by: Samuel Thibault <samuel.thiba...@ens-lyon.org> --- slirp/ip_icmp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/slirp/ip_icmp.c b/slirp/ip_icmp.c index 5ffc7a683d..0b667a429a

<    4   5   6   7   8   9   10   11   12   13   >