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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150330105707.GA17979@kroah.com>
Date:	Mon, 30 Mar 2015 12:57:07 +0200
From:	Greg KH <gregkh@...uxfoundation.org>
To:	"Michael S. Tsirkin" <mst@...hat.com>
Cc:	linux-kernel@...r.kernel.org, Bjorn Helgaas <bhelgaas@...gle.com>,
	Jonathan Corbet <corbet@....net>,
	"David S. Miller" <davem@...emloft.net>,
	Hans Verkuil <hans.verkuil@...co.com>,
	Mauro Carvalho Chehab <mchehab@....samsung.com>,
	Alexei Starovoitov <ast@...mgrid.com>,
	stephen hemminger <stephen@...workplumber.org>,
	Masahiro Yamada <yamada.m@...panasonic.com>,
	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
	Andy Lutomirski <luto@...capital.net>,
	Rasmus Villemoes <linux@...musvillemoes.dk>,
	Stephane Eranian <eranian@...gle.com>,
	Huang Rui <ray.huang@....com>,
	Peter Neubauer <pneubauer@...erwhite.org>,
	linux-pci@...r.kernel.org, linux-doc@...r.kernel.org,
	linux-api@...r.kernel.org
Subject: Re: [PATCH 01/86] pci: export pci_ids.h

On Mon, Mar 30, 2015 at 12:46:36PM +0200, Michael S. Tsirkin wrote:
> Sorry about keeping this thread alive, I'm just trying
> to wrap my head around what you consider a sane API.
> 
> Linux used not to export headers automatically, generally.
> It used to be "just use libc". Why is this header different?

You are now exporting things from the kernel that were not being
exported in the past.  When you do that, you are now guaranteeing that
this api will be present for forever in the future.

> These constants are required to use the interfaces
> linux does export to userspace, including VFIO and sysfs.
> No one maintains them really, though libpci has a copy
> of these.

Also libudev, which takes them from the "master" copy that libpci pulls
from.

> Some people believe headers are copyrighteable, for them, licensing is
> also problematic: libpci is under plain GPL, Linux needs the exception
> for user programs.  Does not this mean that we can't depend on libpci to
> provide parts of linux/userspace interface?

This makes no sense at all.  If you have legal questions, ask a lawyer,
not a programmer.  Would you ask me medical questions as well?

> > > Wouldn't the same thing apply to pci_regs.h?
> > > Why does it make sense to export PCI_CLASS_REVISION
> > > so I know where to read the class value from
> > > configuration, but not what the values are?
> > 
> > That's just due to history, we made the mistake to export those a long
> > time ago, I wouldn't recommend doing any more, and again, instead rely
> > on the programs that properly maintain that for you.
> 
> So add libpci dependency just for the headers?  No one wants to do this.
> Case in point, Linux doesn't want to depend on libpci headers either, right?

The kernel is self-contained, and has to be, don't be foolish.

> I don't think class IDs or vendor IDs ever did or can change.

Then you haven't tracked what has happened over time.  They do change,
they are sometimes incorrect, they are extended, and stuff is modified.

> New stuff is added, we add it as we add Linux support.
> Isn't this a good reason to include this? Will push
> vendors to work with the community instead of
> around it using userspace drivers.

This has nothing to do with "pushing vendors" to do anything.

Again, if you have a userspace program that needs these headers, then
use one of the _two_ different packages that userspace already provides
that has them, don't make the kernel become the third provider of the
same header information, that's major duplication of effort for no
reason at all.

thanks,

greg k-h
--
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