[PATCH 2/4] lwip: Set output flags when calling recv()

2019-05-02 Thread Joan Lledó
Lwip 2.1.2 added a new function lwip_recvmsg() which writes out flags for the recv() operation. * lwip/socket-ops.c: Call lwip_recvmsg() instead of lwip_recvfrom(). --- lwip/socket-ops.c | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/lwip/

[PATCH 3/4] lwip: Error handling when calling update_if()

2019-05-02 Thread Joan Lledó
* lwip/lwip-util.c: * Check for errors when calling update_if() inside a thread-safe context. --- lwip/lwip-util.c | 62 ++-- 1 file changed, 33 insertions(+), 29 deletions(-) diff --git a/lwip/lwip-util.c b/lwip/lwip-util.c index 2d3c

[PATCH 4/4] lwip: Call if_change_flags() inside a thread-safe context

2019-05-02 Thread Joan Lledó
* lwip/port/netif/ifcommon.c: * Changing flags for a device (e.g. by inetutils-ifconfig) now takes the big lock to ensure the stack is not doing anything else. --- lwip/port/netif/ifcommon.c | 61 +- 1 file changed, 54 insertions(+), 7 deletion

[PATCH 1/4] lwip: Fix bug: Remove unsupported flags when calling send().

2019-05-02 Thread Joan Lledó
Lwip 2.1.2 added a new assertion to ensure that no unsupported flags are being sent to lwip_sendmsg(). The send operation must be updated to remove this unsupported flags. * lwip/socket-ops.c: lwip_S_socket_send(): Remove unsupported flags. --- lwip/socket-ops.c | 13 -

Patches for the lwip translator

2019-05-02 Thread Joan Lledó
Hello, Attached are some patches for the lwip translator. Mainly for bug-fixing and error handling.

Re: [PATCH 3/4] lwip: Error handling when calling update_if()

2019-05-03 Thread Joan Lledó
bault del dia dj., 2 de maig 2019 a les 23:58: > > Joan Lledó, le jeu. 02 mai 2019 11:55:01 +0200, a ecrit: > > * lwip/lwip-util.c: > > * Check for errors when calling update_if() > > inside a thread-safe context. > > Applied, thanks!

Re: [PATCH 1/4] lwip: Fix bug: Remove unsupported flags when calling send().

2019-05-03 Thread Joan Lledó
Missatge de Samuel Thibault del dia dj., 2 de maig 2019 a les 23:55: > Put another way: instead, we have to go through flags which we see > happen in the wild, and take appropriate measures (which may really be > to just let lwip_sendmsg return EINVAL, or do the check ourselves if > lwip_sendmsg d

Re: [PATCH 4/4] lwip: Call if_change_flags() inside a thread-safe context

2019-05-03 Thread Joan Lledó
Missatge de Samuel Thibault del dia dv., 3 de maig 2019 a les 0:02: > In C, there is no need to explicit the cast from void*. I'm doing a similar cast on lwip-util.c:256. Should I remove it too? > Errno is a per-thread variable, you can not propagate the error this > way. You can for instance ad

[PATCH 2/2] lwip: Fix bug: Clear MSG_NOSIGNAL flag when calling send().

2019-05-04 Thread Joan Lledó
Lwip 2.1.2 added a new assertion to ensure that no unsupported flags are being sent to lwip_sendmsg(). MSG_NOSIGNAL is one of these flags and name resolving stopped working. * lwip/socket-ops.c: lwip_S_socket_send(): * Clear MSG_NOSIGNAL to ensure is not sent to lwip_sendmsg(). --- lwip/s

[PATCH 2/2] lwip: Fix bug: Clear MSG_NOSIGNAL flag when calling send().

2019-05-04 Thread Joan Lledó
Hi, this is a new patch which clears only MSG_NOSIGNAL.

[PATCH 1/2] lwip: Set output flags when calling recv()

2019-05-04 Thread Joan Lledó
Lwip 2.1.2 added a new function lwip_recvmsg() which writes out flags for the recv() operation. * lwip/socket-ops.c: Call lwip_recvmsg() instead of lwip_recvfrom(). --- lwip/socket-ops.c | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/lwip/so

[PATCH 1/2] lwip: Set output flags when calling recv()

2019-05-04 Thread Joan Lledó
The same patch but this doesn't clear flags.

[PATCH 1/2] lwip: Fix bug: Error handling on configure_device()

2019-05-11 Thread Joan Lledó
* lwip/lwip-util.c: * EINVAL was never being returned. * Return EAGAIN when tcpip_callback() fails. --- lwip/lwip-util.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lwip/lwip-util.c b/lwip/lwip-util.c index 4f632185..235232ce 100644 --- a/lwip/lwip-u

Re: [PATCH 3/4] lwip: Error handling when calling update_if()

2019-05-11 Thread Joan Lledó
Hi, For this case, the callback update_if() doesn't set any error, so there's no need to propagate it. On the other hand, tcpip_callback() doesn't return an errno, it returns an internal lwip error code. The only error possible in this call is ERR_MEM, when the system runs out of memory. This

Re: [PATCH 3/4] lwip: Error handling when calling update_if()

2019-05-11 Thread Joan Lledó
Missatge de Samuel Thibault del dia ds., 11 de maig 2019 a les 10:40: > It's just like malloc() returning ENOMEM :) It seems the best option, but I didn't find it in the POSIX entry for ioctl(). OK, I'll return ENOMEM then.

Re: [PATCH 3/4] lwip: Error handling when calling update_if()

2019-05-11 Thread Joan Lledó
Here's the patch with your suggestions.

[PATCH] lwip: Fix bug: Error handling on configure_device()

2019-05-11 Thread Joan Lledó
* lwip/lwip-util.c: * EINVAL was never being returned. * Return error code for tcpip_callback() as errno. --- lwip/lwip-util.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lwip/lwip-util.c b/lwip/lwip-util.c index 4f632185..61f3194a 100644 --- a/lwip/

Re: Hurd SMP project awarded in "Concurso Universitario de Software Libre"

2019-05-12 Thread Joan Lledó
Enhorabuena! :) By the way, what's the state of the project, is it already working? Missatge de Samuel Thibault del dia dg., 12 de maig 2019 a les 0:51: > > Hello, > > Almudena Garcia, le dim. 12 mai 2019 00:29:35 +0200, a ecrit: > > My project Hurd SMP (where I try to build SMP support in Hurd)

Detect word size in the Hurd from the preprocessor

2019-06-01 Thread Joan Lledó
Hi, Is there a reliable way for the C preprocessor to know whether the system is 32 or 64 bit, in the Hurd? I know the Hurd is only 32 bit for now, but I wonder if is there a macro somewhere which contains this information.

Re: Hurd SSI paper

2019-06-17 Thread Joan Lledó
Hi Brent, I've only read the introduction sections for now, but I found a little typo: the title of the paper says: "Building an SSI *Cluter* with GNU/Hurd", shouldn't it be "Cluster"?, it lacks the 's'. Missatge de Almudena Garcia del dia ds., 15 de juny 2019 a les 17:19: > > Great job!! I'm re

[PATCH] Update patches

2019-06-22 Thread Joan Lledó
ot intended to be upstream + --- /dev/null +++ b/port/include/lwipopts.h -@@ -0,0 +1,160 @@ +@@ -0,0 +1,169 @@ +/* + Copyright (C) 2017 Free Software Foundation, Inc. + Written by Joan Lledó. @@ -177,8 +185,8 @@ Not intended to be upstream + You should have received a copy of the GNU Ge

Lwip patches update

2019-06-22 Thread Joan Lledó
Hi, I updated some patches for the lwip debian package, mostly bug-fixing, but I also had to add a new patch to implement a new function required for the translator [1]. Regards. --- [1] https://lists.gnu.org/archive/html/bug-hurd/2019-05/msg1.html

lwip: Call if_change_flags() inside a thread-safe context

2019-06-22 Thread Joan Lledó
Hi, I updated this patch, now it uses a new function I wrote for lwip which calls any callback inside a thread-safe context. Regards.

[PATCH] lwip: Call if_change_flags() inside a thread-safe context

2019-06-22 Thread Joan Lledó
* lwip/port/netif/ifcommon.c: * Changing flags for a device (e.g. by inetutils-ifconfig) now takes the big lock to ensure the stack is not doing anything else. --- lwip/port/netif/ifcommon.c | 60 ++ 1 file changed, 55 insertions(+), 5 deletion

Re: Lwip patches update

2019-06-25 Thread Joan Lledó
/2019-06/msg00010.html Missatge de Joan Lledó del dia ds., 22 de juny 2019 a les 11:51: > > Hi, > > I updated some patches for the lwip debian package, mostly bug-fixing, > but I also had to add a new patch to implement a new function required > for the translator [1]. > &

Re: Lwip patches update

2019-08-10 Thread Joan Lledó
> It seems to have a few build issues on some archs: > > https://buildd.debian.org/status/package.php?p=lwip Ooops! a new line in my TODO.

PCI Arbiter status

2019-09-03 Thread Joan Lledó
Hello Hurd, Now I've finished porting lwip 2.1.2, I'd like to work on the pci arbiter again. Before starting to work, I'd like to know the current status of the arbiter. I've been taking a look at the old mails, please tell me if I'm wrong: 1- If I understood it right, the translator no longer a

Re: PCI Arbiter status

2019-09-15 Thread Joan Lledó
El dc. 04 de 09 de 2019 a les 19:42 +1000, en/na Damien Zammit va escriure: > I have not sent patches to pciutils, but I do seem to have a git > branch > that I was working on - based on upstream. I'm happy to share > patches. > I think it was based on your existing work, Joan. Is it a public bra

Re: [PATCH] pci-arbiter: Remove embedded pciaccess code

2019-11-03 Thread Joan Lledó
Strange, the patches were not attached... I send them again.

[PATCH] libpciaccess: avoid using pci_get_ndevs()

2019-11-03 Thread Joan Lledó
Hello Hurd, In order to deprecate pci_get_ndevs(), I think we only need to ensure neither pciaccess nor pciutil call it. I wrote this patch for libpciaccess which removes the call, I'm sending it here for your comments, and will send it to upstream if you think it's OK.

Re: [PATCH 1/4] pci-arbiter: Remove embedded pciaccess code

2019-11-03 Thread Joan Lledó
Hi, El 3/11/19 a les 17:56, Samuel Thibault ha escrit: > After applying the patch, my hurd box is stuck at > > Configuring network interfaces... Could it be because GNU Mach is restricting the access to io ports to one process, and then when netdde tries to access, it can't b/c the arbiter arri

Re: [PATCH 3/4] pci-arbiter: Fix a -Wstringop-truncation warning

2019-11-09 Thread Joan Lledó
Hi, El 3/11/19 a les 17:47, Samuel Thibault ha escrit: > The memset still seems spurious to me, isn't it? > Yes, I wrote it to ensure a '\0' was written at the end of the string, no matter its size. But if snprintf() already null terminates, then there's no need for the memset().

Re: [PATCH] pci-arbiter: Remove embedded pciaccess code

2019-11-09 Thread Joan Lledó
Hi, Thanks for your explanations, Samuel. Then I'll take your changes on the libpciaccess patch, fix the closedir() issue and send it to upstream. I was also wondering if after your changes, libpciaccess would support nested arbiters, or if is that something we want at all. About pciutils, I've

[PATCH] pci-arbiter: Fix memory bugs

2019-11-24 Thread Joan Lledó
Hello, Working with nested arbiters I found a heap corruption when the nested arbiter founds no devices b/c the master arbiter doesn't give it any permissions. Attached is a patch to fix it. It also removes an unneeded free(). On the other hand, I noticed that the pointer allocated at alloc_file_

[PATCH] Hurd: avoid using the deprecated RPC pci_get_ndevs()

2019-11-24 Thread Joan Lledó
Hello, This patch for libpciaccess includes Samuel's changes and closedir() calls.

Is darnassus down?

2019-11-24 Thread Joan Lledó
Hi, I can't access to the Hurd's wiki at darnassus http://darnassus.sceen.net/~hurd-web/ Is it down?

Re: [PATCH] Hurd: avoid using the deprecated RPC pci_get_ndevs()

2019-11-24 Thread Joan Lledó
Hi, El dg. 24 de 11 de 2019 a les 21:17 +0100, en/na Samuel Thibault va escriure: > AIUI, apart from my changes, these are the changes which are already > upstream? No, none of this changes are upstream. > I have separated them out and uploaded version +hurd.4. For the Debian package? I'm sorry

Re: Issues with remap when using a nested pci arbiter

2019-12-20 Thread Joan Lledó
Hi, Attached is a new patch that solves the issues.

pci API: pci_get_ndevs()

2020-02-01 Thread Joan Lledó
Hello, now that both pciutils and libpciaccess have upstream patches that doesn't use the operation pci_get_ndevs(), what should we do with it? Should we remove it from the translator and the interface, or keep it for a while?

Re: [PATCH 1/2] pci-arbiter: Rename command line options

2020-02-22 Thread Joan Lledó
Hi, > The text is really not easy to understand I know, I changed it a bit, hope now it's more understandable. > I would say it would be much simpler to make the -U and -G > options create new scopes I reworked this and attached the two patches again.

Re: [PATCH 1/2] pci-arbiter: Rename command line options

2020-02-23 Thread Joan Lledó
Hi, El 22/2/20 a les 23:19, Samuel Thibault ha escrit: > AIUI you have commit rights, so you can push it yourself? Done! > I'm wondering which way would be more natural to users: first rule wins > versus last rule wins. No idea. Another option is to make the most specific scope win, e.g: -U

Re: [PATCH 1/2] pci-arbiter: Rename command line options

2020-02-23 Thread Joan Lledó
El 23/2/20 a les 18:27, Samuel Thibault ha escrit: > That could be more intuitive indeed. This looks like how ACLs work: > uid-based rules apply first, then gid-based rules, then general rules. > Here, exact function match rules would apply first, then slot match > rules, then bus match rules,

pci-arbiter TODO: remove items

2020-05-02 Thread Joan Lledó
Hello, In the TODO of the pci-arbiter there are some items we could probably remove: - add "--pci 00:1f.3" option to easily specify a PCI device instead of having to use --bus, --dev, and --func. This one can be removed since it's already done. - memset + snprintf looks dubious I'm not sure

[PATCH] Memset directory entries to zero during their creation

2020-05-02 Thread Joan Lledó
From: Joan Lledó * pci-arbiter/pcifs.c: * create_dir_entry: Add memset() * create_fs_tree: Remove memset() --- pci-arbiter/pcifs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pci-arbiter/pcifs.c b/pci-arbiter/pcifs.c index d19fc618..615e8753 100644

Re: Three Cheers for Samuel!

2020-06-07 Thread Joan Lledó
+1. Thanks Samuel! El 7 de juny de 2020 14:29:14 CEST, Joshua Branson ha escrit: >Hey Samuel! > >I just want to thank you for being so diligent at maintaining and >continuing to develop the GNU/Hurd. You are one of my heroes, and I >love how dedicated you are to the project! > >Wishing you a g

Re: Three Cheers for Samuel!

2020-06-11 Thread Joan Lledó
El 10/6/20 a les 1:49, Joshua Branson ha escrit: > And Joan was just a college student at that time. > How did you get to be so brilliant so young? I was not so young :). I was 32 at that time and had about 10 years of experience working as programmer. Just started my degree too late!

PCI arbiter crash on last qemu image

2020-08-15 Thread Joan Lledó
Hello, I downloaded and tried the last qemu image "debian-hurd-20200731.img". When I try to read the memory mapped content of region files in the arbiter, it crashes and shows the message "Real-time signal 0". This happens when executing "hexdump -Cn 256 /servers/bus/pci//00/02/0/region0" Re

Re: PCI arbiter crash on last qemu image

2020-08-16 Thread Joan Lledó
El 16/8/20 a les 4:46, Damien Zammit ha escrit: > Hi there, > > On 15/8/20 9:49 pm, Joan Lledó wrote >> I downloaded and tried the last qemu image "debian-hurd-20200731.img". >> When I try to read the memory mapped content of region files in the >> arbi

Re: PCI arbiter crash on last qemu image

2020-08-17 Thread Joan Lledó
El 17/8/20 a les 1:51, Damien Zammit ha escrit: > It's probably due to this patch: It's surely for that > Perhaps a better way to fix the mapping problem I encountered > is by removing the check for previous mappings when trying to map regions, I could check the pointer before reading from it at

Re: PCI arbiter crash on last qemu image

2020-08-22 Thread Joan Lledó
ave as others and adapt the arbiter to use libpciaccess right. Would you like to fix the backend and I fix the arbiter? - [1] https://gitlab.freedesktop.org/xorg/lib/libpciaccess/-/blob/a167bd6474522a709ff3cbb00476c0e4309cb66f/src/x86_pci.c [2] https://gitlab.freedesktop.org/xorg/lib/libpciaccess/-/comm

Re: PCI arbiter crash on last qemu image

2020-08-22 Thread Joan Lledó
Hi, El 22/8/20 a les 15:10, Damien Zammit ha escrit: > Hi Joan, > > I found another probe() call in hurd_pci.c that should not be there. > (So I dropped a second incorrect patch). > Can you please confirm this final branch looks correct? > > http://git.zammit.org/libpciaccess.git/log/?h=rumpdisk

Re: PCI arbiter crash on last qemu image

2020-08-23 Thread Joan Lledó
Hi, I made my changes on the arbiter and works fine, you can check my code at http://git.savannah.gnu.org/cgit/hurd/hurd.git/log/?h=jlledom-pciaccess-map On the other hand, I found a couple of issues in your patch In map_dev_mem(): +memfd = open("/dev/mem", flags | O_CLOEXEC); +if (memf

Implement paging on the pci arbiter

2020-08-26 Thread Joan Lledó
Hi, I'm doing a research on how to allow arbiter clients to map bar regions into their spaces. It seems to me the approach should be: 1.- Make the arbiter implement paging 2.- Expect clients to mmap() the region files the arbiter generates Sounds that correct for you? I'm a bit confused with li

Re: doc libpager

2020-08-26 Thread Joan Lledó
Hi, thanks for your help, I'll take a look :) El 26/8/20 a les 16:23, gfle...@disroot.org ha escrit: > > Hi Joan, > > I can not reply in your thread "Implement paging on the pci arbiter" > because i suscribed right now. hope you this links! > > This doc talk about libpager. > > https://www.fr

Re: PCI arbiter crash on last qemu image

2020-08-26 Thread Joan Lledó
Hi, El 26/8/20 a les 11:13, Damien Zammit ha escrit: > If you think everything is okay with this, I will squash the last patch and > submit patches upstream. Yes it's OK for me

Re: Implement paging on the pci arbiter

2020-08-27 Thread Joan Lledó
El 27/8/20 a les 0:30, Samuel Thibault ha escrit: > libpager/demuxer.c:pager_demuxer (struct pager_requests *requests, That's not the same pager_demuxer in the reference, it's a static function and receives different parameters. It seems there were changes in the libpager's interface and the do

Re: PCI arbiter crash on last qemu image

2020-09-12 Thread Joan Lledó
El 10/9/20 a les 0:29, Samuel Thibault ha escrit: > Now fixed in libpciaccess 0.16-1+hurd.6 and upstream. > Then should I merge jlledom-pciaccess-map into master? http://git.savannah.gnu.org/cgit/hurd/hurd.git/log/?h=jlledom-pciaccess-map

Re: PCI arbiter crash on last qemu image

2020-09-13 Thread Joan Lledó
El 13/9/20 a les 15:54, Samuel Thibault ha escrit: > Hello, > > Joan Lledó, le dim. 13 sept. 2020 08:38:48 +0200, a ecrit: >> El 10/9/20 a les 0:29, Samuel Thibault ha escrit: >>> Now fixed in libpciaccess 0.16-1+hurd.6 and upstream. >> >> Then should I mer

Re: Implement paging on the pci arbiter

2020-11-03 Thread Joan Lledó
Hi, El 26/8/20 a les 17:01, Samuel Thibault ha escrit: > I'm unsure if libpager will be useful actually, since all you need is > to pass on a memory object clamped to the target physical memory. See > gnumach's support for proxy memory object, which possibly is just > enough. > > Samuel > I did

Re: Implement paging on the pci arbiter

2020-11-08 Thread Joan Lledó
Hi, El 3/11/20 a les 23:13, Samuel Thibault ha escrit: > > That would probably work, yes. > > I got something pushed to my branch at [1]. But I found the implementation for pager proxies in gnu mach is incomplete. In particular I can't restrict a range to be mapped. I think I could fix it but

Re: [PATCH v2 hurd] pci: Add RPCs for taking and freeing io ports by BAR

2023-07-20 Thread Joan Lledó
Hi Damien, I think your design is not compatible with nested arbiters. Correct me if I'm wrong, but AFAIK the arbiter doesn't know if it's a main or a nested arbiter, it's libpciaccess who handles that. So the arbiter code must be the same and work no matter if it's main or nested. In your de

Re: [PATCH v3 hurd] pci: Add RPCs for taking and freeing io ports by region

2023-07-22 Thread Joan Lledó
Hi, Thank you Damien and Samuel for your explanations. On 22/7/23 3:31, Damien Zammit wrote: diff --git a/pci-arbiter/netfs_impl.c b/pci-arbiter/netfs_impl.c index 4bb5c97a..6b3d6918 100644 --- a/pci-arbiter/netfs_impl.c +++ b/pci-arbiter/netfs_impl.c @@ -522,6 +522,14 @@ netfs_attempt_read (st

lwip: Allocate the loopback netif by default

2023-12-02 Thread Joan Lledó
Hi, This patch fixes a few bugs. The translator was assuming one interface was already allocated in `netif_list` when calling `init_ifs` during startup, and used it to configure the loopback interface [1]. That was possibly true in the past but after upgrading liblwip I found `netif_list` is

[PATCH] lwip: Allocate the loopback netif by default

2023-12-02 Thread Joan Lledó
From: Joan Lledó The translator received a null `netif_list` during initialization, this caused a few bugs. When started without parameters, the translator didn't add any new interface to `netif_list`, and that broke any subsequent fsysopts over the translator, as the stack was

BSD Compatibility

2024-10-10 Thread Joan Lledó
Hi, This comes from: https://lists.debian.org/debian-hurd/2023/11/msg00030.html I was trying to build the dhcpcd package on the Hurd and it fails with this error: ``` In file included from arp.h:46, from privsep.h:134, from dhcpcd.h:96, from

Re: BSD Compatibility

2024-10-10 Thread Joan Lledó
On 10/10/24 17:18, Samuel Thibault wrote: >> How can we fix this? > > We'd probably add && (!defined(__GNU__)) in the dhcpcd source code. > But doesn't that mean we are actually not compatible? Also, that's error prone bc without a deeper knowledge about the codebase it's hard to tell in whic

[PATCH] lwip: allow setting an invalid address

2025-07-29 Thread Joan Lledó
From: Joan Lledó After DHCPRELEASE, DHCP client sends a SIOCSIFADDR to set the interface address to 0.0.0.0. This is not accepted by our IP validator `ipv4config_is_valid()`. I think this use case is legit so this commit makes the translator accept 0.0.0.0 as a valid address. This assumes that a

[PATCH] lwip: allow setting an invalid address

2025-07-29 Thread Joan Lledó
Hi, In order to make dhclient work over lwip, I had to make a small change in the lwip translator. After a successful DHCPRELEASE, the dhclient script for the hurd sends a SIOCSIFADDR ioctl operation to set the interface address to 0.0.0.0 [1]. This operation failed for us because the transl

Re: [PATCH] - hurd pci-arbiter: remove embedded pciaccess code

2019-10-27 Thread Joan Lledó via Bug reports for the GNU Hurd
Hello Hurd, I made some changes to this patch: 1- I added a call to pci_system_cleanup(); in the shutdown RPC, so libpciaccess is shutdown correctly. 2- As now we're using libpciaccess functions to read/write from netfs_attempt_read/write, and these two libpciaccess functions have diffe

[PATCH] pci-arbiter: Remove embedded pciaccess code

2019-10-27 Thread Joan Lledó via Bug reports for the GNU Hurd
From: Joan Lledó * pci-arbiter/Makefile: * Remove pci_access.c and x86_pci.c from the sources. * pci-arbiter/func_files.c: * config_blog_op: Call the proper i/o function. * io_config_file: Use a harcoded PCI config size. * read_rom_file: Grab the

Re: [PATCH] pci-arbiter: Remove embedded pciaccess code

2019-11-03 Thread Joan Lledó via Bug reports for the GNU Hurd
Hello, El 27/10/19 a les 16:32, Samuel Thibault ha escrit:> Hello, > Could you try to split your changes in separate patches? I splitted the patch into four patches, the first one is the Damien's original patch adapted to the current head + a changelog. The other three patches are my changes.

[PATCH 4/4] pci-arbiter: Fix warning on passing incompatible pointer type

2019-11-03 Thread Joan Lledó via Bug reports for the GNU Hurd
From: Joan Lledó * pci-arbiter/netfs_impl.c: * netfs_attempt_write: Cast op function to pci_io_op_t --- pci-arbiter/netfs_impl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pci-arbiter/netfs_impl.c b/pci-arbiter/netfs_impl.c index 0be8c370..b987a0bc 100644 --- a

[PATCH 2/4] pci-arbiter: Call libpciaccess cleanup on shutdown

2019-11-03 Thread Joan Lledó via Bug reports for the GNU Hurd
From: Joan Lledó * pci-arbiter/startup-ops.c: * S_startup_dosync: Call pci_system_cleanup(). --- pci-arbiter/startup-ops.c | 4 1 file changed, 4 insertions(+) diff --git a/pci-arbiter/startup-ops.c b/pci-arbiter/startup-ops.c index f3506c42..eb387fd9 100644 --- a/pci-arbiter

[PATCH 3/4] pci-arbiter: Fix a -Wstringop-truncation warning

2019-11-03 Thread Joan Lledó via Bug reports for the GNU Hurd
From: Joan Lledó * pci-arbiter/pcifs.c: * create_dir_entry: Limit to NAME_SIZE-1 when calling strncpy(). Finish entry->name with '\0'. * create_fs_tree: memset() to 0 the directory entry. Limit to NA

[PATCH 1/4] pci-arbiter: Remove embedded pciaccess code

2019-11-03 Thread Joan Lledó via Bug reports for the GNU Hurd
f NAME_SIZE @@ -200,9 +203,9 @@ volatile struct mapped_time_value *pcifs_maptime; /* FS manipulation functions */ error_t alloc_file_system (struct pcifs **fs); error_t init_file_system (file_t underlying_node, struct pcifs *fs); -error_t create_fs_tree (struct pcifs *fs, struct pci_system *pci_sy

[PATCH] Hurd: avoid using the deprecated RPC pci_get_ndevs()

2019-11-03 Thread Joan Lledó via Bug reports for the GNU Hurd
From: Joan Lledó --- src/hurd_pci.c | 83 +- 1 file changed, 34 insertions(+), 49 deletions(-) diff --git a/src/hurd_pci.c b/src/hurd_pci.c index 28bef16..98bf83e 100644 --- a/src/hurd_pci.c +++ b/src/hurd_pci.c @@ -304,8 +304,8

Re: [PATCH] Hurd: avoid using the deprecated RPC pci_get_ndevs()

2019-11-03 Thread Joan Lledó via Bug reports for the GNU Hurd
Hi, El 3/11/19 a les 17:10, Samuel Thibault ha escrit: >> +if (!devices) >> +return ENOMEM; > > That makes me realize: we need to closedir(dir). What do you mean? >> if (err) { >> -mach_port_deallocate (mach_task_self (), pci_server_port); >> -/*

[PATCH] pci-arbiter: Remove spurious memset()

2019-11-09 Thread Joan Lledó via Bug reports for the GNU Hurd
From: Joan Lledó * pci-arbiter/pcifs.c: * create_fs_tree: Remove all memset() previous to snprintf() calls. --- pci-arbiter/pcifs.c | 4 1 file changed, 4 deletions(-) diff --git a/pci-arbiter/pcifs.c b/pci-arbiter/pcifs.c index cc08fad0..aaee7f0b 100644 --- a/pci

Re: [PATCH] pci-arbiter: Remove embedded pciaccess code

2019-11-09 Thread Joan Lledó via Bug reports for the GNU Hurd
Hi, El 3/11/19 a les 21:48, Samuel Thibault ha escrit: > Hello, > > Uploaded fixed netdde, pciutils, libpciaccess, and commited this > pci-arbiter cleanup! > Great! Now I have some questions: - You said libpciaccess upstream code for the Hurd doesn't match the one in the Debian package. Where

Re: [PATCH] pci-arbiter: Remove embedded pciaccess code

2019-11-09 Thread Joan Lledó via Bug reports for the GNU Hurd
El 9/11/19 a les 10:48, Joan Lledó via Bug reports for the GNU Hurd ha escrit: > Now I have some questions: > > - You said libpciaccess upstream code for the Hurd doesn't match the one > in the Debian package. Where is the debian repo for the package? I found > [1] but it

[PATCH] pci-arbiter: Fix memory bugs

2019-11-24 Thread Joan Lledó via Bug reports for the GNU Hurd
From: Joan Lledó * pci-arbiter/pcifs.c: * init_file_system: Remove unnecessary free() * create_fs_tree: Fix a boundary overrun where no devices are found. --- pci-arbiter/pcifs.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pci-arbiter

[PATCH] Hurd: avoid using the deprecated RPC pci_get_ndevs()

2019-11-24 Thread Joan Lledó via Bug reports for the GNU Hurd
From: Joan Lledó --- src/hurd_pci.c | 153 + 1 file changed, 91 insertions(+), 62 deletions(-) diff --git a/src/hurd_pci.c b/src/hurd_pci.c index 28bef16..26505f3 100644 --- a/src/hurd_pci.c +++ b/src/hurd_pci.c @@ -304,8 +304,8

Re: [PATCH] Hurd: avoid using the deprecated RPC pci_get_ndevs()

2019-11-25 Thread Joan Lledó via Bug reports for the GNU Hurd
or upstream, OK, we can think another approach and I'll implement it and send you guys a new patch for review. El dl. 25 de 11 de 2019 a les 19:34 +1100, en/na Damien Zammit va escriure: > On 25/11/19 9:51 am, Joan Lledó wrote: > > El dg. 24 de 11 de 2019 a les 21:17 +0100, en/na Sa

Re: [PATCH] Hurd: avoid using the deprecated RPC pci_get_ndevs()

2019-11-30 Thread Joan Lledó via Bug reports for the GNU Hurd
Hi, What about this? Do I send the PR? Is there any alternative for the weak reference? El dt. 26 de 11 de 2019 a les 22:53 +0100, en/na Samuel Thibault va escriure: > Joan Lledó, le lun. 25 nov. 2019 10:02:55 +0100, a ecrit: > > 2- Didn't make any PR b/c I was waiting for comments

Issues with remap when using a nested pci arbiter

2019-12-08 Thread Joan Lledó via Bug reports for the GNU Hurd
Hello Hurd, To test nested arbiters, I installed a translator in /home/jlledom/gnu/servers/bus/pci which connects to the main translator in /servers/bus/pci. Then, logged as 'demo' user, I use remap to ensure all rpcs are sent to my translator, not the main one: demo@debian:~$ remap /servers/bus/

Re: Issues with remap when using a nested pci arbiter

2019-12-10 Thread Joan Lledó via Bug reports for the GNU Hurd
Hi, El 8/12/19 a les 14:49, Samuel Thibault ha escrit: > Hello, > > Joan Lledó via Bug reports for the GNU Hurd, le dim. 08 déc. 2019 09:04:09 > +0100, a ecrit: >> demo@debian:~$ remap /servers/bus/pci /home/jlledom/gnu/servers/bus/pci >> -- rpctrace -o /home/demo/demo.log env >> LD_LIBRARY

Re: Issues with remap when using a nested pci arbiter

2019-12-15 Thread Joan Lledó via Bug reports for the GNU Hurd
Hi, El 11/12/19 a les 2:03, Samuel Thibault ha escrit: > So indeed, when servers/bus/pci/ gets opened, it's not getting remapped. > Feel free to fix the FIXME :) Yes, that was it, I wrote a patch (attached) and it worked. > I would say that pciutils should be made to use stat instead of > lstat,

[PATCH] remap translator: remap prefixes instead of complete file names

2019-12-15 Thread Joan Lledó via Bug reports for the GNU Hurd
From: Joan Lledó * trans/remap.c: * trivfs_S_dir_lookup(): * Match and replace prefixes instead of complete file names. This is needed to remap entire file systems, not only trivial ones. --- trans/remap.c | 12 1 file

[PATCH] remap translator: remap prefixes instead of complete file names

2019-12-20 Thread Joan Lledó via Bug reports for the GNU Hurd
From: Joan Lledó * trans/remap.c: * trivfs_S_dir_lookup(): * Match and replace prefixes instead of complete file names. This is needed to remap entire file systems, not only trivial ones. --- trans/remap.c | 25

Updated patch for pciutils

2019-12-21 Thread Joan Lledó via Bug reports for the GNU Hurd
Hello Hurd, I updated the pciutils patch I wrote in 2017. The new version is attached. This is the same patch with minor changes: - Makefile updated to be applied on newer sources. - hurd_detect(): Use stat() instead of lstat() to work with symbolic links. - enum_devices(): Call closedir() on err

[PATCH] New access method: Hurd via RPCs

2019-12-21 Thread Joan Lledó via Bug reports for the GNU Hurd
From: Joan Lledó A new module for the Hurd that accesses PCI bus using available RPCs. All references to the Hurd in the i386 access method have been removed. --- lib/Makefile | 7 +- lib/configure | 4 +- lib/hurd.c | 381

Re: [PATCH] Hurd: avoid using the deprecated RPC pci_get_ndevs()

2019-12-21 Thread Joan Lledó via Bug reports for the GNU Hurd
Hi, El 1/12/19 a les 1:10, Damien Zammit ha escrit: > libpciaccess 0.16-1+hurd.1 is still broken on rumpdisk. Somehow the 2 > applied patches > don't allow probing of AHCI to occur in rump_init(). > I've packaged rump libs into a debian package following Robert Millan's work > and sent it to Sam

Re: [PATCH] pci-arbiter: Remove embedded pciaccess code

2020-01-26 Thread Joan Lledó via Bug reports for the GNU Hurd
Hello Hurd, I'm glad to say that our patches for both picutils and libpciaccess are now upstream. El 10/11/19 a les 2:44, Samuel Thibault ha escrit: > Joan Lledó, le sam. 09 nov. 2019 17:36:19 +0100, a ecrit: >> I was also wondering if after your changes, libpciaccess would sup

[PATCH 1/2] pci-arbiter: Rename command line options

2020-02-15 Thread Joan Lledó via Bug reports for the GNU Hurd
From: Joan Lledó Rename some CLI options in order to add the new -d --device arg. Replace -s by -c for subclasses. Replace -D by -d for domains. Domains are optional from now on, default to 0. Replace -b by -B for buses. Bus now creates a new permission scope if the current one

pci arbiter: add new --device command line option

2020-02-15 Thread Joan Lledó via Bug reports for the GNU Hurd
Hello Hurd, I made some changes in the options parser to add a new --device option, as a shortcut for current -D -b -d -f options. I also renamed some options in order to free -D and --device to use it for this purpose. From now on, the formerly called "devices" are now called "slots", and "devic

[PATCH 2/2] pci-arbiter: Add --device command line option

2020-02-15 Thread Joan Lledó via Bug reports for the GNU Hurd
From: Joan Lledó Shortcut for -d, -B, -s and -f Usage: --device [:]:. E.G. --device 00:05.0 is shortcut for -d 0 -B 0 -s 5 -f 0 * pci-arbiter/options.c: Implement --slot option * pci-arbiter/options.h: Add --slot to options list --- pci-arbiter/options.c | 60

Re: [PATCH 1/2] pci-arbiter: Rename command line options

2020-02-16 Thread Joan Lledó via Bug reports for the GNU Hurd
Hi, El 15/2/20 a les 15:02, Samuel Thibault ha escrit: > Why a capital b? It's be more coherent to have -d -b -s -f all > small-caps. > Because of this notice in --help: "More than one permission scope may be specified. Uppercase options create a new permission scope if the current one already

[PATCH 2/2] pci-arbiter: Add --device command line option

2020-02-22 Thread Joan Lledó via Bug reports for the GNU Hurd
From: Joan Lledó Shortcut for -d, -b, -s and -f Usage: --device [:]:. E.G. --device 00:05.0 is shortcut for -d 0 -b 0 -s 5 -f 0 * pci-arbiter/options.c: Implement --slot option * pci-arbiter/options.h: Add --slot to options list --- pci-arbiter/options.c | 57

[PATCH 1/2] pci-arbiter: Rename command line options

2020-02-22 Thread Joan Lledó via Bug reports for the GNU Hurd
From: Joan Lledó Rename some CLI options in order to add the new -D --device arg. Replace -s by -c for subclasses. Replace -D by -d for domains. Domains are optional from now on, default to 0. Replace -d by -s for devices. The formerly called "devices" are now cal

Help to fix a bug on the arbiter

2020-04-10 Thread Joan Lledó via Bug reports for the GNU Hurd
Hello, I'm blocked trying to solve a bug I found in the option parsing of the arbiter, at: http://git.savannah.gnu.org/cgit/hurd/hurd.git/tree/pci-arbiter/options.c#n135 strtol() returns 0 if it wasn't able to convert the input, for instance, -d jj will set h->curset->domain to 0, which means gi

<    1   2   3   4   >