<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/dev/proto, branch release/12.3.0</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=release%2F12.3.0</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=release%2F12.3.0'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2021-04-06T15:20:13Z</updated>
<entry>
<title>Lock busdma operations and serialize detach against open/close</title>
<updated>2021-04-06T15:20:13Z</updated>
<author>
<name>Marcel Moolenaar</name>
<email>marcel@FreeBSD.org</email>
</author>
<published>2019-07-04T02:51:34Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=bd422989a99b5acbc1017945a115f111ac81c131'/>
<id>urn:sha1:bd422989a99b5acbc1017945a115f111ac81c131</id>
<content type='text'>
Use sx to allow M_WAITOK allocations (suggested by markj).

admbugs: 782
Reviewed by:	markj

(cherry picked from commit 9f011bca829751ed3552ac94fe7c865d75fabfc4)
</content>
</entry>
<entry>
<title>MFC r340771: proto: change device permissions to 0600</title>
<updated>2018-11-25T00:32:23Z</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2018-11-25T00:32:23Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=ed12a9c3a2ef2f2923e8d5599d3b927f76f4b727'/>
<id>urn:sha1:ed12a9c3a2ef2f2923e8d5599d3b927f76f4b727</id>
<content type='text'>
C Turt reports that the driver is not thread safe and may have
exploitable races.

Note that the proto device is intended for prototyping and development,
and is not for use on production systems.  From the man page:

SECURITY CONSIDERATIONS
    Because programs have direct access to the hardware, the proto
    driver is inherently insecure.  It is not advisable to use this
    driver on a production machine.

The proto device is not included in any of FreeBSD's kernel config files
(although the module is built).

The issues in the proto device still need to be fixed, and the device is
inherently (and intentionally) insecure, but it might as well be limited
to root only.

admbugs:	782
Reported by:	C Turt &lt;ecturt@gmail.com&gt;
Sponsored by:	The FreeBSD Foundation
</content>
</entry>
<entry>
<title>Use uintmax_t (typedef'd to rman_res_t type) for rman ranges.</title>
<updated>2016-03-18T01:28:41Z</updated>
<author>
<name>Justin Hibbits</name>
<email>jhibbits@FreeBSD.org</email>
</author>
<published>2016-03-18T01:28:41Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=da1b038af9f9551a0b2f33d312b4eede00aa1542'/>
<id>urn:sha1:da1b038af9f9551a0b2f33d312b4eede00aa1542</id>
<content type='text'>
On some architectures, u_long isn't large enough for resource definitions.
Particularly, powerpc and arm allow 36-bit (or larger) physical addresses, but
type `long' is only 32-bit.  This extends rman's resources to uintmax_t.  With
this change, any resource can feasibly be placed anywhere in physical memory
(within the constraints of the driver).

Why uintmax_t and not something machine dependent, or uint64_t?  Though it's
possible for uintmax_t to grow, it's highly unlikely it will become 128-bit on
32-bit architectures.  64-bit architectures should have plenty of RAM to absorb
the increase on resource sizes if and when this occurs, and the number of
resources on memory-constrained systems should be sufficiently small as to not
pose a drastic overhead.  That being said, uintmax_t was chosen for source
clarity.  If it's specified as uint64_t, all printf()-like calls would either
need casts to uintmax_t, or be littered with PRI*64 macros.  Casts to uintmax_t
aren't horrible, but it would also bake into the API for
resource_list_print_type() either a hidden assumption that entries get cast to
uintmax_t for printing, or these calls would need the PRI*64 macros.  Since
source code is meant to be read more often than written, I chose the clearest
path of simply using uintmax_t.

Tested on a PowerPC p5020-based board, which places all device resources in
0xfxxxxxxxx, and has 8GB RAM.
Regression tested on qemu-system-i386
Regression tested on qemu-system-mips (malta profile)

Tested PAE and devinfo on virtualbox (live CD)

Special thanks to bz for his testing on ARM.

Reviewed By: bz, jhb (previous)
Relnotes:	Yes
Sponsored by:	Alex Perez/Inertial Computing
Differential Revision: https://reviews.freebsd.org/D4544
</content>
</entry>
<entry>
<title>Check the sync operation.</title>
<updated>2015-07-28T04:54:05Z</updated>
<author>
<name>Marcel Moolenaar</name>
<email>marcel@FreeBSD.org</email>
</author>
<published>2015-07-28T04:54:05Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=f40c76d8dedcc7cf095b00787567a4f1d575280f'/>
<id>urn:sha1:f40c76d8dedcc7cf095b00787567a4f1d575280f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>o   make sure the boundary is a power of 2, when not zero.</title>
<updated>2015-07-26T16:39:37Z</updated>
<author>
<name>Marcel Moolenaar</name>
<email>marcel@FreeBSD.org</email>
</author>
<published>2015-07-26T16:39:37Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=b2ce196ca1af146f5aa010a519d79705c72137bb'/>
<id>urn:sha1:b2ce196ca1af146f5aa010a519d79705c72137bb</id>
<content type='text'>
o   don't convert 0 to ~0 just so that we can use MIN. ~0 is not a
    valid boundary. Introduce BNDRY_MIN that deals with 0 values
    that mean no boundary.
</content>
</entry>
<entry>
<title>Check the hw.proto.attach environment variable for devices that</title>
<updated>2015-07-19T23:37:45Z</updated>
<author>
<name>Marcel Moolenaar</name>
<email>marcel@FreeBSD.org</email>
</author>
<published>2015-07-19T23:37:45Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=be00e098188c0dec135fb449334593731abc0033'/>
<id>urn:sha1:be00e098188c0dec135fb449334593731abc0033</id>
<content type='text'>
proto(4) should attach to instead of the normal driver.

Document the variable.
</content>
</entry>
<entry>
<title>Implement unload and sync operations.</title>
<updated>2015-07-03T05:44:58Z</updated>
<author>
<name>Marcel Moolenaar</name>
<email>marcel@FreeBSD.org</email>
</author>
<published>2015-07-03T05:44:58Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=42d3ab5d1b225b1783288c830ae25d67a4f34aea'/>
<id>urn:sha1:42d3ab5d1b225b1783288c830ae25d67a4f34aea</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add create, destroy and load of memory descriptors.</title>
<updated>2015-07-03T01:52:22Z</updated>
<author>
<name>Marcel Moolenaar</name>
<email>marcel@FreeBSD.org</email>
</author>
<published>2015-07-03T01:52:22Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=89abdea8f020e3afd03227c7fa2d3ec20cb26689'/>
<id>urn:sha1:89abdea8f020e3afd03227c7fa2d3ec20cb26689</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add an ISA/ACPI bus attachment to proto(4).</title>
<updated>2015-07-02T19:21:29Z</updated>
<author>
<name>Marcel Moolenaar</name>
<email>marcel@FreeBSD.org</email>
</author>
<published>2015-07-02T19:21:29Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=3a232946f745ad78e2257711fc757da9e0aa20af'/>
<id>urn:sha1:3a232946f745ad78e2257711fc757da9e0aa20af</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Change the probe to what was intended: attach to devices with</title>
<updated>2015-06-22T00:34:29Z</updated>
<author>
<name>Marcel Moolenaar</name>
<email>marcel@FreeBSD.org</email>
</author>
<published>2015-06-22T00:34:29Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=3f745144d99d23b4819d3ce255ff333e8ee51c6f'/>
<id>urn:sha1:3f745144d99d23b4819d3ce255ff333e8ee51c6f</id>
<content type='text'>
a type 0 header and not to function 0 devices.
</content>
</entry>
</feed>
