Commit Graph

15657 Commits

Author SHA1 Message Date
kib
5777edec4a Merge reaper facility.
MFC r270443 (by mjg):
Properly reparent traced processes when the tracer dies.

MFC r273452 (by mjg):
Plug unnecessary PRS_NEW check in kern_procctl.

MFC 275800:
Add a facility for non-init process to declare itself the reaper of
the orphaned descendants.

MFC r275821:
Add missed break.

MFC r275846 (by mckusick):
Add some additional clarification and fix a few gammer nits.

MFC r275847 (by bdrewery):
Bump Dd for r275846.
2015-01-05 03:27:09 +00:00
ngie
6e9fd215c7 MFC r276320:
Parallelize building lib/ncurses

  Differential Revision: https://reviews.freebsd.org/D1353
2015-01-05 00:15:27 +00:00
ngie
fb7e4816db MFC r274618,r276521:
MFC Note: text corrected for r274618

r274618:

  Add reachover Makefiles for contrib/netbsd-tests/lib/msun

  A variant of this code has been tested on amd64/i386 for some time by
  EMC/Isilon on 10-STABLE/11-CURRENT. It builds on other architectures, but the
  code will remain off until it's proven it works on virtual hardware or real
  hardware on other architectures

  Sponsored by: EMC / Isilon Storage Division

r276521:

  Reset errno in :scalbnf_val and :scalbnl_val before running the tests so the
  tested errno isn't stale

  This was needed in order for the test to pass on amd64 with stable/10
2015-01-05 00:02:11 +00:00
delphij
b1a2801755 MFC r275930:
Plug a memory leak.

Obtained from:	DragonFlyBSD (commit 5119ece)
2015-01-02 18:31:12 +00:00
ngie
366f16dd6a MFC r274578,r274580:
r274578:

  Add reachover Makefiles for contrib/netbsd-tests/lib/libpthread as
  lib/libthr/tests

  A variant of this code has been tested on amd64/i386 for some time by
  EMC/Isilon on 10-STABLE/11-CURRENT. It builds on other architectures, but the
  code will remain off until it's proven it works on virtual hardware or real
  hardware on other architectures

  Original work by: pho
  Sponsored by: EMC / Isilon Storage Division

r274580:

  Add reachover Makefiles for contrib/netbsd-tests/lib/librt

  A variant of this code has been tested on amd64/i386 for some time by
  EMC/Isilon on 10-STABLE/11-CURRENT. It builds on other architectures, but the
  code will remain off until it's proven it works on virtual hardware or real
  hardware on other architectures

  Sponsored by: EMC / Isilon Storage Division
2015-01-01 02:12:43 +00:00
ngie
d4c625976a MFC r264400,r265836:
r264400:

  NO_MAN= has been deprecated in favor of MAN= for some time, go ahead
  and finish the job. ncurses is now the only Makefile in the tree that
  uses it since it wasn't a simple mechanical change, and will be
  addressed in a future commit.

r265836:

  Remove last two NO_MAN= in the tree. In both of these cases, MAN= is
  what is needed.
2014-12-31 23:25:37 +00:00
delphij
48f640fb39 MFC r275698: MFV r275696: file 5.21. 2014-12-30 19:39:31 +00:00
ngie
2e865a9c0a MFC r273482,r274078:
r273482:

  The NetBSD libc tests use several definitions/macros that aren't available in
  FreeBSD

  Add the missing compat definitions/macros to lib/libnetbsd so the testcases
  can be compiled with libnetbsd without having to invent ad hoc #define's, or
  having to convert things over to FreeBSD idioms

  Reviewed by: brooks
  Phabric: D993
  Sponsored by: EMC / Isilon Storage Division

r274078:

  Commit missing header for sys/time.h compat on NetBSD to unbreak the amd64/i386
  build

  Pointyhat to: me (forgot to svn add it sooner)
2014-12-21 11:11:17 +00:00
ngie
dc3ad5131f MFC r273929:
r273929 (by jmmv):

  MFV: Import atf-0.21.
2014-12-21 08:30:18 +00:00
dchagin
dfe2ad4d46 MFC r274462: Add the ppoll() system call. 2014-12-21 07:58:28 +00:00
kib
55c41429c0 MFC r271315 (by joel):
Minor mdoc nit.

MFC r275806:
Markup fixes for kqueue(2), no content changes.
2014-12-18 11:36:14 +00:00
kib
9f63b4b4d8 MFC r268843 (by bapt):
Extend kqueue's EVFILT_TIMER by adding precision unit flags support.
2014-12-18 11:30:51 +00:00
jhb
adf7828a9b MFC 271635,271722:
- Only the manpage updates from 271635 are merged to give additional
  heads up for the stricter checks in 11, but the kernel in 10 remains
  permissive.
  - Fail with EINVAL if an invalid protection mask is passed to mmap().
  - Fail with EINVAL if an unknown flag is passed to mmap().
  - Fail with EINVAL if both MAP_PRIVATE and MAP_SHARED are passed to
    mmap().
  - Require one of either MAP_PRIVATE or MAP_SHARED for non-anonymous
    mappings.
- Remove mention of MAP_INHERIT.  It hasn't been implemented for thirteen
  years.
- Remove mention of unimplemented MAP_SWAP.  There are no future plans to
  implement it.
2014-12-16 20:05:10 +00:00
andrew
90fc0dee7a Clean up our ARM assembly:
MFC 275256:

Switch to the ARM unified assembly language as the clang integrated as only
supports it. Binutils supports it when the ".syntax unified" directive
is set.

Sponsored by:   ABT Systems Ltd

MFC 275264:

Update _ENTRY to use _EENTRY to reduce the common code.

MFC 275321:

Remove extra labels, ENTRY_NP already provides them.

Sponsored by:   ABT Systems Ltd

MFC 275322:

Correctly a few incorrect uses of ENTRY/EENTRY and END/EEND

Sponsored by:   ABT Systems Ltd

MFC 275416:

Fix the name of the coprocessor to include the "p" prefix, the clang
integrated assembler expects this.

Sponsored by:   ABT Systems Ltd

MFC 275418:

Switch to unified syntax so these can be built with clang 3.5.

Sponsored by:   ABT Systems Ltd

MFC 275519:

Add missing END macros to some of the xscale functions.

Sponsored by:   ABT Systems Ltd

MFC 275520:

Use the unified syntax in a few more assembly files

Sponsored by:   ABT Systems Ltd

MFC 275521:

Set the alignment to 4-bytes after a string as clang 3.5 can switch to
thumb mode if this is incorrect.

Sponsored by:   ABT Systems Ltd

MFC 275522:

Place the literal pool after a RET otherwise clang 3.5 tries to put it too
far away from a ldr psuedo instruction. With this clang will place the
literal value here where it's close enough to be loaded.

Sponsored by:   ABT Systems Ltd

MFC 275523:

Switch to an armv6k cpu, without this clang 3.5 complains "bx lr" is
unsupported as it needs a newer cpu.

Sponsored by:   ABT Systems Ltd

MFC 275524:

Switch to a .cpu directive. These will work when clang 3.5 is imported
where the .arch directive is a nop.

Sponsored by:   ABT Systems Ltd
2014-12-14 16:28:53 +00:00
delphij
25ca306958 MFC r275665:
Fix buffer overflow in stdio.

Security:	FreeBSD-SA-14:27.stdio
Security:	CVE-2014-8611
2014-12-10 08:24:02 +00:00
delphij
04dbe28cc6 MFC r275071:
Reinstitate send() after syslogd restarts.

In r228193 the test of CONNPRIV have been moved to before the _usleep
and send in vsyslog().  When syslogd restarts, this would prevent the
message being logged after the disconnect/connect dance for
scenario #1.

PR:		194751
Submitted by:	Peter Creath <pjcreath+freebsd gmail com>
Reviewed By:	glebius
2014-12-09 00:47:02 +00:00
brooks
0ba04a3a67 MFC r263928:
Use the correct variable name in the example code.

PR:		195749
2014-12-06 17:50:37 +00:00
trasz
f9abf723a8 MFC r273854:
Update acl(3) to expand on NFSv4 ACL support.

Sponsored by:	The FreeBSD Foundation
2014-11-29 15:51:48 +00:00
trasz
684c853eed MFC r273853:
Make it clear that ACL flags are NFSv4-only.

Sponsored by:	The FreeBSD Foundation
2014-11-29 15:50:13 +00:00
dteske
7230e71362 MFC r274116:
Add new libraries/utilities for data throughput visualization.
dpv(3): dialog progress view library
dpv(1): stream data from stdin or multiple paths with dialog progress view
figpar(3): configuration file parsing library

MFC r274120, r274121, r274123, r274124, r274144, r274146, r274159, r274192,
r274203, r274209, r274226, r274270, and r274851: Fixes following r274116

Reviews:        D714
Relnotes:       New libdpv/libfigpar and dpv(1) utility
Reviewed by:    jelischer, shurd
Discussed at:   MeetBSD California 2014 Vendor/Dev Summit
Discussed on:   -current
Thanks to:      ngie, ian, jelischer, shurd, bapt
2014-11-25 13:47:53 +00:00
kevlo
110eb67327 MFC r273760:
Fix prototypes.
2014-11-24 01:56:33 +00:00
emaste
b81b7af08d Always return pathname in dl_iterate_phdr's dlpi_name, as Linux does
Linux LD_ITERATE_PHDR(3):
    The dlpi_name field is a null-terminated string giving the
    pathname from which the shared object was loaded.

That functionality is much more useful than returning just the short
name.

Update dl_iterate_phdr(3) to follow r272842

MFC of r272842 and r272848
2014-11-14 21:52:31 +00:00
bapt
5daa84302c MFC: 272445,272578,273772,273779,273782,273786,273787,273791
Add a test for bug 191427 where pw(8) will go into an infinite loop
Add some tests for modifying groups
When a group is renamed then the group has been invalidated for sure.
In that case get the group information using the new name.

Fix a regression in pw usermod -G list

The user was perperly adding the to different groups from "list" but was not
removed from the other groups it could have belong to.

Do not delete the group wheel when bad argument is passed to pw groupdel -g

Check that the -g argument is actually a number, if not report an error.
This argument is converted without checking with atoi(3) later so without this
check it converts any alpha entries into 0 meaning it deletes the group wheel

Ensure pw userdel -u <invalid> do not try to remove root

Check the uid passed is actually a number as early as possible

Fix renaming a group via the gr_copy function

Add a regression test to pw(8) because the bug was discovered via using:
pw groupmod

PR:		193704 [1], 185666 [2], 90114 [3], 187189 [4]
Submitted by:	Marc de la Gueronniere [4]
Reported by:	az [1], sub.mesa@gmail.com [2], bkoenig@cs.tu-berlin.de [3],
		mcdouga9@egr.msu.edu [4]
2014-11-04 07:50:48 +00:00
dim
d8d62b896b MFC r273837:
Fix a clang 3.5 warning about abs(3) being given an argument of type
quad_t in setusercontext().  While here, sanitize the clamping of the
priority value, and use the correct type for the return value of
login_getcapnum().

Reviewed by:	kib
2014-11-01 13:45:01 +00:00
andrew
ce556e3257 MFC r273284:
Allow libkvm to get the kernel va to pa delta without the need for
 physaddr. This should allow for a kernel where PHYSADDR and KERNPHYSADDR
 are both undefined.

 For now libkvm will use the old method of reading physaddr and kernaddr
 to allow it to work with old kernels. This could be removed in the future
 when enough time has passed.
2014-10-29 16:36:08 +00:00
andrew
f0629d0f08 MFC r269956:
From https://sourceware.org/ml/newlib/2014/msg00113.html
 By Richard Earnshaw at ARM
 >
 >GCC has for a number of years provides a set of pre-defined macros for
 >use with determining the ISA and features of the target during
 >pre-processing.  However, the design was always somewhat cumbersome in
 >that each new architecture revision created a new define and then
 >removed the previous one.  This meant that it was necessary to keep
 >updating the support code simply to recognise a new architecture being
 >added.
 >
 >The ACLE specification (ARM C Language Extentions)
 >(http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.set.swdev/index.html)
 >provides a much more suitable interface and GCC has supported this
 >since gcc-4.8.
 >
 >This patch makes use of the ACLE pre-defines to map to the internal
 >feature definitions.  To support older versions of GCC a compatibility
 >header is provided that maps the traditional pre-defines onto the new
 >ACLE ones.

 Stop using __FreeBSD_ARCH_armv6__ and switch to __ARM_ARCH >= 6 in the
 couple of places in tree. clang already implements ACLE. Add a define
 that says we implement version 1.1, even though the implementation
 isn't quite complete.
2014-10-29 16:24:02 +00:00
ian
1edaa04098 MFC r266878, r266879: Add support for snprintf() to libstand. 2014-10-26 02:51:56 +00:00
andrew
58b9da93f0 MFC r273088:
Add support for the __aeabi_c*cmp* functions. These are similar to the
existing functions with the exception they use the condition flags to
store the result.
2014-10-22 13:50:38 +00:00
delphij
e5880e7052 MFC r272884:
accept(2) may and can return EAGAIN, document it.
2014-10-20 18:53:54 +00:00
ache
537ec842e6 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
2014-10-19 21:16:24 +00:00
antoine
3da91303cf Restore ABI compatibility with 10.0-RELEASE, so that stable/10 users can use
official freebsd packages
2014-10-19 12:11:25 +00:00
jhb
44cc4e9f20 MFC 271721:
Explicitly specify MAP_SHARED when mapping the stats file descriptor.
2014-10-15 19:27:14 +00:00
kib
c4d948e445 MFC r272070:
Expand the libthr(3) manpage to document knobs accepted by libthr.so
and explain some internal working of the library, neccessary to
understand the knobs effects.

MFC r272153 (by pluknet):
Fix description of mutex acquisition.
2014-10-15 13:39:00 +00:00
kib
6dfd0e1c93 MFC r272069:
Switch the defaults to not split the RLIMIT_STACK-sized initial thread
stack into the stacks of the created threads.  Add knob
LIBPTHREAD_SPLITSTACK_MAIN to restore the older behaviour.
2014-10-15 13:36:01 +00:00
des
046882fc4f MFH (r272830): change the hardcoded default back to DES
MFH (r272833): remove last vestige of MD5 password hashes
2014-10-13 15:56:47 +00:00
hrs
a86738247c MFC r258580:
Replace Sun RPC license in TI-RPC library with a 3-clause BSD license,
  with the explicit permission of Sun Microsystems in 2009.

MFC r258581, 258582:
  Replace Sun Industry Standards Source License for Sun RPC code with a
  3-clause BSD license as specified by Oracle America, Inc. in 2010.
  This license change was approved by Wim Coekaerts, Senior Vice
  President, Linux and Virtualization at Oracle Corporation.

MFC r259117, 259118:
  Replace Sun RPC license with a 3-clause BSD license.  This license change
  was approved in 2010 by Wim Coekaerts, Senior Vice President, Linux and
  Virtualization at Oracle Corporation.

MFC r259417:
  Replace Sun RPC license for TI-RPC library with a 3-clause BSD license,
  with the explicit permission of Sun Microsystems in 2009.
  The code in question in this file was copied from lib/libc/rpc/pmap_getport.c.
2014-10-09 23:05:32 +00:00
pfg
db3266a5c5 MFC r272273, r272387, r272443, r272533 :
Add strptime(3) support for %U and %W

Add support for the missing POSIX-2001 %U and %W features: the
existing FreeBSD strptime code recognizes both directives and
validates that the week number lies in the permitted range,
but then simply discards the value.

Initial support for the feature was written by Paul Green.
David Carlier added the initial handling of tm_wday/tm_yday.
Major credit goes to Andrey Chernov for detecting much of the
brokenness and rewriting/cleaning most of the code, making it
much more robust.

Tested independently with the strptime test from the GNU C
library.

PR:		137307
Relnotes:	yes

MFC r272441 :

strptime: %s format fix.

Almost never needed in real life because %s is tends to be
only one format spec.
1) Return code of gmtime_r() is checked.
2) All flags are set.

Submitted by:	ache
2014-10-08 16:29:46 +00:00
des
6dff660c17 MFH (r272280, r272281, r272348): allow use with null user and rhost
PR:		83099 193927
Approved by:	re (kib)
2014-10-01 10:26:43 +00:00
des
dcca53b69e MFH (r271624): Upgrade to OpenPAM Ourouparia.
Approved by:	re (gjb)
2014-09-22 08:29:48 +00:00
tijl
680c2860fd MFC r257770 r257818 r257823 r260066 r260067 r260089 r260145 r268587 r268588
r268589 r268590 r268593 r268597 r269758 r270845 r270847 r270893 r270932
    r270947 r271147

Merge libm work by kargl, bde and das from the past few months.
Besides optimisations and small bug fixes this includes new implementations
for C99 functions expl, coshl, sinhl, tanhl, erfl and erfcl.

Approved by:	re (kib)
2014-09-18 15:10:22 +00:00
des
2bc2377c66 MFH (r271256, r271617): avoid segfault if PAM_RHOST nor PAM_TTY are unset.
Approved by:	re (gjb)
PR:		83099
2014-09-18 14:27:37 +00:00
ian
8a19588768 MFC r270882, r270930:
In ARM asm code, ensure that every ENTRY(foo) has a matching END(foo).
  The EABI unwind info requires a .fnend for every .fnstart, and newer
  binutils will complain about seeing two .fnstart in a row.  This change
  allows newer tools to compile our code.

  Do not generate unwind info in asm functions if _STANDALONE is defined.
  The .fnend op causes the assembler to emit RELOC references to unwind
  support functions that don't exist in libstand.

Approved by:	re(gjb)
2014-09-09 22:24:01 +00:00
jhb
f227573925 MFC 271048:
Always seek back to the beginning of a regular directory, even if the
previous seek location was 0.  Without this, readdir() would see
dd_loc of zero and call getdirentries() which would start reading
entries at the current seek location of the directory ignoring the
first batch of entries.  Also, rewinddir() should always seek so that
it reads the directory from the beginning to get updated entries.

PR:		192935
Approved by:	re (gjb)
2014-09-08 14:45:58 +00:00
emaste
261ad5a21c MFC UEFI loader
This MFC consists of the following SVN revisions:
  258741 261568 261603 261668 263115 263117 263968 264078 264087 264088
  264092 264095 264115 264132 264208 264261 264262 264263 264319 265028
  265057 268974

Detailed commit messages:

r258741: Note that libstand is 32-bit on amd64 and powerpc64

r261568: Build libstand as a 64-bit library on amd64

  The 32-bit bootloaders now link against libstand.a in
  sys/boot/libstand32, so there is no need to force /usr/lib/libstand.a
  to be 32-bit.

r261603: Don't force efi to a 32-bit build on amd64

r261668: Build libstand as a 64-bit library on ppc64

  The 32-bit bootloaders now link against libstand.a in
  sys/boot/libstand32, so there is no need to force /usr/lib/libstand.a
  to be 32-bit.

  This is equivalent to r261568 for amd64.

r263115: Add amd64 EFI headers

r263117: Connect 64-bit boot ficl to the build

  It is not yet used, but this will ensure it doesn't get broken.

r263968: Use EFI types for EFI values (silences warnings).

  EFI UINTN is actually a 64-bit type on 64-bit processors.

r264078: Put each source file on a separate line

  This will simplify rebasing the amd64 UEFI patch set.

r264087: Build boot/ficl as 64-bit library on amd64

  The 32-bit bootloaders on amd64 now use the 32-bit version in ficl32,
  as is done with libstand32.  The native 64-bit ficl will be used by the
  upcoming UEFI loader.

r264088: Merge efilib changes from projects/uefi

  r247216: Add the ability for a device to have an "alias" handle.

  r247379: Fix network device registration.

  r247380: Adjust our load device when we boot from CD under UEFI.

    The process for booting from a CD under UEFI involves adding a FAT
    filesystem containing your loader code as an El Torito boot image.
    When UEFI detects this, it provides a block IO instance that points
    at the FAT filesystem as a child of the device that represents the CD
    itself. The problem being that the CD device is flagged as a "raw
    device" while the boot image is flagged as a "logical partition".
    The existing EFI partition code only looks for logical partitions and
    so the CD filesystem was rendered invisible.

    To fix this, check the type of each block IO device. If it's found to
    be a CD, and thus an El Torito boot image, look up its parent device
    and add that instead so that the loader will then load the kernel from
    the CD filesystem.  This is done by using the handle for the boot
    filesystem as an alias.

    Something similar to this will be required for booting from other media
    as well as the loader will live in the EFI system partition, not on the
    partition containing the kernel.

  r247381: Remove a scatalogical debug printf that crept in.

r264092: Add -fPIC for amd64

r264095: Support UEFI booting on amd64 via loader.efi

  This is largely the work from the projects/uefi branch, with some
  additional refinements.  This is derived from (and replaces) the
  original i386 efi implementation; i386 support will be restored later.

  Specific revisions of note from projects/uefi:

  r247380:

    Adjust our load device when we boot from CD under UEFI.

    The process for booting from a CD under UEFI involves adding a FAT
    filesystem containing your loader code as an El Torito boot image.
    When UEFI detects this, it provides a block IO instance that points at
    the FAT filesystem as a child of the device that represents the CD
    itself. The problem being that the CD device is flagged as a "raw
    device" while the boot image is flagged as a "logical partition". The
    existing EFI partition code only looks for logical partitions and so
    the CD filesystem was rendered invisible.

    To fix this, check the type of each block IO device. If it's found to
    be a CD, and thus an El Torito boot image, look up its parent device
    and add that instead so that the loader will then load the kernel from
    the CD filesystem.  This is done by using the handle for the boot
    filesystem as an alias.

    Something similar to this will be required for booting from other
    media as well as the loader will live in the EFI system partition, not
    on the partition containing the kernel.

  r246231:

    Add necessary code to hand off from loader to an amd64 kernel.

  r246335:

    Grab the EFI memory map and store it as module metadata on the kernel.

    This is the same approach used to provide the BIOS SMAP to the kernel.

  r246336:

    Pass the ACPI table metadata via hints so the kernel ACPI code can
    find them.

  r246608:

    Rework copy routines to ensure we always use memory allocated via EFI.

    The previous code assumed it could copy wherever it liked. This is not
    the case. The approach taken by this code is pretty ham-fisted in that
    it simply allocates a large (32MB) buffer area and stages into that,
    then copies the whole area into place when it's time to execute. A more
    elegant solution could be used but this works for now.

  r247214:

    Fix a number of problems preventing proper handover to the kernel.

    There were two issues at play here. Firstly, there was nothing
    preventing UEFI from placing the loader code above 1GB in RAM. This
    meant that when we switched in the page tables the kernel expects to
    be running on, we are suddenly unmapped and things no longer work. We
    solve this by making our trampoline code not dependent on being at any
    given position and simply copying it to a "safe" location before
    calling it.

    Secondly, UEFI could allocate our stack wherever it wants. As it
    happened on my PC, that was right where I was copying the kernel to.
    This did not cause happiness. The solution to this was to also switch
    to a temporary stack in a safe location before performing the final
    copy of the loaded kernel.

  r246231:

    Add necessary code to hand off from loader to an amd64 kernel.

  r246335:

    Grab the EFI memory map and store it as module metadata on the kernel.

    This is the same approach used to provide the BIOS SMAP to the kernel.

  r246336:

    Pass the ACPI table metadata via hints so the kernel ACPI code can
    find them.

  r246608:

    Rework copy routines to ensure we always use memory allocated via EFI.

    The previous code assumed it could copy wherever it liked. This is not
    the case. The approach taken by this code is pretty ham-fisted in that
    it simply allocates a large (32MB) buffer area and stages into that,
    then copies the whole area into place when it's time to execute. A more
    elegant solution could be used but this works for now.

  r247214:

    Fix a number of problems preventing proper handover to the kernel.

    There were two issues at play here. Firstly, there was nothing
    preventing UEFI from placing the loader code above 1GB in RAM. This
    meant that when we switched in the page tables the kernel expects to
    be running on, we are suddenly unmapped and things no longer work. We
    solve this by making our trampoline code not dependent on being at any
    given position and simply copying it to a "safe" location before
    calling it.

    Secondly, UEFI could allocate our stack wherever it wants. As it
    happened on my PC, that was right where I was copying the kernel to.
    This did not cause happiness. The solution to this was to also switch
    to a temporary stack in a safe location before performing the final
    copy of the loaded kernel.

  r247216:

    Use the UEFI Graphics Output Protocol to get the parameters of the
    framebuffer.

r264115: Fix printf format mismatches

r264132: Connect sys/boot/amd64 to the build

r264208: Do not build the amd64 UEFI loader with GCC

  The UEFI loader causes buildworld to fail when building with (in-tree)
  GCC, due to a typedef redefinition.  As it happens the in-tree GCC
  cannot successfully build the UEFI loader anyhow, as it does not support
  __attribute__((ms_abi)).  Thus, just avoid trying to build it with GCC,
  rather than disconnecting it from the build until the underlying issue
  is fixed.

r264261: Correct a variable's type for 64-bit Ficl

  FICL_INT is long.

r264262: Fix printf args for 64-bit archs

r264263: Add explicit casts to quiet warnings in libefi

r264319: Fix EFI loader object tree creation on 9.x build hosts

  Previously ${COMPILER_TYPE} was checked in sys/boot/amd64, and the efi
  subdirectory was skipped altogether for gcc (since GCC does not support
  a required attribute).  However, during the early buildworld stages
  ${COMPILER_TYPE} is the existing system compiler (i.e., gcc on 9.x build
  hosts), not the compiler that will eventually be used.  This caused
  "make obj" to skip the efi subdirectory.  In later build stages
  ${COMPILER_TYPE} is "clang", and then the efi loader would attempt to
  build in the source directory.

r265028 (dteske): Disable the beastie menu for EFI console ...

  which doesn't support ANSI codes (so things like `at-xy', `clear', and
  other commands don't work making it impossible to generate a living
  menu).

r265057 (nwhitehorn): Turn off various fancy instruction sets...

  as well as deduplicate some options.  This makes the EFI loader build
  work with CPUTYPE=native in make.conf on my Core i5.

r268974 (sbruno): Supress clang warning for FreeBSD printf %b and %D formats

Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
2014-09-04 21:01:10 +00:00
emaste
ae111330ce MFC r269077 (sbruno): libstand qdivrem warning fixes
libstand's qdivrem.c assumes that sizeof(int) == sizeof(long), this is not
  true on amd64 I'm not quite positive this is the "correct" solution for
  this but it does seem to compile and shut up the spew of warnings when
  compiling libstand for userboot.

  Add two _Static_asserts() so that in the future somebody will get a compile
  failure if an architecture develops that violates the assumptions of this
  code. (strongly suggested by jmg)

  Change commetns to indicate int types instead of long.  (noted by ian in
  phabric review)

  Phabric:    https://phabric.freebsd.org/D443
2014-09-04 20:49:11 +00:00
emaste
2c0d103cf1 MFC r261591 (nwhitehorn):
Make libstand setjmp work for both 64- and 32-bit ABIs.
2014-09-04 20:21:30 +00:00
ngie
5706da73b7 MFC r270145:
Replace DPADD with DPSRCS to fix "make checkdpadd"

  Phabric: D625
  Approved by: jmmv (mentor)
  Reviewed by: dim
  PR: 192734
2014-09-01 02:53:32 +00:00
ngie
b7b1b100cc MFC r266650, r267172 (both by jmmv):
r266650:

  Change libatf-c and libatf-c++ to be private libraries.

  We should not be leaking these interfaces to the outside world given
  that it's much easier for third-party components to use the devel/atf
  package from ports.

  As a side-effect, we can also drop the ATF pkgconfig and aclocal files
  from the base system.  Nothing in the base system needs these, and it
  was quite ugly to have to get them installed only so that a few ports
  could build.  The offending ports have been fixed to depend on
  devel/atf explicitly.

  Reviewed by:  bapt

r267172:

  Homogenize libatf-* version numbers with upstream.

  The libatf-* major version numbers in FreeBSD were one version ahead of
  upstream because, when atf was first imported into FreeBSD, the upstream
  numbers were not respected.  This is just confusing and bound to cause
  problems down the road.

  Fix this by taking advantage of the fact that libatf-* are now private
  and that atf is not yet built by default.  However, and unfortunately, a
  clean build is needed for tests to continue working once "make
  delete-old-libs" has been run; hence the note in UPDATING.

Phabric: D701
Approved by: jmmv (maintainer, mentor)
2014-08-31 23:09:23 +00:00
ume
8b5c391a35 MFC r270215: Add missing break. 2014-08-30 10:29:47 +00:00
ume
82bd2f3628 MFC r269873:
Fix broken pointer overflow check ns_name_unpack()

Many compilers may optimize away the overflow check `msg + l < msg',
where `msg' is a pointer and `l' is an integer, because pointer
overflow is undefined behavior in C.

Use a safe precondition test `l >= eom - msg' instead.

Reference:
https://android-review.googlesource.com/#/c/50570/

Requested by:	pfg
Obtained from:	NetBSD (CVS rev. 1.10)
2014-08-30 10:25:41 +00:00