[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 hurd] pci: Add RPCs for taking and freeing io ports by BAR
From: |
Samuel Thibault |
Subject: |
Re: [PATCH v2 hurd] pci: Add RPCs for taking and freeing io ports by BAR |
Date: |
Fri, 21 Jul 2023 07:56:59 +0200 |
User-agent: |
NeoMutt/20170609 (1.8.3) |
Damien Zammit, le ven. 21 juil. 2023 01:23:38 +0000, a ecrit:
> On 21/7/23 03:44, Samuel Thibault wrote:
> > Damien Zammit, le jeu. 20 juil. 2023 10:13:10 +0000, a ecrit:
> >> + e = master->po->np->nn->ln;
> >> + if (strncmp (e->name, FILE_CONFIG_NAME, NAME_SIZE))
> >> + /* This operation may only be addressed to the config file */
> >> + return EINVAL;
> >> +
> >> + err = check_permissions (master, O_READ);
> >
> > I'm wondering about this: don't we want to require some write access?
> > (since the i/o ports will allow basically anything with the device).
> > Not actually to the PCI config since we don't want to let the caller
> > change it. But it can rather be the region file on which we'd want to
> > run the RPC? (and thus not need the bar parameter).
>
> OK, how about we name the io regions ioX instead of regionX and
> only allow this io rpc to be run on them?
>
> It does not make sense to have the io region file exposed with read/write.
Indeed, that'd make things more obvious to shell users.
Samuel