Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Sep 2015 19:48:45 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 201611] [patch] Add devfs_get_cdevpriv_from_file(9)
Message-ID:  <bug-201611-8-J0MPZV9vSB@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-201611-8@https.bugs.freebsd.org/bugzilla/>
References:  <bug-201611-8@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=201611

Konstantin Belousov <kib@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kib@FreeBSD.org

--- Comment #2 from Konstantin Belousov <kib@FreeBSD.org> ---
(In reply to Andy Ritger from comment #0)
I do not quite understand this.

Lets clarify the notational system first.  I propose to rename the file
descriptor we talk about in the context of the process B as fdb.  Also, we note
that both fd (from the process A filedescriptors namespace) and fdb (from B)
point to the same file F.

In the process B, to retrieve the video memory associated with F, you perform
some kernel call, most likely ioctl(fdb, OPcode, ...).  Then, during the call
to the ioctl handler for OPcode, you get the same pointer to the file private
data F by devfs_get_cdevpriv().  It does not matter if it is in context of
ioctl(fd, OP1code) in A or in context of ioctl(fdb, OPcode) in B.  The
underlying file is same, since it was passed by ancillary data, and cdevpriv is
same.

-- 
You are receiving this mail because:
You are the assignee for the bug.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-201611-8-J0MPZV9vSB>