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]
Message-ID: <4BE84B04.9050607@zytor.com>
Date:	Mon, 10 May 2010 11:05:56 -0700
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Dmitry Torokhov <dtor@...are.com>
CC:	"mingo@...hat.com" <mingo@...hat.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"greg@...ah.com" <greg@...ah.com>,
	"hjanssen@...rosoft.com" <hjanssen@...rosoft.com>,
	"ksrinivasan@...ell.com" <ksrinivasan@...ell.com>,
	"tglx@...utronix.de" <tglx@...utronix.de>,
	Alok Kataria <akataria@...are.com>,
	"linux-tip-commits@...r.kernel.org" 
	<linux-tip-commits@...r.kernel.org>
Subject: Re: [tip:x86/cpu] Modify the VMware balloon driver for the new x86_hyper
 API

On 05/10/2010 10:52 AM, Dmitry Torokhov wrote:
> 
> The usage that you mention only valid in the context of working with
> device nodes. In other cases it can be used to indicate different errors
> altogether:
> 
> mmap:
> 
> [ENODEV]
>     The fildes argument refers to a file whose type is not supported
>     by mmap().
> 
> fallocate:
> 
> [ENODEV]
>     The fd argument does not refer to a regular file.
> 
> Linux mount:
> 
>       ENODEV filesystemtype not configured in the kernel.
> 
>       ENXIO  The major number of the block device source is out of range.
> 

"The major number of the block device source is out of range" is really
nothing but confusion on the part of the man page author.  It's exactly
this kind of confusion which I try to clamp down on, because we have
*so* many instances of it in the existing codebase.  It seems, in fact,
to be one of the most common mistakes

ENXIO really means exactly the same thing as it does elsewhere: no
hardware for the specified device.  For example, create /dev/hda on a
system with no IDE:

mount("/dev/hda", "/mnt", "ext2", MS_MGC_VAL, NULL) = -1 ENXIO (No such
device or address)

[no "out of range" anything there...]

The kernel does indeed return ENODEV for a nonexistent filesystem name,
which can only best be described as "severely confusing", but probably
have to be considered grandfathered in by now.  (mount returns ENOTBLK
for a non-devicenode, which is somewhat accurate -- a non-device is not
a block device, after all...)

	-hpa
--
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