lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 4 Jan 2016 22:29:49 +0000
From:	Keith Busch <keith.busch@...el.com>
To:	Martin Mares <mj@....cz>
Cc:	LKML <linux-kernel@...r.kernel.org>, x86@...nel.org,
	linux-pci@...r.kernel.org, Jiang Liu <jiang.liu@...ux.intel.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Dan Williams <dan.j.williams@...el.com>,
	Bjorn Helgaas <bhelgaas@...gle.com>,
	Bryan Veal <bryan.e.veal@...el.com>,
	Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>,
	Jon Derrick <jonathan.derrick@...el.com>
Subject: Re: [PATCHv5 7/7] pciutils: Allow 32-bit domains

Hi, thanks for the feedback. I've a few follow up questions.

On Sun, Jan 03, 2016 at 03:11:24PM +0100, Martin Mares wrote:
> This is definitely not enough. Try grepping the source for "domain" :-)
>
> At least the following places need updating, too:
> 
>   o  struct pci_filter and operations on it

Not sure I follow. struct pci_filter's domain was already a 32-bit int.
 
>   o  Format strings for printing domains at various places

Are you wanting a %04x for 16 bit domains and %08x for 32 bit ones? The
%04x specifier still works with 32-bit values.

We just need a bit so this new h/w can't collide with ACPI _SEG defined
domains. I don't know of any real need for the full 32-bits; we'd do
fine using only 17 bits, so thought the leading 0's wasn't useful.

>   o  ABI compability ... changing a field in the middle of struct pci_dev
>      (or pci_filter) is going to break ABI, so you either need to change the
>      structures in a backward-compatible way, or to use ABI versioning.

It looks like there's a 16-bit gap after device_class. Would it be
acceptable place the domain's upper 16 bits in there to keep ABI
compatibility?

> Also, we should decide on what type the domain should have -- currently, some
> places use "int", others use u16, and your patch introduces int32_t. I would
> prefer u32 myself, but especially in the filters we should be careful about
> how to encode "any domain".

I left it as a signed int to allow a negative number for "any", and that's
also what the linux kernel uses.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ