<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/share, branch releng/12.1</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=releng%2F12.1</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=releng%2F12.1'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2020-04-29T18:51:34Z</updated>
<entry>
<title>MF10 r352637,r358076: correct Clang and lld version checks</title>
<updated>2020-04-29T18:51:34Z</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2020-04-29T18:51:34Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=d98e1c62c3d9e9d9b13063d088a6c596f91245b7'/>
<id>urn:sha1:d98e1c62c3d9e9d9b13063d088a6c596f91245b7</id>
<content type='text'>
r352637 (mhorne): Allow for compiler versions &gt;= 10
r358076 (dim): Correctly recognize linker versions greater than 10.0.

These routines determine the host compiler and linker version, and caused
attempts to build 12.1-RELEASE on 13-CURRENT to fail after the latter was
updated to Clang 10.  We don't guarantee such a build config to work, but
it is used by FreeBSD ports build processes.  As a result the fixes from
stable/12 will be included with the next set of advisories, and are being
committed to the branch now to unblock ports builds.

PR:		245973
Reported by:	sbruno, antoine
Approved by:	so
Errata:		EN-20:10.build
Sponsored by:	The FreeBSD Foundation
</content>
</entry>
<entry>
<title>MFS r353402:</title>
<updated>2019-10-10T18:39:11Z</updated>
<author>
<name>Michael Tuexen</name>
<email>tuexen@FreeBSD.org</email>
</author>
<published>2019-10-10T18:39:11Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=0e4420ace73a231c30ca8fadc115941c6a46bdd5'/>
<id>urn:sha1:0e4420ace73a231c30ca8fadc115941c6a46bdd5</id>
<content type='text'>
In r343587 a simple port filter as sysctl tunable was added to siftr.
The new sysctl was not added to the siftr.4 man page at the time.
This updates the man page, and removes one left over trailing whitespace.

Submitted by:		Richard Scheffenegger
Differential Revision:	https://reviews.freebsd.org/D21619
Reviewed by:		bcr@
Approved by:		re (gjb@)
</content>
</entry>
<entry>
<title>MFS r353184, r353186, r353188, r353190, r353192, r353194, r353196, r353198,</title>
<updated>2019-10-07T13:13:06Z</updated>
<author>
<name>Hans Petter Selasky</name>
<email>hselasky@FreeBSD.org</email>
</author>
<published>2019-10-07T13:13:06Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=a3833b88b15499ff5979c36a9ca7113754775ab6'/>
<id>urn:sha1:a3833b88b15499ff5979c36a9ca7113754775ab6</id>
<content type='text'>
r353200, r353203, r353205, r353207, r353209, r353211, r353213, r353215,
r353217, r353219, r353221, r353223, r353225, r353227, r353229, r353231,
r353233, r353235, r353237, r353239, r353241, r353243, r353245, r353247,
r353249, r353251, r353253, r353255, r353257, r353259, r353261, r353263,
r353265 and r353267:

Update mlx5core, mlx5en(4) and mlx5ib(4).

Sponsored by:	Mellanox Technologies
Approved by:	re (gjb)

MFC r352956:
Fix reported max SGE calculation in mlx5ib.

Add the 512 bytes limit of RDMA READ and the size of remote address to the max
SGE calculation.

Linux commit:	288c01b746aa

MFC r352957:
Update warning and error print formats in mlx5ib.

MFC r352958:
Make sure the number of IRQ vectors doesn't exceed 256 in mlx5core.
The "intr" field in "struct mlx5_ifc_eqc_bits" is only 8 bits wide.

MFC r352959:
Check return value of mlx5_vector2eqn() function in mlx5en.

MFC r352960:
Fix for missing cleanup code in error case in mlx5en.

MFC r352961:
Implement macro for asserting priv lock in mlx5en.

MFC r352962:
Add support for Multi-Physical Function Switch, MPFS, in mlx5en.

MPFS is a logical switch in the Mellanox device which forward packets
based on a hardware driven L2 address table, to one or more physical-
or virtual- functions. The physical- or virtual- function is required
to tell the MPFS by using the MPFS firmware commands, which unicast
MAC addresses it is requesting from the physical port's traffic.
Broadcast and multicast traffic however, is copied to all listening
physical- and virtual- functions and does not need a rule in the MPFS
switching table.

Linux commit:	eeb66cdb682678bfd1f02a4547e3649b38ffea7e

MFC r352963:
Cleanup naming of IRQ vectors in mlx5en.
Remove unused IRQ naming functions and arrays.

MFC r352964:
Export channel IRQ number as part of the "hw_ctx_debug" sysctl(8) in mlx5en(4).

MFC r352965:
Correct and update some counter names in mlx5en(4).

MFC r352966:
Add port module event software counters in mlx5core.
While at it, fixup PME based on latest PRM defines.

MFC r352967:
Make the mlx5_vsc_wait_on_flag(9) function global.

MFC r352968:
Move mlx5_ifc_vsc_space_bits and mlx5_ifc_vsc_addr_bits to mlx5_ifc.h.

MFC r352969:
Use the MLX5_VSC_DOMAIN_SEMAPHORES constant instead of hand-rolled symbol
in mlx5core.

MFC r352970:
Define MLX5_VSC_DOMAIN_SCAN_CRSPACE.

MFC r352971:
Read rege map from crdump scan space in mlx5core.

MFC r352972:
Remove no longer needed fwdump register tables from mlx5core.

MFC r352973:
Add missing blank line at the end of the print in mlx5core.

MFC r352974:
Add proper print in case of 0x0 health syndrome in mlx5core.

In case of health counter fails to increment it indicates a bad device health.
In case when the syndrome indicated by firmware is 0x0, this indicates that
firmware is unable to respond to initialization segment reads.
Add proper print in this case.

MFC r352975:
Unify prints in mlx5core.

All prints in mlx5core should use on of the macros:
mlx5_core_err/dbg/warn

MFC r352976:
Unify prints in mlx5en(4).

All prints in mlx5en(4) should use on of the macros:
mlx5_en_err/dbg/warn

MFC r352977:
Sort the ports registers definitions numerically in mlx5core.

MFC r352978:
Add definition for the Port Buffer Status Register in mlx5core.

MFC r352979:
Update definitons for PPTB and PBMC registers layouts in mlx5core.

MFC r352980:
Add mlx5e_dbg() compatibility macro.

MFC r352981:
Import Linux code to query/set buffer state in mlx5en(4).

MFC r352982:
Add support for buffer parameter manipulations in mlx5en(4).

The following sysctls are added:
dev.mce.N.conf.qos.cable_length
dev.mce.N.conf.qos.buffers_size
dev.mce.N.conf.qos.buffers_prio

MFC r352983 and r353001:
Move EEPROM information query from a sysctl in mlx5en(4) to an ioctl
in mlx5core. The EEPROM information is not only a property of the
mlx5en(4) driver.

MFC r352984:
Add the ability to query the EEPROM information in mlx5tool(8).

MFC r352985:
Add sysctl(8) to get and set forward error correction, FEC, configuration
in mlx5en(4).

MFC r352986:
Return an error from ioctl(MLX5_FW_RESET) if reset was rejected in mlx5core.

MFC r352987:
Remove mkey_be from channel structure in mlx5en(4).
Use value from priv structure instead.
This saves some space in the channel structure.

MFC r352988:
Remove unused cpu field from channel structure in mlx5en(4).

MFC r352989:
Seal transmit path with regards to using destroyed mutex in mlx5en(4).

It may happen during link down that the running state may be observed
non-zero in the transmit routine, right before the running state is
cleared. This may end up using a destroyed mutex.

Make all channel mutexes and callouts persistant.

Preserve receive and send queue statistics during link toggle.

MFC r352991 and 353000:
Wait for FW readiness before initializing command interface in mlx5core.

Before attempting to initialize the command interface we must wait till
the fw_initializing bit is clear.

If we fail to meet this condition the hardware will drop our
configuration, specifically the descriptors page address.  This scenario
can happen when the firmware is still executing an FLR flow and did not
finish yet so the driver needs to wait for that to finish.

Linux commits:
6c780a0267b8
b8a92577f4be.

MFC r352992:
Use size_t for byte_to_write variable when comparing to eeprom_info_out_len
which is also size_t in mlx5tool(8).

MFC r352993:
Randomize the delay when waiting for VSC flag in mlx5core.

The PRM suggests random 0 - 10ms to prevent multiple waiters on the same
interval in order to avoid starvation.

MFC r352994:
Improve mlx5_fwdump_prep logging in mlx5core.

MFC r352995:
Only update lossy buffers config when manual PFC configuration was done
in mlx5en(4).

MFC r352996:
Add print to show user a reason for rejecting buffer size change in mlx5en(4).

MFC r352997:
Print numeric error_type and module_status in mlx5core
in case the strings are not available.

MFC r352998:
Bump driver version for mlx5core, mlx5en(4) and mlx5ib(4).
</content>
</entry>
<entry>
<title>MFC r349225:</title>
<updated>2019-09-30T03:35:48Z</updated>
<author>
<name>Li-Wen Hsu</name>
<email>lwhsu@FreeBSD.org</email>
</author>
<published>2019-09-30T03:35:48Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=c9d67586a411ab096997da8eca95ebf52206b038'/>
<id>urn:sha1:c9d67586a411ab096997da8eca95ebf52206b038</id>
<content type='text'>
Finsh readding Big5 in r317204, which was reverting r315568.  This commit
reverts r315569.

Reported by:	Ting-Wei Lan &lt;lantw44 gmail com&gt;
Discussed with:	kevlo
Sponsored by:	The FreeBSD Foundation

Approved by:	re (delphij)
</content>
</entry>
<entry>
<title>Regen src.conf.5 after r352768, r352769</title>
<updated>2019-09-26T21:06:55Z</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2019-09-26T21:06:55Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=62878556e850fed991677a367a06ebc982e4177e'/>
<id>urn:sha1:62878556e850fed991677a367a06ebc982e4177e</id>
<content type='text'>
Approved by:	re (gjb)
</content>
</entry>
<entry>
<title>MFS r352752: Add a WITH_BIND_NOW build knob</title>
<updated>2019-09-26T18:56:41Z</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2019-09-26T18:56:41Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=6b495bed876919a638e93e543937d55b30e72c5d'/>
<id>urn:sha1:6b495bed876919a638e93e543937d55b30e72c5d</id>
<content type='text'>
MFC r340186: Add a WITH_BIND_NOW build knob

The linker's -z now flag sets the DF_BIND_NOW flag, which signals to the
runtime loader that all relocation processing should be performed at
process startup rather than on demand.  In combination with lld's
default of enabling relro this causes the GOT to be made read-only when
the process starts, preventing straightforward GOT overwrite attacks.

MFC r341429: disable BIND_NOW in libc, libthr, and rtld

An issue remains with BIND_NOW and processes using threads.  For now,
restore libc's BIND_NOW disable, and also disable BIND_NOW in rtld and
libthr.

MFC r345625: revert r341429 "disable BIND_NOW in libc, libthr, and rtld"

r345620 by kib@ fixed the rtld issue that caused a crash at startup
during resolution of libc's ifuncs with BIND_NOW.

MFC r345638: Revert change accidentally committed along with r345625

MFC r345640: Revert other accidentally committed part of r345625

Approved by:	re (gjb)
Sponsored by:	The FreeBSD Foundation
</content>
</entry>
<entry>
<title>MFS r352754: Add WITH_PIE knob to build Position Independent Executables</title>
<updated>2019-09-26T18:37:58Z</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2019-09-26T18:37:58Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=349a1e572466e410130570a575ee09fef5903f11'/>
<id>urn:sha1:349a1e572466e410130570a575ee09fef5903f11</id>
<content type='text'>
MFC r344179: Add WITH_PIE knob to build Position Independent Executables

Building binaries as PIE allows the executable itself to be loaded at a
random address when ASLR is enabled (not just its shared libraries).

With this change PIE objects have a .pieo extension and INTERNALLIB
libraries libXXX_pie.a.

MK_PIE is disabled for some kerberos5 tools, Clang, and Subversion, as
they explicitly reference .a libraries in their Makefiles.  These can
be addressed on an individual basis later.  MK_PIE is also disabled for
rtld-elf because it is already position-independent using bespoke
Makefile rules.

Currently only dynamically linked binaries will be built as PIE.

MFC r344181: Fix Makefile conditional after r344179

MFC r344182: Use make's :tl instead of checking "no" and "NO"

MFC r344189: Fixup bsd.prog.mk after r344182

MFC r344211: wlandebug: disable PIE to fix build failure

libifconfig is built as a static-only PRIVATELIB (and there is no _pie.a
version) so disable PIE in libifconfig's consumer.

r345489: Fix GNU objdump build under WITH_PIE

Explicitly specified bare .a libraries need ${PIE_SUFFIX}.

r345490: Apply WITH_PIE changes to other binutils components

Followon to r345489, explicitly specified bare .a libraries need
${PIE_SUFFIX} (although these still built).

r345778: Fix gdb/kgdb build under WITH_PIE

Explicitly specified bare .a libraries need ${PIE_SUFFIX}.

Approved by:	re (gjb)
Sponsored by:	The FreeBSD Foundation
</content>
</entry>
<entry>
<title>MFC r339738, r339744, r339770, r339773, r339864-r339866, r339907-r339908, r339912-r339913, r339916, r339954, r340213, r340395, r340840, r340910-r340911, r341424, r342773, r342974, r351027, r352073:</title>
<updated>2019-09-16T13:41:24Z</updated>
<author>
<name>Andrew Turner</name>
<email>andrew@FreeBSD.org</email>
</author>
<published>2019-09-16T13:41:24Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=6592a716f6050bcec9cc479a32d0824f4cc71bf7'/>
<id>urn:sha1:6592a716f6050bcec9cc479a32d0824f4cc71bf7</id>
<content type='text'>
MFC the BSD crtbegin to stable/12 but keep it disabled.

r339738:
Implement a BSD licensed crtbegin/crtend

These are needed for .ctors/.dtors and .jcr handling. The former needs
all the function pointers to be called in the correct order from the
.init/.fini section. The latter just needs to call a gcj specific function
if it exists with a pointer to the start of the .jcr section.

This is currently disabled until __dso_handle support is added.

Reviewed by:	emaste
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D17587

r339744:
Add a missing include for src.opts.mk. Without it MK_TESTS isn't defined.

MFC with:	r339738
Sponsored by:	DARPA, AFRL

r339770:
Drop the csu tests WARNS to 5 to fix the powerpc64 build.

MFC with:	r339738
Sponsored by:	DARPA, AFRL

r339773:
Add __dso_handle to the BSD crtbegin. This is used to identify shared
objects.

MFC with:	r339738
Sponsored by:	DARPA, AFRL

r339864:
Check __dso_handle is NULL in non-DSO objects. It should only be non-NULL
when accessed from a shared object.

MFC with:	r339738
Sponsored by:	DARPA, AFRL

r339865:
Include the csu test directories in BSD.tests.dist

MFC with:	r339738
Sponsored by:	DARPA, AFRL

r339866:
Make the .ctors, .dtors, and .jcr markers as static. They shouldn't be
accessible from out of the files they are defined in.

MFC with:	r339738
Sponsored by:	DARPA, AFRL

r339907:
The jcr argument to _Jv_RegisterClasses is used, stop marking it otherwise.

MFC with:	r339738
Sponsored by:	DARPA, AFRL

r339908:
Run the csu tests on a DSO. This builds the tests into a shared library,
then runs these from the base test programs. With this we can check
crtbeginS.o and crtendS.o are working as expected.

MFC with:	r339738
Sponsored by:	DARPA, AFRL

r339912:
Fix the location of the static keyword.

MFC with:	r339738
Sponsored by:	DARPA, AFRL

r339913:
Disable the .preinit_array test in DSOs, ld.bfd fails to link objects with
the section.

MFC with:	r339738
Sponsored by:	DARPA, AFRL

r339916:
Build the csu tests on all architectures.

The tests haven't been run them, but this is enough to build them so I can
get feedback on if the various crt.h headers are correct.

MFC with:	r339738
Sponsored by:	DARPA, AFRL

r339954:
Add __used to __CTOR_LIST__ and __DTOR_LIST__

Enabling BSD_CRTBEGIN on amd64 resulted in
error: unused variable '__CTOR_LIST__'.

__CTOR_LIST__ is indeed unused in crtbegin.c; it marks the beginning of
the .ctors array and is used in crtend.c.  Annotate __DTOR_LIST__ as
well for consistency.

Discussed with:	andrew
MFC with:	r339738
Sponsored by:	The FreeBSD Foundation

r340213:
Add the (untested) mips and sparc64 .init call sequences.

The BSD crtbegin/crtend code now builds on all architectures, however
further work is needed to check if it works correctly.

MFC with:	r339738
Sponsored by:	DARPA, AFRL

r340395:
Run __cxa_finalize in shared objects in the destructor path.

When we have .dtors call them before .dtor handling, otherwise call from
a destructor.

PR:		233056
MFC with:	r339738
Sponsored by:	DARPA, AFRL

r340840:
Mark the function called by the MIPS .init/.fini sequence with .local.

As with r328939 we need to mark local symbols as such. Without this the
assembly parser treats the symbols as global and created relocations
against these private symbols.

MFC with:	r339738
Sponsored by:	DARPA, AFRL

r340910:
Add the missing 0 at the end of the .jcr section.

Without this the dynamic library test was failing as it was calling
_Jv_RegisterClasses multiple times.

r340911:
Re-enable the dynamiclib tests. These should be fixed by r340910.

r341424:
Disable the BSD CRT code on powerpc and sparc64, they need extra crt*.o
files that haven't been implemented.

Reported by:	sbruno
MFC with:	r339738
Sponsored by:	DARPA, AFRL

r342773:
Add explicit csu test dependency

lib/csu/tests/dynamiclib requires libh_csu.so be built first.  I'm not
sure this is the most correct/best way to address this but it solves
the issue in my testing.

PR:		233734
Sponsored by:	The FreeBSD Foundation

r342974:
Create crtsavres.o for powerpc builds

Summary:
GCC expects to link in a crtsavres.o on powerpc platforms.  On
powerpc64 this is an empty file, but on powerpc and powerpcspe this does contain
some save/restore functions, which may not actually be necessary for newer
modern GCC and clang.  This appeases the in-tree gcc, though, and is needed in
order to switch to the BSD CRTRBEGIN.

PR:	233751
Reviewed By: andrew
Differential Revision: https://reviews.freebsd.org/D18826

r351027:
Enable BSD_CRTBEGIN on powerpc

In r342974 jhibbits added support to build crtsavres.o. This was the
blocker for BSD_CRTBEGIN to be enabled there. As such enable this
option again.

Reviewed by:	jhibbits
Sponsored by:	DARPA, AFRL

r352073:
csu: Add the riscv .init call sequence

Reviewed by:	br
Sponsored by:	Axiado
Differential Revision:	https://reviews.freebsd.org/D21537
</content>
</entry>
<entry>
<title>MFC 351064</title>
<updated>2019-09-15T20:13:46Z</updated>
<author>
<name>Doug Moore</name>
<email>dougm@FreeBSD.org</email>
</author>
<published>2019-09-15T20:13:46Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=201ff19e59b2f9c6dd486a629f03704d1aa93f23'/>
<id>urn:sha1:201ff19e59b2f9c6dd486a629f03704d1aa93f23</id>
<content type='text'>
Don't let swapon trimming wipe the bsd label.

Reviewed by: alc
Approved by: markj (mentor, implicit)
</content>
</entry>
<entry>
<title>MFC the new fusefs driver</title>
<updated>2019-09-15T04:14:31Z</updated>
<author>
<name>Alan Somers</name>
<email>asomers@FreeBSD.org</email>
</author>
<published>2019-09-15T04:14:31Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=00228becc8ebad2862e404ad3565af17d780814d'/>
<id>urn:sha1:00228becc8ebad2862e404ad3565af17d780814d</id>
<content type='text'>
MFC r350665, r350990, r350992, r351039, r351042, r351061, r351066, r351113, r351560, r351961, r351963, r352021, r352025, r352230

r350665:
fusefs: merge from projects/fuse2

This commit imports the new fusefs driver. It raises the protocol level
from 7.8 to 7.23, fixes many bugs, adds a test suite for the driver, and
adds many new features. New features include:

* Optional kernel-side permissions checks (-o default_permissions)
* Implement VOP_MKNOD, VOP_BMAP, and VOP_ADVLOCK
* Allow interrupting FUSE operations
* Support named pipes and unix-domain sockets in fusefs file systems
* Forward UTIME_NOW during utimensat(2) to the daemon
* kqueue support for /dev/fuse
* Allow updating mounts with "mount -u"
* Allow exporting fusefs file systems over NFS
* Server-initiated invalidation of the name cache or data cache
* Respect RLIMIT_FSIZE
* Try to support servers as old as protocol 7.4

Performance enhancements include:

* Implement FUSE's FOPEN_KEEP_CACHE and FUSE_ASYNC_READ flags
* Cache file attributes
* Cache lookup entries, both positive and negative
* Server-selectable cache modes: writethrough, writeback, or uncached
* Write clustering
* Readahead
* Use counter(9) for statistical reporting

PR:		199934 216391 233783 234581 235773 235774 235775
PR:		236226 236231 236236 236291 236329 236381 236405
PR:		236327 236466 236472 236473 236474 236530 236557
PR:		236560 236844 237052 237181 237588 238565
Reviewed by:	bcr (man pages)
Reviewed by:	cem, ngie, rpokala, glebius, kib, bde, emaste (post-commit
		review on project branch)
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
Pull Request:	https://reviews.freebsd.org/D21110

r350990:
fusefs: add SVN Keywords to the test files

Reported by:	SVN pre-commit hooks
MFC-With:	r350665
Sponsored by:	The FreeBSD Foundation

r350992:
fusefs: skip some tests when unsafe aio is disabled

MFC-With:       r350665
Sponsored by:   The FreeBSD Foundation

r351039:
fusefs: fix intermittency in the default_permissions.Unlink.ok test

The test needs to expect a FUSE_FORGET operation. Most of the time the test
would pass anyway, because by chance FUSE_FORGET would arrive after the
unmount.

MFC-With:	350665
Sponsored by:	The FreeBSD Foundation

r351042:
fusefs: Fix the size of fuse_getattr_in

In FUSE protocol 7.9, the size of the FUSE_GETATTR request has increased.
However, the fusefs driver is currently not sending the additional fields.
In our implementation, the additional fields are always zero, so I there
haven't been any test failures until now.  But fusefs-lkl requires the
request's length to be correct.

Fix this bug, and also enhance the test suite to catch similar bugs.

PR:		239830
MFC-With:	350665
Sponsored by:	The FreeBSD Foundation

r351061:
fusefs: fix the 32-bit build after 351042

Reported by:	jhb
MFC-With:	351042
Sponsored by:	The FreeBSD Foundation

r351066:
fusefs: fix conditional from r351061

The entirety of r351061 was a copy/paste error.  I'm sorry I've been
comitting so hastily.

Reported by:	rpokala
Reviewed by:	rpokala
MFC-With:	351061
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D21265

r351113:
fusefs: don't send the namespace during listextattr

The FUSE_LISTXATTR operation always returns the full list of a file's
extended attributes, in all namespaces. There's no way to filter the list
server-side. However, currently FreeBSD's fusefs driver sends a namespace
string with the FUSE_LISTXATTR request. That behavior was probably copied
from fuse_vnop_getextattr, which has an attribute name argument. It's
been there ever since extended attribute support was added in r324620. This
commit removes it.

Reviewed by:	cem
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D21280

r351560:
fusefs: Fix some bugs regarding the size of the LISTXATTR list

* A small error in r338152 let to the returned size always being exactly
  eight bytes too large.

* The FUSE_LISTXATTR operation works like Linux's listxattr(2): if the
  caller does not provide enough space, then the server should return ERANGE
  rather than return a truncated list.  That's true even though in FUSE's
  case the kernel doesn't provide space to the client at all; it simply
  requests a maximum size for the list.  We previously weren't handling the
  case where the server returns ERANGE even though the kernel requested as
  much size as the server had told us it needs; that can happen due to a
  race.

* We also need to ensure that a pathological server that always returns
  ERANGE no matter what size we request in FUSE_LISTXATTR won't cause an
  infinite loop in the kernel.  As of this commit, it will instead cause an
  infinite loop that exits and enters the kernel on each iteration, allowing
  signals to be processed.

Reviewed by:	cem
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D21287

r351961:
Coverity fixes in fusefs(5)

CID 1404532 fixes a signed vs unsigned comparison error in fuse_vnop_bmap.
It could potentially have resulted in VOP_BMAP reporting too many
consecutive blocks.

CID 1404364 is much worse. It was an array access by an untrusted,
user-provided variable. It could potentially have resulted in a malicious
file system crashing the kernel or worse.

Reported by:	Coverity
Reviewed by:	emaste
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D21466

r351963:
fusefs: coverity cleanup in the tests

Address the following defects reported by Coverity:

* Structurally dead code (CID 1404366): set m_quit before FAIL, not after

* Unchecked return value of sysctlbyname (CID 1404321)

* Unchecked return value of stat(2) (CID 1404471)

* Unchecked return value of open(2) (CID 1404402, 1404529)

* Unchecked return value of dup(2) (CID 1404478)

* Buffer overflows. These are all false positives caused by the fact that
  Coverity thinks I'm using a buffer to store strings, when in fact I'm
  really just using it to store a byte array that happens to be initialized
  with a string. I'm changing the type from char to uint8_t in the hopes
  that it will placate Coverity. (CID 1404338, 1404350, 1404367, 1404376,
  1404379, 1404381, 1404388, 1404403, 1404425, 1404433, 1404434, 1404474,
  1404480, 1404484, 1404503, 1404505)

* False positive file descriptor leak. I'm going to try to fix this with
  Coverity modeling, but I'll also change an EXPECT to ASSERT so we don't
  perform meaningless assertions after the failure. (CID 1404320, 1404324,
  1404440, 1404445).

* Unannotated file descriptor leak. This will be followed up by a Coverity
  modeling change. (CID 1404326, 1404334, 1404336, 1404357, 1404361,
  1404372, 1404391, 1404395, 1404409, 1404430, 1404448, 1404451, 1404455,
  1404457, 1404458, 1404460)

* Uninitialized variables in C++ constructors (CID 1404327, 1404346). In the
  case of m_maxphys, this actually led to part of the FUSE_INIT's response
  being set to stack garbage during the WriteCluster::clustering test.

* Uninitialized sun_len field in struct sockaddr_un (CID 1404330, 1404371,
  1404429).

Reported by:	Coverity
Reviewed by:	emaste
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D21457

r352021:
fusefs: suppress some Coverity resource leak CIDs in the tests

The fusefs tests deliberately leak file descriptors.  To do otherwise would
add extra complications to the tests' mock FUSE server.  This annotation
should hopefully convince Coverity to shut up about the leaks.

Reviewed by:	uqs
Sponsored by:	The FreeBSD Foundation

r352025:
mount_fusefs: fix a segfault on memory allocation failure

Reported by:	Coverity
Coverity CID:	1354188
Sponsored by:	The FreeBSD Foundation

r352230:
fusefs: Fix iosize for FUSE_WRITE in 7.8 compat mode

When communicating with a FUSE server that implements version 7.8 (or older)
of the FUSE protocol, the FUSE_WRITE request structure is 16 bytes shorter
than normal. The protocol version check wasn't applied universally, leading
to an extra 16 bytes being sent to such servers. The extra bytes were
allocated and bzero()d, so there was no information disclosure.

Reviewed by:	emaste
MFC-With:	r350665
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D21557
</content>
</entry>
</feed>
