Commit Graph

1269 Commits

Author SHA1 Message Date
ws 45d6c7c30c Allow multiple path separators between/after directory names.
Problem found while analyzing PR kern/43963.
2010-10-18 11:08:26 +00:00
jym b60c232a64 Use standard ELF types for ELF code, instead of paddr_t. paddr_t should
only be used for low level code, like virtual memory internals.
2010-09-16 00:26:49 +00:00
pooka f3c7386990 Rename jump label to something a little more negative. No, I'm
not doing it for cosmetic value or out of angst.  See, PIC_PROLOGUE
on i386 uses the "1" label internally.  Now, everything would be
fine and dandy for the first 551245 calls to random.  After that
p+q is negative and the jump is taken.  However, it is taken into
the middle of PIC_PROLOGUE instead of where upon superficial
examination we assumed we are jumping.  This causes wrong(tm) things
to happen and "ret" triggers a jump into hyperspace.

(no, I did not see that coming)
2010-09-07 20:35:50 +00:00
christos e5690d15fe PR/43830: Valery Ushakov: libsa/loadfile_elf32.c loads .shstrtab into
unallocated memory. Don't load if counting.
2010-09-02 17:10:14 +00:00
christos bd0a22e5e8 add a LOAD_BACKWARDS flag on sections that might load backwards. 2010-08-25 16:30:01 +00:00
christos f2af08161f Add a new LOAD_MINIMAL flag to avoid loading sections that might seek backwards
and are not really needed like the note and the symbol section.
2010-08-25 16:23:23 +00:00
chs b078ae7e33 print the correct error code if nfs_mount() fails. 2010-08-08 18:38:31 +00:00
pooka 2b801a94d6 fix typo 2010-05-11 21:50:35 +00:00
rmind 84b7918250 Fix KASSERTMSG() to be consistent with KASSERT() logic, not inverted.
Hi matt@!
2010-04-25 15:39:41 +00:00
jakllsch a6fc850cd8 Ensure cd9660_read() gives accurate EOF indication.
Should fix PR/42983.
2010-03-22 16:57:54 +00:00
chs 04aa4da3b0 fix copy{in,out}{,str}() to return the error returned by uvm_fault().
fixes PR 41813.
2010-03-20 23:31:27 +00:00
uwe 73fb9af349 Add memset to libkern on vax, moving existing memset.S to src/common.
While kernel source code is supposed to use <machine/macros.h> via
<sys/param.h> and pick an inline asm version from there, gcc itself
can generate direct calls to memset() for structure initialization, so
the symbol must be provided.

Fixes INSTALL kernel, for which -Os caused gcc to use memset() call to
initialize a struct in uvm_fault_internal().
2010-03-15 11:46:49 +00:00
darran 38c72d335c DTrace: Add support for CTF sections in the netbsd elf image, load these
at boot.
Add a ksyms_mod_foreach() function to iterate a callback function over the
set of elf symbols for a specific module (netbsd included).
Add kern_ctf.c and mod_ctf_get() to allow the retrieval and decompression
of CTF sections for a specific module.
2010-03-12 21:43:10 +00:00
martin 0eda8d8e5e Add a prototype. 2010-02-11 21:28:16 +00:00
martin dd8b03031c fix includes 2010-02-10 23:33:56 +00:00
martin 9b40c0f8c3 Utility function to lookup a symbol value in an elf symbol table - allows,
for example, a bootloader to access symbols in the just loaded kernel
(or module).
2010-02-10 21:54:47 +00:00
pgoyette d03b2461a3 Remove kern_assert.c - it's not needed here cuz it's already pulled in
by sys/lib/libkern/Makefile.libkern

OK pooka@
2010-01-20 18:13:40 +00:00
pooka 793cda8e13 __assert.c -> kern_assert.c
(I don't fully understand why __assert.c is needed here.  maybe it
can be removed, but I don't have time to do a full set of mips builds
tonight)
2010-01-20 03:36:26 +00:00
pooka 654415b2b7 Get rid of last "easy" kernel symbols starting with __:
__assert -> kern_assert
__sigtimedwait1 -> sigtimedwait1
__wdstart -> wdstart1

The rest are MD and/or shared with userspace, so they will require
a little more involvement than what is available for this quick
"ride the 5.99.24 bump" action.
2010-01-19 22:28:30 +00:00
tsutsui 1aa1df4953 Add long long (%lld etc.) support and width (%02x etc.) support
in libsa printf(3).  Disabled by default but enabled by
-DLIBSA_PRINTF_LONGLONG_SUPPORT and -DLIBSA_PRINTF_WIDTH_SUPPORT.
Provided by tnozaki@ for my libsa debugging. Thanks!
2010-01-19 15:26:45 +00:00
joerg 5591cac167 Keep arc4_i and arc4_j synchronised after a rekeying. This prevents
accidentally ending up in a short ARC4 cycle.
2010-01-18 20:54:54 +00:00
joerg 56da4fa7b5 Move AMD64's bswap64 implementation from libc to src/common and share it
with the kernel.
2010-01-14 02:09:46 +00:00
drochner b265b3ebf8 RFC783 says the ErrMsg sent with an ERROR packet needs to be
NUL-terminated
2010-01-13 10:56:17 +00:00
elad 251a5f50bc Don't abuse INSECURE for allowing exec() to load files not owned by uid 0.
Adjust references where this has been used.
2009-12-29 20:21:45 +00:00
uebayasi e3ac1d9304 Build fix for the mips64 merge:
- If memset2.c is in ${SRCS}, exclude conflicting memset.c.
- If MD byte_swap_8.* is in ${SRCS}, exclude conflicting bswap64.c.
2009-12-14 12:18:14 +00:00
matt e110dba586 Merge from matt-nb5-mips64 2009-12-14 00:47:10 +00:00
skrll af4728306c Rename L_ADDR to L_PCB 2009-12-10 07:57:02 +00:00
skrll b7b0345e3d Remove U_PCB as requested by rmind.
Same code before and after.
2009-12-01 09:06:16 +00:00
uebayasi 619d7bed3d Redo the previous inverted logic. Sort alphabetically. 2009-11-21 13:37:18 +00:00
uebayasi dd7316895f Don't build quad support code on 64-bit platforms. 2009-11-21 13:30:23 +00:00
snj febb7cce65 Drop 3rd and 4th clauses. Approved by gwr@ (copyright holder). 2009-10-21 23:12:09 +00:00
bouyer 6d07b400dc Remove closes 3 & 4 from my licence. Lots of thanks to Soren Jacobsen
for the booring work !
2009-10-19 18:41:07 +00:00
pooka 5e1c61c660 Don't build spcopy for rumpkern. Fixes hp700 build failure pointed
out by nick.

XXX: spcopy should be in the main kernel instead of libkern in any case
2009-09-22 09:57:16 +00:00
he 78569b98fc Uh, move loadfile_aout.c in under the check for ${SA_USE_LOADFILE}
again, so that it's not unconditionally compiled, fixing the previous.
2009-08-25 14:10:54 +00:00
he e408f74353 If we're on mips, don't build exec.c or loadfile_aout.c, since they
both deal with a.out format executables.
2009-08-21 21:12:02 +00:00
matt 7b2f3a5640 Change include of <sys/exec.h> to <sys/exec_aout.h> since these files want
the a.out stuff.
2009-08-16 13:26:16 +00:00
dsl eaf64f1b6c Move that majority of the 'SRCS+= foo.c' into the main Makefile.libkern.
Any .S files added by the arch/*/Makefile.inc cause the .c file to
be excluded.
Specific exclusions added using NO_SRCS to match previous files.
At least sparc, sparc64, i386, amd64 and vax GENERIC still build.
(There is a fubar with the naming of the byte-swap files ...)
2009-08-14 19:23:53 +00:00
skrll 89ec5e3d9c Put back random.S. Hi dsl! 2009-08-12 22:49:37 +00:00
dsl e46010532d Remove some .c files accidentally left on the .S lines 2009-08-12 21:24:57 +00:00
dsl cfac8834d7 Split the lines that add .c to SRCS from those that add .S
No changes (apart from the order) intended.
2009-08-12 21:20:40 +00:00
dsl 6f5236b423 Use stuff from libc/Makefile to auto-remove .c files if a .S has been added.
Use it to dispose of tne .c files that were already only conditionally
added.
2009-08-12 21:18:42 +00:00
joerg 0578c2ad0f Move popcount et al to src/common and add popcount32/popcount64.
Requested by rmind@. MD should now override popcount32/popcount64 and
provide the aliases as fitting.
2009-07-21 14:55:32 +00:00
kiyohara b922a542ab Fix little bit, and add a few files.
current status is to see following thread.
    http://mail-index.netbsd.org/port-ia64/2009/06/18/msg000102.html
2009-07-20 11:23:04 +00:00
roy 5f399f5c68 Use a function to add extra data to the vendor area so that data added
remains constant for both DISCOVER and REQUEST messages.
2009-07-10 12:16:31 +00:00
roy 4cd4e97af9 We should request the DHCP parameters we need. 2009-07-10 02:55:42 +00:00
he b1946a6b32 Back out the addition of memset.c to the vax libkern, and instead do
as tsutsui@ suggested, and include <sys/param.h> in sha2.c instead.
On the vax, this causes <machine/macros.h> to be included, and it contains
that machine's memset() macro+inline.
2009-06-18 15:22:24 +00:00
he 78443215c7 Add memset.c, so that the references from sha2.c can be satisfied, and
so that the kernel and puffs applications can link again.
2009-06-18 07:56:04 +00:00
pgoyette 28469fc250 Implement snprintb_m(3) to provide multi-line bit/bit-field decode.
Discussed on tech-kern.
2009-05-13 02:50:31 +00:00
roy 235c0d4ef6 We should check for potential overflows.
ok: martin
2009-05-06 23:56:49 +00:00
skrll 8516d55745 Merge nick-hppapmap.
This is a port of the OpenBSD pmap and trap handling code to get us

        - Performance boost on some/all machines.
        - Well on the way to PA2.0 (in 32bit mode) support. Several
          machines probe hardware, but fail sometime after interrupts
          are enabled.

Other things changed / fixed on the branch are

        - update autoconf to use the OpenBSD code.
        - com @ dino is very close to being supported.
        - HPPA_REDZONE has been replaced with a working redzone which
          is enabled with DIAGNOSTIC.
        - UPAGES has been halved in size.
        - power(4) from OpenBSD to fix a few bugs.
        - updated list of modules from OpenBSD.
	- initial ports of uturn(4), astro(4) and elroy(4).
	- update some copyrights (remove advertising clause, etc.)

Thanks to mjf for some of the above, testing and listening.
2009-04-30 07:01:26 +00:00