<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/compat/linux/linux_stats.c, branch upstream/10.1.0</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=upstream%2F10.1.0</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=upstream%2F10.1.0'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2012-02-10T12:35:57Z</updated>
<entry>
<title>Remove direct access to si_name.</title>
<updated>2012-02-10T12:35:57Z</updated>
<author>
<name>Ed Schouten</name>
<email>ed@FreeBSD.org</email>
</author>
<published>2012-02-10T12:35:57Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=7870adb640dfa24455291c665ac965046e5622e9'/>
<id>urn:sha1:7870adb640dfa24455291c665ac965046e5622e9</id>
<content type='text'>
Code should just use the devtoname() function to obtain the name of a
character device. Also add const keywords to pieces of code that need it
to build properly.

MFC after:	2 weeks
</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>
<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>Linux' shm_open() fails because it wants to find some funky shmfs</title>
<updated>2011-02-09T20:23:22Z</updated>
<author>
<name>Alexander Leidinger</name>
<email>netchild@FreeBSD.org</email>
</author>
<published>2011-02-09T20:23:22Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=529844c77c7eb584746c1544a2bc32904571cfd2'/>
<id>urn:sha1:529844c77c7eb584746c1544a2bc32904571cfd2</id>
<content type='text'>
to construct the full pathname. It starts to search at the default
mountpoint which is /dev/shm. If this fails it runs through fstab
and searches for shmfs and tmpfs. Whatever it finds will be
statfs()'ed to be checked for Linux' fs magic for shmfs (0x01021994).

Ideally our tmpfs should deliver this fs magic to Linux processes, but
as our tmpfs is considered to be an experimental feature we can not
assume that there is always a tmpfs available.

To make shared memory work in the Linuxulator, force the fs type of
/dev/shm (which can be a symlink) to match what Linux expects. The user
is responsible (info has to be added to the linux base ports and the docs)
to setup a suitable link for /dev/shm.

Noticed by:	Andre Albsmeier &lt;Andre.Albsmeier@siemens.com&gt;
Submitted by:	Andre Albsmeier &lt;Andre.Albsmeier@siemens.com&gt;
MFC after:	1 month
</content>
</entry>
<entry>
<title>Rename st_*timespec fields to st_*tim for POSIX 2008 compliance.</title>
<updated>2010-03-28T13:13:22Z</updated>
<author>
<name>Ed Schouten</name>
<email>ed@FreeBSD.org</email>
</author>
<published>2010-03-28T13:13:22Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=510ea843baf66ae678ca6ddbbbca9816177be5b0'/>
<id>urn:sha1:510ea843baf66ae678ca6ddbbbca9816177be5b0</id>
<content type='text'>
A nice thing about POSIX 2008 is that it finally standardizes a way to
obtain file access/modification/change times in sub-second precision,
namely using struct timespec, which we already have for a very long
time. Unfortunately POSIX uses different names.

This commit adds compatibility macros, so existing code should still
build properly. Also change all source code in the kernel to work
without any of the compatibility macros. This makes it all a less
ambiguous.

I am also renaming st_birthtime to st_birthtim, even though it was a
local extension anyway. It seems Cygwin also has a st_birthtim.
</content>
</entry>
<entry>
<title>No need to include security/mac/mac_framework.h here.</title>
<updated>2010-02-18T22:26:01Z</updated>
<author>
<name>Pawel Jakub Dawidek</name>
<email>pjd@FreeBSD.org</email>
</author>
<published>2010-02-18T22:26:01Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=957d68dd91a6dd07f056c5bbd81ce1e257248748'/>
<id>urn:sha1:957d68dd91a6dd07f056c5bbd81ce1e257248748</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Move "options MAC" from opt_mac.h to opt_global.h, as it's now in GENERIC</title>
<updated>2009-06-05T14:55:22Z</updated>
<author>
<name>Robert Watson</name>
<email>rwatson@FreeBSD.org</email>
</author>
<published>2009-06-05T14:55:22Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=bcf11e8d0048006ba97cb460a134cc23290428b2'/>
<id>urn:sha1:bcf11e8d0048006ba97cb460a134cc23290428b2</id>
<content type='text'>
and used in a large number of files, but also because an increasing number
of incorrect uses of MAC calls were sneaking in due to copy-and-paste of
MAC-aware code without the associated opt_mac.h include.

Discussed with:	pjd
</content>
</entry>
<entry>
<title>Move the per-prison Linux MIB from a private one-off pointer to the new</title>
<updated>2009-05-07T18:36:47Z</updated>
<author>
<name>Jamie Gritton</name>
<email>jamie@FreeBSD.org</email>
</author>
<published>2009-05-07T18:36:47Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=7ae27ff49f75ab84aa08078514699692fb9c4f16'/>
<id>urn:sha1:7ae27ff49f75ab84aa08078514699692fb9c4f16</id>
<content type='text'>
OSD-based jail extensions.  This allows the Linux MIB to accessed via
jail_set and jail_get, and serves as a demonstration of adding jail support
to a module.

Reviewed by:	dchagin, kib
Approved by:	bz (mentor)
</content>
</entry>
<entry>
<title>Don't make Linux stat() open character devices to resolve its name.</title>
<updated>2009-02-20T13:05:29Z</updated>
<author>
<name>Ed Schouten</name>
<email>ed@FreeBSD.org</email>
</author>
<published>2009-02-20T13:05:29Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=0eee862a5427f8d1975b1b3152949558489afaf7'/>
<id>urn:sha1:0eee862a5427f8d1975b1b3152949558489afaf7</id>
<content type='text'>
The existing code calls kern_open() to resolve the vnode of a pathname
right after a stat(). This is not correct, because it causes random
character devices to be opened in /dev. This means ls'ing a tape
streamer will cause it to rewind, for example. Changes I have made:

- Add kern_statat_vnhook() to allow binary emulators to `post-process'
  struct stat, using the proper vnode.

- Remove unneeded printf's from stat() and statfs().

- Make the Linuxolator use kern_statat_vnhook(), replacing
  translate_path_major_minor_at().

- Let translate_fd_major_minor() use vp-&gt;v_rdev instead of
  vp-&gt;v_un.vu_cdev.

Result:

	crw-rw-rw- 1 root root   0, 14 Feb 20 13:54 /dev/ptmx
	crw--w---- 1 root adm  136,  0 Feb 20 14:03 /dev/pts/0
	crw--w---- 1 root adm  136,  1 Feb 20 14:02 /dev/pts/1
	crw--w---- 1 ed   tty  136,  2 Feb 20 14:03 /dev/pts/2

Before this commit, ptmx also had a major number of 136, because it
silently allocated and deallocated a pseudo-terminal. Device nodes that
cannot be opened now have proper major/minor-numbers.

Reviewed by:	kib, netchild, rdivacky (thanks!)
</content>
</entry>
<entry>
<title>Last step of splitting up minor and unit numbers: remove minor().</title>
<updated>2009-01-28T17:57:16Z</updated>
<author>
<name>Ed Schouten</name>
<email>ed@FreeBSD.org</email>
</author>
<published>2009-01-28T17:57:16Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=a4611ab612f1eaf057262b5251d6745a90f99294'/>
<id>urn:sha1:a4611ab612f1eaf057262b5251d6745a90f99294</id>
<content type='text'>
Inside the kernel, the minor() function was responsible for obtaining
the device minor number of a character device. Because we made device
numbers dynamically allocated and independent of the unit number passed
to make_dev() a long time ago, it was actually a misnomer. If you really
want to obtain the device number, you should use dev2udev().

We already converted all the drivers to use dev2unit() to obtain the
device unit number, which is still used by a lot of drivers. I've
noticed not a single driver passes NULL to dev2unit(). Even if they
would, its behaviour would make little sense. This is why I've removed
the NULL check.

Ths commit removes minor(), minor2unit() and unit2minor() from the
kernel. Because there was a naming collision with uminor(), we can
rename umajor() and uminor() back to major() and minor(). This means
that the makedev(3) manual page also applies to kernel space code now.

I suspect umajor() and uminor() isn't used that often in external code,
but to make it easier for other parties to port their code, I've
increased __FreeBSD_version to 800062.
</content>
</entry>
</feed>
