Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Sep 2014 17:44:15 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        src-committers@freebsd.org
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org
Subject:   Re: svn commit: r271489 - in head/sys: kern ofed/include/linux opencrypto sys
Message-ID:  <352667542.FMiDv6jZct@ralph.baldwin.cx>
In-Reply-To: <201409122129.s8CLTBZ0070756@svn.freebsd.org>
References:  <201409122129.s8CLTBZ0070756@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Friday, September 12, 2014 09:29:11 PM John Baldwin wrote:
> Author: jhb
> Date: Fri Sep 12 21:29:10 2014
> New Revision: 271489
> URL: http://svnweb.freebsd.org/changeset/base/271489
> 
> Log:
>   Fix various issues with invalid file operations:
>   - Add invfo_rdwr() (for read and write), invfo_ioctl(), invfo_poll(),
>     and invfo_kqfilter() for use by file types that do not support the
>     respective operations.  Home-grown versions of invfo_poll() were
>     universally broken (they returned an errno value, invfo_poll()
>     uses poll_no_poll() to return an appropriate event mask).  Home-grown
>     ioctl routines also tended to return an incorrect errno (invfo_ioctl
>     returns ENOTTY).
>   - Use the invfo_*() functions instead of local versions for
>     unsupported file operations.
>   - Reorder fileops members to match the order in the structure definition
>     to make it easier to spot missing members.
>   - Add several missing methods to linuxfileops used by the OFED shim
>     layer: fo_write(), fo_truncate(), fo_kqfilter(), and fo_stat().  Most
>     of these used invfo_*(), but a dummy fo_stat() implementation was
>     added.

For this last, if you managed to get a handle to one of these file descriptors
using any of the associated system calls (write(), fstat(), etc.) would 
trigger an instant-panic.  I don't think that non-root users can get to these
descriptors however.

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?352667542.FMiDv6jZct>