<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/lib/libc/tests/sys, branch stable/13</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>libc/sys: add errno test</title>
<updated>2024-03-02T05:04:50+00:00</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2024-02-24T23:39:02+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=13ca1f11d6ff96a5a1363ff954091ab9e0407e1d'/>
<id>13ca1f11d6ff96a5a1363ff954091ab9e0407e1d</id>
<content type='text'>
(cherry picked from commit 32fdcff8703da6f2795193acc77ec3c1fb8b723d)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(cherry picked from commit 32fdcff8703da6f2795193acc77ec3c1fb8b723d)
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove a few more stray __FBSDID uses</title>
<updated>2023-10-24T18:13:18+00:00</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2023-09-25T14:49:52+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=a94d45499f9f6eec6bf04dac55cf5f2720df6509'/>
<id>a94d45499f9f6eec6bf04dac55cf5f2720df6509</id>
<content type='text'>
Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D41954

(cherry picked from commit 16837d353cdde87672d08112610e51e4121c4e50)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D41954

(cherry picked from commit 16837d353cdde87672d08112610e51e4121c4e50)
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove $FreeBSD$: one-line sh pattern</title>
<updated>2023-08-23T17:43:30+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-22T01:32:01+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=023fc80ee38a117fa65b2ccb2abf8bdc7dbd6fd9'/>
<id>023fc80ee38a117fa65b2ccb2abf8bdc7dbd6fd9</id>
<content type='text'>
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/

Similar commit in main:
(cherry picked from commit d0b2dbfa0ecf)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/

Similar commit in main:
(cherry picked from commit d0b2dbfa0ecf)
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove $FreeBSD$: one-line .c pattern</title>
<updated>2023-08-23T17:43:26+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-22T01:31:41+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=3d497e17ebd33fe0f58d773e35ab994d750258d6'/>
<id>3d497e17ebd33fe0f58d773e35ab994d750258d6</id>
<content type='text'>
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/

Similar commit in main:
(cherry picked from commit 1d386b48a555)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/

Similar commit in main:
(cherry picked from commit 1d386b48a555)
</pre>
</div>
</content>
</entry>
<entry>
<title>spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD</title>
<updated>2023-07-25T15:13:49+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-05-10T15:40:58+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=caa41f641755c935b036e17440a3b49329c904ed'/>
<id>caa41f641755c935b036e17440a3b49329c904ed</id>
<content type='text'>
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with:		pfg
MFC After:		3 days
Sponsored by:		Netflix

(cherry picked from commit 4d846d260e2b9a3d4d0a701462568268cbfe7a5b)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with:		pfg
MFC After:		3 days
Sponsored by:		Netflix

(cherry picked from commit 4d846d260e2b9a3d4d0a701462568268cbfe7a5b)
</pre>
</div>
</content>
</entry>
<entry>
<title>netbsd-tests: Serialize message queue tests</title>
<updated>2023-03-20T12:52:07+00:00</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2023-03-10T22:07:06+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=06fc9fe027f68aaeb36fe52fbeb7ab0ac6e7012f'/>
<id>06fc9fe027f68aaeb36fe52fbeb7ab0ac6e7012f</id>
<content type='text'>
They can fail when run in parallel since they all share a global queue
key.

MFC after:	1 week

(cherry picked from commit e1ccf64b884a1a47c48a2fb7d71e7eb18347c6d6)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
They can fail when run in parallel since they all share a global queue
key.

MFC after:	1 week

(cherry picked from commit e1ccf64b884a1a47c48a2fb7d71e7eb18347c6d6)
</pre>
</div>
</content>
</entry>
<entry>
<title>sendfile_test: fix copy-paste bug</title>
<updated>2022-03-02T21:56:31+00:00</updated>
<author>
<name>Eric van Gyzen</name>
<email>vangyzen@FreeBSD.org</email>
</author>
<published>2022-02-24T22:53:03+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=ec68cb077be136c2a082701fdefc50620e151605'/>
<id>ec68cb077be136c2a082701fdefc50620e151605</id>
<content type='text'>
Require the newly opened file descriptor to be good, instead of
re-requiring the one that was required three lines earlier.
Thankfully, opening /dev/null is really unlikely to fail.

Reported by:	Coverity
MFC after:	1 week
Sponsored by:	Dell EMC Isilon

(cherry picked from commit a8fea07c3053293f35e00b9073b33ff6f1d9a067)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Require the newly opened file descriptor to be good, instead of
re-requiring the one that was required three lines earlier.
Thankfully, opening /dev/null is really unlikely to fail.

Reported by:	Coverity
MFC after:	1 week
Sponsored by:	Dell EMC Isilon

(cherry picked from commit a8fea07c3053293f35e00b9073b33ff6f1d9a067)
</pre>
</div>
</content>
</entry>
<entry>
<title>jail: allow root to implicitly widen its cpuset to attach</title>
<updated>2021-03-04T02:04:10+00:00</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2021-02-26T21:46:47+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=c4ccb6d1be1f00ebcda9e83f06db55f9d6c152ac'/>
<id>c4ccb6d1be1f00ebcda9e83f06db55f9d6c152ac</id>
<content type='text'>
The default behavior for attaching processes to jails is that the jail's
cpuset augments the attaching processes, so that it cannot be used to
escalate a user's ability to take advantage of more CPUs than the
administrator wanted them to.

This is problematic when root needs to manage jails that have disjoint
sets with whatever process is attaching, as this would otherwise result
in a deadlock. Therefore, if we did not have an appropriate common
subset of cpus/domains for our new policy, we now allow the process to
simply take on the jail set *if* it has the privilege to widen its mask
anyways.

With the new logic, root can still usefully cpuset a process that
attaches to a jail with the desire of maintaining the set it was given
pre-attachment while still retaining the ability to manage child jails
without jumping through hoops.

A test has been added to demonstrate the issue; cpuset of a process
down to just the first CPU and attempting to attach to a jail without
access to any of the same CPUs previously resulted in EDEADLK and now
results in taking on the jail's mask for privileged users.

PR:		253724

(cherry picked from commit 60c4ec806dfd0f79edf8ca3abc04bbb69c0418f7)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The default behavior for attaching processes to jails is that the jail's
cpuset augments the attaching processes, so that it cannot be used to
escalate a user's ability to take advantage of more CPUs than the
administrator wanted them to.

This is problematic when root needs to manage jails that have disjoint
sets with whatever process is attaching, as this would otherwise result
in a deadlock. Therefore, if we did not have an appropriate common
subset of cpus/domains for our new policy, we now allow the process to
simply take on the jail set *if* it has the privilege to widen its mask
anyways.

With the new logic, root can still usefully cpuset a process that
attaches to a jail with the desire of maintaining the set it was given
pre-attachment while still retaining the ability to manage child jails
without jumping through hoops.

A test has been added to demonstrate the issue; cpuset of a process
down to just the first CPU and attempting to attach to a jail without
access to any of the same CPUs previously resulted in EDEADLK and now
results in taking on the jail's mask for privileged users.

PR:		253724

(cherry picked from commit 60c4ec806dfd0f79edf8ca3abc04bbb69c0418f7)
</pre>
</div>
</content>
</entry>
<entry>
<title>libc: tests: add some tests for cpuset(2)</title>
<updated>2020-12-31T18:31:54+00:00</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2020-12-31T18:30:43+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=1fc421287d5ddbcfba99412cf968ee3490383fe7'/>
<id>1fc421287d5ddbcfba99412cf968ee3490383fe7</id>
<content type='text'>
The cpuset(2) tests should be run as root (require.user properly set) with
&gt;= 3 cpus for maximum coverage. All tests that want to modify the cpuset
don't assume any particular cpu layout (i.e. the first cpu may not be 0, the
last may not be first + count) and the following scenarios are tested:

1.) newset: basic execute cpuset() to grab a new cpuset, make sure the
    assigned cpuset then has a different ID.
2.) transient: create a new cpuset then assign the process its original
    cpuset, ensuring that the one we created is now gone.
3.) deadlk: test assigning an anonymous mask, then resetting the process
    base affinity with 1-cpu overlap w.r.t. the anonymous mask and with
    0-cpu overlap w.r.t. the anonymous mask.
4.) jail_attach_newbase: process attaches to a jail with its own
    cpuset+mask (e.g. cpuset -c -l 1,2 jail -c path=/ command=/bin/sh)
5.) jail_attach_newbase_plain: process attaches to a jail with its own
    cpuset (e.g. cpuset -c jail -c path=/ command=/bin/sh)
6.) jail_attach_prevbase: process attaches to a jail with the containing
    jail's root cpuset (e.g. jail -c path=/ command=/bin/sh)
7.) jail_attach_plain: process attaches to a jail with the containing jail's
    root cpuset+mask.
8.) badparent: creates a new cpuset and modifies the anonymous thread mask,
    then setid's back to the original and checks that cpuset_getid() returns
    the expected set.

Differential Revision:	https://reviews.freebsd.org/D27307
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The cpuset(2) tests should be run as root (require.user properly set) with
&gt;= 3 cpus for maximum coverage. All tests that want to modify the cpuset
don't assume any particular cpu layout (i.e. the first cpu may not be 0, the
last may not be first + count) and the following scenarios are tested:

1.) newset: basic execute cpuset() to grab a new cpuset, make sure the
    assigned cpuset then has a different ID.
2.) transient: create a new cpuset then assign the process its original
    cpuset, ensuring that the one we created is now gone.
3.) deadlk: test assigning an anonymous mask, then resetting the process
    base affinity with 1-cpu overlap w.r.t. the anonymous mask and with
    0-cpu overlap w.r.t. the anonymous mask.
4.) jail_attach_newbase: process attaches to a jail with its own
    cpuset+mask (e.g. cpuset -c -l 1,2 jail -c path=/ command=/bin/sh)
5.) jail_attach_newbase_plain: process attaches to a jail with its own
    cpuset (e.g. cpuset -c jail -c path=/ command=/bin/sh)
6.) jail_attach_prevbase: process attaches to a jail with the containing
    jail's root cpuset (e.g. jail -c path=/ command=/bin/sh)
7.) jail_attach_plain: process attaches to a jail with the containing jail's
    root cpuset+mask.
8.) badparent: creates a new cpuset and modifies the anonymous thread mask,
    then setid's back to the original and checks that cpuset_getid() returns
    the expected set.

Differential Revision:	https://reviews.freebsd.org/D27307
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/libc/tests/sys: raise WARNS to 6</title>
<updated>2020-09-24T21:39:09+00:00</updated>
<author>
<name>Alan Somers</name>
<email>asomers@FreeBSD.org</email>
</author>
<published>2020-09-24T21:39:09+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=9f036e84fb4528580a9d0f88f5090618b4b9c3b4'/>
<id>9f036e84fb4528580a9d0f88f5090618b4b9c3b4</id>
<content type='text'>
MFC after:	2 weeks
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
MFC after:	2 weeks
</pre>
</div>
</content>
</entry>
</feed>
