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] [day] [month] [year] [list]
Message-ID: <20110509134356.63f66a29@jbarnes-desktop>
Date:	Mon, 9 May 2011 13:43:56 -0700
From:	Jesse Barnes <jbarnes@...tuousgeek.org>
To:	Alex Williamson <alex.williamson@...hat.com>
Cc:	linux-pci@...r.kernel.org, kvm@...r.kernel.org, avi@...hat.com,
	linux-kernel@...r.kernel.org, jan.kiszka@...mens.com
Subject: Re: [PATCH v3 1/3] PCI: Track the size of each saved capability
 data area

On Wed, 20 Apr 2011 14:31:33 -0600
Alex Williamson <alex.williamson@...hat.com> wrote:

> -struct pci_cap_saved_state {
> -	struct hlist_node next;
> +struct pci_cap_saved {
>  	char cap_nr;
> +	unsigned int size;
>  	u32 data[0];
>  };
>  
> +struct pci_cap_saved_state {
> +	struct hlist_node next;
> +	struct pci_cap_saved saved;
> +};
> +
>  struct pcie_link_state;
>  struct pci_vpd;
>  struct pci_sriov;
> @@ -366,7 +371,7 @@ static inline struct pci_cap_saved_state *pci_find_saved_cap(
>  	struct hlist_node *pos;
>  
>  	hlist_for_each_entry(tmp, pos, &pci_dev->saved_cap_space, next) {
> -		if (tmp->cap_nr == cap)
> +		if (tmp->saved.cap_nr == cap)
>  			return tmp;
>  	}
>  	return NULL;

Looks pretty good in general.  But I think the naming makes it harder
to read than it ought to be.

So we have a pci_cap_saved_state, which implies capability info, and
that's fine.

But pci_cap_saved doesn't communicate much; maybe pci_cap_data or
pci_cap_saved_data would be better?

Thanks,
-- 
Jesse Barnes, Intel Open Source Technology Center
--
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