Displaying 1 50 of 303,244 commits (0.028s)

FreeBSD — head/usr.bin/mkimg endian.h bsd.c

Avoid depending on the <sys/endian.h> header for le*enc and be*enc.
Not only is the header unportable, the encoding/decoding functions
are as well.  Instead, duplicate the handful of small inlines we
need into a private header called endian.h.

Aside: an alternative approach is to move the encoding/decoding
functions to a separate system header.  While the header is still
nonportable, such an approach would make it possible to re-use the
definitions by playing games with include paths. This may be the
preferred approach if more (build) utilities need this.  This
change does not preclude that.  In fact, it makes it easier.

FreeBSD — head/usr.bin/mkimg qcow.c image.c

Eliminate the use of EDOOFUS.  The error code was used to signal
programming errors, but is really a poor substitute for assert.
And less portable as well.

FreeBSD — head/sys/arm/nvidia tegra_pcie.c

Update PCI driver to match new dts tree

In new dts tree phy is a property of port, not the controller node, also
the name was changed from "pcie" to "pcie-0"
Delta File
+21 -13 head/sys/arm/nvidia/tegra_pcie.c
+21 -13 1 file

FreeBSD — head/sys/arm/nvidia tegra_ahci.c

Update AHCI driver to match new dts tree

phy name parameter was changed from "sata-phy" to "sata-0" in new dts tree
introduced in r306197
Delta File
+1 -1 head/sys/arm/nvidia/tegra_ahci.c
+1 -1 1 file

FreeBSD — stable/9/lib/libc/stdtime strptime.c

MFC r272562,r272678,r272679

1) Fix the case we have less arguments for format string than we expected.
2) Return error on unsupported format specs.
(both according to POSIX)
3) For %Z format, understand "UTC" name too.

PR:     93197 (only r272679)

FreeBSD — head/usr.bin/mkimg format.c scheme.c

Replace the use of linker sets with constructors for both the
formats and schemes.  Formats and schemes are registered at
runtime now, rather than collected at link time.

FreeBSD — head/sys/dev/ath/ath_hal ah_regdomain.c

[ath_hal] add a comment for the channel 144 regdomain flag.

I'm .. still trying to figure out what's going on.

FreeBSD — head/sys/dev/ath/ath_hal ah_internal.h, head/sys/dev/ath/ath_hal/ah_regdomain ah_rd_freqbands.h ah_rd_domains.h

[ath_hal] Add FCC6_FCCA regulatory domain (0x0014).

Tested:

* TP-Link N900, AR9380, regdomain 0x0014 (FCC6_FCCA).

FreeBSD — stable/10/contrib/libarchive/libarchive archive_write_disk_posix.c archive_read_disk_entry_from_file.c, stable/10/contrib/libarchive/libarchive/test test_write_disk_secure746.c test_write_format_gnutar_filenames.c

MFC r305819:
Sync libarchive with vendor including important security fixes.

Issues fixed (FreeBSD):
PR #778: ACL error handling
Issue #745: Symlink check prefix optimization is too aggressive
Issue #746: Hard links with data can evade sandboxing restrictions

This update fixes the vulnerability #3 and vulnerability #4 as reported in
"non-cryptanalytic attacks against FreeBSD update components".
https://gist.github.com/anonymous/e48209b03f1dd9625a992717e7b89c4f

Fix for vulnerability #2 has already been merged in r305192.

Security: http://gist.github.com/anonymous/e48209b03f1dd9625a992717e7b89c4f

FreeBSD — stable/11/contrib/libarchive/libarchive archive_write_disk_posix.c archive_read_disk_entry_from_file.c, stable/11/contrib/libarchive/libarchive/test test_write_disk_secure746.c test_write_format_gnutar_filenames.c

MFC r305819:
Sync libarchive with vendor including important security fixes.

Issues fixed (FreeBSD):
PR #778: ACL error handling
Issue #745: Symlink check prefix optimization is too aggressive
Issue #746: Hard links with data can evade sandboxing restrictions

This update fixes the vulnerability #3 and vulnerability #4 as reported in
"non-cryptanalytic attacks against FreeBSD update components".
https://gist.github.com/anonymous/e48209b03f1dd9625a992717e7b89c4f

Fix for vulnerability #2 has already been merged in r305188.

Security: http://gist.github.com/anonymous/e48209b03f1dd9625a992717e7b89c4f

FreeBSD — head/sys/dev/usb/wlan if_rsu.c

rsu: do not restart calibration task when going out of RUN state.

Clear 'sc_calibrating' flag and stop calibration task when interface
is not associated; this fixes possible panic after detach.

Reported and tested by:        hselasky
Reviewed by:        adrian
MFC after:        6 days
Delta File
+6 -3 head/sys/dev/usb/wlan/if_rsu.c
+6 -3 1 file

FreeBSD — head/sys/i386/i386 db_disasm.c

Minor fixes for 160-bit disassembly:

(1) Print the default segment %ss before adresses relative to %bp.
    This is too cluttered for me, but so is printing some other default
    prefixes, and this is a reasonable reminder that %ss is quite
    likely to be different from %ds in 16-bit mode.

    db_disasm still handles prefixes poorly, by trying to discard
    redundant ones.  This loses information, and sometimes the result
    is wrong or misleading.

    Clean up nearby initializations and dead code.

(2) Fix decoding of operand and address size prefixes in 16-bit mode.
    They reverse the default in all modes.

Obtained from:            (1) is partly from r1.4 (2003/11/08) in DFlyBSD (?)
Delta File
+12 -6 head/sys/i386/i386/db_disasm.c
+12 -6 1 file

FreeBSD — head/sys/i386/i386 sys_machdep.c

MFamd64: r266901

Allocate a zeroed LDT.

Failing to do this might result in the LDT appearing to run out of free
descriptors because of random junk in the descriptor's 'sd_type' field.

http://lists.freebsd.org/pipermail/freebsd-amd64/2014-May/016088.html

PR:                212639
Submitted by:        wheelcomplex at gmail.com
MFC after:        2 weeks
Delta File
+1 -1 head/sys/i386/i386/sys_machdep.c
+1 -1 1 file

FreeBSD — stable/11/sys/boot/efi/loader/arch/amd64 elf64_freebsd.c

MFC r305943:
Utilize pmap.h names.

FreeBSD — stable/11/sbin/sysctl sysctl.c, stable/11/sys/amd64/amd64 machdep.c

MFC r305942:
Consolidate four efi_next_descriptor() definitions.

FreeBSD — stable/11/sys/boot/efi/include efilib.h

MFC r305941:
Add double-inclusion protection.

MFC r305947:
Add comment for the closing guard.

FreeBSD — stable/11/share/man/man9 fpu_kern.9, stable/11/sys/amd64/amd64 fpu.c

MFC r305692:
Add FPU_KERN_NOCTX flag to the fpu_kern_enter() function on amd64.

FreeBSD — head/share/mk bsd.README

Document the ".pico" extension for object files.

Suggested by: emaste@
Delta File
+1 -1 head/share/mk/bsd.README
+1 -1 1 file

FreeBSD — head UPDATING

Relocatable object files are renamed from *.So to *.pico

Reminder by:        imp@
Delta File
+6 -0 head/UPDATING
+6 -0 1 file

FreeBSD — head/share/man/man4 ddb.4, head/sys/ddb db_examine.c

Determine the operand/address size of %cs in a new function
db_segsize().

Use db_segsize() to set the default operand/address size for
disassembling.  Allow overriding this with the "alternate" display
format /I.  The API of db_disasm() should be debooleanized to pass a
more general request (amd64 needs overrides to sizes of 16, 32, and
64, but this commit doesn't implement anything for amd64 since much
larger changes are needed to restore the amd64 disassmbler's support
for non-default sizes).

Fix db_print_loc_and_inst() to ask for the normal format and not the
alternate in normal operation.

This is most useful for vm86 mode, but also works for 16-bit protected
mode.

Use db_segsize() to avoid trying to print a garbage stack trace if %cs
is 16 bits.  Print something like the stack trace termination message
for a trap boundary instead.

Document that the alternate format is now useful on i386.

FreeBSD — head/sys/amd64/amd64 machdep.c, head/sys/i386/i386 machdep.c

Fix vm86 initialization, part 3 of 2 and a half.  (Actually, just fix
early printfs and debugging of vm86 initialization and some other early
initialization in some cases.)  Add an option debug.late_console (with
default 1=off) to move console and kdb initialization back where it was.
Do the same for amd64 although there is no vm86 there.

On my test system, debug.late_console=0 works for the syscons, sio and
uart console drivers on amd64 and i386, and for vt on i386 but not on
amd64.

The early printfs fixed by debug.late_console=0 are:
- on i386, the message about lost memory above 4G
- with -v in otherwise normal use, about 20 printfs for SMAP
- other debugging messages for memory sizing.  Mostly under -v and
  not printed in normal use.

Document in a comment how much earlier the initialization and early
printf()s can be.  That is very early for the console.  Not much more
than curthread is needed.  kdb use obviously needs to be not so early,
since it needs IDT initialization and that is done relatively late
for convenience and historical reasons.

FreeBSD — stable/11/share/man/man4 re.4, stable/11/sys/dev/re if_re.c

MFC r306102:

Add support for the TP-Link TG-3468 v2.
This is an RTL8168 chip, which we already support so all we have to do is add
the vendor ID.

PR:        212876
Submitted by:        Tobias Kortkamp <t at tobik.me>

FreeBSD — stable/11/lib/libpam/modules/pam_ssh pam_ssh.8 pam_ssh.c

MFC: 304626,304635:
        r304626: Add support for Ed25519 keys.
        r304635: Remove support for SSH1, already disabled in our OpenSSH.

Submitted by:        mwlucas (r304626), vangyzen (r304635)

FreeBSD — head/sys/arm/conf GENERIC

Add the start of a GENERIC armv6 kernel config. This supports the Allwinner
SMP SoCs and qemu virt. Further SoCs can be supported if they support the
PLATFORM, PLATFORM_SMP, and MULTIDELAY options.

Tested by:        manu
Sponsored by:        ABT Systems Ltd
Delta File
+145 -0 head/sys/arm/conf/GENERIC
+145 -0 1 file

FreeBSD — head/sys/kern kern_descrip.c

Give the user a clue as to which process hit maxfiles.

MFC after:        1 week
Sponsored by:        Panzura
Delta File
+2 -2 head/sys/kern/kern_descrip.c
+2 -2 1 file

FreeBSD — head/sys/netinet6 nd6_nbr.c

Convert checks in nd6_dad_start() and nd6_dad_timer() to assertions.

In particular, these functions can assume they are operating on tentative
addresses.

MFC after:        2 weeks
Delta File
+15 -37 head/sys/netinet6/nd6_nbr.c
+15 -37 1 file

FreeBSD — head/sys/cddl/compat/opensolaris/kern opensolaris_proc.c, head/sys/cddl/compat/opensolaris/sys proc.h

Move implementations of uread() and uwrite() to the illumos compat layer.

MFC after:        1 week

FreeBSD — projects/clang390-import/contrib/llvm/lib/Target/X86 X86ISelLowering.cpp

Pull in r282336 from upstream llvm trunk (by Sanjay Patel):

  [x86] don't try to create a vector integer inst for an SSE1 target
  (PR30512)

  This bug was introduced with:
  http://reviews.llvm.org/rL272511

  We need to restrict the lowering to v4f32 comparisons because that's
  all SSE1 can handle.

  This should fix:
  https://llvm.org/bugs/show_bug.cgi?id=28044

This avoids a "Do not know how to custom type legalize this operation"
error when building the multimedia/ffmpeg port on i386 with SSE enabled.

FreeBSD — head/sys/dev/cxgbe t4_main.c t4_vf.c

cxgbe(4): Use the port's top speed to figure out whether it is "high
speed" or not (for the purpose of calculating the number of queues etc.)
This does the right thing for 25Gbps and 100Gbps ports.

FreeBSD — head/contrib/ofed/usr.lib/libsdp Makefile

When MAKEOBJDIRPREFIX points to a case-insensitive file system, the
build can break when different source files create the same target
files (case-insensitivity speaking).  This is the case for object
files compiled with -fpic and shared libraries. The former uses
an extension of ".So", and the latter an extension ".so".  Rename
shared object files from *.So to *.pico to match what NetBSD does.

Missed in r306297

MFC after:        1 month
Sponsored by:        Bracket Computing
Differential Revision:        https://reviews.freebsd.org/D7906

FreeBSD — head/usr.bin/mkimg mkimg.c

Update local variable 'block' after calling capacity_resize(),
otherwise format_resize(), which is called right after, isn't
getting the current/actual image size. Rather than rounding up,
format_resize() could end up truncating the size and we don't
allow that by design.

MFC after:        1 week
Delta File
+6 -3 head/usr.bin/mkimg/mkimg.c
+6 -3 1 file

FreeBSD — stable/10/lib/libc/sys rctl_add_rule.2 Makefile.inc, stable/11/lib/libc/sys rctl_add_rule.2 Makefile.inc

MFC r305956: Add manpage for rctl_* system calls

Approved by:        kib (mentor)
Sponsored by:        Dell Technologies

FreeBSD — head/gnu/lib/libgcc Makefile, head/gnu/lib/libgcov Makefile

When MAKEOBJDIRPREFIX points to a case-insensitive file system, the
build can break when different source files create the same target
files (case-insensitivity speaking).  This is the case for object
files compiled with -fpic and shared libraries. The former uses
an extension of ".So", and the latter an extension ".so".  Rename
shared object files from *.So to *.pico to match what NetBSD does.

See also r305855

MFC after:        1 month
Sponsored by:        Bracket Computing
Differential Revision:        https://reviews.freebsd.org/D7906

FreeBSD — stable/11/tools/tools/crypto cryptotest.c

MFC: 305066,305304,305312

Update cryptotest for modern algorithms
Clean up the usage message and remove dead code.
Add cpuset support to separate forked processes.

Reviewed by:    cem
Sponsored by:   Rubicon Communications, LLC (Netgate)

FreeBSD — head/sys/dev/cxgbe t4_main.c t4_tracer.c

cxgbe(4): Support SIOGIFXMEDIA so that ifconfig displays correct media
for 25Gbps and 100Gbps ports.   This should have been part of r305713,
which is when the driver first started reporting extended media types.

FreeBSD — stable/10/sys/compat/linux linux_ioctl.c

MFC r305896:

Implement BLKSSZGET ioctl for the Linuxulator.

PR:                212700

FreeBSD — stable/11/sys/compat/linux linux_ioctl.c

MFC r305896:

Implement BLKSSZGET ioctl for the Linuxulator.

PR:                212700

FreeBSD — head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs zfs_vnops.c

fix vnode lock assertion for extended attributes directory

Background.  In ZFS a file with extended attributes has a special
directory associated with it where each extended attribute is a file.
The attribute's name is a file name and its value is a file content.
When the ownership of a file with extended attributes is changed, ZFS
also changes ownership of the special directory.  This is where the bug
was hit.

The bug was introduced in r209158.

Nota bene.  ZFS vnode locks are typically acquired before
z_teardown_lock (i.e., before ZFS_ENTER).  But this is not the case for
the vnodes that represent the extended attribute directory and files.
Those are always locked after ZFS_ENTER.  This is confusing and fragile.

PR:                212702
Reported by:        Christian Fuss to FreeNAS
Tested by:        mav
MFC after:        1 week

FreeBSD — head/sys/dev/amdsbwd amd_chipset.h

the rest of changes intended to be committed in r306290

MFC after:        5 days
X-MFC with:        r306218

FreeBSD — head/sys/dev/amdsbwd amd_chipset.h

clarify description of the 0x790b1022 / "KERNCZ"/ "CZ" device

MFC after:        5 days
X-MFC with:        r306218
Delta File
+15 -10 head/sys/dev/amdsbwd/amd_chipset.h
+15 -10 1 file

FreeBSD — head/sys/net if_bridge.c

bridge: Fix fragment handling and memory leak

Fragmented UDP and ICMP packets were corrupted if a firewall with reassembling
feature (like pf'scrub) is enabled on the bridge.  This patch fixes corrupted
packet problem and the panic (triggered easly with low RAM) as explain in PR
185633.

bridge_pfil and bridge_fragment relationship:

bridge_pfil() receive (IN direction) packets and sent it to the firewall The
firewall can be configured for reassembling fragmented packet (like pf'scrubing)
in one mbuf chain when bridge_pfil() need to send this reassembled packet to the
outgoing interface, it needs to re-fragment it by using bridge_fragment()
bridge_fragment() had to split this mbuf (using ip_fragment) first then
had to M_PREPEND each packet in the mbuf chain for adding Ethernet
header.

But M_PREPEND can sometime create a new mbuf on the begining of the mbuf chain,
then the "main" pointer of this mbuf chain should be updated and this case is
tottaly forgotten. The original bridge_fragment code (Revision 158140,
2006 April 29) came from OpenBSD, and the call to bridge_enqueue was
embedded.  But on FreeBSD, bridge_enqueue() is done after bridge_fragment(),
then the original OpenBSD code can't work as-it of FreeBSD.

PR:                185633

    [2 lines not shown]
Delta File
+55 -31 head/sys/net/if_bridge.c
+55 -31 1 file

FreeBSD — head/sys/dev/iicbus ds1307.c

Fix ds1307 probing

'compat' can never be NULL, because the compatible check loop ends when
compat->ocd_str is NULL.  This causes ds1307 to attach to any unclaimed i2c
device.
Delta File
+1 -1 head/sys/dev/iicbus/ds1307.c
+1 -1 1 file

FreeBSD — head/sys/dev/bhnd bhnd_bus_if.m bhnd.h, head/sys/dev/bhnd/bcma bcma.c bcma_subr.c

bhnd(4): Implement common API for IOST/IOCTL register access and core reset


- Added bhnd(4) bus APIs for per-core ioctl/iost register access.
- Updated reset/suspend bhnd(4) APIs for compatibility with ioctl/iost
  changes.
- Implemented core reset/suspend support for both bcma(4) and siba(4).
- Implemented explicit release of all outstanding PMU requests at the bus
  level when putting a core into reset.

Approved by:    adrian (mentor, implicit)
Differential Revision:  https://reviews.freebsd.org/D8009

FreeBSD — head/sys/dev/iwm if_iwm.c

[iwm] fix default antenna selection a bit; fix 5GHz rate control handling.

* Don't do the antenna switching when setting up the rate table - we don't
  take into account whether it's an active antenna or not (eg shared with BT.)
  I'll look into this a bit more later.

* The default antenna is still 1, I'll look into that a bit more later.
  (So no, this doesn't fix it for Larry who needs ANT_B to be active, not
  ANT_A.)

* My changes to the rate control setup used the wrong method for finding
  a suitable rate, which led to 1M CCK frames being queued for 11a operation.
  This is .. sub-optimal.  Change the rate control lookup path to use
  the global table instead of the per-node table, which won't be setup
  until the node rate table is setup (which happens way too late in this
  game.)

Tested:

* Intel 7260, 2G and 5G operation.
Delta File
+63 -12 head/sys/dev/iwm/if_iwm.c
+63 -12 1 file

FreeBSD — head/sys/netinet6 in6.c nd6_rtr.c

Rename ndpr_refcnt to ndpr_addrcnt.

This field counts derived addresses and is not a true refcount for prefix
objects, so the previous name was misleading.

MFC after:        1 week

FreeBSD — head/sys/dev/bxe bxe.c bxe_stats.h

Fixes for issues under high workloads

MFC after:5 days

FreeBSD — user/alc/PQ_LAUNDRY/lib/libc/sys procctl.2 cap_enter.2, user/alc/PQ_LAUNDRY/lib/libcompiler_rt Makefile

MFH r306282

FreeBSD — head/sys/compat/cloudabi cloudabi_fd.c

cloudabi: use fget_cap instead of hand-rolling capability read

This has a side effect of unbreaking the build after r306272.

Discussed with:                ed
Delta File
+10 -22 head/sys/compat/cloudabi/cloudabi_fd.c
+10 -22 1 file

FreeBSD — head/targets/pseudo/userland Makefile.depend, head/usr.bin/proccontrol Makefile.depend

DIRDEPS_BUILD: Connect new directories.

Sponsored by:        Dell EMC Isilon