<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/dev/mpt, branch releng/12.4</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=releng%2F12.4</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=releng%2F12.4'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2022-04-14T06:31:43Z</updated>
<entry>
<title>mpt(4): Fix a typo in a source code comment</title>
<updated>2022-04-14T06:31:43Z</updated>
<author>
<name>Gordon Bergling</name>
<email>gbe@FreeBSD.org</email>
</author>
<published>2022-04-09T12:10:05Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=4a4c6243e9e014f4b499ed788336b2edce1e87ef'/>
<id>urn:sha1:4a4c6243e9e014f4b499ed788336b2edce1e87ef</id>
<content type='text'>
- s/proccessor/processor/

(cherry picked from commit a37c6fcc46caffc15f0f22a7e4afce9192872c1a)
</content>
</entry>
<entry>
<title>mpr/mps/mpt: verify cfg page ioctl lengths</title>
<updated>2022-04-04T00:46:34Z</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2022-03-28T13:33:54Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=56d0638c738e3f9b7fbc7f78bd49590523e01ada'/>
<id>urn:sha1:56d0638c738e3f9b7fbc7f78bd49590523e01ada</id>
<content type='text'>
*_CFG_PAGE ioctl handlers in the mpr, mps, and mpt drivers allocated a
buffer of a caller-specified size, but copied to it a fixed size header.
Add checks that the size is at least the required minimum.

Note that the device nodes are owned by root:operator with 0640
permissions so the ioctls are not available to unprivileged users.

This change includes suggestions from scottl, markj and mav.

Two of the mpt cases were reported by Lucas Leong (@_wmliang_) of
Trend Micro Zero Day Initiative; scottl reported the third case in mpt.
Same issue found in mpr and mps after discussion with imp.

Reported by:	Lucas Leong (@_wmliang_), Trend Micro Zero Day Initiative
Reviewed by:	imp, mav
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D34692

(cherry picked from commit 8276c4149b5fc7c755d6b244fbbf6dae1939f087)
</content>
</entry>
<entry>
<title>mpt(4): Remove incorrect S/G segments limits.</title>
<updated>2021-04-24T00:43:29Z</updated>
<author>
<name>Alexander Motin</name>
<email>mav@FreeBSD.org</email>
</author>
<published>2021-04-17T14:41:35Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=dd01826ad3add7e5285f4f391c9f502906c78600'/>
<id>urn:sha1:dd01826ad3add7e5285f4f391c9f502906c78600</id>
<content type='text'>
First, two of those four checks are unreachable.
Second, I don't believe there should be "&gt;=" instead of "&gt;".
Third, bus_dma(9) already returns the same EFBIG if "&gt;".

This fixes false I/O errors in worst S/G cases with maxphys &gt;= 2MB.

MFC after:	1 week

(cherry picked from commit 0f29396e493bd87ffa6a63fcb602b12e79d21a1e)
</content>
</entry>
<entry>
<title>MFC r359937:</title>
<updated>2020-04-28T17:59:37Z</updated>
<author>
<name>Brooks Davis</name>
<email>brooks@FreeBSD.org</email>
</author>
<published>2020-04-28T17:59:37Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=18fec7394da653a176be797ebcdd1eaf55897f9d'/>
<id>urn:sha1:18fec7394da653a176be797ebcdd1eaf55897f9d</id>
<content type='text'>
Centralize compatability translation macros.

Copy the CP, PTRIN, etc macros from freebsd32.h into a sys/abi_compat.h
and replace existing definitation with includes where required. This
eliminates duplicate code and allows Linux and FreeBSD compatability
headers to be included in the same files.

Obtained from:	CheriBSD
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D24275
</content>
</entry>
<entry>
<title>Revert r327828, r327949, r327953, r328016-r328026, r328041:</title>
<updated>2018-01-21T15:42:36Z</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2018-01-21T15:42:36Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=ac2fffa4b74cd83963f0d462c379c7f50eeabf20'/>
<id>urn:sha1:ac2fffa4b74cd83963f0d462c379c7f50eeabf20</id>
<content type='text'>
Uses of mallocarray(9).

The use of mallocarray(9) has rocketed the required swap to build FreeBSD.
This is likely caused by the allocation size attributes which put extra pressure
on the compiler.

Given that most of these checks are superfluous we have to choose better
where to use mallocarray(9). We still have more uses of mallocarray(9) but
hopefully this is enough to bring swap usage to a reasonable level.

Reported by:	wosch
PR:		225197
</content>
</entry>
<entry>
<title>dev: make some use of mallocarray(9).</title>
<updated>2018-01-13T22:30:30Z</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2018-01-13T22:30:30Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=26c1d774b55c4db79bca772941883244986e6f44'/>
<id>urn:sha1:26c1d774b55c4db79bca772941883244986e6f44</id>
<content type='text'>
Focus on code where we are doing multiplications within malloc(9). None of
these is likely to overflow, however the change is still useful as some
static checkers can benefit from the allocation attributes we use for
mallocarray.

This initial sweep only covers malloc(9) calls with M_NOWAIT. No good
reason but I started doing the changes before r327796 and at that time it
was convenient to make sure the sorrounding code could handle NULL values.
</content>
</entry>
<entry>
<title>sys/dev: further adoption of SPDX licensing ID tags.</title>
<updated>2017-11-27T14:52:40Z</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2017-11-27T14:52:40Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=718cf2ccb9956613756ab15d7a0e28f2c8e91cab'/>
<id>urn:sha1:718cf2ccb9956613756ab15d7a0e28f2c8e91cab</id>
<content type='text'>
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
</content>
</entry>
<entry>
<title>sys/dev: further adoption of SPDX licensing ID tags.</title>
<updated>2017-11-20T19:36:21Z</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2017-11-20T19:36:21Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=7282444b103e0b3e7c8cd053413ff6c068831cc6'/>
<id>urn:sha1:7282444b103e0b3e7c8cd053413ff6c068831cc6</id>
<content type='text'>
Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.
</content>
</entry>
<entry>
<title>mpt.h: macro parenthesization</title>
<updated>2017-06-30T22:06:24Z</updated>
<author>
<name>Ryan Libby</name>
<email>rlibby@FreeBSD.org</email>
</author>
<published>2017-06-30T22:06:24Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=5a62cbcaad2d7851f1dd03d5a078a64f743e0d8f'/>
<id>urn:sha1:5a62cbcaad2d7851f1dd03d5a078a64f743e0d8f</id>
<content type='text'>
Build with gcc -Wint-in-bool-context revealed a macro parenthesization
error (invoking mpt_lprt with a ternary expression for level).

Reviewed by:	markj
Approved by:	markj (mentor)
Sponsored by:	Dell EMC Isilon
Differential revision:	https://reviews.freebsd.org/D11412
</content>
</entry>
<entry>
<title>Partially fix target task management requests handling.</title>
<updated>2017-03-11T14:25:14Z</updated>
<author>
<name>Alexander Motin</name>
<email>mav@FreeBSD.org</email>
</author>
<published>2017-03-11T14:25:14Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=67445003fb9407f05b1f8a6404428b9be7874076'/>
<id>urn:sha1:67445003fb9407f05b1f8a6404428b9be7874076</id>
<content type='text'>
 - XPT_NOTIFY_ACKNOWLEDGE was not handled, causing stuck requests.
 - XPT_ABORT was not even trying to abort active ATIOs/INOTs.
 - Initiator's tag was not stored and not used where needed.
 - List of TM request types needed update.
 - mpt_scsi_tgt_status() missed some useful debugging.

After this change global TM requests, such as reset, should work properly.
ABORT TASK (ABTS) requests are still not passes to CTL, that is not good
and should be fixed.

MFC after:	2 weeks
</content>
</entry>
</feed>
