Commit Graph

159387 Commits

Author SHA1 Message Date
tls 64e3562f4f Fix two bugs reported by Simon Burge: 1) USE_FORT and USE_SSP should be
disabled on platforms where GCC doesn't support -fstack-protector.  2) The
libssl Makefile had a hard-coded USE_FORT=yes.
2007-05-29 13:55:31 +00:00
macallan b0698fecd5 cpu_info.ci_idle_pcb is gone so don't try to set it
probably needs more work but it works fine like that at least on my PB3400c
2007-05-29 13:26:39 +00:00
blymn eaa84a63c0 Change debug handling, now we write debug out iff CURSES_TRACE_FILE
has been set in the environment, this prevents people using MKDEBUGLIB
getting more than they bargained for.

Tidied up the debug settings in the Makefile to reflect the above change,
we no longer need to have FULL_DEBUG since nothing is written by default.
2007-05-29 13:20:21 +00:00
tsutsui 82e46da13f Use the kernel symbol table to see the beginning of the current
subroutine to get more proper backtrace on ddb(4).

In the previous code it scans backwards from the current PC
for the end of the previous subroutine and checks "jr ra" or
"jr k0" instructions, but it often fails because gcc is
so aggressive nowadays as to reorder instruction blocks
to create efficient code path by branch predict etc. and
"jr ra" is not always located at the end of subroutines.

No objection on port-mips.
2007-05-29 12:03:45 +00:00
tsutsui cd07663368 Fix inconsistent changes in rev 1.153 and 1.154:
Adjust fs->fs_maxfilesize instead of ump->um_maxfilesize
in ffs_oldfscompat_read() because the latter is overrided
by the former after ffs_oldfscompat_read() returned.

Fixes EFBIG errors on read(2) and "exec /sbin/init: error 8"
problem on mac68k after mountroot() on old 4.3BSD UFS created
by the Mkfs tool for MacOS (reported and confirmed on port-mac68k).
2007-05-29 11:30:17 +00:00
blymn 070937be37 Fix some compiler warnings.
Remove shadowed variable declarations when DEBUG is defined.
2007-05-29 11:10:55 +00:00
manu d04d1dbd4b Try to make select(2) man page more insightful, by providing an example.
Based on contribution form Jean-Yves Migeon <Jean-Yves.Migeon@bde.espci.fr>
2007-05-29 07:54:17 +00:00
simonb 9dc083f73e Fix a tyop. 2007-05-29 07:17:23 +00:00
tls 1e799aacf7 Sigh. Fix USE_FORT: do not use /usr/include/ssp from *host* system. 2007-05-29 04:56:34 +00:00
ad 1ae6657a7b Fix lock order inversion between vnode locks and ufs_hashlock. Addresses
kern/36331 (MP deadlock between ufs_ihashget() and VOP_LOOKUP()) for ffs,
other file systems to follow. Reported by perseant@, debugged by Sverre
Froyen, patch posted/tested by Blair Sadewitz.
2007-05-28 23:42:56 +00:00
mrg 565d4d6ca6 disable mutex_spin_enter() & mutex_spin_exit() as they are currently
broken and cause MULTIPROCESSOR kernels to hang while entering
userland boot up.
2007-05-28 22:56:19 +00:00
mhitch 82970a259f Got rid of too much - need to allocate virtual space for msgbuf. 2007-05-28 22:36:15 +00:00
pavel c9cec95fb7 Move ixpide from INSTALL to INSTALL_LARGE. This controller is apparently
found only in southbridges of relatively recent motherboards.
2007-05-28 21:54:38 +00:00
mrg b4ff11c2dd fix some NOTDEF_DEBUG code. 2007-05-28 21:52:49 +00:00
pavel e09c8c416e Move puc, ahcisata, nfe, svwsata from INSTALL to INSTALL_LARGE to help fit
INSTALL to a 2.88 MB floppy image. Suggested by Manuel Bouyer.
2007-05-28 21:45:29 +00:00
mrg 839b86dc5e cpu_attach(): in the MP case, fix up idle lwp info as well as lwp0.l_cpu.
for LOCKDEBUG, mutex_destroy() the cpu0 spc_lwplock with the global
cpuinfo VA, and re-mutex_init() it with the per-cpu address that is only
now available.  for non-boot cpus, be sure to also initialise curlwp to
the idle lwp.

xcall(), pmap_quiet_check(), pmap_pmap_pool_ctor(), pmap_pmap_pool_dtor(),
and pmap_enu4m(): don't care about cpus that have not been attached yet.
2007-05-28 21:24:17 +00:00
mrg 8f8cea5c68 clean up cpu_switchto() a little - no need to flushw or membar
excessively.  optimise an rdpr.  tested by tnn.
2007-05-28 20:09:50 +00:00
tls 36a21907e2 Since Christos cleaned up the use of libc internals here, we can switch
these from USE_SSP to USE_FORT as they should be.
2007-05-28 18:12:06 +00:00
yamt febe85111f - remove nfs_exit exit hook. ok'ed by christos@.
- as far as i understand the code, it shouldn't be necessary
	  because nfs_request can't return without removing its request
	  and r->r_lwp is either curlwp or NULL.
	- even if it's necessary, leaking requests is not the correct way
	  to recover from the condition.
- nfs_request: add a related assertion.
2007-05-28 16:47:38 +00:00
blymn ca8513e5dc Added libcurses wide curses merge. 2007-05-28 15:14:55 +00:00
blymn a9537fef11 Update minor version of libcurses. 2007-05-28 15:02:30 +00:00
blymn e124de36d8 Merge in wide curses code done as a Summer of Code project by
Ruibiao Qiu.
2007-05-28 15:01:53 +00:00
christos 599840187d get rid of libc cruft. requested by tls 2007-05-28 14:49:15 +00:00
tls 4147a3c54a Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the
FORTIFY_SOURCE feature of libssp, thus checking the size of arguments to
various string and memory copy and set functions (as well as a few system
calls and other miscellany) where known at function entry.  RedHat has
evidently built all "core system packages" with this option for some time.

This option should be used at the top of Makefiles (or Makefile.inc where
this is used for subdirectories) but after any setting of LIB.

This is only useful for userland code, and cannot be used in libc or in
any code which includes the libc internals, because it overrides certain
libc functions with macros.  Some effort has been made to make USE_FORT=yes
work correctly for a full-system build by having the bsd.sys.mk logic
disable the feature where it should not be used (libc, libssp iteself,
the kernel) but no attempt has been made to build the entire system with
USE_FORT and doing so will doubtless expose numerous bugs and misfeatures.

Adjust the system build so that all programs and libraries that are setuid,
directly handle network data (including serial comm data), perform
authentication, or appear likely to have (or have a history of having)
data-driven bugs (e.g. file(1)) are built with USE_FORT=yes by default,
with the exception of libc, which cannot use USE_FORT and thus uses
only USE_SSP by default.  Tested on i386 with no ill results; USE_FORT=no
per-directory or in a system build will disable if desired.
2007-05-28 12:06:17 +00:00
tls 67fcd29261 Do not include internal header files from libpcap without setting the
feature-test macros they use.  Really, of course, this code should not
include such header files at all.
2007-05-28 11:55:19 +00:00
hubertf a91b802739 Give a bit more details on what the 'ppcoea-renovation' branch is about.
OK'd by garbled@
2007-05-28 09:29:18 +00:00
mrg 8c454927d9 regenerate. 2007-05-28 05:55:10 +00:00
mrg f08e949808 add ALi M5261 ethernet (tulip clone) 2007-05-28 05:54:07 +00:00
tls 7d2d02742e Revert previous: the readline support here does unspeakable things with
the history buffer that require knowledge of the readline internals to
make safe (it "knows" that GNU readline mallocs certain returned data,
and thus, with libedit, happily calls free on static variables).
2007-05-28 03:28:58 +00:00
cube 62e0f430f0 p needs to be const. [hi christos!] 2007-05-28 00:39:00 +00:00
mhitch 5a0ae3b2c5 Oops. I thought I had caught this before commiting the CMAP[12] removal,
but obviously I didn't.  Non-DEBUG kernels were unbootable because I left
some code inside an #ifdef DEBUG group.
2007-05-27 21:33:55 +00:00
christos 1b3a5dad50 turn on command line editing. 2007-05-27 19:46:31 +00:00
christos 2d9dad6f00 Add rl_completion_matches, fix remove_history 2007-05-27 19:45:37 +00:00
dyoung f5c27b7a80 Remove remarks that insinuate that gre(4) still supports the hack
that let us set a route over the tunnel to the tunnel's decapsulating
host.  Thanks, Andreas Wrede, for pointing it out.
2007-05-27 19:15:48 +00:00
uwe 19eb8fc1bc Need to use atop() when adjusting kernend for ksyms.
XXX: This code has obviously bit-rotted.

Pointed out by Anders Gavare on port-sh3.
2007-05-27 18:30:01 +00:00
tls e87faddb31 Gross workaround for PR 36390: don't overwrite the stack with zeroes when
using struct sockaddr_dl in an ifreq.
2007-05-27 18:11:38 +00:00
cube 8b523203e0 Tyop. 2007-05-27 16:58:17 +00:00
tls be45f4d02a For FORTIFY_SOURCE: do not pretend to convert code from b* to mem* by
using a #define to turn one into the other, this is pointless and causes
more portability issues than it solves (admittedly, in the year 1702 when
this code was written the opposite may have been the case).
2007-05-27 16:31:41 +00:00
tls ac016a7fc2 Changes required for FORTIFY_SOURCE: don't rely on #define read (etc.)
before system header file inclusion magically causing what "read" is
#defined to to pick up a read-like prototype.  For sanity's sake, put
prototypes for revolting trace_mr stuff in their own header file (instead
of nowhere at all and using the trick referenced above).
2007-05-27 16:27:57 +00:00
jmmv fadca732d6 Guess the terminal size on each change instead of during program startup.
This allows the mouse to be used properly in consoles with different sizes:
before this change it was restricted to the size reported by the console
used to start the daemon.

Problem reported by Blair Sadewitz.
2007-05-27 15:05:00 +00:00
tsutsui 2fc470a315 Reorder IPL_SOFTSERIAL and IPL_SOFTCLOCK properly. 2007-05-27 14:22:36 +00:00
tsutsui cd02a491e7 - Don't clear BSS in mach_init() if a kernel is loaded
by our native bootloader.
- Restore lwp0.l_cpu (which is required for curcpu()) and
  cpu_info_store.ci_curlwp after clearing BSS in case
  a kernel is loaded by the firmware directly since these
  values are in BSS and initilized before mach_init() is called.
  (actually they are restored in mips_machdep.c:mips_vector_init()
   but we use curcpu() earlier than that point)

Fixes silent hang right after boot on cobalt.
2007-05-27 14:10:49 +00:00
tsutsui 5964c0cd2d Pass correct args to lwp_startup() in lwp_trampoline().
Should fix "panic: TLB out of universe" on MIPS3 machines.
2007-05-27 13:57:30 +00:00
uwe 269ff6629e In sh3_tlb_update we need to ensure we are not interrupted while
meesing with the TLB.  That would usually show up as misterious kernel
crashes under heavy load.

Prettify the code while here so that traversal of the memory mapped
TLB arrays looks congruent in all functions.

Fixes PR 34706
2007-05-27 12:21:24 +00:00
he e0ce1262e3 Bump SYMTAB_SPACE so that it fits again. 2007-05-27 11:47:11 +00:00
skrll f27ffb061f Fix up the frame sanity checking to not bitch when taking interrupts in
the sti ROM code.

Fixes PR/34715.

Thanks to David H. Gutteridge.
2007-05-27 09:41:25 +00:00
christos e3277e1c36 don't look at the wrong structure to bring the interface down. Also keep
track of state, and bring the interface back up. This should be pulled to
4.0.
2007-05-27 03:15:34 +00:00
christos 1681ee0f39 unregister the read socket when we deinit, otherwise the stale socket stays
in the select mask, select fails with EBADFD and wpa_supplicant exits. This
should be pulled to 4.0.
2007-05-27 03:14:32 +00:00
christos 8231a12bf8 remove the rest of the libc cruft. 2007-05-26 23:00:22 +00:00
christos 26cf69237f This does not appear to need rpc_generic.c 2007-05-26 22:58:43 +00:00