mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* How to avoid "Trying to register duplicated ioctl32 handler"
@ 2005-09-15 21:17 Bagalkote, Sreenivas
  2005-09-17  9:29 ` 'Christoph Hellwig'
  0 siblings, 1 reply; 2+ messages in thread
From: Bagalkote, Sreenivas @ 2005-09-15 21:17 UTC (permalink / raw)
  To: 'Christoph Hellwig'
  Cc: 'linux-kernel@vger.kernel.org',
	'linux-scsi@vger.kernel.org'

In our MegaRAID driver, one of the IOCTLs is defined as
#define MEGASAS_IOC_GET_AEN _IOW('M', 2, struct megasas_aen)

This clashes with some other value in "built_in" ioctl table on x86_64
kernels.
How do I really avoid such problems in the future. Even if I search the
length
of the built_in table and pick a unique value, is it guaranteed to be unique
in
the future releases? The Documentation/ioctl-number.txt isn't of much help
either.
It lists multiple conflicts. Moreover, not all of them are listed there.

On a broader note, if the struct ioctl_trans inside ioctl32_hash_table could
use the combination of cmd + major number instead of just cmd to determine
the
uniqueness, these conflicts could be avoided, right? I mean understand the
reasons
for system-wide unique ioctl numbers. But right now, only those platforms
that
need conversion are technically impeded for violating that guideline.

Thanks,
Sreenivas

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: How to avoid "Trying to register duplicated ioctl32 handler"
  2005-09-15 21:17 How to avoid "Trying to register duplicated ioctl32 handler" Bagalkote, Sreenivas
@ 2005-09-17  9:29 ` 'Christoph Hellwig'
  0 siblings, 0 replies; 2+ messages in thread
From: 'Christoph Hellwig' @ 2005-09-17  9:29 UTC (permalink / raw)
  To: Bagalkote, Sreenivas
  Cc: 'Christoph Hellwig',
	'linux-kernel@vger.kernel.org',
	'linux-scsi@vger.kernel.org'

On Thu, Sep 15, 2005 at 05:17:29PM -0400, Bagalkote, Sreenivas wrote:
> In our MegaRAID driver, one of the IOCTLs is defined as
> #define MEGASAS_IOC_GET_AEN _IOW('M', 2, struct megasas_aen)
> 
> This clashes with some other value in "built_in" ioctl table on x86_64
> kernels.
> How do I really avoid such problems in the future. Even if I search the
> length
> of the built_in table and pick a unique value, is it guaranteed to be unique
> in
> the future releases? The Documentation/ioctl-number.txt isn't of much help
> either.
> It lists multiple conflicts. Moreover, not all of them are listed there.
> 
> On a broader note, if the struct ioctl_trans inside ioctl32_hash_table could
> use the combination of cmd + major number instead of just cmd to determine
> the
> uniqueness, these conflicts could be avoided, right? I mean understand the
> reasons
> for system-wide unique ioctl numbers. But right now, only those platforms
> that
> need conversion are technically impeded for violating that guideline.

Cou can't avoid the clashes in the hash.  That's why we got rid of
user-registerable ioctl translations completely and only allow ->compat_ioctl
anymore.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-09-17  9:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-15 21:17 How to avoid "Trying to register duplicated ioctl32 handler" Bagalkote, Sreenivas
2005-09-17  9:29 ` 'Christoph Hellwig'

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®