Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Jan 2013 13:54:45 -0500
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-current@freebsd.org
Cc:        Yuri <yuri@rawbw.com>
Subject:   Re: [PATCH] Variable-size ioctl data handling
Message-ID:  <201301221354.45093.jhb@freebsd.org>
In-Reply-To: <50FDA46D.6080105@rawbw.com>
References:  <50FDA46D.6080105@rawbw.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Monday, January 21, 2013 3:26:21 pm Yuri wrote:
> Hi,
> 
> Could anybody please review and check in the patch 
> patch-ioctl-var-size.txt from this PR: 
> http://www.freebsd.org/cgi/query-pr.cgi?pr=175425 ?
> This patch introduces the generic way to pass variable size ioctl 
> argument using the structure like this struct my_struct {int len; ...any 
> fields...}.

I think this layout is a bit of a special case.  I think you should just put 
the userland pointer in length in the structure you pass to the ioctl as mdf@ 
suggested in the thread on hackers@.  If nothing else, the length should be a 
size_t instead of an int.

-- 
John Baldwin



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