Commit Graph

178380 Commits

Author SHA1 Message Date
kib
6355fe9a5c Implement xstrdup() using strlen()/xmalloc()/memcpy() already
presented in rtld, instead of pulling in libc strdup().

Submitted by:	   bde
MFC after:	   2 weeks
2012-03-23 12:04:44 +00:00
dim
a7368abeec Work around the following clang warning in mps(4):
sys/dev/mps/mps_sas.c:861:1: error: function 'mpssas_discovery_timeout' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration]
  mpssas_discovery_timeout(void *data)
  ^

Because the driver is obtained from upstream, we don't want to modify
it; just silence the warning instead, it is harmless.

MFC after:	3 days
2012-03-23 11:35:01 +00:00
dim
9acd4342b3 Silence alignment warnings from clang in libarchive's ppmd code (which
is actually third-party code).  Clang even warns about alignment issues
on x86, and the warnings are not needed there.
2012-03-23 11:18:07 +00:00
pluknet
1d95b215bb Update IFCAP_* macro descriptions.
Reviewed by:	attilio (polling part, a previous version)
MFC after:	1 week
2012-03-23 10:39:50 +00:00
pluknet
4e698dcf9e Clean up from the old kern.polling.
Reviewed by:	attilio
MFC after:	1 week
2012-03-23 10:33:24 +00:00
pluknet
2ecce29547 Clean up of fs/fifofs include directory after fifo.h removal.
Glanced by:	kib
2012-03-23 10:12:35 +00:00
ed
0818e862f4 Make utmpx(3) thread safe if we support TLS.
Because the utmpx interface is generally not required to be thread-safe,
but it is nice to have, if easy to do so. Therefore don't make a mess
out of the code and only use it if __NO_TLS is not defined.
2012-03-23 08:26:31 +00:00
stas
106fa4a89c - Actually fill the date of the Heimdal update. 2012-03-23 07:52:37 +00:00
stas
b4aa77d342 - Take krb5_verify_user.3.gz out of ObsoleteFiles as it's still being
installed.
- Add 32-bit compat old kerberos libraries to ObsoleteFiles as well.

Reported by:	pluknet@
2012-03-23 07:45:11 +00:00
ae
7232ff0e78 Check that scheme is not already registered. This may happens when a
KLD is preloaded with loader(8) and leads to infinity loops.

Also do not return EEXIST error code from MOD_LOAD handler, because
we have undocumented(?) ability replace kernel's module with preloaded one.
And if we have so, then preloaded module will be initialized first.
Thus error in MOD_LOAD handler will be triggered for the kernel.

PR:		kern/165573
MFC after:	3 weeks
2012-03-23 07:26:17 +00:00
pluknet
7ee779f903 Remove archive_entry_*_w(3) entries from ObsoleteFiles.inc. Since the
recent libarchive import they are MLINK'ed again.
2012-03-23 06:57:04 +00:00
pluknet
0c727773c5 Document IFT_USB referenced by IFF_CANTCONFIG since the previous change,
so that ifnet(9) is self contained.

MFC after:	1 week
2012-03-23 06:06:37 +00:00
pluknet
7bddb0d7f4 Update IFF_* macro descriptions.
MFC after:	1 week
2012-03-23 06:01:16 +00:00
stas
d07544c6a7 - Add new kerberos libraries to the list of optional obsolete files. 2012-03-23 03:43:04 +00:00
stas
97dfa7c7ff - Do not build libcom_err and compile_et when kerberos is disabled. They
depends on several heimdal libraries and not used by anything but kerberos
  tools.
2012-03-23 03:16:35 +00:00
gonzo
0450849e9c Add pseudo-device for handling PMC interrupts and link everything
PMC-related to build
2012-03-23 00:11:54 +00:00
gonzo
42ce1eaaa2 Add Octeon-related parts to libpmc 2012-03-23 00:10:21 +00:00
gonzo
d2702a3c7c Add Octeon PMC hardware backend 2012-03-23 00:09:27 +00:00
gonzo
9c120510f9 Add list of Octeon's PMC counters obtained from cvmx-core.h 2012-03-23 00:04:09 +00:00
gonzo
74c3c8ddb5 Add Octeon class and CPU type 2012-03-23 00:03:26 +00:00
gonzo
14bd63a0b0 Setup fake MODINFO variables for octeon kernel 2012-03-23 00:01:09 +00:00
adrian
0167a18d8f Add some further debugging to try and aid tracking down what the state of
things were just before a full software queue is drained.
2012-03-22 21:48:36 +00:00
adrian
a791b92eab Sprinkle some style(9) things around. 2012-03-22 21:47:14 +00:00
adrian
a66a3383e1 Fix an incorrect parameter usage here.
Submitted by:	monthadar@gmail.com
2012-03-22 21:22:58 +00:00
raj
8506e99052 Improve FDT handling in loader(8) and make it more robust.
o Fix buffer overflows when using a long property body in node paths.
o Fix loop end condition when iterating through the symbol table.
o Better error handling during node modification, better problem reporting.
o Eliminate build time warnings.

Submitted by:	Lukasz Wojcik
Obtained from:	Semihalf
MFC after:	1 week
2012-03-22 20:34:26 +00:00
jkoshy
f9f3805d9d Correct a function prototype.
Submitted by:	"Anders Magnusson" <ragge at ludd.ltu.se>, via joel
2012-03-22 19:04:22 +00:00
gonzo
aefc71658f Make reusable part of code have mips prefix, not mips24 2012-03-22 18:07:44 +00:00
gonzo
44ac3b71b6 Rework MIPS PMC code:
- Replace MIPS24K-specific code with more generic framework that will
    make adding new CPU support easier
- Add MIPS24K support for new framework
- Limit backtrace depth to 1 for stability reasons and add option
    HWPMC_MIPS_BACKTRACE to override this limitation
2012-03-22 18:01:23 +00:00
gonzo
5098cfd078 Move PMC hook invocation to cpu_intr. The idea is the same as with ast()
call but there is no reason to implement it in assembler.
2012-03-22 17:47:52 +00:00
gonzo
c3a5f91cea Fix base vaddr detection for ELF binaries. PT_LOAD with offset 0 is not
mandatory for ELF binaries so we'll use the segment with offset less then
alignment and align it appropriately (which covers pt_offset == 0 case)
2012-03-22 17:44:36 +00:00
gonzo
81298371ec Fix PMC syscall on 64-bit big endian systems.
Sycall argument is pointer to array of register_t values. Casting it to
pointer to structure with fields of size smaller then register_t we rely
on compiler-dependent memory layout of structure.

Tested on: mips64 and amd64 systems
2012-03-22 17:36:53 +00:00
jkim
b7b9f0e6d9 Add ACPI_LV_REPAIR debug level, available since ACPICA 20091214 (r200553).
MFC after:	3 days
2012-03-22 17:01:25 +00:00
joel
921d391cb5 Update snd_cmi, snd_csa and snd_emu10kx status. 2012-03-22 16:24:50 +00:00
tuexen
4666dbd7e1 Small cleanup of the code. No functional change (in FreeBSD kernel).
MFC after: 1 week.
2012-03-22 16:22:16 +00:00
joel
5dd021f67f Add snd_cmi, snd_csa and snd_emu10kx to GENERIC on i386 and amd64.
The GPL infected parts which were blocking the inclusion of snd_csa
and snd_emu10kx in GENERIC have recently been removed from the tree.
I'm also adding snd_cmi to GENERIC, which I originally intended to
add when we enabled sound support by default.

Discussed with:	jhb, pfg, Yuriy Tsibizov <yuriy.tsibizov@gfk.ru>
Approved by:	jhb
2012-03-22 16:19:04 +00:00
jchandra
5cbc1e69ab Fix return type of mips pmap_kextract()
The return type should be vm_paddr_t, not vm_offset_t.
2012-03-22 15:14:10 +00:00
kib
625402758b Use xmalloc() instead of malloc() in the places where malloc() calls
are assumed to not fail.

Make the xcalloc() calling conventions follow the calloc(3) calling
conventions and replace unchecked calls to calloc() with calls to
xcalloc().

Remove redundand declarations from xmalloc.c, which are already
present in rtld.h.

Reviewed by:	kan
Discussed with:	bde
MFC after:	2 weeks
2012-03-22 14:20:51 +00:00
kib
348388ff1c Remove the fragments which are not needed on FreeBSD. The caltech
malloc hardly would ever be updated.

Reviewed by:  bde, kan
MFC after:    2 weeks
2012-03-22 14:11:10 +00:00
jhb
6b1692ceda Mark the 'lapics' and 'ioapics' arrays here static since they are
private to this file.  The 'lapics' array was actually shadowing a
completely different 'lapics' array that is private to local_apic.c.

Reported by:	bde
MFC after:	2 weeks
2012-03-22 12:23:32 +00:00
stas
2d133d4c85 - Avoid use of deprecated KRB5 functions. 2012-03-22 11:18:14 +00:00
pluknet
aa2132bb8b Fix style. Somehow I managed to lost a space when copy&paste.
Pointed out by:	stefanf
2012-03-22 09:51:31 +00:00
pluknet
8a86bd1bcc Garbage collect defunct nlist(3) symbols.
MFC after:	1 week
2012-03-22 09:47:14 +00:00
pluknet
38c24aff4e Prevent fs_file NULL pointer dereference in fixfsfile() uncovered after r1.5
when passing damaged user-supplied fstab file data.

MFC after:	1 week
2012-03-22 09:42:27 +00:00
ae
bb8b607479 Correct debug message. 2012-03-22 09:29:07 +00:00
stas
e7e0b34988 - Update FreeBSD Heimdal distribution to version 1.5.1. This also brings
several new kerberos related libraries and applications to FreeBSD:
  o kgetcred(1) allows one to manually get a ticket for a particular service.
  o kf(1) securily forwards ticket to another host through an authenticated
    and encrypted stream.
  o kcc(1) is an umbrella program around klist(1), kswitch(1), kgetcred(1)
    and other user kerberos operations. klist and kswitch are just symlinks
    to kcc(1) now.
  o kswitch(1) allows you to easily switch between kerberos credentials if
    you're running KCM.
  o hxtool(1) is a certificate management tool to use with PKINIT.
  o string2key(1) maps a password into key.
  o kdigest(8) is a userland tool to access the KDC's digest interface.
  o kimpersonate(8) creates a "fake" ticket for a service.

  We also now install manpages for some lirbaries that were not installed
  before, libheimntlm and libhx509.

- The new HEIMDAL version no longer supports Kerberos 4.  All users are
  recommended to switch to Kerberos 5.

- Weak ciphers are now disabled by default.  To enable DES support (used
  by telnet(8)), use "allow_weak_crypto" option in krb5.conf.

- libtelnet, pam_ksu and pam_krb5 are now compiled with error on warnings
  disabled due to the function they use (krb5_get_err_text(3)) being
  deprecated.  I plan to work on this next.

- Heimdal's KDC now require sqlite to operate.  We use the bundled version
  and install it as libheimsqlite.  If some other FreeBSD components will
  require it in the future we can rename it to libbsdsqlite and use for these
  components as well.

- This is not a latest Heimdal version, the new one was released while I was
  working on the update.  I will update it to 1.5.2 soon, as it fixes some
  important bugs and security issues.
2012-03-22 08:48:42 +00:00
alc
e02fd6b842 Handle spurious page faults that may occur in no-fault sections of the
kernel.

When access restrictions are added to a page table entry, we flush the
corresponding virtual address mapping from the TLB.  In contrast, when
access restrictions are removed from a page table entry, we do not
flush the virtual address mapping from the TLB.  This is exactly as
recommended in AMD's documentation.  In effect, when access
restrictions are removed from a page table entry, AMD's MMUs will
transparently refresh a stale TLB entry.  In short, this saves us from
having to perform potentially costly TLB flushes.  In contrast,
Intel's MMUs are allowed to generate a spurious page fault based upon
the stale TLB entry.  Usually, such spurious page faults are handled
by vm_fault() without incident.  However, when we are executing
no-fault sections of the kernel, we are not allowed to execute
vm_fault().  This change introduces special-case handling for spurious
page faults that occur in no-fault sections of the kernel.

In collaboration with:	kib
Tested by:		gibbs (an earlier version)

I would also like to acknowledge Hiroki Sato's assistance in
diagnosing this problem.

MFC after:	1 week
2012-03-22 04:52:51 +00:00
alc
1c754fb497 Change pv_entry_count to a long. During the lifetime of FreeBSD 10.x,
physical memory sizes at the high-end will likely reach a point that
the number of pv entries could overflow an int.

Submitted by:	kib
2012-03-22 04:40:22 +00:00
marius
3bf3d7b5ee Declare the CRC lookup-tables const as they hardly should change at
run-time.
2012-03-21 20:55:21 +00:00
marius
607fe1084c Use the common/shared CRC-32 implementation instead of duplicating it.
MFC after:	1 week
2012-03-21 20:53:47 +00:00
bschmidt
5499758717 Update the firmware to version 0.236
Submitted by:	PseudoCylon
MFC after:	2 weeks
2012-03-21 19:09:52 +00:00