Sascha Wildner [Tue, 24 May 2011 12:05:04 +0000 (14:05 +0200)]
nrelease/installer: No longer build and offer separate UP and SMP kernels.
Due to sephe's recent work, SMP kernels should boot on UP machines as
well. This is to give his work more exposure.
Also remove the (now redundant) *_SMP configs.
In-discussion-with: sephe
Sascha Wildner [Tue, 24 May 2011 12:04:43 +0000 (14:04 +0200)]
Put 'options SMP' in our standard GENERIC and X86_64_GENERIC configs.
Due to sephe's recent work, SMP kernels should boot on UP machines as
well. This is to give his work more exposure.
While doing this, remove the no longer needed APIC_IO options from
all configs (it is 1 by default since commit
ed4d621d) and comment
'options SMP' in the LINT* configs so the still existing UP code
paths are still build-tested.
In-discussion-with: sephe
Sepherosa Ziehau [Mon, 23 May 2011 11:53:08 +0000 (19:53 +0800)]
ioapic: Move ioapic_enable from machdep.c to apic/ioapic.c
Enable I/O APIC by default.
Sascha Wildner [Mon, 23 May 2011 11:00:41 +0000 (13:00 +0200)]
mail(1) & battlestar(6): Rename some files.
All these files had names which are reserved in Windows, which led
to our tree being not correctly checked out to NTFS, for example.
Reported-by: Adam Hoka <adam.hoka@gmail.com>
Sascha Wildner [Sun, 22 May 2011 18:34:17 +0000 (20:34 +0200)]
kernel: Fix building with NETATALK but without NETATALKDEBUG.
at_rmx.c is required in any case.
Reported-by: Max Herrgard <herrgard@gmail.com>
Sepherosa Ziehau [Sun, 22 May 2011 13:21:41 +0000 (21:21 +0800)]
ioapic: apic_io_enable -> ioapic_enable
Sascha Wildner [Sun, 22 May 2011 13:21:58 +0000 (15:21 +0200)]
<machine/specialreg.h>: Whitespace
Sepherosa Ziehau [Sun, 22 May 2011 11:22:33 +0000 (19:22 +0800)]
x86_64/lapic: Allow vmware with single CPU to boot SMP kernel
Sepherosa Ziehau [Sun, 22 May 2011 11:10:10 +0000 (19:10 +0800)]
i386/lapic: Allow vmware with single CPU to boot SMP kernel
It looks like that if only one CPU is configured in vmware, then
LAPIC will not work at all, so LAPIC will not be enabled if this
kind of configuration is detected.
Currently we detect vmware using cpu_feature2's CPUID2_VMM bit.
Thank swildner@ for providing necessary information on this.
John Marino [Sat, 21 May 2011 11:42:51 +0000 (13:42 +0200)]
c++filt: Remove compiler version makefiles
John Marino [Sat, 21 May 2011 11:38:10 +0000 (13:38 +0200)]
c++filt: Switch from compiler to binutils versions
John Marino [Sat, 21 May 2011 09:35:14 +0000 (11:35 +0200)]
binutils 2.20: Upgrade to version 2.20.1
In addition to the point upgrade, the makefiles have been prepared to
generate c++filt. Soon the version of c++filt will be moved from the
compilers to binutils.
John Marino [Sat, 21 May 2011 11:07:29 +0000 (13:07 +0200)]
Merge branch 'vendor/BINUTILS220'
John Marino [Sat, 21 May 2011 11:29:20 +0000 (13:29 +0200)]
binutils220: Update vendor branch to version 2.20.1
Sascha Wildner [Fri, 20 May 2011 22:43:57 +0000 (00:43 +0200)]
Revert "objformat(1): Remove an unneeded default case."
This reverts commit
6308114003c9933e09f3d6362af7e14638b6c223.
There are numerous ways to pass garbage to the switch(), even with
an enum, so we want the default.
Pointed-out-by: aggelos
Jan Lentfer [Fri, 20 May 2011 12:21:33 +0000 (14:21 +0200)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Jan Lentfer [Fri, 20 May 2011 12:07:36 +0000 (14:07 +0200)]
ldns/drill: Update local files to 1.6.9, too
John Marino [Fri, 20 May 2011 11:17:03 +0000 (13:17 +0200)]
kernel ELF: Implement AT_OSRELDATE aux vector
We have several unimplemented non-standard enumerations of the ELF aux
vectors brought in with a recent sync with FreeBSD. In general they won't
be implemented because of philosophical reasons or lack of necessity. In
the case of AT_OSRELDATE, it makes sense to provide this simple update
as the release date comes directly from the ELF binary and it's already
available thanks to recent comments regarding osreldate.
Alex Hornung [Fri, 20 May 2011 09:53:06 +0000 (10:53 +0100)]
rtld-elf - Don't pass -elf to the linker
* Don't pass -elf to the linker, only our binutils217 understands it.
All others interpret it as using the symbol 'lf' as entry point. We
didn't have a problem so far because the regular ld (bfd) falls back
to a reasonable entry point (start of .text), but gold doesn't and
falls back to 0.
* This enables us to run world linked with gold.
Alex Hornung [Fri, 20 May 2011 09:52:25 +0000 (10:52 +0100)]
binutils221 - remove some foo from ld Makefile
* Remove some leftovers from, presumably, experimentation.
Sascha Wildner [Fri, 20 May 2011 09:30:40 +0000 (11:30 +0200)]
objformat(1): Remove an unneeded default case.
Since cmd_type is an enum now, gcc will handle missing and unknown values.
Sascha Wildner [Fri, 20 May 2011 09:05:22 +0000 (11:05 +0200)]
objformat(1): Some cleanup (no functional change).
* Use NELEM()
* Use an enum for the command types
* Remove BINUTILS1 handling
Sascha Wildner [Fri, 20 May 2011 08:53:57 +0000 (10:53 +0200)]
<sys/param.h>: Fix a typo in the NELEM() definition.
This way it resolves to sizeof(foo[0]) instead of sizeof(foo)[0].
Interestingly, both ways work and give the same results. But the former
looks clearer.
Jan Lentfer [Fri, 20 May 2011 08:41:42 +0000 (10:41 +0200)]
Merge branch 'vendor/LDNS'
Jan Lentfer [Fri, 20 May 2011 08:22:39 +0000 (10:22 +0200)]
ldns/drill: Update vendor branch to 1.6.9
John Marino [Thu, 19 May 2011 22:52:12 +0000 (00:52 +0200)]
kernel ELF: Removed unwanted return
John Marino [Thu, 19 May 2011 22:33:16 +0000 (00:33 +0200)]
kernel ELF: Improve OS Release Date handling
This brings in FreeBSD's method of having separate OS Release Date
(osreldate) handling for each brand. Previously the decoding method
was hardcoded for *BSD, which meant it was broken for the Linux brand.
Now all supported brands (DragonFly, FreeBSD, Linux) are retrieving the
osreldate values correctly.
John Marino [Thu, 19 May 2011 19:54:27 +0000 (21:54 +0200)]
kernel ELF: Use interpreter paths outside of first page
The ELF handler was returning ENOEXEC error whenever it encountered a
binary with an interpreter program header located outside of the first
page. This patch allows these binaries to execute normally.
Additionally, the handler will now ignore subsequent interpreter headers
encountered. Before it would overwrite the previous pointer it had
stored.
Jan Lentfer [Thu, 19 May 2011 11:51:37 +0000 (13:51 +0200)]
sendmail: Update vendor branch to v8.14.15
Jan Lentfer [Thu, 30 Dec 2010 00:30:02 +0000 (01:30 +0100)]
Update to ldns-1.6.7
Jan Lentfer [Tue, 9 Mar 2010 20:42:10 +0000 (21:42 +0100)]
Initial vendor import of ldns-1.6.4 into contrib.
Simon Schubert [Wed, 28 Oct 2009 09:53:46 +0000 (10:53 +0100)]
Import binutils-2.20
Alex Hornung [Sat, 3 Jan 1970 05:16:21 +0000 (06:16 +0100)]
"Fix" kernel profiling for i386
* It is actually quite a hack-ish fix, but better than nothing; it even
seems to work with these changes.
* Note that the ICU bintr/eintr has been removed because it gave
link-time collisions with the bintr/eintr macros in the apic code.
If one doesn't use the APIC, it's probably a good idea to restore
those bintr/eintr macros.
* The spinlock foo is using some old spinlock_deprecated structures
which should probably be changed.
John Marino [Thu, 19 May 2011 09:12:45 +0000 (11:12 +0200)]
kernel ELF: Add missing return after exec_map_page error
Max Herrgard [Thu, 19 May 2011 08:07:48 +0000 (10:07 +0200)]
hammer.8: Add dedup period of 0 description.
John Marino [Wed, 18 May 2011 23:36:03 +0000 (01:36 +0200)]
Kernel Elf: Expand ABI.note-tag search to cover entire file
The FreeBSD code that provides the new ABI.note-tag search limits itself
to the first page PT_NOTE header found and there could be more than one.
Moreover, that header is ignored if it doesn't fall within the first page.
The problem is that 99% of the binaries produced right now have their
note-tag outside of the first page, and perhaps the culprit is the new
binutils 2.21. Due to this, we are required to search the entire
binary to look for these tags, and the previous code of DragonFly did
this so part of it was brought back here.
Peter Avalos [Thu, 19 May 2011 00:56:40 +0000 (14:56 -1000)]
Use OpenBSD's glob in OpenSSH.
This fixes a bus error caused by globbing in the ssh utils (specifically
'ls *' in sftp).
Peter Avalos [Thu, 19 May 2011 00:47:11 +0000 (14:47 -1000)]
Merge branch 'vendor/OPENSSH'
Peter Avalos [Thu, 19 May 2011 00:26:17 +0000 (14:26 -1000)]
Add OpenBSD's compat glob.c for OpenSSH.
The latest version of OpenSSH uses OpenBSD-specific features.
John Marino [Wed, 18 May 2011 05:23:38 +0000 (07:23 +0200)]
gold: Local modification to add --relocatable synonym
Until a change to the binutils master branch two days ago, the gold linker
simply ignored the -i switch, which is considered to be a synonym of
the --relocatable (-r) switch by the ld linker.
This mainly affects makefiles that use gold directly rather than having it
invoked by gcc, and there was a case like this in the DragonFly base.
While the base was easily modified to use the -r switch, it was deemed a
good idea to apply this modification to the gold of binutils 2.21 in case
any pkgsrc software try to use the linker directly.
John Marino [Wed, 18 May 2011 05:20:14 +0000 (07:20 +0200)]
Activate building of gold linker in binutils 2.21
John Marino [Tue, 17 May 2011 23:10:13 +0000 (01:10 +0200)]
Kernel ELF: Restore legacy FreeBSD brand
During the rework of the kernel/ELF branding code, the FreeBSD brand
was intentionally left off due to having an interpreter path of
/usr/libexec/ld-elf.so.1, which is no longer built.
However, some users have been building old DragonFly 1.x servers up
which still have that old rtld running, and are still running FreeBSD
branded binaries. For the sake of legacy, the FreeBSD brand is being
restored.
Matthew Dillon [Wed, 18 May 2011 01:54:00 +0000 (18:54 -0700)]
kernel - Fix netgraph MP race
* Fix a netgraph MP race due to netgraph not acquiring required tokens
when manipulating the socket's sockbuf structure.
Reported-by: Francois Tigeot <ftigeot@wolfpond.org>
John Marino [Tue, 17 May 2011 22:44:51 +0000 (00:44 +0200)]
Linuxulator: Fix recent breakage, part II
The linux files still aren't getting branded correctly after the recent
kernel/ELF modifications. Hopefully this will fix it.
Reported-by: Thomas Nikolajsen
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue9908>
John Marino [Tue, 17 May 2011 19:49:27 +0000 (21:49 +0200)]
btx: tweak makefile for gold linker
gold linker ignores the -i flag, which is considered a synonym for -r
flag (--relocatable) by ld linker. This causes the btx build of crt0
to fail under gold. The easy solution changes the -i flag to -r since
both linkers understand it.
This is the only instance of "-i" in the system. All the other products
that require the relocatable switch use the "-r" option, so now there
are no "-i" flags left.
Sascha Wildner [Tue, 17 May 2011 14:06:12 +0000 (16:06 +0200)]
Revert "gcc 44: Change shared library search order (embedded rpath)"
This reverts commit
e42b0192f1e7ce6df0aa461075bde4978fa72adc.
This commit broke the pkgsrc bootstrap (which is using its own
libfetch that is not compatible with ours).
Reported-by: Max Herrgard <herrgard@gmail.com>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue2076>
Sascha Wildner [Tue, 17 May 2011 13:38:35 +0000 (15:38 +0200)]
binutils221: Remove /usr/{local,pkg}/lib as libdirs from ld(1).
Sascha Wildner [Tue, 17 May 2011 03:15:33 +0000 (05:15 +0200)]
ee(1): Raise WARNS to 2.
Peter Avalos [Mon, 16 May 2011 04:08:40 +0000 (18:08 -1000)]
Merge branch 'vendor/FILE'
Peter Avalos [Mon, 16 May 2011 03:59:10 +0000 (17:59 -1000)]
Import file-5.07.
This fixes a buffer overflow and magic regressions.
Sascha Wildner [Sun, 15 May 2011 12:54:07 +0000 (14:54 +0200)]
bsd-family-tree: Sync with FreeBSD.
Sepherosa Ziehau [Sun, 15 May 2011 07:21:11 +0000 (15:21 +0800)]
i386: Handle I/O APIC probing failure
Sepherosa Ziehau [Sun, 15 May 2011 06:50:30 +0000 (14:50 +0800)]
x86_64: Handle I/O APIC probing failure
If I/O APIC does not exist:
- Reset apic_io_enable and reinitialize ICU if necessary; mainly for
ICU's auto EOI setting.
- Enable LAPIC LINT0 and disable LAPIC LINT1
While I'm here, add hw.ioapic_probe tunable to test this feature (again,
just don't it :)
Sepherosa Ziehau [Sun, 15 May 2011 06:29:02 +0000 (14:29 +0800)]
i386: Fix AP count after LAPIC enumeration
Sepherosa Ziehau [Sun, 15 May 2011 05:53:54 +0000 (13:53 +0800)]
x86_64: Fix AP count after LAPIC enumeration
While I'm here, add hw.ap_max to further limit the number of APs to
be activated.
Sascha Wildner [Sat, 14 May 2011 22:52:28 +0000 (00:52 +0200)]
Remove some duplicate includes in bin/, games/ and lib/.
Sascha Wildner [Sat, 14 May 2011 17:40:49 +0000 (19:40 +0200)]
efun.3: Include <sys/types.h> for some types used in the prototypes.
Sepherosa Ziehau [Sat, 14 May 2011 15:34:51 +0000 (23:34 +0800)]
x86_64: Don't set task priority register
Sepherosa Ziehau [Sat, 14 May 2011 15:32:37 +0000 (23:32 +0800)]
x86_64/lapic: Handle the case that the CPU does not have LAPIC for SMP kernel
Sepherosa Ziehau [Sat, 14 May 2011 14:54:33 +0000 (22:54 +0800)]
x86_64: Streamline calling of MachIntrABI.finalize()
Sepherosa Ziehau [Sat, 14 May 2011 14:52:11 +0000 (22:52 +0800)]
x86_64/madt: Allow systems with only one CPU to boot with SMP kernel
Sepherosa Ziehau [Sat, 14 May 2011 14:49:28 +0000 (22:49 +0800)]
x86_64: Cleanup APIC ID to CPU ID mapping macros
Sepherosa Ziehau [Sat, 14 May 2011 14:37:59 +0000 (22:37 +0800)]
x86_64: Move mp_set_cpuids() from mp_machdep.c to lapic.c
Sepherosa Ziehau [Sat, 14 May 2011 14:00:25 +0000 (22:00 +0800)]
x86_64: Move CPU ID and APIC ID maps from mp_machdep.c to lapic.c
Sepherosa Ziehau [Sat, 14 May 2011 13:57:06 +0000 (21:57 +0800)]
x86_64: Move ioapic_map() from mp_machdep.c to ioapic.c
Sascha Wildner [Sat, 14 May 2011 10:53:32 +0000 (12:53 +0200)]
efun.3: Fix typo in MLINKS.
Sascha Wildner [Sat, 14 May 2011 10:47:01 +0000 (12:47 +0200)]
prop_array_util.3 & udev_monitor.3: Add missing MLINKS.
John Marino [Thu, 12 May 2011 05:57:56 +0000 (07:57 +0200)]
gcc 44: Change shared library search order (embedded rpath)
GCC 4.4.x has always created shared libraries with embedded rpath of
/usr/lib/gcc44:/usr/lib. There are only two shared libraries in
/usr/lib/gcc44 which are stdc++ and obj-c. There are 73 shared libraries
at /usr/lib, including the c library. Reversing the rpath order will
cause many more library searchs to be successful on the first hit.
When searching for a library created by pkgsrc, there is no difference.
In that case, /usr/pkg/lib becomes the third directory in the search
path and relative order of the first two is irrelevant as both fail.
Venkatesh Srinivas [Sat, 14 May 2011 02:04:31 +0000 (19:04 -0700)]
Import fmemopen(3) manual page from NetBSD.
Sascha Wildner [Fri, 13 May 2011 21:13:09 +0000 (23:13 +0200)]
make_dev.9: Add a missing .Nm and MLINK.
Sascha Wildner [Fri, 13 May 2011 20:58:47 +0000 (22:58 +0200)]
taskqueue.9: Fix typo.
Sascha Wildner [Fri, 13 May 2011 10:32:59 +0000 (12:32 +0200)]
fmemopen(): Some more cleanup.
Sascha Wildner [Fri, 13 May 2011 09:17:15 +0000 (11:17 +0200)]
fmemopen(): Style & whitespace fixes.
Sepherosa Ziehau [Fri, 13 May 2011 09:18:51 +0000 (17:18 +0800)]
i386/lapic: Don't set task priority register
Sepherosa Ziehau [Fri, 13 May 2011 03:26:32 +0000 (11:26 +0800)]
i386/lapic: Handle the case that the CPU does not have LAPIC for SMP kernel
If LAPIC does not exist:
- Reset apic_io_enable and reinitialize ICU if necessary; mainly for
ICU's auto EOI setting.
- Setup minimum information for BSP's globaldata
While I'm here, add hw.lapic_enable tunable to test this feature (just don't
use it :).
Sepherosa Ziehau [Fri, 13 May 2011 02:57:00 +0000 (10:57 +0800)]
i386: Streamline calling of MachIntrABI.finalize()
John Marino [Fri, 13 May 2011 07:16:41 +0000 (09:16 +0200)]
Linuxolator: fix recent breakage
Breakage causes by recent kernel ELF commit. Tested with LINT.
Sepherosa Ziehau [Fri, 13 May 2011 02:14:06 +0000 (10:14 +0800)]
i386/madt: Allow systems with only one CPU to boot with SMP kernel
Sepherosa Ziehau [Thu, 12 May 2011 07:31:34 +0000 (15:31 +0800)]
i386: Cleanup APIC ID to CPU ID mapping macros
Sepherosa Ziehau [Thu, 12 May 2011 07:04:07 +0000 (15:04 +0800)]
i386: Move mp_set_cpuids() from mp_machdep.c to lapic.c
Sepherosa Ziehau [Thu, 5 May 2011 11:21:53 +0000 (19:21 +0800)]
i386: Move CPU ID and APIC ID maps from mp_machdep.c to lapic.c
Sepherosa Ziehau [Thu, 5 May 2011 11:03:21 +0000 (19:03 +0800)]
i386: Move ioapic_map() from mp_machdep.c to ioapic.c
Sascha Wildner [Thu, 12 May 2011 12:16:09 +0000 (14:16 +0200)]
kernel: Add SLAB_DEBUG and VM_PAGE_DEBUG to the LINT* configs.
Sascha Wildner [Thu, 12 May 2011 12:10:53 +0000 (14:10 +0200)]
periodic.conf: Adjust for ipfilter removal.
Venkatesh Srinivas [Wed, 11 May 2011 17:31:35 +0000 (10:31 -0700)]
libc -- Initial fmemopen support.
fmemopen allows wrapping a memory buffer in the FILE* interface.
fmemopen was added to POSIX 200809. This version is based around a patch
from Hiten Pandya for FreeBSD. This version does not currently support all of
POSIX's mode strings.
John Marino [Tue, 10 May 2011 21:06:51 +0000 (23:06 +0200)]
kernel ELF: Map PIE binaries at non-zero or specified address
From FreeBSD:
svn 197933 (10 OCT 2009)
svn 197934 (10 OCT 2009)
svn 198202 (18 OCT 2009)
By default, map PIE binaries to a non-zero address. The specified
default address was determined by FreeBSD by examining ld to see where
non-relocable binaries get put normally.
The binary relocation will not happen if the ET_DYN binary already has
a non-zero base address specified.
Also cleaned up some whitespace issues, and took some alignment checks
from FreeBSD.
John Marino [Tue, 10 May 2011 19:39:01 +0000 (21:39 +0200)]
kernel ELF: Do not map segments of zero length
From FreeBSD svn 197932 (10 OCT 2009)
John Marino [Tue, 10 May 2011 19:17:07 +0000 (21:17 +0200)]
kernel ELF: Reimplement Elf Branding, .note.ABI-tag
Static executables built with the GNU gold linker are not recognized as
valid ELF binaries, although the same binaries built by ld linker did
work.
It was suspected that gold was keying off the .note.ABI-tag. Primitive
support for this tag had been added years ago from NetBSD, and later
Corecode disabled it except for ELF program headers.
I removed all the .note.ABI-tag support that had been added after
DragonFly forked from FreeBSD and ported over FreeBSD's branding logic
and .note.ABI-tag support. In particular, the branding logic a lot
cleaner now, and will easily support 32-bit binaries on x86_64 should
this feature arise in DragonFly in the future.
With these changes, gold can now build static executables that are
recognized and execute. The Linuxolator had to be modified to work
with the new branding scheme as well (i386 only).
Venkatesh Srinivas [Tue, 10 May 2011 19:54:07 +0000 (12:54 -0700)]
kernel -- Convert sb_timeo for socket timeout from short -> int.
Allows socket timeouts longer than 327; allows Varnish to run w/ default
configuration.
Sascha Wildner [Tue, 10 May 2011 16:26:19 +0000 (18:26 +0200)]
taskqueue: Fix error message.
Sascha Wildner [Mon, 9 May 2011 19:01:24 +0000 (21:01 +0200)]
efun.3: evasprintf() wasn't brought in and easprintf() was missing docs.
Sascha Wildner [Mon, 9 May 2011 15:26:15 +0000 (17:26 +0200)]
Some manual page cleanup.
Sascha Wildner [Mon, 9 May 2011 08:41:58 +0000 (10:41 +0200)]
who.1: Fix a typo.
Sascha Wildner [Sun, 8 May 2011 20:36:47 +0000 (22:36 +0200)]
hammer.8: Fix a typo.
Sascha Wildner [Sun, 8 May 2011 20:29:47 +0000 (22:29 +0200)]
Add libgnuregex remains for removal via 'make upgrade'.
John Marino [Sun, 8 May 2011 19:42:46 +0000 (21:42 +0200)]
cvs: fix recently introduced, repeatable segfault
In specific involving local cvs repositories, the newly refactored cvs
would segfault. It was traces back to libc's version of delim. The
previous version of cvs provided its own functions like getline and
delim, but the recent change choose to use libc instead.
This "fix" basically goes back to the provided version of delim. There
might be something wrong with the libc version. It would work for a
while, but eventually it segfaulted on a memcpy command.
reported-by: swildner
John Marino [Sat, 7 May 2011 16:35:40 +0000 (18:35 +0200)]
Remove libgnuregex from the system
With recent upgrades to grep, diffutils, and CVS, this library is not
longer required.
John Marino [Sat, 7 May 2011 14:48:11 +0000 (16:48 +0200)]
cvs: Rebuild without gnuregex library
CVS is the last software that uses the libgnuregex. In fact, it only
used one of its headers, and it wasn't necessary. This commit clears the
way for libgnuregex to be removed from base by restoring the use of the
provided regex source files.
Review showed:
* config.h.proto file was out of date
* alloca.h allowed macro redefinition
* prepend_args.* files weren't used
* doc files were generating warnings, maybe due to new texinfo upgrade
* MD library linking unnecessary
* other minor issues
John Marino [Sat, 7 May 2011 16:04:09 +0000 (18:04 +0200)]
Merge branch 'vendor/CVS'
John Marino [Sat, 7 May 2011 11:23:46 +0000 (13:23 +0200)]
cvs vendor branch: restore local regex source files