Call to the driver-specific ioctl used to process ioctl number
that will lead to the out-of-bounds access to the ioctl handler
array.
PR: 193367
Approved by: kib
MFC of: r275209 (original commit by rea)
r281783, r281809, r281832:
r280299 (cperciva):
When creating VM images, copy the contents of the created filesystem
into a new filesystem before packaging it into a disk image. This
prevents "remnants" of deleted files from showing up in the VM images,
and reduces their compressed size (by about 10% for the cloudware
images) as a result.
r280840 (cperciva):
Clean up filesystem unmounting in vmimage builds:
- Remove vm_umount_base function which is currently unused.
- Add umount_loop function which loops attempting to unmount one
filesystem.
- Replace calls to umount with calls to umount_loop.
- Don't attempt to unmount ${DESTDIR}/dev if it isn't mounted.
The looping is necessary because sometimes umount fails due to
filesystems being busy. The most common cause of such busyness is
periodic(8) jobs running `find / ...`.
r280846 (cperciva):
Improve check for whether ${DESTDIR}/dev is mounted.
r280879 (cperciva):
Add bits for building EC2 disk images.
r280881 (cperciva):
Partially revert r278118 now that the required logic for deciding
whether freebsd-update can be useful has moved into the
firstboot_freebsd_update script.
r280884 (cperciva):
Fix pkg(8) command line in vm_extra_pre_umount().
r280928 (cperciva):
Add code for creating an EC2 AMI.
r281783:
When building VM disk images, vm_copy_base() uses tar(1) to copy
the userland from one md(4)-mounted filesystem to a clean filesystem
to prevent remnants of files that were added and removed from
resulting in an unclean filesystem. When newfs(8) creates the first
filesystem with journaled soft-updates enabled, the /.sujournal file
in the new filesystem cannot be overwritten by the /.sujournal in the
original filesystem.
To avoid this particular error case, do not enable journaled
soft-updates when creating the md(4)-backed filesystems, and instead
use tunefs(8) to enable journaled soft-updates after the new
filesystem is populated in vm_copy_base().
While here, fix a long standing bug where the build environment /boot
files were used by mkimg(1) when creating the VM disk images by using
the files in .OBJDIR.
r281809:
Simplify variable expansion in attempt to fix the vm-image build.
r281832:
Fix locating the /boot files.
Sponsored by: The FreeBSD Foundation
Add config option PAE_TABLES for the i386 kernel. It switches pmap to
use PAE format for the page tables, but does not incur other
consequences of the full PAE config. In particular, vm_paddr_t and
bus_addr_t are left 32bit, and max supported memory is still limited
by 4GB.
The option allows to have nx permissions for memory mappings on i386
kernel, while keeping the usual i386 KBI and avoiding the kernel data
sizing problems typical for the PAE config.
r261550 (by glebius):
Add test case for kern/181741. Right now test fails.
PR: 181741
Sponsored by: Nginx, Inc.
r281354:
Fix warnings, fix a typo in a testcase description, bump WARNS to 3
- Remove argc/argv (-Wunused)
- Cast len in comparison to size_t (-Wsign-compare)
Sponsored by: EMC / Isilon Storage Division
r281355:
Fix -Wunused warnings, bump WARNS to 6
The testcase fails today on subtest # 9
The output is still broken if prove -rv is run and the testcase aborts
prematurely (the testcase doesn't really conform to TAP protocol properly,
except when it completes fully)
Sponsored by: EMC / Isilon Storage Division
r281356:
Fix -Wunused warnings, bump WARNS to 6
The output is still broken if prove -rv is run and the testcase aborts
prematurely with fail_assertion (the testcase doesn't really conform to TAP
protocol properly, except when it completes fully)
Sponsored by: EMC / Isilon Storage Division
r281358:
- Parameterize out the number of accept/connect attempts
- Randomize the bind port to allow 2+ consecutive calls in < 10 minutes, and
to also not fail if (for instance) there's a server already listening on port
8080
- Don't leak the listening socket / fds into the child process
- Fix warnings:
-- Remove argc/argv (-Wunused)
-- Mark sig __unused (-Wunused)
-- Mark quit static (-Wmissing-variable-declarations)
Sponsored by: EMC / Isilon Storage Division
r281359:
Remove argc/argv (-Wunused)
Sponsored by: EMC / Isilon Storage Division
r281360:
Fix warnings
- Remove argc/argv (-Wunused)
- Mark some parameters to socket_listen_update __unused (-Wunused)
Sponsored by: EMC / Isilon Storage Division
r281361:
Remove argc/argv (-Wunused)
Sponsored by: EMC / Isilon Storage Division
r281362:
Use _exit, not exit in forked process
Sponsored by: EMC / Isilon Storage Division
r281391:
- Use static buffers for temporary file paths instead of strdup of constant strings
- Don't use /tmp because it's outside ATF's prescribed sandbox
- Use mkstemp instead of mktemp to eliminate warning
Sponsored by: EMC / Isilon Storage Division
r281392:
- Garbage collect argc/argv (-Wunused)
- Bump WARNS to 6
Sponsored by: EMC / Isilon Storage Division
r281393:
Fix warnings and bump WARNS to 6
- Garbage collect argc/argv (-Wunused)
- sleep(3) will always return an unsigned int; don't check for return codes <0
(-Wsign-compare)
Sponsored by: EMC / Isilon Storage Division
r281394:
- Don't use /tmp because it's outside ATF's prescribed sandbox
- Replace a hardcoded PATH_MAX value with sizeof(path)
- Use path like an array, not a pointer, and always try to unlink it in cleanup
Sponsored by: EMC / Isilon Storage Division
r281395:
Fix a -Wuninitialized warning by setting the socket to -1 and bump WARNS to 6
Sponsored by: EMC / Isilon Storage Division
r281397:
Mark signum unused in signal_handler; bump WARNS to 6
Sponsored by: EMC / Isilon Storage Division
r281398:
Garbage collect argc/argv and bump WARNS to 6
Sponsored by: EMC / Isilon Storage Division
r281399:
Fix warnings and bump WARNS to 6
- Staticize variables as needed
- Garbage collect argc/argv
- Fix -Wsign-compare warnings by casting small sizeof to (int)
Sponsored by: EMC / Isilon Storage Division
r281400:
- Garbage collect argc/argv; bump WARNS to 6
- Make the socket path random and move it out of /tmp as that's outside ATF's
prescribed path
Sponsored by: EMC / Isilon Storage Division
r281401:
- Garbage collect argc/argv
- Use random paths instead of one in /tmp
Sponsored by: EMC / Isilon Storage Division
r281402:
Garbage collect argc/argv and bump WARNS to 6
Sponsored by: EMC / Isilon Storage Division
r281403:
Garbage collect argc/argv and bump WARNS to 6
Sponsored by: EMC / Isilon Storage Division
r281404:
Generate temporary files with mkstemp instead of mktemp
Sponsored by: EMC / Isilon Storage Division
r281407:
Fix the knob twiddling to work properly per src.opts.mk
Sponsored by: EMC / Isilon Storage Division
r281408:
- Remove the .t wrapper and put the "magic" of determining the number of
testcases into the .c file
- Require root for now because it fails with SOCK_RAW without root privileges
- Increment the test count properly on socket create failure
Sponsored by: EMC / Isilon Storage Division
r281409:
Fix warnings, bump WARNS to 6, and use a temporary socket instead of one in /tmp
Sponsored by: EMC / Isilon Storage Division
r281410:
Fix more warnings I didn't catch in the first go-around
Sponsored by: EMC / Isilon Storage Division
r281411:
Fix even more warnings..
Sponsored by: EMC / Isilon Storage Division
Cleanup and do minor refactoring before converting testcases to ATF
- Convert errx(-1, ..) to errx(1, ..)
- Move the aio(4) checks to a single function (aio_available); use modfind(2)
instead of depending on SIGSYS (doesn't work when aio(4) support is missing,
not documented in the aio syscall manpages).
- Use aio_available liberally in the testcase functions
- Use mkstemp(3) + unlink(2) instead of mktemp(3)
- Fix some -Wunused warnings
- Bump WARNS to 6
Submitted by: mjohnston [*]
Sponsored by: EMC / Isilon Storage Division
snd_hda: add support for the Lenovo X1 20BS model.
This requires a patch to redirect the output to a separate DAC when
the headphones are used. While there, add device strings for Intel
Broadwell HDA controllers and Realtek ALC292 codecs.
Merge changes from vendor driver version 1.1.1:
v1.1.1 2015-03-26
* Support 4Kn drive.
* Change the SCSI target ID of the disk to be the index of physical
connetion to the HBA.
* Support staggered drive spin up.
* Fix a bug that command would be timeout because of improper
interrupt service routine.
* Error handling to avoid scsi command lost which caused system
hang up.
* Fix a bug that fail to get the devcie's serial number via
FreeNAS WebGUI.
Many thanks to HighPoint for continued support of FreeBSD!
Relnotes: yes
r275358:
Start process of removing the use of the deprecated "M_FLOWID" flag
from the FreeBSD network code. The flag is still kept around in the
"sys/mbuf.h" header file, but does no longer have any users. Instead
the "m_pkthdr.rsstype" field in the mbuf structure is now used to
decide the meaning of the "m_pkthdr.flowid" field. To modify the
"m_pkthdr.rsstype" field please use the existing "M_HASHTYPE_XXX"
macros as defined in the "sys/mbuf.h" header file.
This patch introduces new behaviour in the transmit direction.
Previously network drivers checked if "M_FLOWID" was set in "m_flags"
before using the "m_pkthdr.flowid" field. This check has now now been
replaced by checking if "M_HASHTYPE_GET(m)" is different from
"M_HASHTYPE_NONE". In the future more hashtypes will be added, for
example hashtypes for hardware dedicated flows.
"M_HASHTYPE_OPAQUE" indicates that the "m_pkthdr.flowid" value is
valid and has no particular type. This change removes the need for an
"if" statement in TCP transmit code checking for the presence of a
valid flowid value. The "if" statement mentioned above is now a direct
variable assignment which is then later checked by the respective
network drivers like before.
r275483:
Remove M_FLOWID from SCTP code.
r276982:
Remove no longer used "M_FLOWID" flag from mbuf.h and update the netisr
manpage.
Note: The FreeBSD version has been bumped.
Reviewed by: hps, tuexen
Sponsored by: Limelight Networks
Pad RX copy alignment calculation to avoid illegal memory accesses
The optimization made in r239940 is valid for struct mbuf's current structure
and size in FreeBSD, but hardcodes assumptions about sizes of struct mbuf,
which are unfortunately broken if additional data is added to the beginning of
struct mbuf
X-MFC note (discussed with rwatson):
This change requires the MPKTHSIZE definition, which is only available after
head@r277203 and will not be MFCed as it breaks mbuf(9) KPI.
A direct commit to stable/10 and merges to other branches to add the necessary
definitions to work with the code as-is will be done to facilitate this MFC
PR: 194314
Approved/Reviewed by: erj, jfv
Sponsored by: EMC / Isilon Storage Division
These macros are equivalent to the ones on head, except they are only exposed
when _KERNEL is defined, i.e. to kernel code, whereas the code on head is exposed
to userland as well
This is for improved forwards compatibility with mbuf(9) macros in head@r277203+,
and is required for a clean MFC of r279393
This is a direct commit to stable/10
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D2126
Reviewed by: glebius, rwatson
Sponsored by: EMC / Isilon Storage Division
users, myself included. The original code is likely papering over a
larger bug that needs to be explored, but for now get things back to
a working state.
Obtained from: Netflix, Inc.
Set ARCHIVE_EXTRACT_SECURE_SYMLINKS and ARCHIVE_EXTRACT_SECURE_NODOTDOT
as in bsdtar to prevent extraction of archive entries whose pathnames
contain .. or whose target directory would be altered by a symlink.
Also disallow absolute pathnames.
We don't currently provide an option to disable this behaviour (as
bsdtar's -P does). It is unlikely to be a problem in practice for ar(1),
but the -P option is not currently used and available if we want to
consider it for this purpose.
Obtained from: ELF tool chain ar, Ticket #474
Relnotes: Yes
Sponsored by: The FreeBSD Foundation
Fix the IPV6_MULTICAST_IF sockopt handling. RFC 3493 says when the
interface index is specified as zero, the system should select the
interface to use for outgoing multicast packets. Even the comment
for the in6p_set_multicast_if() function says about index of zero.
But in fact for zero index the function just returns EADDRNOTAVAIL.
I.e. if you first set some interface and then will try reset it
with zero ifindex, you will get EADDRNOTAVAIL.
Reset im6o_multicast_ifp to NULL when interface index specified as
zero. Also return EINVAL in case when ifnet_byindex() returns NULL.
This will be the same behaviour as when ifindex is bigger than
V_if_index. And return EADDRNOTAVAIL only when interface is not
multicast capable.
Move the message complaining about failed system resource allocations
under bootverbose. Every example I've seen to date has been due to
an ACPI system resource device reserving a range that overlaps with
system memory (which ram0 attempts to reserve) or a local or I/O APIC
(which apic0 attempts to reserve). These are always harmless but look
scary to users.
Pull in r229911 from upstream llvm trunk (by Benjamin Kramer):
MC: Allow multiple comma-separated expressions on the .uleb128 directive.
For compatiblity with GNU as. Binutils documents this as
'.uleb128 expressions'. Subtle, isn't it?
Reported by: sbruno
PR: 199554
MFC r281777:
Add llvm patch corresponding to r281775.
Fix the check for maximum mbuf's size needed to send ND6 NA and NS.
It is acceptable that the size can be equal to MCLBYTES. In the later
KAME's code this check has been moved under DIAGNOSTIC ifdef, because
the size of NA and NS is much smaller than MCLBYTES. So, it is safe to
replace the check with KASSERT.
PR: 199304