Bug 528500

Summary: Linux Kernel no longer provides non-GPL access to gendisk partition information
Product: [Fedora] Fedora Reporter: Derek Atkins <warlord>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: low    
Version: 11CC: dougsland, gansalmon, itamar, kernel-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-10-13 04:35:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Derek Atkins 2009-10-12 14:24:41 UTC
Description of problem:

I've got a proprietary kernel disk driver that needs to access the disk partition information in order to gather information like:

 * how many real partitions are there?
 * for each partition, what is the:
    - partition number?
    - starting offset?
    - size?

I used to be able to just iterate over the gendisk->part[] array, but as of 2.6.29 in F11 this array is now hidden behind a GPL-ONLY RCU interface and a GPL-ONLY iterator interface.


Version-Release number of selected component (if applicable):

kernel-2.6.29 and 2.6.30

How reproducible:

100%

Steps to Reproduce:
1. write a non-GPL kernel module
2. try to find some way to access gendisk partition information
3. realize it's all GPL-Only now.
  
Actual results:

The partition data is all behind RCU which is GPL-Only... And the iterator functions are also GPL-Only..  Which effectively hides the partition array behind a GPL-Only interface whereas it used to be available.  So now there is no non-GPL way to access disk partitions.

Expected results:

Linux shouldn't hide data structures behind GPL-Only interfaces when those structures used to be accessible to non-GPL modules.

Additional info:

The quick fix would be to make the partition iterator interfaces available to non-GPL modules.  I think that would solve all the problems..  While it would be nice to be able to access the disk_get_part() API I could implement one if I had the iterator available.

Comment 1 Dave Jones 2009-10-13 04:35:02 UTC
This isn't something that Fedora changed, so this doesn't belong in Fedora bugzilla.  If you want this changed, you're going to have to get it done upstream at linux-kernel.org