Age | Commit message (Collapse) | Author |
|
to the cast to unsigned, it fails the error test and returns a bogus partial
read to the caller, which is painful to debug.
|
|
|
|
kernels and we no longer have any.
|
|
change type of len to size_t to match strlen(3) result. Drop unneeded
casts.
u_int64_t is overkill because the actual size is still limited to SYMLINK_MAX
but it is probably better to match the filesystem types.
ok miod@, guenther@
|
|
ok guenther@, henning@
|
|
caller's responsibility to do so.
|
|
While binutils supports both "unified" and "divided" syntax (defaulting
to divided) the integrated assembler in clang only supports unified names
so switch some files to unified syntax. Similiar changes were made in
bitrig and freebsd. No difference in objdump -d output.
tested on zaurus by deraadt@, ok miod@
|
|
of the kernel, and extend the array filled by loadfile to report the location
of the randomness area.
This doesn't introduce any change for bootblocks (save for a slightly larger
stack usage due to the larger array), for the new {LOAD,COUNT}_RANDOM bits
are included in the {LOAD,COUNT}_ALL masks everything uses or computes from.
|
|
have any direct symbols used. Tested for indirect use by compiling
amd64/i386/sparc64 kernels.
ok tedu@ deraadt@
|
|
|
|
|
|
|
|
Suggested by deraadt@
|
|
ok deraadt@
|
|
superflous '*' after '/*' and adding blank after terminating '$'.
Also eases parsing of the lines by simple awk scripts.
Aesthetic approval from tedu@.
|
|
|
|
This codepath was removed in the NetBSD code this is derived from back
in 2003 and was removed in Bitrig earlier this year. No binary change.
|
|
<sys/types.h>. kthxbye
|
|
ok dlg@ mpi@ bcook@ millert@ miod@
|
|
ok kettenis
|
|
strchr/index, strrchr/rindex, and strlen that provide a significantly
faster performance than our previous .c or .S implementations. Based
on NetBSD's code.
Tested with different amd64 CPUs.
ok deraadt@ mikeb@
|
|
ok deraadt
|
|
logic writes balony. Hunting with tedu, mlarkin, and final bit spotted
by naddy in freebsd's version.
|
|
ok deraadt@ tedu@
|
|
|
|
Add the new files to the few md libsa builds which require it.
|
|
|
|
|
|
|
|
|
|
ok miod@
|
|
|
|
loaded image area.
|
|
This allows ddb's "trace" command to include file and line numbers:
ddb{0}> trace
Debugger() at Debugger+0x9 [../../../../arch/amd64/amd64/db_interface.c:405]
ddb_sysctl() at ddb_sysctl+0x1b4 [../../../../ddb/db_usrreq.c:104]
sys___sysctl() at sys___sysctl+0x216 [../../../../kern/kern_sysctl.c:229]
syscall() at syscall+0x297 [../../../../sys/syscall_mi.h:84]
--- syscall (number 202) ---
end of kernel
end trace frame: 0x7f7ffffcf1d7, count: -4
acpi_pdirpa+0x4117aa:
For this to work, it requires using a new version of boot(8), and
booting a kernel with the .debug_line section present (e.g., building
with ``makeoptions DEBUG="-g"'' and then booting the bsd.gdb kernel
instead of the stripped bsd kernel).
Still a WIP, but no failure reports yet. Committing so further
development and testing can happen in tree.
prodding deraadt, guenther, mlarkin
ok mpi
|
|
|
|
|
|
|
|
KASSERT() is annoying as it only prints the expression as a string. If you
(developers) want to know a little more information, you have to do:
#ifdef DIAGNOSTIC
if (bad)
panic(...);
#endif
KASSERTMSG() replaces it into a single line:
KASSERTMSG(!bad, ...);
Taken from NetBSD.
(There is a concern that KASSERT() messages are too long; consume more memory,
and not friendly for small monitors. This have to be considered & revisited
later.)
"Like" from henning@
Man page review & advices from jmc@ and schwarze@
|
|
|
|
|
|
"sure" miod@
|
|
ok miod@
|
|
noticed that i missed committing one file.
|
|
of softfloat.c shortly.
|
|
Modern compiler toolchains are capable of optimizing even across
translation unit boundaries, so simply moving the memory clearing into
a separate function is not guaranteed to clear memory.
To avoid this, we take advantage of ELF weak symbol semantics, and
insert a call to an empty, weakly named function. The semantics of
calling this function aren't determinable until load time, so the
compiler and linker need to keep the memset() call.
There are still ways a toolchain might defeat this trick (e.g.,
optimistically expecting the weak symbol to not be overloaded, and
only calling memset() if it is; promoting weak symbols to strong
symbols at link-time when emitting a static binary because they won't
be interposed; implementing load-time optimizations). But at least
for the foreseeable future, these seem unlikely.
ok deraadt
|
|
Pointed out by LLVM.
tftp.c:331:17: error: comparison of unsigned expression < 0 is always false
From NetBSD
ok miod@
|
|
|
|
change.
|
|
ok bmercer@
|
|
was done by Pedro Martelletto for bitrig. One small tweak to make it buildable with -Werror. "Please commit" miod@
|