Re: [PATCH] pci-arbiter: Prevent mapping IO regions

2023-07-05 Thread Samuel Thibault
Applied, thanks! Joan Lledó, le mer. 05 juil. 2023 21:38:12 +0200, a ecrit: > From: Joan Lledó > > * pci-arbiter/netfs_impl.c: > * get_filemap_region(): Return MACH_PORT_NULL and set errno to EOPNOTSUPP > when the client tries to map a IO region file. > --- > pci-arbiter/netfs_impl.c | 3

[PATCH] pci-arbiter: Prevent mapping IO regions

2023-07-05 Thread Joan Lledó
From: Joan Lledó * pci-arbiter/netfs_impl.c: * get_filemap_region(): Return MACH_PORT_NULL and set errno to EOPNOTSUPP when the client tries to map a IO region file. --- pci-arbiter/netfs_impl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pci-arbiter/netfs_impl.c

Re: [PATCH] pci-arbiter: Fix type of printf param

2022-09-11 Thread Samuel Thibault
Applied, thanks! Damien Zammit, le jeu. 08 sept. 2022 09:31:31 +, a ecrit: > --- > pci-arbiter/options.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/pci-arbiter/options.c b/pci-arbiter/options.c > index 73f74ca3..e0455f41 100644 > --- a/pci-arbiter/options.c >

[PATCH] pci-arbiter: Fix type of printf param

2022-09-08 Thread Damien Zammit
--- pci-arbiter/options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pci-arbiter/options.c b/pci-arbiter/options.c index 73f74ca3..e0455f41 100644 --- a/pci-arbiter/options.c +++ b/pci-arbiter/options.c @@ -382,7 +382,7 @@ netfs_append_args (char **argz, size_t *

Re: [PATCH] pci-arbiter: Remove invalid pci_device_close

2022-02-27 Thread Samuel Thibault
Applied, thanks! Damien Zammit, le dim. 27 févr. 2022 07:52:02 +, a ecrit: > Perhaps some logic needs to be added to prevent > concurrent pci accesses by multiple clients > since some pci commands are non-atomic (?) Indeed, actually libpciaccess doesn't seem to have any support for thread

[PATCH] pci-arbiter: Remove invalid pci_device_close

2022-02-26 Thread Damien Zammit
pci_control_port is not a port info so calling deref on it is invalid. There seems no reason to have a device_close for the pci device currently so remove it. Perhaps some logic needs to be added to prevent concurrent pci accesses by multiple clients since some pci commands are non-atomic (?)

Re: [PATCH] pci-arbiter: Stop using deprecated region memory pointer

2022-01-08 Thread Samuel Thibault
Joan Lledó, le sam. 08 janv. 2022 13:15:37 +0100, a ecrit: > From: Joan Lledó > > Use a internal array of pointers instead Applied, thanks! Samuel > * pci-arbiter/device_map.h: > * Update device_map_region() prototype > * Now it receives an output address as parameter > *

Re: [PATCH] pci-arbiter: Stop using deprecated region memory pointer

2022-01-08 Thread Joan Lledó
I updated the comment

[PATCH] pci-arbiter: Stop using deprecated region memory pointer

2022-01-08 Thread Joan Lledó
From: Joan Lledó Use a internal array of pointers instead * pci-arbiter/device_map.h: * Update device_map_region() prototype * Now it receives an output address as parameter * pci-arbiter/device_map.c: * Update device_map_region() definition to match the new prototype * Support for

Re: [PATCH] pci-arbiter: Stop using deprecated region memory pointer

2022-01-07 Thread Samuel Thibault
Joan Lledó, le ven. 07 janv. 2022 12:09:55 +0100, a ecrit: > > Rather >= ? > > No, libpciaccess accepts using the legacy method for addrress up to 0x10 > included. Odd for the base part, but ok :) But can't se just use the non-legacy mapping in all cases? That'd make the code simpler.

Re: [PATCH] pci-arbiter: Stop using deprecated region memory pointer

2022-01-07 Thread Samuel Thibault
Hello, Joan Lledó, le ven. 07 janv. 2022 12:09:56 +0100, a ecrit: > - err = pci_device_map_range (device, region->base_addr, region->size, > - PCI_DEV_MAP_FLAG_WRITABLE, >memory); > + /* Use the legacy call for regions under 1MB */ > + if

[PATCH] pci-arbiter: Stop using deprecated region memory pointer

2022-01-07 Thread Joan Lledó
From: Joan Lledó Use a internal array of pointers instead * pci-arbiter/device_map.h: * Update device_map_region() prototype * Now it receives an output address as parameter * pci-arbiter/device_map.c: * Update device_map_region() definition to match the new prototype * Support for

Re: [PATCH] pci-arbiter: Stop using deprecated region memory pointer

2022-01-07 Thread Joan Lledó
Hi, > Rather >= ? No, libpciaccess accepts using the legacy method for addrress up to 0x10 included. > Also, why this address? Putting a comment there would be welcome to explain > the magic number. I'm taking the condition from here:

Re: [PATCH] pci-arbiter: Stop using deprecated region memory pointer

2022-01-05 Thread Samuel Thibault
Joan Lledó, le mer. 05 janv. 2022 13:08:02 +0100, a ecrit: > - if (region->memory == 0) > + if (*addr == 0) > { > - err = pci_device_map_range (device, region->base_addr, region->size, > - PCI_DEV_MAP_FLAG_WRITABLE, >memory); > + if (region->base_addr

[PATCH] pci-arbiter: Stop using deprecated region memory pointer

2022-01-05 Thread Joan Lledó
From: Joan Lledó Use a internal array of pointers instead * pci-arbiter/device_map.h: * Update device_map_region() prototype * Now it receives an output address as parameter * pci-arbiter/device_map.c: * Update device_map_region() definition to match the new prototype * Support for

Re: [PATCH] - pci-arbiter fix warnings

2020-04-12 Thread Samuel Thibault
Damien Zammit, le dim. 12 avril 2020 15:44:14 +1000, a ecrit: > While polishing rumpdisk I made these trivial patches which may be useful. Applied, thanks! Samuel

[PATCH] - pci-arbiter fix warnings

2020-04-11 Thread Damien Zammit
While polishing rumpdisk I made these trivial patches which may be useful. Damien >From 364be01ee8120f795c588c30f92557a9c3f97578 Mon Sep 17 00:00:00 2001 From: Damien Zammit Date: Fri, 10 Apr 2020 22:17:31 +1000 Subject: [PATCH 1/2] pci-ops.c: Use compatible pointers --- pci-arbiter/pci-ops.c

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

2020-04-11 Thread Samuel Thibault
Hello, Joan Lledó via Bug reports for the GNU Hurd, le sam. 11 avril 2020 13:37:19 +0200, a ecrit: > From: Joan Lledó > > A misuse of strtol() caused wrong parameters to be interpreted as '0' Applied, thanks! Samuel

[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

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

2020-01-26 Thread Samuel Thibault
Joan Lledó via Bug reports for the GNU Hurd, le dim. 26 janv. 2020 09:52:12 +0100, a ecrit: > I'm glad to say that our patches for both picutils and libpciaccess are > now upstream. Yay \o/ Samuel

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] pci-arbiter: Fix memory bugs

2019-11-24 Thread Samuel Thibault
Hello, Joan Lledó, le dim. 24 nov. 2019 20:47:44 +0100, a ecrit: > 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().

[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

[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

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

2019-11-09 Thread Samuel Thibault
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 arbiters, or if is that something we want at all. We'd want this, yes. > About pciutils, I've seen our patch doesn't use the RPC get_ndevs(), so > no need

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

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

2019-11-09 Thread Almudena Garcia
> That's exactly it, no manual compilation needed. Just make sure to be > getting upgrades from the "unreleased" distrib. Thanks. This week I'll try to test It El sáb., 9 nov. 2019 a las 15:21, Samuel Thibault () escribió: > Almudena Garcia, le sam. 09 nov. 2019 15:15:31 +0100, a ecrit: > > but

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

2019-11-09 Thread Samuel Thibault
Almudena Garcia, le sam. 09 nov. 2019 15:15:31 +0100, a ecrit: > but I don't know if I simply have to "apt full-upgrade", That's exactly it, no manual compilation needed. Just make sure to be getting upgrades from the "unreleased" distrib. Samuel

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

2019-11-09 Thread Almudena Garcia
Then, does Debian repositories includes all new PCI Arbitrer and libpciaccess0 updates? Samuel asked me to test the latest versions of netdde, libpciaccess0 and hurd, in my Thinkpad T60, but I don't know if I simply have to "apt full-upgrade", or I need to do a manual compilation from upstream El

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

2019-11-09 Thread Guillem Jover
Hi! [ BTW it seems like something on the gnu.org side is mandling UTF-8 characters? :/ ] On Sat, 2019-11-09 at 11:54:15 +0100, Samuel Thibault wrote: > Joan Lledó via Bug reports for the GNU Hurd, le sam. 09 nov. 2019 10:50:18 > +0100, a ecrit: > > And, about pciutils, what did you do? >

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

2019-11-09 Thread Samuel Thibault
Concerning packages uploaded to the "unreleased" distribution, a repository if there was one would be on https://salsa.debian.org/hurd-team I however don't create one for each and very package I upload to "unreleased". Normally the patchs uploaded there are already submitted upstream or to a

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

2019-11-09 Thread Samuel Thibault
Joan Lledó via Bug reports for the GNU Hurd, le sam. 09 nov. 2019 10:35:31 +0100, a ecrit: > From: Joan Lledó > > * pci-arbiter/pcifs.c: > * create_fs_tree: > Remove all memset() previous to snprintf() calls. Applied, thanks! > --- > pci-arbiter/pcifs.c | 4 > 1 file

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't seem to have

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

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

2019-11-05 Thread Damien Zammit
On 4/11/19 7:48 am, Samuel Thibault wrote: > Hello, > > Uploaded fixed netdde, pciutils, libpciaccess, and commited this > pci-arbiter cleanup! > > Samuel > Thank you for doing all this! wOOt!! I will test it soon. Damien

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

2019-11-03 Thread Samuel Thibault
Hello, Uploaded fixed netdde, pciutils, libpciaccess, and commited this pci-arbiter cleanup! Samuel

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

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

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.

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

2019-10-27 Thread Samuel Thibault
Hello, Thanks for your work? Could you try to split your changes in separate patches? Otherwise the review is harder since the reviewer has to work out which pieces are intended to what part of the changes, and applying the parts that look ok while other parts are getting repolished is harder

[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

2018-10-29 Thread Samuel Thibault
Hello, I have commited this. While skimming over the changes, I noted some TODOs which we should work on, but don't prevent from using it. Samuel

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

Re: [PATCH] PCI Arbiter

2017-10-26 Thread Justus Winter
Joan Lledó writes: >>> +INTR_INTERFACE >> >> Leftover here. >> > > I cannot compile the server if I remove the `INTR_INTERFACE', The > mig-generated header doesn't mach my prototype. Is that what's left > over? Oh, I was wrong here. INTR_INTERFACE indeed only says

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

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

Re: [PATCH] PCI Arbiter

2017-10-22 Thread Samuel Thibault
Hello, Justus Winter, on dim. 22 oct. 2017 10:55:13 +0200, wrote: > Joan Lledó writes: > > 2017-10-20 15:18 GMT+02:00 Justus Winter : > >> let me be the first to say: Awesome :) Same :) > > If so, I was talking to Samuel about that (irc

Re: [PATCH] PCI Arbiter

2017-10-21 Thread Joan Lledó
Hi! 2017-10-20 15:18 GMT+02:00 Justus Winter : > Hi Joan :) > > let me be the first to say: Awesome :) > > Joan Lledó writes: > >> Attached are two patches. The first one is to be applied to the Hurd >> source tree and contains a new mig pci

Re: [PATCH] PCI Arbiter

2017-10-20 Thread Justus Winter
Hi Joan :) let me be the first to say: Awesome :) Joan Lledó writes: > 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. So

[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