Re: Help to fix a bug on the arbiter

2020-04-11 Thread Joan Lledó via Bug reports for the GNU Hurd
Forget about this, it was working with settrans b/c this command replaces the ol d translator. I was testing the old code when using fsysopts... :( Anyway, here's the patch to fix that bug.

[PATCH] pci-arbiter: Fix bug on option parsing.

2020-04-11 Thread Joan Lledó via Bug reports for the GNU Hurd
From: Joan Lledó A misuse of strtol() caused wrong parameters to be interpreted as '0' * pci-arbiter/options.c: * New function parse_number() to handle wrong input * Call parse_number() from all places where strtol was being called --- pci-arbiter/options.c | 58

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

[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 called "slots",

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-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

[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

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 support >> nested

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

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

[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 +

[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

[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

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 >

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 >>

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

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. > > Ok, now

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

2019-11-25 Thread Joan Lledó via Bug reports for the GNU Hurd
Hi, I'll try to clear things: 1- I wrote this patch from and for 0.16 in upstream: https://gitlab.freedesktop.org/xorg/lib/libpciaccess 2- Didn't make any PR b/c I was waiting for comments. 3- Didn't thought on Debian at all. 4- If using a weak reference is not good enough for upstream, OK,

[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 @@

[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

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 doesn

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.

[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 ---

[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 @@

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

2019-11-03 Thread Joan Lledó via Bug reports for the GNU Hurd
From: Damien Zammit This patch removes all embedded pciaccess code from the arbiter and instead uses the external pciaccess library. * pci-arbiter/Makefile: * Remove pci_access.c and x86_pci.c from the sources. * pci-arbiter/func_files.c: * io_config_file: Use a harcoded PCI

[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 ---

[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 ---

[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 NAME_SIZE-1 all

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] 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] - 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