<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/compat/linux/linux_ioctl.c, branch releng/10.2</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=releng%2F10.2</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=releng%2F10.2'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2016-05-31T16:55:45Z</updated>
<entry>
<title>Fix kernel stack disclosure in Linux compatibility layer. [SA-16:20]</title>
<updated>2016-05-31T16:55:45Z</updated>
<author>
<name>Gleb Smirnoff</name>
<email>glebius@FreeBSD.org</email>
</author>
<published>2016-05-31T16:55:45Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=3b6d05264f164de15224257803c5e9b9d331dbd8'/>
<id>urn:sha1:3b6d05264f164de15224257803c5e9b9d331dbd8</id>
<content type='text'>
Fix kernel stack disclosure in 4.3BSD compatibility layer. [SA-16:21]

Security:	SA-16:20
Security:	SA-16:21
Approved by:	so
</content>
</entry>
<entry>
<title>Merge r263233 from HEAD to stable/10:</title>
<updated>2015-03-19T13:37:36Z</updated>
<author>
<name>Robert Watson</name>
<email>rwatson@FreeBSD.org</email>
</author>
<published>2015-03-19T13:37:36Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=8c0b8b26921d2b7336f487bf71f7bf9e555e374e'/>
<id>urn:sha1:8c0b8b26921d2b7336f487bf71f7bf9e555e374e</id>
<content type='text'>
  Update kernel inclusions of capability.h to use capsicum.h instead; some
  further refinement is required as some device drivers intended to be
  portable over FreeBSD versions rely on __FreeBSD_version to decide whether
  to include capability.h.

Sponsored by:	Google, Inc.
</content>
</entry>
<entry>
<title>MFC r272059:</title>
<updated>2014-09-27T08:33:50Z</updated>
<author>
<name>Alexander Motin</name>
<email>mav@FreeBSD.org</email>
</author>
<published>2014-09-27T08:33:50Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=6ebf074b6ec14fde999379d7f9c90e7eab2d921e'/>
<id>urn:sha1:6ebf074b6ec14fde999379d7f9c90e7eab2d921e</id>
<content type='text'>
Remake Linux' SOUND_MIXER_INFO IOCTL as a wrapper around new FreeBSD's one.

Submitted by:	Dmitry Luhtionov &lt;dmitryluhtionov@gmail.com&gt;

Approved by:	re (kib)
</content>
</entry>
<entry>
<title>MFC r267051:</title>
<updated>2014-07-04T15:09:56Z</updated>
<author>
<name>Alexander Motin</name>
<email>mav@FreeBSD.org</email>
</author>
<published>2014-07-04T15:09:56Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=0294cdaef3aba346834720a07bc816770ca23bfb'/>
<id>urn:sha1:0294cdaef3aba346834720a07bc816770ca23bfb</id>
<content type='text'>
- Add support for SG_GET_SG_TABLESIZE IOCTL to report that we don't support
scatter/gather lists.
- Return error for still unsupported SG 3.x API read/write calls.
</content>
</entry>
<entry>
<title>MFC r266981:</title>
<updated>2014-07-02T10:16:12Z</updated>
<author>
<name>Alexander Motin</name>
<email>mav@FreeBSD.org</email>
</author>
<published>2014-07-02T10:16:12Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=fedcd50c8616c084916f64b7b6c7177e3b07421c'/>
<id>urn:sha1:fedcd50c8616c084916f64b7b6c7177e3b07421c</id>
<content type='text'>
Overhaul CAM SG driver IOCTL interfaces.

Make it really work for native FreeBSD programs.  Before this it was broken
for years due to different number of pointer dereferences in Linux and
FreeBSD IOCTL paths, permanently returning errors to FreeBSD programs.
This change breaks the driver FreeBSD IOCTL ABI, making it more strict,
but since it was not working any way -- who bother.

Add shims for 32-bit programs on 64-bit host, translating the argument
of the SG_IO IOCTL for both FreeBSD and Linux ABIs.

With this change I was able to run 32-bit Linux sg3_utils tools and simple
32 and 64-bit FreeBSD test tools on both 32 and 64-bit FreeBSD systems.
</content>
</entry>
<entry>
<title>Change the cap_rights_t type from uint64_t to a structure that we can extend</title>
<updated>2013-09-05T00:09:56Z</updated>
<author>
<name>Pawel Jakub Dawidek</name>
<email>pjd@FreeBSD.org</email>
</author>
<published>2013-09-05T00:09:56Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=7008be5bd7341259037f383434a72960413cfeb8'/>
<id>urn:sha1:7008be5bd7341259037f383434a72960413cfeb8</id>
<content type='text'>
in the future in a backward compatible (API and ABI) way.

The cap_rights_t represents capability rights. We used to use one bit to
represent one right, but we are running out of spare bits. Currently the new
structure provides place for 114 rights (so 50 more than the previous
cap_rights_t), but it is possible to grow the structure to hold at least 285
rights, although we can make it even larger if 285 rights won't be enough.

The structure definition looks like this:

	struct cap_rights {
		uint64_t	cr_rights[CAP_RIGHTS_VERSION + 2];
	};

The initial CAP_RIGHTS_VERSION is 0.

The top two bits in the first element of the cr_rights[] array contain total
number of elements in the array - 2. This means if those two bits are equal to
0, we have 2 array elements.

The top two bits in all remaining array elements should be 0.
The next five bits in all array elements contain array index. Only one bit is
used and bit position in this five-bits range defines array index. This means
there can be at most five array elements in the future.

To define new right the CAPRIGHT() macro must be used. The macro takes two
arguments - an array index and a bit to set, eg.

	#define	CAP_PDKILL	CAPRIGHT(1, 0x0000000000000800ULL)

We still support aliases that combine few rights, but the rights have to belong
to the same array element, eg:

	#define	CAP_LOOKUP	CAPRIGHT(0, 0x0000000000000400ULL)
	#define	CAP_FCHMOD	CAPRIGHT(0, 0x0000000000002000ULL)

	#define	CAP_FCHMODAT	(CAP_FCHMOD | CAP_LOOKUP)

There is new API to manage the new cap_rights_t structure:

	cap_rights_t *cap_rights_init(cap_rights_t *rights, ...);
	void cap_rights_set(cap_rights_t *rights, ...);
	void cap_rights_clear(cap_rights_t *rights, ...);
	bool cap_rights_is_set(const cap_rights_t *rights, ...);

	bool cap_rights_is_valid(const cap_rights_t *rights);
	void cap_rights_merge(cap_rights_t *dst, const cap_rights_t *src);
	void cap_rights_remove(cap_rights_t *dst, const cap_rights_t *src);
	bool cap_rights_contains(const cap_rights_t *big, const cap_rights_t *little);

Capability rights to the cap_rights_init(), cap_rights_set(),
cap_rights_clear() and cap_rights_is_set() functions are provided by
separating them with commas, eg:

	cap_rights_t rights;

	cap_rights_init(&amp;rights, CAP_READ, CAP_WRITE, CAP_FSTAT);

There is no need to terminate the list of rights, as those functions are
actually macros that take care of the termination, eg:

	#define	cap_rights_set(rights, ...)				\
		__cap_rights_set((rights), __VA_ARGS__, 0ULL)
	void __cap_rights_set(cap_rights_t *rights, ...);

Thanks to using one bit as an array index we can assert in those functions that
there are no two rights belonging to different array elements provided
together. For example this is illegal and will be detected, because CAP_LOOKUP
belongs to element 0 and CAP_PDKILL to element 1:

	cap_rights_init(&amp;rights, CAP_LOOKUP | CAP_PDKILL);

Providing several rights that belongs to the same array's element this way is
correct, but is not advised. It should only be used for aliases definition.

This commit also breaks compatibility with some existing Capsicum system calls,
but I see no other way to do that. This should be fine as Capsicum is still
experimental and this change is not going to 9.x.

Sponsored by:	The FreeBSD Foundation
</content>
</entry>
<entry>
<title>Add some missing LIBUSB IOCTL conversion codes.</title>
<updated>2013-07-14T10:13:01Z</updated>
<author>
<name>Hans Petter Selasky</name>
<email>hselasky@FreeBSD.org</email>
</author>
<published>2013-07-14T10:13:01Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=a40a377cc7eb11a8735e9cb029b125f5022f6c3f'/>
<id>urn:sha1:a40a377cc7eb11a8735e9cb029b125f5022f6c3f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>- Move videodev headers from compat/linux to contrib/v4l (cp from vendor and</title>
<updated>2013-07-06T19:59:06Z</updated>
<author>
<name>Alexander Leidinger</name>
<email>netchild@FreeBSD.org</email>
</author>
<published>2013-07-06T19:59:06Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=b85e1f7d05ac7889868f2364474e02b6a024af25'/>
<id>urn:sha1:b85e1f7d05ac7889868f2364474e02b6a024af25</id>
<content type='text'>
  apply diff to compat/linux versions).
- The cp implies an update of videodev2.h to the linux kernel 2.6.34.14 one.

The update makes video in skype v4 work on FreeBSD.

Tested by:	Artyom Mirgorodskiy &lt;artyom.mirgorodsky@gmail.com&gt;
		(update of header only)
</content>
</entry>
<entry>
<title>MFS security patches which seem to have accidentally not reached HEAD:</title>
<updated>2012-11-23T01:48:31Z</updated>
<author>
<name>Colin Percival</name>
<email>cperciva@FreeBSD.org</email>
</author>
<published>2012-11-23T01:48:31Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=43f13bea35296bc14198f6cf0e5a67e556c43f5b'/>
<id>urn:sha1:43f13bea35296bc14198f6cf0e5a67e556c43f5b</id>
<content type='text'>
Fix insufficient message length validation for EAP-TLS messages.

Fix Linux compatibility layer input validation error.

Security:	FreeBSD-SA-12:07.hostapd
Security:	FreeBSD-SA-12:08.linux
Security:	CVE-2012-4445, CVE-2012-4576
With hat:	so@
</content>
</entry>
<entry>
<title>Convert files to UTF-8</title>
<updated>2012-01-15T13:23:18Z</updated>
<author>
<name>Ulrich Spörlein</name>
<email>uqs@FreeBSD.org</email>
</author>
<published>2012-01-15T13:23:18Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=9a14aa017b21c292740c00ee098195cd46642730'/>
<id>urn:sha1:9a14aa017b21c292740c00ee098195cd46642730</id>
<content type='text'>
</content>
</entry>
</feed>
