GSoC 2017: Porting LwIP to the Hurd

2017-03-17 Thread Joan Lledó
Hello, My name is Joan Lledó, I'm in the last year of my degree in CS at the Open University of Catalonia[1]. I'm interested in OS programming and, for now, I have only read theory and have made university exercises in ths field. That's why I see GSoC as a good chance to work in a real project

Fwd: GSoC 2017: Porting LwIP to the Hurd

2017-04-08 Thread Joan Lledó
with the Linux stack. Maybe we should create this library so we don't need to recompile the translator when updating LwIP. Thanks for the link! 2017-04-07 12:54 GMT+02:00 Thomas Schwinge <tho...@codesourcery.com>: > Hi! > > On Fri, 17 Mar 2017 08:31:37 +0100, Joan Lledó <joanlluisll...@g

Re: [GSoC 2017] Number fo sockets

2017-08-13 Thread Joan Lledó
> Too bad there is no lwip_poll function. > Might the LwIP folks be amenable to adding one? Yes, they talked about that in their mailing list[1]. > Your size calculations seem wrong. > glibc defines fd_mask = __fd_mask = long int. > FD_SETSIZE is the number of bits that fit in fd_set. > But then

Re: [GSoC 2017] Number fo sockets

2017-08-15 Thread Joan Lledó
Hello Kalle, I've applied and tested your patches and seem to be working fine. The translator is now using lwip_poll() instead of lwip_select(). I've pushed the changes to github. Thank you very much.

[GSoC 2017] Number fo sockets

2017-08-12 Thread Joan Lledó
As I mentioned in my previous post about ioctl operations[1], LwIP establishes a maximum limit of sockets, which is a big problem for a system like the Hurd. Now I've finished all tasks in my initial proposal, I thought it was a good idea to spend some time studying this issue and trying to find a

Re: [GSoC 2017] Number fo sockets

2017-08-17 Thread Joan Lledó
Hello again Kalle, I've got a question about your patch. Why did you say io_select without a thread per socket would require a different solution? I'm studying the patch b/c I'd like to send it to lwip maintainers, and don't find the problem. 2017-08-15 9:50 GMT+02:00 Joan Lledó <joanllui

[GSoC 2017] Multithreading

2017-07-09 Thread Joan Lledó
After finishing with IPv6, I spent the last week fixing some bugs, mainly those related with multithreading. This is an issue I never thought on until now, and turned up to be a real mess. I shall give you a summary. First, LwIP has a main thread called "tcpip_thread" where the stack is actually

Re: [GSoC 2017] Multithreading

2017-07-10 Thread Joan Lledó
2017-07-10 10:30 GMT+02:00 Richard Braun <rbr...@sceen.net>: > On Sun, Jul 09, 2017 at 10:18:05PM +0200, Joan Lledó wrote: >> However, after all the pending threads still were not being canceled. >> The problem here was that the standard function where the thr

[GSoC 2017] ioctl operations

2017-07-15 Thread Joan Lledó
One of the pending tasks in my TODO since the beginning of the project was implementing the operations of the iioctl interface and other interfaces if needed. The iioctl interface is the responsible for servicing the ioctl requests[1] that have a socket as first parameter. Besides, pfinet also

[GSoC 2017] Ifupdown

2017-07-23 Thread Joan Lledó
When we tried to configure the stack with ifupdown during the boot we found two problems. Fist, the system failed to find the loopback interface to give it an address, and second, the DHCP client wasn't able to get the MAC address of the interfaces it was trying to configure. For doing these

[GSoC 2017] IPv6

2017-07-02 Thread Joan Lledó
Adding support for IPv6 has took most of my time this week, and part of the previous one, but it's done and now I can say the LwIP server supports IPv6 :). Specifically, these items are implemented: - Automatic assignation of link-local addresses. - Automatic auto-configuration with SLAAC. -

Re: [GSoC 2017] Support for fsysopts and multiple interfaces

2017-06-29 Thread Joan Lledó
on it until now, > partly because of some email problems, and partly because I haven't been > working on Hurd for the last six months or so. > > On Mon, Jun 26, 2017 at 7:28 AM, Joan Lledó <joanlluisll...@gmail.com> > wrote: >> >> I've advanced in several front

Filtering Ethernet multicasr frames

2017-06-28 Thread Joan Lledó
Hello, finally I've managed to fix the problem with IPv6 in my LwIP translator, and the problem was that the driver was discarding some Ethernet multicast frames. I've fixed it by enabling the IFF_ALLMULTI flag through device_set_status(), that is, now there is no filtering and all multicast

[GSoC 2017] Point-to-point

2017-08-06 Thread Joan Lledó
The last item in my initial TODO list was implementing the --peer option available in pfinet. This week I've been working on it and it's now done, so I can say the LwIP translator is now able to replace pfinet. The --peer option is provided by pfinet for setting the peer's address in a

[GSoC 2017] Misc

2017-07-31 Thread Joan Lledó
At this time, the only functionality provided by pfinet and pending to be implemented in the LwIP translator is the --peer options, everything else is done. From now on, most of the work will consist on polishing and fixing bugs, so I'll probably talk about many different topics in each post. The

Re: [GSoC 2017] Point-to-point

2017-08-06 Thread Joan Lledó
2017-08-06 19:03 GMT+02:00 Justus Winter <jus...@gnupg.org>: > Joan Lledó <joanlluisll...@gmail.com> writes: > >> The last item in my initial TODO list was implementing the --peer >> option available in pfinet. This week I've been working on it and it's >

[GSoC 2017] Support for fsysopts and multiple interfaces

2017-06-26 Thread Joan Lledó
I've advanced in several fronts during the last two weeks, like the initial configuration of the stack from the command line, by using libargp, or reading and writing a new configuration in run time, through fsysopts. The aim is to support exactly the same options pfinet does, so we'll be able to

Re: [GSoC 2017] Support for fsysopts and multiple interfaces

2017-06-27 Thread Joan Lledó
2017-06-27 13:53 GMT+02:00 Joan Lledó <joanlluisll...@gmail.com>: > Hi! > > 2017-06-27 1:19 GMT+02:00 Samuel Thibault <samuel.thiba...@gnu.org>: >> Hello, >> >> Joan Lledó, on lun. 26 juin 2017 13:28:47 +0200, wrote: >>> As a curious factor, it's wo

A blog about my GSoC project

2017-05-30 Thread Joan Lledó
Hello, Justus suggested me to create a blog to document my progress in my GSoC project. I'm going to paste here the first post where I talk about how I started to work in the prototype. You can find the blog at http://blogs.uoc.edu/jlledom/ Regards. Last summer I started to

[GSoC 2017] Work done so far

2017-06-06 Thread Joan Lledó
It's useful to make a review of the work done in the last months and list some of the problems arisen during this period. The process of writing the sockets and I/O operations have been quite straightforward. Most of actions performed by pfinet's operations are already implemented by LwIP, this

Re: [GSoC 2017] Work done so far

2017-06-06 Thread Joan Lledó
2017-06-06 19:23 GMT+02:00 Justus Winter <jus...@gnupg.org>: > Hi :) > > Joan Lledó <joanlluisll...@gmail.com> writes: > >> It's useful to make a review of the work done in the last months and >> list some of the problems arisen during this period.

Re: [GSoC 2017] Support for fsysopts and multiple interfaces

2017-06-27 Thread Joan Lledó
Hi! 2017-06-27 1:19 GMT+02:00 Samuel Thibault <samuel.thiba...@gnu.org>: > Hello, > > Joan Lledó, on lun. 26 juin 2017 13:28:47 +0200, wrote: >> As a curious factor, it's worth mentioning that pfinet had >> a memory leak that I could manage to fix. > > Could you

Re: [PATCH] eth-multiplxer: Implement ds_device_close()

2017-09-22 Thread Joan Lledó
> Please confirm that eth-multiplexer does not die. It doesn't, see [1] > MIG_SERVER_DIED is generated by the mig-generated client stubs when the > replies message id does not matche the expected id, but > MACH_NOTIFY_SEND_ONCE. This message is generated by the kernel if a > send-once right is

[PATCH] eth-multiplxer: Implement ds_device_close()

2017-09-20 Thread Joan Lledó
Hello, One difference between pfinet and lwip translators is that pfinet doesn't delete interfaces (or I haven't found how to do it) while lwip does. For instance, if one starts pfinet with: settrans -fga /servers/socket/2 /hurd/pfinet -i /dev/eth1 -a 192.168.123.178 -m 255.255.255.0 -g

Re: [PATCH] eth-multiplxer: Implement ds_device_close()

2017-09-20 Thread Joan Lledó
Ooops!! I forgot that! :) 2017-09-20 20:06 GMT+02:00 James Clarke <jrt...@jrtc27.com>: > On 20 Sep 2017, at 11:08, Joan Lledó <joanlluisll...@gmail.com> wrote: >> >> --- >> eth-multiplexer/Makefile | 2 +- >> eth-multiplexer/device_impl.c | 5 +

[PATCH] eth-multiplxer: Implement ds_device_close()

2017-09-20 Thread Joan Lledó
--- eth-multiplexer/Makefile | 2 +- eth-multiplexer/device_impl.c | 5 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/eth-multiplexer/Makefile b/eth-multiplexer/Makefile index cefa0abd..2b19de6d 100644 --- a/eth-multiplexer/Makefile +++ b/eth-multiplexer/Makefile @@

DHCP client

2017-09-11 Thread Joan Lledó
Hello, In my tests on the lwip translator, I've observed that the DHCP client sets the interface address to 255.255.255.255 before sending the DHCPDISCOVER messages. I found the source of this behaviour in the dhclient-script[1]. The script executes "fsysopts /servers/socket/2 -i ${interface}"

Re: DHCP client

2017-09-11 Thread Joan Lledó
> > It looks odd not to specify explicitly -a 0.0.0.0, can't we do that? Yes, "-a" is equivalent to "-a 0.0.0.0 -m 255.0.0.0". Both options are good. > Otherwise it looks good to me, please submit a patch to the > corresponding upstream & Debian maintainers :) I'm a bit lost here. Is it enough

[PATCH] LwIP translator

2017-09-06 Thread Joan Lledó
ck_user *make_sock_user (struct socket *, int, int, int); +error_t make_sockaddr_port (int, int, mach_port_t *, mach_msg_type_name_t *); + +void init_ifs (void *); + +/* Install portclass on node NAME. */ +void translator_bind (int portclass, const char *name); + +#endif diff --git a/lwip/lwip-uti

[PATCH] LwIP translator

2017-09-06 Thread Joan Lledó
This patch includes some refactoring in the device modules to remove borrowed code from lwip.

[PATCH] LwIP translator

2017-08-24 Thread Joan Lledó
I made some changes to conditionally build the lwip translator depending on whether liblwip is installed.

[PATCH] LwIP translator

2017-08-24 Thread Joan Lledó
k_user (struct socket *, int, int, int); +error_t make_sockaddr_port (int, int, mach_port_t *, mach_msg_type_name_t *); + +void init_ifs (void *); + +/* Install portclass on node NAME. */ +void translator_bind (int portclass, const char *name); + +#endif diff --git a/lwip/lwip-util.c b/lwip/lwip-util.c n

[GSoC 2017] LwIP translator

2017-08-26 Thread Joan Lledó
Dear Hurd developers, The Google Summer of Code is about to end and it is time to summarize my work on the lwip translator. The initial goal of the project was to provide a translator able to replace pfinet, that means providing at least the next functions: - Support for IPv4 and IPv6 - Support

[PATCH] LwIP translator

2017-08-23 Thread Joan Lledó
Hello, This is the LwIP translator I wrote during my GSoC. The translator uses LwIP as a regular library and therefore the stack sources are not included in the patch. The lwip external libary may be downloaded from [1] or cloned from [2]. Regards, Joan -- [1]

Re: [GSoC 2017] Number fo sockets

2017-08-23 Thread Joan Lledó
> > I meant the S_io_select and S_io_select_timeout functions should > be able to return without replying to the RPC, if the socket is > not immediately ready. They would instead put the RPC in a > queue, and if the socket later becomes ready, another thread > would remove the RPC from the queue

[PATCH] LwIP translator

2017-08-23 Thread Joan Lledó
_release (struct socket *); + +void clean_addrport (void *); +void clean_socketport (void *); + +struct sock_user *make_sock_user (struct socket *, int, int, int); +error_t make_sockaddr_port (int, int, mach_port_t *, mach_msg_type_name_t *); + +void init_ifs (void *); + +/* Install portclass on

Re: [PATCH] LwIP translator

2017-08-25 Thread Joan Lledó
>> # Whether we found libgcrypt. >> HAVE_LIBGCRYPT = @HAVE_LIBGCRYPT@ >> >> +# Whether we found libgcrypt. > > Copy-paste error :) > Ops!, yes... you've got a sharp eye!

Re: [GSoC 2017] Number fo sockets

2017-08-25 Thread Joan Lledó
> Instead of a linked list, how about using a dynamic array? > > https://en.wikipedia.org/wiki/Dynamic_array > > This would give you constant-time lookups, amortized constant time > insertions and deletions, and better data locality and cache behavior. > > What do you think? It's a good idea,

Re: [PATCH] LwIP translator

2017-10-18 Thread Joan Lledó
Hello Samuel, Thanks for taking your time reviewing my code. 2017-09-27 0:44 GMT+02:00 Samuel Thibault : >> +error_t >> +lwip_S_io_write (struct sock_user * user, >> + char *data, >> + size_t datalen, >> + off_t offset,

PCI Arbiter

2017-10-24 Thread Joan Lledó
Hi, yes, there was a misunderstanding as I didn't know what libhurduser was. Here're two new patches, now there's no libpciclient and libpciaccess uses libhurduser.

[PATCH] PCI Arbiter

2017-10-24 Thread Joan Lledó
--- Makefile | 1 + hurd/hurd_types.defs | 19 ++- hurd/hurd_types.h | 1 + hurd/paths.h | 1 + hurd/pci_conf.defs | 50 +++ hurd/subsystems| 1 + pci_arbiter/Makefile | 40 ++ pci_arbiter/config.h |

[PATCH] New module for the Hurd.

2017-10-24 Thread Joan Lledó
= pci_system_hurd_create(); +#elif defined(__CYGWIN__) err = pci_system_x86_create(); #else # error "Unsupported OS" diff --git a/src/hurd_pci.c b/src/hurd_pci.c new file mode 100644 index 000..cf0b1d6 --- /dev/null +++ b/src/hurd_pci.c @@ -0,0 +1,299 @@ +/* + * Copyright (c) 2017, Joan Lledó + *

[PATCH] LwIP translator

2017-11-12 Thread Joan Lledó
user (struct socket *, int, int, int); +error_t make_sockaddr_port (int, int, mach_port_t *, mach_msg_type_name_t *); + +void init_ifs (void *); + +/* Install portclass on node NAME. */ +void translator_bind (int portclass, const char *name); + +#endif diff --git a/lwip/lwip-util.c b/lwip/lwip-uti

[PATCH] LwIP translator

2017-11-12 Thread Joan Lledó
After working on the perl tests fails, I can say they are due to bugs in lwip, not in our server. I've already sent the bug reports. The attached patch includes all required changes in previous emails.

Re: [PATCH] LwIP translator

2017-12-18 Thread Joan Lledó
2017-12-18 14:46 GMT+01:00 Samuel Thibault : > Ok, but I don't see that base in your repository, the first commit > already has a lot of source code which is not in 2.0.1. Oh, yes. That's because I first imported all lwip 2.0.1 code to my lwip-hurd repository and made

Re: [PATCH] LwIP translator

2017-12-18 Thread Joan Lledó
Hello, 2017-12-18 2:32 GMT+01:00 Samuel Thibault : > Or are you actually based on another lwip? Yes, It's based in the version 2.0.1, as I started to work on this back in February. I plan to upgrade liblwip to the last version in a few months.

Re: [PATCH] LwIP translator

2017-12-18 Thread Joan Lledó
2017-12-18 17:28 GMT+01:00 Samuel Thibault : > BTW, your lwip code should probably be made BSD-licensed, just like the > rest of lwip. Mmm, I think I don't know what you mean, if I send patches to a BSD-licensed project, they are BSD too, right?

Re: [PATCH] LwIP translator

2017-12-19 Thread Joan Lledó
Hi, 2017-12-19 19:21 GMT+01:00 Samuel Thibault : > Is it not actually valid for posix systems in general? (except the > cond_wait thing which I patched over) That's what the port/ folder contains: - lwipopts.h is for configuring the stack parameters - cc.h is for

Re: [PATCH] LwIP translator

2017-12-19 Thread Joan Lledó
Hi Samuel, 2017-12-18 20:03 GMT+01:00 Samuel Thibault : > I am talking about the files you created in your repository, they are > hold a GPL copyright notice. I guess at some point we will want to see > them maintained within lwip, and thus BSD-licensed. > I've been

[PATCH] PCI Arbiter

2017-12-03 Thread Joan Lledó
--- Makefile | 1 + hurd/hurd_types.defs | 19 +- hurd/hurd_types.h | 24 +- hurd/paths.h | 3 + hurd/pci.defs | 73 hurd/subsystems | 1 + pci-arbiter/Makefile | 44 +++ pci-arbiter/config.h | 5 +

[PATCH] New module for the Hurd.

2017-12-03 Thread Joan Lledó
(); +#elif defined(__CYGWIN__) err = pci_system_x86_create(); #else # error "Unsupported OS" diff --git a/src/hurd_pci.c b/src/hurd_pci.c new file mode 100644 index 000..10758c0 --- /dev/null +++ b/src/hurd_pci.c @@ -0,0 +1,492 @@ +/* + * Copyright (c) 2017, Joan Lledó + * Copyrigh

[PATCH] New access method: Hurd via RPCs

2017-12-03 Thread Joan Lledó
mode 100644 index 000..40aa067 --- /dev/null +++ b/lib/hurd.c @@ -0,0 +1,366 @@ +/* + * The PCI Library -- Hurd access via RPCs + * + * Copyright (c) 2017 Joan Lledó <jlle...@member.fsf.org> + * + * Can be freely distributed and used under the terms of the GNU GPL. + */ + +#d

PCI Arbiter

2017-12-03 Thread Joan Lledó
Hello Hurd, This is a new version of the PCI arbiter. Following are some features I've added the project over the last weeks. - A tiny libnetfs filesystem to expose a tree of devices. - For each virtual device, provide files to read/write its configuration space, regions an expansion rom. -

Re: [PATCH] LwIP translator

2017-10-29 Thread Joan Lledó
2017-10-22 17:25 GMT+02:00 Samuel Thibault : >> >> Unfortunately, lwip doesn't provide a lwip_ppoll() function. > > Ah, I saw it in lwipv6, I thought it was generally available. > > That being said, it'd be better to make the code already use struct > timespec, converting

Re: [PATCH] PCI Arbiter

2017-10-26 Thread Joan Lledó
Hi! 2017-10-20 15:18 GMT+02:00 Justus Winter : > > I'd suggest pci-arbiter. > Done. >> diff --git a/hurd/pci.defs b/hurd/pci.defs >> new file mode 100644 >> index ..d051bd69 >> --- /dev/null >> +++ b/hurd/pci.defs >> @@ -0,0 +1,50 @@ >> +/* Definitions for

Re: [PATCH] PCI Arbiter

2017-10-21 Thread Joan Lledó
Hi! 2017-10-20 15:18 GMT+02:00 Justus Winter <teyth...@avior.uberspace.de>: > Hi Joan :) > > let me be the first to say: Awesome :) > > Joan Lledó <joanlluisll...@gmail.com> writes: > >> Attached are two patches. The first one is to be applied to the Hurd >&

Re: GSoC TCP/IP webpage edit patch

2018-05-05 Thread Joan Lledó
Hi, > However lwip does not provide device drivers for ethernet or wireless chips. Mmm, that's true for wi-fi, but Ethernet is supported[1] and device drivers are provided by netdde. [1] https://git.savannah.gnu.org/cgit/hurd/hurd.git/tree/lwip/port/netif/hurdethif.c

Lwip Debian package

2018-04-28 Thread Joan Lledó
Hello Hurd, I've finished porting lwip 2.0.3 to the Hurd, and have some patches for the debian package at [1]. Should I send them here? [1] https://salsa.debian.org/debian/lwip

Fwd: GSoC TCP/IP webpage edit patch

2018-05-07 Thread Joan Lledó
Hello, > However, lwip uses the netdde device drivers for wireless chips, > which are old drivers from an old version of linux Does netdde provide drivers for any wireless card? I don't remember. Anyway, there's no difference between lwip and pfinet here, both need netdde for reaching a NIC, and

[PATCH] lwip translator: Remove unused reference to config.h

2018-05-02 Thread Joan Lledó
--- lwip/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/lwip/Makefile b/lwip/Makefile index c5f3c8cb..d0ddfd38 100644 --- a/lwip/Makefile +++ b/lwip/Makefile @@ -47,4 +47,3 @@ iioctl-MIGSFLAGS = -imacros $(srcdir)/mig-mutate.h # cpp doesn't automatically make dependencies for

Re: [PATCH 1/2] Add config.h to lwip translator

2018-05-02 Thread Joan Lledó
Yes, it worked. Attached is a patch for that removes that line. On the other hand, I saw this commit[1] in hurd upstream. It's a mistake, right? -- [1] https://git.savannah.gnu.org/cgit/hurd/hurd.git/commit/?id=05403a6e3a72c085e25b46c3173efde4cf64c21f

Lwip translator updates for working with lwip 2.0.3

2018-04-30 Thread Joan Lledó
I've got two patches for the lwip translator. The first patch only creates a new config.h file in the lwip/ folder. I'm not sure whether this is really required (should config.h be generated?) but I cannot compile the translator without it. So just ignore it if this is only my problem. The

[PATCH 2/2] Include required sockets headers

2018-04-30 Thread Joan Lledó
--- lwip/iioctl-ops.c | 1 + lwip/lwip-util.c| 1 + lwip/pfinet-ops.c | 2 ++ lwip/port/netif/hurdethif.c | 2 ++ 4 files changed, 6 insertions(+) diff --git a/lwip/iioctl-ops.c b/lwip/iioctl-ops.c index fcb7e872..6d3b6cb9 100644 --- a/lwip/iioctl-ops.c +++

[PATCH 1/2] Add config.h to lwip translator

2018-04-30 Thread Joan Lledó
--- lwip/config.h | 4 1 file changed, 4 insertions(+) create mode 100644 lwip/config.h diff --git a/lwip/config.h b/lwip/config.h new file mode 100644 index ..262e3590 --- /dev/null +++ b/lwip/config.h @@ -0,0 +1,4 @@ +#define __KERNEL__ 1 +#undef __SMP__ + +#define _HURD_

[PATCH] PCI Arbiter

2017-10-20 Thread Joan Lledó
--- Makefile | 2 + hurd/hurd_types.defs | 19 ++- hurd/hurd_types.h | 1 + hurd/paths.h | 1 + hurd/pci.defs | 50 +++ hurd/subsystems | 1 + libpciclient/Makefile | 29 libpciclient/pciclient.c | 103

PCI Arbiter

2017-10-20 Thread Joan Lledó
Hello, This is a first approach to a PCI arbiter for the Hurd. Attached are two patches. The first one is to be applied to the Hurd source tree and contains a new mig pci interface, the pci server and a new library which includes the mig client stubs. The second one is to be applied to the

[PATCH] PCI Arbiter

2018-01-16 Thread Joan Lledó
--- Makefile | 1 + hurd/hurd_types.defs | 19 +- hurd/hurd_types.h | 24 +- hurd/paths.h | 3 + hurd/pci.defs | 73 hurd/subsystems | 1 + pci-arbiter/Makefile | 44 +++ pci-arbiter/config.h | 5 +

[PATCH] New access method: Hurd via RPCs

2018-01-16 Thread Joan Lledó
mode 100644 index 000..c9581df --- /dev/null +++ b/lib/hurd.c @@ -0,0 +1,366 @@ +/* + * The PCI Library -- Hurd access via RPCs + * + * Copyright (c) 2017 Joan Lledó <jlle...@member.fsf.org> + * + * Can be freely distributed and used under the terms of the GNU GPL. + */ + +#d

PCI Arbiter

2018-01-16 Thread Joan Lledó
Hello, I've finished my thesis and this is the final code, there are no new features but I fixed some bugs I've found. > Mach actually provides a way to give a task the right for a given > range of I/O ports (i386_io_perm_cerate), so one could use that. Nice! > I don't think we want to spend

[PATCH] New module for the Hurd

2018-01-16 Thread Joan Lledó
(); +#elif defined(__CYGWIN__) err = pci_system_x86_create(); #else # error "Unsupported OS" diff --git a/src/hurd_pci.c b/src/hurd_pci.c new file mode 100644 index 000..abdcb0e --- /dev/null +++ b/src/hurd_pci.c @@ -0,0 +1,490 @@ +/* + * Copyright (c) 2017, Joan Lledó + * Copyrigh

Re: Question about protected payloads

2018-07-26 Thread Joan Lledó
> Very briefly, they are an optimization to avoid a lookup. Instead of > receiving a port name and looking up the associated object from it, > we use protected payloads, which are merely user-assigned arbitrary > values associated to ports, to store the address of the associated > object directly,

Re: [PATCH 4/4] lwip: Fix a buffer overflow and clear compiler warnings

2018-08-14 Thread Joan Lledó
Missatge de Samuel Thibault del dia dt., 14 d’ag. 2018 a les 9:34: > > - strncpy (in->dev_name, arg, DEV_NAME_LEN); > > + strncpy (in->dev_name, arg, sizeof(in->dev_name)-1); > > Mmm, but if arg is longer than the given size and doesn't contain a \0, > in->dev_name will not contain one

[PATCH 3/4] lwip: return EINTR when a select() IPC thread is cancelled

2018-08-07 Thread Joan Lledó
--- lwip/io-ops.c | 8 1 file changed, 8 insertions(+) diff --git a/lwip/io-ops.c b/lwip/io-ops.c index 1429bc55..72e08e26 100644 --- a/lwip/io-ops.c +++ b/lwip/io-ops.c @@ -198,6 +198,8 @@ lwip_io_select_common (struct sock_user *user, int timeout; struct pollfd fdp; nfds_t

[PATCH 4/4] lwip: Fix a buffer overflow and clear compiler warnings

2018-08-07 Thread Joan Lledó
--- lwip/options.c| 2 +- lwip/pfinet-ops.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lwip/options.c b/lwip/options.c index 6591ac52..d35b9f32 100644 --- a/lwip/options.c +++ b/lwip/options.c @@ -133,7 +133,7 @@ parse_opt (int opt, char *arg, struct argp_state

[PATCH 2/4] lwip: refactor main demuxer to avoid code duplication

2018-08-07 Thread Joan Lledó
--- lwip/main.c | 42 +++--- 1 file changed, 11 insertions(+), 31 deletions(-) diff --git a/lwip/main.c b/lwip/main.c index 9f7eb9b2..4dfbe143 100644 --- a/lwip/main.c +++ b/lwip/main.c @@ -99,6 +99,7 @@ int lwip_demuxer (mach_msg_header_t * inp,

[PATCH] Update patches

2018-08-07 Thread Joan Lledó
--git a/debian/patches/port b/debian/patches/port index c6c9d82..b0ab392 100644 --- a/debian/patches/port +++ b/debian/patches/port @@ -3,1022 +3,941 @@ Not intended to be upstream --- /dev/null +++ b/port/include/arch/cc.h @@ -0,0 +1,68 @@ -+/* -+ Copyright (C) 2017 Free Software Foundation,

Re: Lwip 2.0.3 patches

2018-08-07 Thread Joan Lledó
Hi, Attached is a patch to update our lwip library. About autoconf: > So your autoconf effort and that effort could probably be merged? They recently removed their unix library from their lwip-contrib repo, and are wroking on replacing GNU Autotools for CMake[1], so I don't think they are

[PATCH 1/4] lwip: select/poll(): return EIO when POLLERR is set

2018-08-07 Thread Joan Lledó
--- lwip/io-ops.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lwip/io-ops.c b/lwip/io-ops.c index 636c26f7..1429bc55 100644 --- a/lwip/io-ops.c +++ b/lwip/io-ops.c @@ -229,6 +229,9 @@ lwip_io_select_common (struct sock_user *user, if (ret > 0) { + if (fdp.revents &

Patches: lwip translator

2018-08-07 Thread Joan Lledó
Hello Hurd, Here are some patches for the lwip translator. They solve minor problems I've found when working on our lwip library. Regards.

[PATCH 1/4] lwip: poll(): return EIO when POLLERR is set

2018-08-11 Thread Joan Lledó
Needed to properly support poll in glibc (_hurd_select). * lwip/io-ops.c (lwip_io_select_common): If POLLERR is set, return EIO. --- lwip/io-ops.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lwip/io-ops.c b/lwip/io-ops.c index 636c26f7..1429bc55 100644 --- a/lwip/io-ops.c +++

[PATCH 4/4] lwip: Fix a buffer overflow and clear compiler warnings

2018-08-11 Thread Joan Lledó
GCC 8 new warning -Wstringop-truncation detected some buffer overflows. * lwip/options.c (parse_opt): Fix the buffer overflow. * lwip/pfinet-ops.c (dev_ifconf): Likewise. --- lwip/options.c| 2 +- lwip/pfinet-ops.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 3/4] lwip: return EINTR when a select() IPC thread is cancelled

2018-08-11 Thread Joan Lledó
Needed to properly support poll in glibc (_hurd_select). * lwip/io-ops.c (lwip_io_select_common): Detect when the current RPC is cancelled by checking the reply port. --- lwip/io-ops.c | 8 1 file changed, 8 insertions(+) diff --git a/lwip/io-ops.c b/lwip/io-ops.c index

[PATCH 2/4] lwip: refactor main demuxer to avoid code duplication

2018-08-11 Thread Joan Lledó
* lwip/main.c (lwip_demuxer): Refactored. --- lwip/main.c | 42 +++--- 1 file changed, 11 insertions(+), 31 deletions(-) diff --git a/lwip/main.c b/lwip/main.c index 9f7eb9b2..4dfbe143 100644 --- a/lwip/main.c +++ b/lwip/main.c @@ -99,6 +99,7 @@ int

Re: Patches: lwip translator

2018-08-11 Thread Joan Lledó
> But could you write the proper ChangeLog entries to explain not only why > the change but also what change is made? See git log and the GNU Coding > Style. The idea is that they help a *lot* when having to dig back what > happened to a given function, to the use of a macro, etc. Of course,

Re: How do I learn the Hurd stuff?

2018-08-26 Thread Joan Lledó
Missatge de Svante Signell del dia dg., 26 d’ag. 2018 a les 19:52: > I've read your blog from your GSoC project. Nice reading indeed. Since > more developments have been made by you and others after that, do you > think you could add a follow-up of that blog to reach current status of > lwip for

Re: [PATCH] Update patches

2018-08-28 Thread Joan Lledó
Missatge de Samuel Thibault del dia dt., 28 d’ag. 2018 a les 20:50: > Could you re-send it as a compressed file to make sure that > it doesn't get mangled? Sure, it's attached here. 0001-Update-patches.tar.xz Description: application/xz

Re: Lwip 2.0.3 patches

2018-08-20 Thread Joan Lledó
Missatge de Samuel Thibault del dia dv., 10 d’ag. 2018 a les 0:05: > The removal of the unix library is worrying, however. Are they aware > that some people are using it? If nobody complains, they won't know > that it poses problem. They probably don't know about our liblwip package, I missed

Re: How do I learn the Hurd stuff?

2018-08-26 Thread Joan Lledó
Missatge de Joshua Branson del dia ds., 25 d’ag. 2018 a les 19:09: > Is there something else I could be doing? It could be worth to take a look at my GSOC blog, it may help you: http://darnassus.sceen.net/~jlledom/en/index.html

Question about protected payloads

2018-07-21 Thread Joan Lledó
Hello Hurd, I'm blocked with a bug in the lwIP translator that's driving me crazy: under some particular circumstances, calling select() over two ports results on only one of these io_select RPCs being received by the translator. The other one is returned to glibc as EOPNOTSUPP. I debugged

Re: Question about protected payloads

2018-07-24 Thread Joan Lledó
> Just to be sure, do you see what protected payloads are ? I think I don't, to be honest.

Re: [PATCH] Import commit d9a738 from upstream, to fix a bug with https.

2018-08-31 Thread Joan Lledó
Ooops!!!, My mailer dropped all ^M again! I can't quilt push the patch. Please, may you revert or remove the last commit and apply the attached one? I'm sorry... Missatge de Samuel Thibault del dia dj., 30 d’ag. 2018 a les 10:49: > > Joan Lledó, le jeu. 30 août 2018 10:15:40 +0200, a

[PATCH] Import commit d9a738 from upstream, to fix a bug with https.

2018-08-30 Thread Joan Lledó
sockets: fix lwip_getsockname/lwip_getpeername for dual-stack: ip_addr_t type "any" (dual) has to be converted to AF_INET6 --- debian/patches/getpeername_dual | 11 +++ debian/patches/series | 1 + 2 files changed, 12 insertions(+) create mode 100644

Liblwip package:new patch

2018-08-30 Thread Joan Lledó
Hi, I found a bug in the lwip version we're using for our debian package and created a new patch to apply the solution. The bug is fixed upstream, in fact, this new patch is a particular commit cherry-picked from upstream, so must be marked as "already upstream".

Web server at darnassus is down

2018-04-12 Thread Joan Lledó
Hello, It seems http://darnassus.sceen.net/~hurd-web/ is down, I couldn't access the site in the last few days.

Re: Web server at darnassus is down

2018-04-12 Thread Joan Lledó
Great! now it's working. 2018-04-12 10:59 GMT+02:00 Samuel Thibault <samuel.thiba...@gnu.org>: > Hello, > > Joan Lledó, le jeu. 12 avril 2018 10:41:50 +0200, a ecrit: >> It seems http://darnassus.sceen.net/~hurd-web/ is down, I couldn't >> access the site in the

Re: How do I learn the Hurd stuff?

2018-08-31 Thread Joan Lledó
Missatge de Joshua Branson del dia dc., 29 d’ag. 2018 a les 22:57: > That makes sense. Can we trouble you for a teaser update on the mailing list? It's OK, buts there's not really too much to say. The translator is upstream and we created a debian package to install lwip as a user shared