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: <20101004185231.GF9961@silverbox.local>
Date:	Mon, 4 Oct 2010 20:52:31 +0200
From:	"Hans J. Koch" <hjk@...utronix.de>
To:	"Eric W. Biederman" <ebiederm@...ssion.com>
Cc:	"Hans J. Koch" <hjk@...utronix.de>, Greg KH <greg@...ah.com>,
	Greg KH <gregkh@...e.de>, linux-kernel@...r.kernel.org,
	Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH 5/5] uio: Implement hotunplug support, using libunload

On Mon, Oct 04, 2010 at 11:19:34AM -0700, Eric W. Biederman wrote:
> "Hans J. Koch" <hjk@...utronix.de> writes:
> 
> > On Sun, Sep 26, 2010 at 03:49:03PM -0700, Eric W. Biederman wrote:
> >> 
> >> With this change it is possible to remove a module that implements
> >> a uio device, or to remove the underlying hardware device of a uio
> >> device withot crashing the kernel, or causing user space more problems
> >> than just an I/O error.
> >
> > Well, that I/O error can also be a segfault if userspace accesses
> > memory previously mmap'ed. So a userspace program needs to properly
> > handle -EIO from read(), and has to handle SIG_SEGV. 
> 
> It is SIG_BUS (just like truncate), but yes.

All I saw was "Segmentation fault" from my test app when unloading
my uio_dummy test driver. I didn't check which signal it actually was.
Doesn't matter too much as long as it can be handled.

> If userspace doesn't
> handle there error it can go down.  All of which is a better state
> then the current version where the kernel crash if you hotunplug
> a uio device.
> 
> > This should also
> > be mentioned in Documentation/DocBook/uio-howto.tmpl.
> > Or do you have a better solution?
> 
> A better solution for?

For preventing the segfault situation. But forget that, it's OK as it
is. But it should be mentioned in the documentation.

Thanks,
Hans

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