<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/dev/xen, branch releng/12.2</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=releng%2F12.2</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=releng%2F12.2'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2021-02-24T01:42:01Z</updated>
<entry>
<title>xen-blkback: fix leak of grant maps on ring setup failure</title>
<updated>2021-02-24T01:42:01Z</updated>
<author>
<name>Roger Pau Monné</name>
<email>royger@FreeBSD.org</email>
</author>
<published>2021-01-20T18:40:51Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=602f1da04217967e7627be3fe19a56098ad29b6f'/>
<id>urn:sha1:602f1da04217967e7627be3fe19a56098ad29b6f</id>
<content type='text'>
Multi page rings are mapped using a single hypercall that gets passed
an array of grants to map. One of the grants in the array failing to
map would lead to the failure of the whole ring setup operation, but
there was no cleanup of the rest of the grant maps in the array that
could have likely been created as a result of the hypercall.

Add proper cleanup on the failure path during ring setup to unmap any
grants that could have been created.

This is part of XSA-361.

Approved by:	so
Security:	CVE-2021-26932
Security:	FreeBSD-SA-21:06.xen
Security:	XSA-361
Sponsored by:	Citrix Systems R&amp;D

(cherry picked from commit 808d4aad1022a2a33d222663b0c9badde30b9d45)
(cherry picked from commit dfb372f5d38c302953a6a4e2838179cd0a1a6438)
</content>
</entry>
<entry>
<title>xen: allow limiting the amount of duplicated pending xenstore watches</title>
<updated>2021-01-29T01:15:45Z</updated>
<author>
<name>Roger Pau Monné</name>
<email>royger@FreeBSD.org</email>
</author>
<published>2020-11-25T11:34:38Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=0b9b9a15c24142efcd675b454843991856af1c97'/>
<id>urn:sha1:0b9b9a15c24142efcd675b454843991856af1c97</id>
<content type='text'>
Xenstore watches received are queued in a list and processed in a
deferred thread. Such queuing was done without any checking, so a
guest could potentially trigger a resource starvation against the
FreeBSD kernel if such kernel is watching any user-controlled xenstore
path.

Allowing limiting the amount of pending events a watch can accumulate
to prevent a remote guest from triggering this resource starvation
issue.

For the PV device backends and frontends this limitation is only
applied to the other end /state node, which is limited to 1 pending
event, the rest of the watched paths can still have unlimited pending
watches because they are either local or controlled by a privileged
domain.

The xenstore user-space device gets special treatment as it's not
possible for the kernel to know whether the paths being watched by
user-space processes are controlled by a guest domain. For this reason
watches set by the xenstore user-space device are limited to 1000
pending events. Note this can be modified using the
max_pending_watch_events sysctl of the device.

This is XSA-349.

Sponsored by:	Citrix Systems R&amp;D
MFC after:	3 days

(cherry picked from commit 4e4e43dc9e1afc863670a031cc5cc75eb5e668d6)
(cherry picked from commit 2d194dc219892049dd03564c4083080cac1aa688)

Approved by:	so
Security:	XSA-349, CVE-2020-29568
</content>
</entry>
<entry>
<title>MFC r362033:</title>
<updated>2020-07-01T01:12:23Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2020-07-01T01:12:23Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=4d27be0a24ee18e87be72e35d2c775dd262772d7'/>
<id>urn:sha1:4d27be0a24ee18e87be72e35d2c775dd262772d7</id>
<content type='text'>
Remove double-calls to tc_get_timecount() to warm timecounters
</content>
</entry>
<entry>
<title>MFC r352925: xen/ctrl: acknowledge all control requests</title>
<updated>2020-06-18T15:15:04Z</updated>
<author>
<name>Roger Pau Monné</name>
<email>royger@FreeBSD.org</email>
</author>
<published>2020-06-18T15:15:04Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=f82d96fe8037ab66f7841de5fd0b52da7caf463d'/>
<id>urn:sha1:f82d96fe8037ab66f7841de5fd0b52da7caf463d</id>
<content type='text'>
MFC r357616: xen/console: fix priority of Xen console
MFC r361274: dev/xenstore: fix return with locks held
Note this should be dev/evtchn not dev/xenstore.
MFC r361578: xenpv: do not use low 1MB for Xen mappings on i386
MFC r361580: xen/control: short circuit xctrl_on_watch_event on spurious event

Those are all Xen related fixes or minor improvements that have been sitting on
current for a reasonable time without complaints.

Sponsored by: Citrix Systems R&amp;D
</content>
</entry>
<entry>
<title>MFC r360051: tty: convert tty_lock_assert to tty_assert_locked</title>
<updated>2020-04-24T13:31:22Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2020-04-24T13:31:22Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=74727284b626971c5209f162f593ec65d4606b64'/>
<id>urn:sha1:74727284b626971c5209f162f593ec65d4606b64</id>
<content type='text'>
A later change, currently being iterated on in D24459, will in-fact change
the lock type to an sx so that TTY drivers can sleep on it if they need to.
Committing this ahead of time to make the review in question a little more
palatable.

tty_lock_assert() is unfortunately still needed for now in two places to
make sure that the tty lock has not been recursed upon, for those scenarios
where it's supplied by the TTY driver and possibly a mutex that is allowed
to recurse.
</content>
</entry>
<entry>
<title>MFC r353444:</title>
<updated>2019-10-18T13:41:08Z</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2019-10-18T13:41:08Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=c63146855722abc9a489bdcf468c480dfef107ba'/>
<id>urn:sha1:c63146855722abc9a489bdcf468c480dfef107ba</id>
<content type='text'>
Remove an unneeded include of opt_sctp.h.
</content>
</entry>
<entry>
<title>MFC r348785:</title>
<updated>2019-06-17T15:11:04Z</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2019-06-17T15:11:04Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=3c2656961c6594094d39059e03986cc897fbb3a3'/>
<id>urn:sha1:3c2656961c6594094d39059e03986cc897fbb3a3</id>
<content type='text'>
Replace uses of vm_page_unwire(m, PQ_NONE) with vm_page_unwire_noq(m).
</content>
</entry>
<entry>
<title>MFC r341398:</title>
<updated>2018-12-16T02:42:32Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2018-12-16T02:42:32Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=eb0fe45f8bbe3eccfa09feddef3c060acd56f0b2'/>
<id>urn:sha1:eb0fe45f8bbe3eccfa09feddef3c060acd56f0b2</id>
<content type='text'>
Change the vm_ooffset_t type to unsigned.

MFC note: For KPI stability, UOFF_TO_IDX() macro is still provided,
redefined to OFF_TO_IDX().
</content>
</entry>
<entry>
<title>xen: temporary disable SMAP when forwarding hypercalls from user-space</title>
<updated>2018-09-13T07:15:02Z</updated>
<author>
<name>Roger Pau Monné</name>
<email>royger@FreeBSD.org</email>
</author>
<published>2018-09-13T07:15:02Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=5ff6c7f3638411bf7e82dedd57f0f7cba57bc77d'/>
<id>urn:sha1:5ff6c7f3638411bf7e82dedd57f0f7cba57bc77d</id>
<content type='text'>
The Xen page-table walker used to resolve the virtual addresses in the
hypercalls will refuse to access user-space pages when SMAP is enabled
unless the AC flag in EFLAGS is set (just like normal hardware with
SMAP support would do).

Since privcmd allows forwarding hypercalls (and buffers) from
user-space into Xen make sure SMAP is temporary disabled for the
duration of the hypercall from user-space.

Approved by:		re (gjb)
Sponsored by:		Citrix Systems R&amp;D
</content>
</entry>
<entry>
<title>xen/netfront: Ensure curvnet is set</title>
<updated>2018-08-23T16:52:52Z</updated>
<author>
<name>Kristof Provost</name>
<email>kp@FreeBSD.org</email>
</author>
<published>2018-08-23T16:52:52Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=903eaa68f13b8a3b2d6fd035bb1376d7ac2247a7'/>
<id>urn:sha1:903eaa68f13b8a3b2d6fd035bb1376d7ac2247a7</id>
<content type='text'>
netfront_backend_changed() is called from the xenwatch_thread(), which means
that the curvnet is not set. We have to set it before we can call things like
arp_ifinit().

PR:		230845
</content>
</entry>
</feed>
