bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] gnumach - Restrict pci io cfg ports to one process


From: Samuel Thibault
Subject: Re: [PATCH] gnumach - Restrict pci io cfg ports to one process
Date: Sat, 10 Nov 2018 10:50:20 +0100
User-agent: NeoMutt/20170113 (1.7.2)

Again, thanks :)

Damien Zammit, le sam. 10 nov. 2018 19:17:32 +1100, a ecrit:
> @@ -185,6 +191,13 @@ i386_io_perm_create (const ipc_port_t master_port, 
> io_port_t from, io_port_t to,
>    if (from > to)
>      return KERN_INVALID_ARGUMENT;
>  
> +  if (from <= PCI_CFG1_ADDRESS_REG && to >= PCI_CFG1_DATA_REG)
> +    in_pcicfg_range = TRUE;

Mmm, it seems not enough to me.

The data register port is 0xCFC + (reg & 3); so it could be as much as
0xCFF.

The x86 conf2 method also uses 0xC000 | dev << 8 | reg; so we need to
also protect 0xc000 - 0xcfff.

Samuel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]