<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/dev/snp, branch release/9.3.0</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=release%2F9.3.0</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=release%2F9.3.0'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2011-08-11T12:30:23Z</updated>
<entry>
<title>Second-to-last commit implementing Capsicum capabilities in the FreeBSD</title>
<updated>2011-08-11T12:30:23Z</updated>
<author>
<name>Robert Watson</name>
<email>rwatson@FreeBSD.org</email>
</author>
<published>2011-08-11T12:30:23Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=a9d2f8d84f69e98100b5746816b35666bcf992ac'/>
<id>urn:sha1:a9d2f8d84f69e98100b5746816b35666bcf992ac</id>
<content type='text'>
kernel for FreeBSD 9.0:

Add a new capability mask argument to fget(9) and friends, allowing system
call code to declare what capabilities are required when an integer file
descriptor is converted into an in-kernel struct file *.  With options
CAPABILITIES compiled into the kernel, this enforces capability
protection; without, this change is effectively a no-op.

Some cases require special handling, such as mmap(2), which must preserve
information about the maximum rights at the time of mapping in the memory
map so that they can later be enforced in mprotect(2) -- this is done by
narrowing the rights in the existing max_protection field used for similar
purposes with file permissions.

In namei(9), we assert that the code is not reached from within capability
mode, as we're not yet ready to enforce namespace capabilities there.
This will follow in a later commit.

Update two capability names: CAP_EVENT and CAP_KEVENT become
CAP_POST_KEVENT and CAP_POLL_KEVENT to more accurately indicate what they
represent.

Approved by:	re (bz)
Submitted by:	jonathan
Sponsored by:	Google Inc
</content>
</entry>
<entry>
<title>Fix whitespace inconsistencies in the TTY layer and its drivers owned by me.</title>
<updated>2011-06-26T18:26:20Z</updated>
<author>
<name>Ed Schouten</name>
<email>ed@FreeBSD.org</email>
</author>
<published>2011-06-26T18:26:20Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=7c9669276e4a26554643756f0c0ff180b990b625'/>
<id>urn:sha1:7c9669276e4a26554643756f0c0ff180b990b625</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add ttydisc_rint_simple().</title>
<updated>2009-08-23T08:04:40Z</updated>
<author>
<name>Ed Schouten</name>
<email>ed@FreeBSD.org</email>
</author>
<published>2009-08-23T08:04:40Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=5c67885a2660e6403402851f912dd01331cb45d4'/>
<id>urn:sha1:5c67885a2660e6403402851f912dd01331cb45d4</id>
<content type='text'>
I noticed several drivers in our tree don't actually care about parity
and framing, such as pts(4), snp(4) (and my partially finished console
driver). Instead of duplicating a lot of code, I think we'd better add a
utility function for those drivers to quickly process a buffer of input.

Also change pts(4) and snp(4) to use this function.
</content>
</entry>
<entry>
<title>Keep this line shorter than 80 columns.</title>
<updated>2009-05-13T19:29:50Z</updated>
<author>
<name>Ed Schouten</name>
<email>ed@FreeBSD.org</email>
</author>
<published>2009-05-13T19:29:50Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=aa16f86ca5cd03da24ba042731c67b0c7778c68f'/>
<id>urn:sha1:aa16f86ca5cd03da24ba042731c67b0c7778c68f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add macros around the sx operations in snp(4).</title>
<updated>2009-05-11T18:52:46Z</updated>
<author>
<name>Ed Schouten</name>
<email>ed@FreeBSD.org</email>
</author>
<published>2009-05-11T18:52:46Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=7fb6f68587c6df50b08f7c11a8a56699f41a9f40'/>
<id>urn:sha1:7fb6f68587c6df50b08f7c11a8a56699f41a9f40</id>
<content type='text'>
As an experiment, I changed snp(4) to use a mutex instead of an sx lock.
We can't enable this right now, because Syscons still picks up Giant.
It's nice to already have the framework there.
</content>
</entry>
<entry>
<title>Slightly improve the design of the TTY buffer.</title>
<updated>2009-02-03T19:58:28Z</updated>
<author>
<name>Ed Schouten</name>
<email>ed@FreeBSD.org</email>
</author>
<published>2009-02-03T19:58:28Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=41ba7e9b13c4c50e6110d72e5a9eb9b91fe981fd'/>
<id>urn:sha1:41ba7e9b13c4c50e6110d72e5a9eb9b91fe981fd</id>
<content type='text'>
The TTY buffers used the standard &lt;sys/queue.h&gt; lists. Unfortunately
they have a big shortcoming. If you want to have a double linked list,
but no tail pointer, it's still not possible to obtain the previous
element in the list. Inside the buffers we don't need them. This is why
I switched to custom linked list macros. The macros will also keep track
of the amount of items in the list. Because it doesn't use a sentinel,
we can just initialize the queues with zero.

In its simplest form (the output queue), we will only keep two
references to blocks in the queue, namely the head of the list and the
last block in use. All free blocks are stored behind the last block in
use.

I noticed there was a very subtle bug in the previous code: in a very
uncommon corner case, it would uma_zfree() a block in the queue before
calling memcpy() to extract the data from the block.
</content>
</entry>
<entry>
<title>Change ttyhook_register() second argument from thread to process pointer.</title>
<updated>2008-12-13T21:17:46Z</updated>
<author>
<name>Alexander Motin</name>
<email>mav@FreeBSD.org</email>
</author>
<published>2008-12-13T21:17:46Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=a9385ad10fc917da9876dfdd2baa43a82c36d94e'/>
<id>urn:sha1:a9385ad10fc917da9876dfdd2baa43a82c36d94e</id>
<content type='text'>
Thread was not really needed there, while previous ng_tty implementation
that used thread pointer had locking issues (using sx while holding mutex).
</content>
</entry>
<entry>
<title>Reintroduce the snp(4) driver.</title>
<updated>2008-11-05T15:04:03Z</updated>
<author>
<name>Ed Schouten</name>
<email>ed@FreeBSD.org</email>
</author>
<published>2008-11-05T15:04:03Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=932ef5b5cdfd11055e5a1239cabde17748174f78'/>
<id>urn:sha1:932ef5b5cdfd11055e5a1239cabde17748174f78</id>
<content type='text'>
Because the TTY hooks interface was not finished when I imported the
MPSAFE TTY layer, I had to disconnect the snp(4) driver. This snp(4)
implementation has been sitting in my P4 branch for some time now.
Unfortunately it still doesn't use the same error handling as snp(4)
(returning codes through FIONREAD), but it should already be usable.

I'm committing this to SVN, hoping someone else could polish off its
rough edges. It's always better than having a broken driver sitting in
the tree.
</content>
</entry>
<entry>
<title>Even though snp(4) in SVN is still broken, remove the unneeded D_NEEDMINOR.</title>
<updated>2008-09-19T10:21:30Z</updated>
<author>
<name>Ed Schouten</name>
<email>ed@FreeBSD.org</email>
</author>
<published>2008-09-19T10:21:30Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=873da6a7fafc46728bcb8a68132605c2f01ccc9d'/>
<id>urn:sha1:873da6a7fafc46728bcb8a68132605c2f01ccc9d</id>
<content type='text'>
kib@ and I have decided we will MFC the bpf(4)/snp(4) fixes after we've
released 7.1. Make sure the code in HEAD doesn't refer to a flag we
don't need anyway.

snp(4) in the MPSAFE TTY P4 branch already works, but still needs some
polishing before it can be integrated to SVN.
</content>
</entry>
<entry>
<title>Convert the snp(4) driver to use cdevpriv.</title>
<updated>2008-08-15T13:07:07Z</updated>
<author>
<name>Ed Schouten</name>
<email>ed@FreeBSD.org</email>
</author>
<published>2008-08-15T13:07:07Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=2e37c8eacb89146024f974f3391fea61d9ee1ea5'/>
<id>urn:sha1:2e37c8eacb89146024f974f3391fea61d9ee1ea5</id>
<content type='text'>
Now we have a single /dev/snp device node, which can be opened by
watch(8) multiple times. Even though snp(4) will be dead as of next
week, it's nice having this in SVN, because:

- We may want to MFC it to RELENG_7.
- By the time we fix snp(4) again, it's already there, existing watch(8)
  binaries should already work.

Just like bpf(4), I'm adding a symlink from snp0 to snp to remain binary
compatible.
</content>
</entry>
</feed>
