History log of /src/sys/lib/libkern/libkern.h |
Revision | | Date | Author | Comments |
1.148 |
| 02-Mar-2025 |
riastradh | libc: New _r variants of heapsort, mergesort, qsort.
Also kheapsort_r for kernel/standalone use.
These variants allow the caller to pass a cookie through to the comparison function, e.g. if you want to sort an array of indices into a buffer.
qsort_r is new in POSIX.1-2024; the others are obvious analogues of our nonstandard extensions for heapsort and mergesort.
PR lib/58931: qsort_r() missing
|
1.147 |
| 01-Nov-2024 |
riastradh | string.h: Fix various symbol visibility issues.
1. Order declarations according to POSIX 2024 to make this easier to review side-by-side with the spec. 2. Fix visibility of memccpy: XSI-only, not POSIX in general; require _XOPEN_SOURCE, not just _POSIX_C_SOURCE. 3. Omit redundant _XOPEN_SOURCE test around stpcpy/stpncpy. 4. Hide strdup in POSIX 2001. Not POSIX (without XSI) until 2008. 5. Hide strerror_r until POSIX 2001. Can't find evidence of it in any earlier POSIX or X/Open. (Not 100% sure on this one, maybe someone can double-check my research.) 6. Add restrict to strlcat/strlcpy. 7. Omit redundant _XOPEN_SOURCE test around strndup and strnlen. 8. Hide strtok_r until POSIX 2001. Can't find evidence of it in any earlier POSIX or X/Open. (Not 100% sure on this one, maybe someone can double-check my research.)
Carry the restrict qualifiers on strlcat/strlcpy to libkern too.
Main reference: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/string.h.html
PR standards/58804: string.h: wrong visibility for memccpy
|
1.146 |
| 09-Oct-2024 |
christos | deduplicate offsetof (stddef.h) and container_of (container_of.h)
|
1.145 |
| 06-Sep-2023 |
mrg | fix the example for container_of().
needs to be a pointer into the containing structure, not the value of a pointer inside the structure.
|
1.144 |
| 31-Dec-2021 |
riastradh | libkern: Make KASSERT verify expression is valid if !DIAGNOSTIC.
This way it is no longer necessary to mark variables __diagused if they are used in KASSERT conditions.
Fix fallout from this by removing now-unnecessary and `#ifdef DIAGNOSTIC'.
Don't do the same for KDASSERT if !DEBUG -- unlike KASSERT and DIAGNOSTIC, variables needed by KDASSERT and DEBUG are likely to be expensive to compute (and potentially difficult for a compiler to prove flushable), so we don't want to require them under !DEBUG.
|
1.143 |
| 17-May-2021 |
mrg | move bi-endian disklabel support from the kernel and libsa into libkern.
- dkcksum() and dkcksum_sized() move from subr_disk.c and from libsa into libkern/dkcksum.c (which is missing _sized() version), using the version from usr.sbin/disklabel.
- swap_disklabel() moves from subr_disk_mbr.c into libkern, now called disklabel_swap(). (the sh3 version should be updated to use this.)
- DISKLABEL_EI becomes a first-class option with opt_disklabel.h.
- add libkern.h to libsa/disklabel.c.
this enables future work for bi-endian libsa/ufs.c (relevant for ffsv1, ffsv2, lfsv1, and lfsv2), as well as making it possible for ports not using subr_disk_mbr.c to include bi-endian disklabel support (which, afaict, includes any disk on mbr-supporting platforms that do not have an mbr as well as disklabel.)
builds successsfully on: alpha, i386, amd64, sun2, sun3, evbarm64, evbarm64-eb, sparc, and sparc64. tested in anita on i386 and sparc, testing in hardware on evbarm64*.
|
1.142 |
| 21-Jan-2021 |
thorpej | branches: 1.142.4; 1.142.6; Add a generic set of routines for interacting with OpenFirmware-style string lists.
|
1.141 |
| 16-Jan-2021 |
chs | remove unused "_DIAGNOSTIC" option and opt_diagnostic.h. note that this is unrelated to the widely used "DIAGNOSTIC" option.
|
1.140 |
| 17-Apr-2020 |
maxv | branches: 1.140.2; Slightly reorder for clarity, and add header.
|
1.139 |
| 07-Apr-2020 |
skrll | branches: 1.139.2; Fix KASAN build on aarch64
|
1.138 |
| 03-Apr-2020 |
maxv | Add KASAN instrumentation on strcat/strchr/strrchr.
|
1.137 |
| 14-Dec-2019 |
riastradh | Remove never-used Mersenne twister from libkern.
|
1.136 |
| 05-Dec-2019 |
riastradh | #ifdef notyet ---> never
|
1.135 |
| 22-Nov-2019 |
maxv | Ah, strcat/strchr/strrchr are ASM functions, so instrument them.
|
1.134 |
| 14-Nov-2019 |
maxv | Add support for Kernel Memory Sanitizer (kMSan). It detects uninitialized memory used by the kernel at run time, and just like kASan and kCSan, it is an excellent feature. It has already detected 38 uninitialized variables in the kernel during my testing, which I have since discreetly fixed.
We use two shadows: - "shad", to track uninitialized memory with a bit granularity (1:1). Each bit set to 1 in the shad corresponds to one uninitialized bit of real kernel memory. - "orig", to track the origin of the memory with a 4-byte granularity (1:1). Each uint32_t cell in the orig indicates the origin of the associated uint32_t of real kernel memory.
The memory consumption of these shadows is consequent, so at least 4GB of RAM is recommended to run kMSan.
The compiler inserts calls to specific __msan_* functions on each memory access, to manage both the shad and the orig and detect uninitialized memory accesses that change the execution flow (like an "if" on an uninitialized variable).
We mark as uninit several types of memory buffers (stack, pools, kmem, malloc, uvm_km), and check each buffer passed to copyout, copyoutstr, bwrite, if_transmit_lock and DMA operations, to detect uninitialized memory that leaves the system. This allows us to detect kernel info leaks in a way that is more efficient and also more user-friendly than KLEAK.
Contrary to kASan, kMSan requires comprehensive coverage, ie we cannot tolerate having one non-instrumented function, because this could cause false positives. kMSan cannot instrument ASM functions, so I converted most of them to __asm__ inlines, which kMSan is able to instrument. Those that remain receive special treatment.
Contrary to kASan again, kMSan uses a TLS, so we must context-switch this TLS during interrupts. We use different contexts depending on the interrupt level.
The orig tracks precisely the origin of a buffer. We use a special encoding for the orig values, and pack together in each uint32_t cell of the orig: - a code designating the type of memory (Stack, Pool, etc), and - a compressed pointer, which points either (1) to a string containing the name of the variable associated with the cell, or (2) to an area in the kernel .text section which we resolve to a symbol name + offset.
This encoding allows us not to consume extra memory for associating information with each cell, and produces a precise output, that can tell for example the name of an uninitialized variable on the stack, the function in which it was pushed on the stack, and the function where we accessed this uninitialized variable.
kMSan is available with LLVM, but not with GCC.
The code is organized in a way that is similar to kASan and kCSan, so it means that other architectures than amd64 can be supported.
|
1.133 |
| 05-Nov-2019 |
maxv | Add Kernel Concurrency Sanitizer (kCSan) support. This sanitizer allows us to detect race conditions at runtime. It is a variation of TSan that is easy to implement and more suited to kernel internals, albeit theoretically less precise than TSan's happens-before.
We do basically two things:
- On every KCSAN_NACCESSES (=2000) memory accesses, we create a cell describing the access, and delay the calling CPU (10ms).
- On all memory accesses, we verify if the memory we're reading/writing is referenced in a cell already.
The combination of the two means that, if for example cpu0 does a read that is selected and cpu1 does a write at the same address, kCSan will fire, because cpu1's write collides with cpu0's read cell.
The coverage of the instrumentation is the same as that of kASan. Also, the code is organized in a way similar to kASan, so it is easy to add support for more architectures than amd64. kCSan is compatible with KCOV.
Reviewed by Kamil.
|
1.132 |
| 20-Sep-2019 |
maxv | Add ifdefs to eliminate false positives on lgtm, same as coverity.
|
1.131 |
| 07-Sep-2019 |
maxv | Add KASAN instrumentation for memmove.
|
1.130 |
| 03-Sep-2018 |
riastradh | Rename min/max -> uimin/uimax for better honesty.
These functions are defined on unsigned int. The generic name min/max should not silently truncate to 32 bits on 64-bit systems. This is purely a name change -- no functional change intended.
HOWEVER! Some subsystems have
#define min(a, b) ((a) < (b) ? (a) : (b)) #define max(a, b) ((a) > (b) ? (a) : (b))
even though our standard name for that is MIN/MAX. Although these may invite multiple evaluation bugs, these do _not_ cause integer truncation.
To avoid `fixing' these cases, I first changed the name in libkern, and then compile-tested every file where min/max occurred in order to confirm that it failed -- and thus confirm that nothing shadowed min/max -- before changing it.
I have left a handful of bootloaders that are too annoying to compile-test, and some dead code:
cobalt ews4800mips hp300 hppa ia64 luna68k vax acorn32/if_ie.c (not included in any kernels) macppc/if_gm.c (superseded by gem(4))
It should be easy to fix the fallout once identified -- this way of doing things fails safe, and the goal here, after all, is to _avoid_ silent integer truncations, not introduce them.
Maybe one day we can reintroduce min/max as type-generic things that never silently truncate. But we should avoid doing that for a while, so that existing code has a chance to be detected by the compiler for conversion to uimin/uimax without changing the semantics until we can properly audit it all. (Who knows, maybe in some cases integer truncation is actually intended!)
|
1.129 |
| 27-Aug-2018 |
maxv | Add kasan interceptors for strcpy/strcmp/strlen.
|
1.128 |
| 20-Aug-2018 |
maxv | Add support for kASan on amd64. Written by me, with some parts inspired from Siddharth Muralee's initial work. This feature can detect several kinds of memory bugs, and it's an excellent feature.
It can be enabled by uncommenting these three lines in GENERIC:
#makeoptions KASAN=1 # Kernel Address Sanitizer #options KASAN #no options SVS
The kernel is compiled without SVS, without DMAP and without PCPU area. A shadow area is created at boot time, and it can cover the upper 128TB of the address space. This area is populated gradually as we allocate memory. With this design the memory consumption is kept at its lowest level.
The compiler calls the __asan_* functions each time a memory access is done. We verify whether this access is legal by looking at the shadow area.
We declare our own special memcpy/memset/etc functions, because the compiler's builtins don't add the __asan_* instrumentation.
Initially all the mappings are marked as valid. During dynamic allocations, we add a redzone, which we mark as invalid. Any access on it will trigger a kASan error message. Additionally, the compiler adds a redzone on global variables, and we mark these redzones as invalid too. The illegal-access detection works with a 1-byte granularity.
For now, we cover three areas:
- global variables - kmem_alloc-ated areas - malloc-ated areas
More will come, but that's a good start.
|
1.127 |
| 08-Jul-2018 |
christos | provide memmem
|
1.126 |
| 09-Dec-2017 |
christos | branches: 1.126.2; 1.126.4; Even smaller and takes print function.
|
1.125 |
| 08-Dec-2017 |
christos | coalesce the two copies of hexdump into libkern
|
1.124 |
| 07-Jul-2016 |
msaitoh | KNF. Remove extra spaces. No functional change.
|
1.123 |
| 11-May-2016 |
rtr | provide const versions of container_of macros.
discussed with riastradh@ by email
|
1.122 |
| 02-May-2016 |
christos | move scsipi_strvis -> libkern:strnvisx() change the prototype to match userland fix sizes of strings passed to it
|
1.121 |
| 30-Aug-2015 |
uebayasi | Include opt_diagnostic.h.
|
1.120 |
| 29-May-2015 |
matt | If the platform support popcount as a __builtin, use that in preference to the libc versions.
|
1.119 |
| 09-May-2015 |
christos | tricks with sizeof() make coverity complain.
|
1.118 |
| 20-Apr-2015 |
riastradh | Add container_of to libkern.
Given x = &c->f, container_of(x, T, f) yields c, where T is the type of c.
Discussed on tech-kern a while ago:
https://mail-index.netbsd.org/tech-kern/2013/03/21/msg015131.html
|
1.117 |
| 16-Jan-2015 |
christos | strtoi and strtou for the kernel
|
1.116 |
| 20-Nov-2014 |
christos | branches: 1.116.2; bcdtobin and bintobcd are now inlines in <dev/clock_subr.h>
|
1.115 |
| 10-Aug-2014 |
tls | branches: 1.115.2; Merge tls-earlyentropy branch into HEAD.
|
1.114 |
| 19-Jul-2014 |
lneto | lua: updated from 5.1 to 5.3 work3
* lua(1): - changed lua_Integer to intmax_t - updated distrib/sets/lists and etc/mtree - updated bsd.lua.mk - fixed bozohttpd (lua-bozo.c) - compatibilized bindings: gpio, sqlite * lua(4): - removed floating-point and libc dependencies using '#ifndef _KERNEL' - fixed division by zero and exponentiation - libkern: added isalnum(), iscntrl(), isgraph(), isprint() and ispunct() - acpica: removed isprint() from acnetbsd.h - libc: moved strcspn.c, strpbrk.c and strspn.c to common - removed stub headers - compatibilized bindings: luapmf, luasystm * reorganized luaconf.h * updated doc/CHANGES and doc/RESPONSIBLE
|
1.113 |
| 27-Feb-2014 |
joerg | branches: 1.113.2; Provide labs, llabs and imaxabs for kernel use.
|
1.112 |
| 27-Dec-2013 |
christos | add strncat (for acpi)
|
1.111 |
| 15-Dec-2013 |
pooka | Allow overriding CTASSERT. This helps with building NetBSD sources with compilers that don't support __COUNTER__ -- shifting the CTASSERTs around to avoid __LINE__ conflicts is a hopeless struggle.
|
1.110 |
| 11-Dec-2013 |
joerg | Allow kernel code to access constant databases by moving cdbr(3) and the required mi_vector_hash(3) into src/common.
|
1.109 |
| 02-Dec-2013 |
lneto | changed lua_Number to int64_t
|
1.108 |
| 28-Aug-2013 |
riastradh | Fix libkern's prototype for explicit_memset.
|
1.107 |
| 24-Jun-2013 |
riastradh | branches: 1.107.2; Replace consttime_bcmp/explicit_bzero by consttime_memequal/explicit_memset.
consttime_memequal is the same as the old consttime_bcmp. explicit_memset is to memset as explicit_bzero was to bcmp.
Passes amd64 release and i386/ALL, but I'm sure I missed some spots, so please let me know.
|
1.106 |
| 30-Aug-2012 |
drochner | branches: 1.106.2; Add "consttime_bcmp" and "explicit_bzero" functions for both kernel abd userland, as proposed on tech-security, with explicit_bzero using a volatile function pointer as suggested by Alan Barrett. Both do what the name says. For userland, both are prefixed by "__" to keep them out of the user namespace. Change some memset/memcmp uses to the new functions where it makes sense -- these are just some examples, more to come.
|
1.105 |
| 22-Jan-2012 |
rmind | Add CTASSERT_SIGNED() and CTASSERT_UNSIGNED().
|
1.104 |
| 28-Nov-2011 |
tls | branches: 1.104.2; Remove arc4random() and arc4randbytes() from the kernel API. Replace arc4random() hacks in rump with stubs that call the host arc4random() to get numbers that are hopefully actually random (arc4random() keyed with stack junk is not). This should fix some of the currently failing anita tests -- we should no longer generate duplicate "random" MAC addresses in the test environment.
|
1.103 |
| 01-Oct-2011 |
chs | branches: 1.103.2; use gcc builtin for memset() on vax too.
|
1.102 |
| 29-Sep-2011 |
christos | Don't include <sys/systm.h> because it brings in too much stuff that conflicts with standalone code. Instead modify kern_assert() to be like panic() and call that.
|
1.101 |
| 27-Sep-2011 |
jym | Modify *ASSERTMSG() so they are now used as variadic macros. The main goal is to provide routines that do as KASSERT(9) says: append a message to the panic format string when the assertion triggers, with optional arguments.
Fix call sites to reflect the new definition.
Discussed on tech-kern@. See http://mail-index.netbsd.org/tech-kern/2011/09/07/msg011427.html
|
1.100 |
| 25-Sep-2011 |
jym | Do as Joerg said and kill the __STDC__ blocks. They only make sense for things used by assembler, which won't be the case for these macros.
|
1.99 |
| 01-Sep-2011 |
jym | Make strnlen(3) accessible in kernel. ok christos@.
|
1.98 |
| 05-Jul-2011 |
matt | If GCC 4.0 or later, use __builtin_offsetof for offsetof. This make GCC 4.5 with offsetof in mbuf.h and kern_cpu.c
|
1.97 |
| 19-Feb-2011 |
matt | Define CTASSERT in terms of __CTASSERT
|
1.96 |
| 26-Jan-2011 |
matt | Fix KDASSERTMSG defintions for !DEBUG
|
1.95 |
| 24-Jan-2011 |
matt | Add KDASSERTMSG (KDASSERT already exists).
|
1.94 |
| 25-Apr-2010 |
rmind | branches: 1.94.2; 1.94.4; Fix KASSERTMSG() to be consistent with KASSERT() logic, not inverted. Hi matt@!
|
1.93 |
| 19-Jan-2010 |
pooka | branches: 1.93.2; 1.93.4; 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.
|
1.92 |
| 21-Jul-2009 |
joerg | 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.
|
1.91 |
| 13-May-2009 |
pgoyette | Implement snprintb_m(3) to provide multi-line bit/bit-field decode. Discussed on tech-kern.
|
1.90 |
| 25-Mar-2009 |
tls | Fix build problems caused by crc32 addition to libkern. Also, this makes the i386 bootblocks about 2K smaller than they were before we monkeyed with crc32 at all.
|
1.89 |
| 25-Mar-2009 |
darran | Fixes PR kern/41069 and PR kern/41070.
Extends the Opencrypto API to allow the destination buffer size to be specified when its not the same size as the input buffer (i.e. for operations like compress and decompress). The crypto_op and crypt_n_op structures gain a u_int dst_len field. The session_op structure gains a comp_alg field to specify a compression algorithm. Moved four ioctls to new ids; CIOCGSESSION, CIOCNGSESSION, CIOCCRYPT, and CIOCNCRYPTM. Added four backward compatible ioctls; OCIOCGSESSION, OCIOCNGSESSION, OCIOCCRYPT, and OCIOCNCRYPTM.
Backward compatibility is maintained in ocryptodev.h and ocryptodev.c which implement the original ioctls and set dst_len and comp_alg to 0.
Adds user-space access to compression features.
Adds software gzip support (CRYPTO_GZIP_COMP).
Adds the fast version of crc32 from zlib to libkern. This should be generally useful and provide a place to start normalizing the various crc32 routines in the kernel. The crc32 routine is used in this patch to support GZIP.
With input and support from tls@NetBSD.org.
|
1.88 |
| 23-Mar-2009 |
tsutsui | Don't use gcc's __builtin_*() functions #if defined(_STANDALONE) because they could be larger than __OPTIMIZE_SIZE__'ed libsa ones and __builtin_memcpy() on vax rejects NULL (i.e. copying from/to address 0x0).
No particular comments on tech-toolchain.
Tested on alpha, arc, cobalt, hp300, i386, landisk, macppc, news68k, sgimips, sparc, sparc64, sun3, and vax (on simh).
|
1.87 |
| 18-Mar-2009 |
tsutsui | - remove bcmp(9), bcopy(9), and bzero(9) from libkern since <sys/systm.h> has macro which replace them with mem*() functions in #ifdef _KERNEL as noted in man pages - move declarations of bcopy(3) and bzero(3) into <lib/libsa/stand.h> since they are still in libsa for some MD standalone sources (I guess all bcmp(3) in standalone sources have been replaced with memcmp(3) but they should be replaced with memcmp() anyway)
|
1.86 |
| 14-Mar-2009 |
dsl | Remove all the __P() from sys (excluding sys/dist) Diff checked with grep and MK1 eyeball. i386 and amd64 GENERIC and sys still build.
|
1.85 |
| 16-Dec-2008 |
christos | branches: 1.85.2; replace bitmask_snprintf(9) with snprintb(3)
|
1.84 |
| 16-Nov-2008 |
ad | Our qsort() is inappropriate for kernel use because it makes recursive calls. Replace it with a kheapsort() function in kernel. Pointed out by tron@.
|
1.83 |
| 16-Nov-2008 |
ad | Make qsort() available in libkern.
|
1.82 |
| 08-Sep-2008 |
gmcgarry | branches: 1.82.2; 1.82.4; 1.82.8; Replace most gcc-specific __attribute__ uses with BSD-style sys/cdef.h preprocessor macros.
|
1.81 |
| 02-Jul-2008 |
matt | branches: 1.81.2; Add KASSERTMSG(e, msg) for umass.c. XXX directly calls panic.
|
1.80 |
| 02-Jul-2008 |
matt | Add CTASSERT (compile time assert) from FreeBSD. Causes sources to fail to compile: <file>:<line>: error: size of array '__ctassert<line>' is negative
|
1.79 |
| 25-Mar-2008 |
christos | branches: 1.79.4; 1.79.6; 1.79.8; fix again
|
1.78 |
| 25-Mar-2008 |
christos | fix bcopy again
|
1.77 |
| 25-Mar-2008 |
christos | fix bcopy prototype
|
1.76 |
| 25-Mar-2008 |
christos | add a prototype for bcopy.
|
1.75 |
| 17-Feb-2008 |
matt | branches: 1.75.6; Don't need to that particular in mtprng_random(). Use 2 values instead of 8.
|
1.74 |
| 02-Feb-2008 |
matt | Improve my version of mtprng_random. Reshuffle things. Add an compatible version of init_by_array.
|
1.73 |
| 31-Jan-2008 |
matt | Add Mersenne Twister prototypes and state struct to libkern.h Cleanup a comment. s/RLEN/MTPRNG_RLEN/g s/POS1/MTPRNG_POS1/g Remove unneeded test code.
|
1.72 |
| 25-Dec-2007 |
perry | Convert many of the uses of __attribute__ to equivalent __packed, __unused and __dead macros from cdefs.h
|
1.71 |
| 24-Sep-2007 |
pooka | branches: 1.71.4; 1.71.6; 1.71.10; Rename __assert() to __kernassert() so that it doesn't collide with the libc version. They take different arguments.
|
1.70 |
| 29-Jul-2007 |
ad | branches: 1.70.4; 1.70.6; 1.70.8; 1.70.10; Disable kernel assertions if panicstr != NULL.
|
1.69 |
| 09-Apr-2007 |
matt | branches: 1.69.4; Enable builtin_ffs for vax
|
1.68 |
| 21-Feb-2007 |
thorpej | branches: 1.68.4; 1.68.6; Replace the Mach-derived boolean_t type with the C99 bool type. A future commit will replace use of TRUE and FALSE with true and false.
|
1.67 |
| 08-Oct-2006 |
thorpej | branches: 1.67.2; 1.67.4; 1.67.6; - Move strtoll.c and strtoull.c from libc/stdlib to common/libc/stdlib. - Add strtoll.c and strtoull.c to libkern.
|
1.66 |
| 10-Sep-2006 |
matt | branches: 1.66.2; If __STDC__ and GNU C >= 3.0, define C99's bool, true, false
|
1.65 |
| 31-Aug-2006 |
dyoung | branches: 1.65.2; Per discussion on tech-kern and tech-userlevel, move the bit-twiddling macros, __BIT, __BITS, SHIFTIN, SHIFTOUT, and __arraycount() from lib/libkern/libkern.h to sys/cdefs.h. Add a __-prefix to SHIFTIN and SHIFTOUT, and add a manual page for the bit-twiddling macros, bits(3).
Make the __BIT and __BITS macros "widthless," as best I can, by changing their type to uintmax_t from uint32_t. XXX The manual page lags this change by a bit.
Define __PRIxBIT and __PRIxBITS printf(3) format strings.
|
1.64 |
| 25-Aug-2006 |
matt | Add __NULL_STMT which is do { } while (/* CONSTCOND */ 0)
|
1.63 |
| 08-Jul-2006 |
matt | With VAX & GCC4, use builtin memset and memmove.
|
1.62 |
| 22-Apr-2006 |
thorpej | branches: 1.62.4; Move strtoumax.c from libc/stdlib to common/libc/stdlib and include it in libkern. Required for new code coming soon.
|
1.61 |
| 15-Apr-2006 |
christos | Imply DIAGNOSTIC if __COVERITY__.
|
1.60 |
| 14-Apr-2006 |
christos | If __COVERITY__ is defined, turn on KASSERT and _DIAGASSERT.
|
1.59 |
| 27-Mar-2006 |
dyoung | Per discussion on source-changes@, add __arraycount(array) for counting the number of elements in a static array, using the idiom, sizeof(array)/sizeof(array[0]).
XXX This may move in the future, but this is a safe place to put XXX it for use in the kernel.
|
1.58 |
| 11-Mar-2006 |
kleink | branches: 1.58.2; Provide BCD<->binary conversion in libkern and turn <dev/clock_subr.h>'s FROMBCD()/TOBCD() macros into wrappers around it, resulting in both smaller code footprint and elimination of possible issues due to multiple evaluation of macro arguments.
Suggested by Simon Burge and Anders Gavare on tech-kern.
|
1.57 |
| 08-Mar-2006 |
dyoung | Change macro names to avoid collisions:
BIT -> __BIT BITS -> __BITS
|
1.56 |
| 08-Mar-2006 |
dyoung | Move my bit-twiddling macros to libkern.h from my drivers, where I had duplicated them. Improve the macros' names. Simplify their implementation.
A brief description of each macro is below.
BIT(n): Return a bitmask with bit m set, where the least significant bit is bit 0.
BITS(m, n): Return a bitmask with bits m through n, inclusive, set. It does not matter whether m>n or m<=n. The least significant bit is bit 0.
A "bitfield" is a span of consecutive bits defined by a bitmask, where 1s select the bits in the bitfield. SHIFTIN, SHIFTOUT, and SHIFTOUT_MASK help read and write bitfields from device registers.
SHIFTIN(v, mask): Left-shift bits `v' into the bitfield defined by `mask', and return them. No side-effects.
SHIFTOUT(v, mask): Extract and return the bitfield selected by `mask' from `v', right-shifting the bits so that the rightmost selected bit is at bit 0. No side-effects.
SHIFTOUT_MASK(mask): Right-shift the bits in `mask' so that the rightmost non-zero bit is at bit 0. This is useful for finding the greatest unsigned value that a bitfield can hold. No side-effects. Note that SHIFTOUT_MASK(m) = SHIFTOUT(m, m).
Examples:
/* * Register definitions taken from the RFMD RF3000 manual. */ #define RF3000_GAINCTL 0x11 /* TX variable gain control */ #define RF3000_GAINCTL_TXVGC_MASK BITS(7, 2) #define RF3000_GAINCTL_SCRAMBLER BIT(1)
/* * Shift the transmit power into the transmit-power field of the * gain-control register and write it to the baseband processor. */ atw_rf3000_write(sc, RF3000_GAINCTL, SHIFTIN(txpower, RF3000_GAINCTL_TXVGC_MASK));
/* * Register definitions taken from the ADMtek ADM8211 manual. * */ #define ATW_RXSTAT_OWN BIT(31) /* 1: NIC may fill descriptor */ /* ... */ #define ATW_RXSTAT_DA1 BIT(17) /* DA bit 1, admin'd address */ #define ATW_RXSTAT_DA0 BIT(16) /* DA bit 0, group address */ #define ATW_RXSTAT_RXDR_MASK BITS(15,12) /* RX data rate */ #define ATW_RXSTAT_FL_MASK BITS(11,0) /* RX frame length, last * descriptor only */
/* Extract the frame length from the Rx descriptor's * status field. */ len = SHIFTOUT(rxstat, ATW_RXSTAT_FL_MASK);
|
1.55 |
| 16-Feb-2006 |
perry | branches: 1.55.2; 1.55.4; Change "inline" back to "__inline" in .h files -- C99 is still too new, and some apps compile things in C89 mode. C89 keywords stay.
As per core@.
|
1.54 |
| 24-Dec-2005 |
perry | branches: 1.54.2; 1.54.4; 1.54.6; Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
|
1.53 |
| 21-Dec-2005 |
christos | Add the state setting functions for the new random function, but use the small one by default, so that we can switch in the future if we want to.
|
1.52 |
| 20-Dec-2005 |
christos | Provide _DIAGASSERT and NULL, so that we don't have to do it in *all* the libkern files. Also the new inet_addr, provides inet_aton; advertise it.
|
1.51 |
| 11-Dec-2005 |
christos | merge ktrace-lwp.
|
1.50 |
| 13-Aug-2003 |
ragge | branches: 1.50.16; Do not use the builtins for the mem* functions on vax, the compiler gets confused with the static inline functions vax uses.
|
1.49 |
| 07-Aug-2003 |
agc | Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22364, verified by myself.
|
1.48 |
| 15-May-2003 |
itojun | branches: 1.48.2; add strl{cpy,cat} to libkern. code from lib/libc/string (originally from openbsd).
|
1.47 |
| 24-Oct-2002 |
christos | make offsetof lint friendlier.
|
1.46 |
| 06-Oct-2002 |
tls | ESP output was drawing down the entropy pool at a ferocious rate, a particular problem on hosts with only wireless interfaces that are definitely not safe to use as entropy sources.
Add arc4randbytes() which hands out bytes from the same source used by arc4random(). This is intended to be a _temporary_ interface until we can design and implement a better general PRNG interface that is decoupled from the entropy-pool implementation.
Modify key_randomfill() (used only for initialization vectors on SA creation and via key_sa_stir_iv(), which does not "stir", despite its name) to use arc4randbytes() instead of pulling bits directly from the entropy pool. It is my hope that this change will pose minimal integration problems for the KAME folks as the random-pool interface is *already* different between each BSD variant; this just simplifies the NetBSD case and solves a fairly serious problem.
Note that it is generally considered acceptable cryptographic practice to use a fast stream cipher to generate IVs for encryption with stronger block ciphers. For example, the use of "non-Approved" PRNGs to generate IVs for "Approved" block ciphers is explicitly sanctioned by FIPS 140-2.
|
1.45 |
| 04-Oct-2002 |
junyoung | Add strstr() to libkern. For now, it's only used in i386 (for processor identification).
|
1.44 |
| 04-Oct-2002 |
matt | Ansify's (use prototypes).
|
1.43 |
| 25-Aug-2002 |
thorpej | Tweak the previous change so that a prototype is always provided.
|
1.42 |
| 23-Aug-2002 |
ragge | Do not try to use "__builtin_ffs" on vax, ffs is an instruction already. Maybe possible to teach gcc to use it?
|
1.41 |
| 21-Aug-2002 |
thorpej | GCC 2.95 supports __builtin_ffs(); use it.
|
1.40 |
| 28-May-2002 |
itojun | have arc4random(9).
|
1.39 |
| 28-Dec-2001 |
thorpej | branches: 1.39.8; 1.39.10; Always provide alloca() as __builtin_alloca().
|
1.38 |
| 23-Dec-2001 |
thorpej | The kernel is now built with -ffreestanding, so GCC built-ins are disabled. Explicitly re-enable some that we want to use, namely:
* memcpy() -> __builtin_memcpy() * memcmp() -> __builtin_memcmp() * memset() -> __builtin_memset()
* strcpy() -> __builtin_strcpy() * strcmp() -> __builtin_strcmp() * strlen() -> __builtin_strlen()
We might also consider some others for GCC 3.x.
|
1.37 |
| 07-Jul-2001 |
perry | branches: 1.37.2; restore bzero and bcmp prototypes for now -- this has to be hashed out.
|
1.36 |
| 07-Jul-2001 |
simonb | Put the prototypes for bcmp() and bzero() back (ifdef _STANDALONE) so that libsa builds again.
|
1.35 |
| 07-Jul-2001 |
perry | Remove bcmp and bzero prototypes. And yes, I actually checked and tested this time. (Slap self repeatedly.)
|
1.34 |
| 30-Apr-2001 |
lukem | remove some lint
|
1.33 |
| 05-Apr-2001 |
thorpej | Add ctype routines.
|
1.32 |
| 01-Nov-2000 |
thorpej | branches: 1.32.2; Add a strcasecmp(), modified from chopps's strncasecmp().
|
1.31 |
| 12-Oct-2000 |
msaitoh | enclose offsetof macro definition with #ifndef offsetof ... #endif
|
1.30 |
| 08-May-2000 |
thorpej | branches: 1.30.4; __predict_true() the expressions passed to the assert family, so as to move the calls to __assert() out-of-line.
Suggested by Bill Sommerfeld.
|
1.29 |
| 29-Mar-2000 |
simonb | Multiple include protection.
|
1.28 |
| 29-Nov-1999 |
simonb | Move strtoul.c (via CVS repo copy) to libkern. Also sort prototypes in libkern.h and sources in arm32/Makefile.inc alphabetically.
|
1.27 |
| 10-Sep-1999 |
tron | branches: 1.27.2; 1.27.8; Add prototype for memcmp() as suggested by Anders Hjalmarsson in PR kern/8360.
|
1.26 |
| 07-May-1999 |
drochner | move intoa() from libsa:net.c to libkern, turn inet_ntoa() into a macro, nuke ip_convertaddr()
|
1.25 |
| 12-Apr-1999 |
drochner | This was an n_long, not u_long, so u_int32_t is correct.
|
1.24 |
| 12-Apr-1999 |
ross | libkern just got an inet_addr(), but it won't compile, no prototype. Cleanup... * Add prototype to libkern.h. * Remove the almost-identical-copy from libsa/net.[ch]. * Change its type back to the (wrong, but harmless) historical one. (u_long) * Kill the XXX local prototype in nfs_bootparam.c
|
1.23 |
| 31-Jul-1998 |
perry | branches: 1.23.8; make libkern build memmove() properly
|
1.22 |
| 21-Jun-1998 |
christos | branches: 1.22.2; Add a small string pattern matching function to facilitate pcmcia cis string matches.
|
1.21 |
| 01-Mar-1998 |
fvdl | Merge with Lite2 + local changes
|
1.20 |
| 22-Feb-1998 |
mycroft | Add memcpy() and memset(), and sort.
|
1.19 |
| 28-Jan-1998 |
thorpej | Add offsetof().
|
1.18 |
| 23-Jan-1998 |
drochner | remove prototypes for deprecated index() and rindex()
|
1.17 |
| 22-Jan-1998 |
drochner | add prototype for index()
|
1.16 |
| 21-Jan-1998 |
cgd | add strrchr
|
1.15 |
| 24-Oct-1997 |
mjacob | Add missing NULL define for KERNEL case and prototype into libkern.h.
|
1.14 |
| 07-Jul-1997 |
cgd | mark prototypes for static inline functions as possibly unused (with __attribute__ ((unused))), to avoid generating warnings when compiling without optimization but with most ports' default warning flags.
|
1.13 |
| 13-Jun-1997 |
drochner | Add prototype for bzero() (since it is implemented here).
|
1.12 |
| 18-Jan-1997 |
cgd | add strchr() to libkern. strchr.c copied from libc's "index.c", but with appropriate definitions so that it'll build strchr(), and so that it builds correctly in libkern (needed to #define NULL).
|
1.11 |
| 24-Oct-1996 |
cgd | second and third args to scanc() (string and table) are not and should not be modified. Make them 'const'.
|
1.10 |
| 22-Sep-1996 |
cgd | add a missing #else, pointed out by Wolfgang Solfrank
|
1.9 |
| 27-Aug-1996 |
cgd | Add machine-independent assertion-checking support. macros are:
assert() which always does assertion checking unless "NDEBUG" is defined.
KASSERT() which does assertion checking if DIAGNOSTIC is defined.
KDASSERT() which does assertion checking if DEBUG is define. This macro exists for compatibility with existing ports' assertion checking macros. (Assertion checking is not typically an "expensive" operation, and DIAGNOSTIC should be used for inexpensive consistency checks.)
|
1.8 |
| 10-Jun-1996 |
cgd | locc() is unused. Remove it from the machine-independent kernel interface.
|
1.7 |
| 14-Mar-1996 |
christos | - Add missing prototypes - Bring prototypes into scope - Correct prototype for skpc
|
1.6 |
| 13-Feb-1996 |
christos | Add declaration of strncasecmp.
|
1.5 |
| 23-Sep-1995 |
leo | Add abs() function as an 'inline'. The atari-port needs it since the -fno-builtin is used in the kernel Makefile.
|
1.4 |
| 14-Aug-1995 |
cgd | prototype inline functions, almost as suggested by Jonathan Stone in PR 1258.
|
1.3 |
| 26-Oct-1994 |
cgd | new RCS ID format.
|
1.2 |
| 15-Jul-1994 |
cgd | don't use inline, use __inline, like cdefs intends (so it can kill it if nongcc
|
1.1 |
| 05-May-1994 |
cgd | branches: 1.1.2; lots of changes: prototype migration, move lots of variables, definitions, and structure elements around. kill some unnecessary type and macro definitions. standardize clock handling. More changes than you'd want.
|
1.1.2.1 |
| 15-Jul-1994 |
cgd | updates from trunk. basically, C language errors.
|
1.22.2.1 |
| 08-Aug-1998 |
eeh | Revert cdevsw mmap routines to return int.
|
1.23.8.1 |
| 21-Jun-1999 |
thorpej | Sync w/ -current.
|
1.27.8.1 |
| 27-Dec-1999 |
wrstuden | Pull up to last week's -current.
|
1.27.2.3 |
| 21-Apr-2001 |
bouyer | Sync with HEAD
|
1.27.2.2 |
| 22-Nov-2000 |
bouyer | Sync with HEAD.
|
1.27.2.1 |
| 20-Nov-2000 |
bouyer | Update thorpej_scsipi to -current as of a month ago
|
1.30.4.1 |
| 05-Nov-2000 |
tv | Pullup 1.31 [msaitoh]: enclose offsetof macro definition with #ifndef offsetof ... #endif
|
1.32.2.8 |
| 11-Nov-2002 |
nathanw | Catch up to -current
|
1.32.2.7 |
| 18-Oct-2002 |
nathanw | Catch up to -current.
|
1.32.2.6 |
| 27-Aug-2002 |
nathanw | Catch up to -current.
|
1.32.2.5 |
| 20-Jun-2002 |
nathanw | Catch up to -current.
|
1.32.2.4 |
| 08-Jan-2002 |
nathanw | Catch up to -current.
|
1.32.2.3 |
| 24-Aug-2001 |
nathanw | Catch up with -current.
|
1.32.2.2 |
| 21-Jun-2001 |
nathanw | Catch up to -current.
|
1.32.2.1 |
| 09-Apr-2001 |
nathanw | Catch up with -current.
|
1.37.2.3 |
| 06-Sep-2002 |
jdolecek | sync kqueue branch with HEAD
|
1.37.2.2 |
| 23-Jun-2002 |
jdolecek | catch up with -current on kqueue branch
|
1.37.2.1 |
| 10-Jan-2002 |
thorpej | Sync kqueue branch with -current.
|
1.39.10.2 |
| 03-Dec-2002 |
he | Pull up revisions 1.42-1.43 (requested by thorpej in ticket #1024): Don't use __builtin_ffs() on vax, ffs is an instruction there already. Also, always provide an ffs() prototype. Should fix build problem on vax.
|
1.39.10.1 |
| 21-Nov-2002 |
he | Pull up revision 1.41 (requested by thorpej in ticket #710): GCC 2.95 supports __builtin_ffs(), so use it.
|
1.39.8.2 |
| 29-Aug-2002 |
gehenna | catch up with -current.
|
1.39.8.1 |
| 30-May-2002 |
gehenna | Catch up with -current.
|
1.48.2.3 |
| 21-Sep-2004 |
skrll | Fix the sync with head I botched.
|
1.48.2.2 |
| 18-Sep-2004 |
skrll | Sync with HEAD.
|
1.48.2.1 |
| 03-Aug-2004 |
skrll | Sync with HEAD
|
1.50.16.8 |
| 27-Feb-2008 |
yamt | sync with head.
|
1.50.16.7 |
| 04-Feb-2008 |
yamt | sync with head.
|
1.50.16.6 |
| 21-Jan-2008 |
yamt | sync with head
|
1.50.16.5 |
| 27-Oct-2007 |
yamt | sync with head.
|
1.50.16.4 |
| 03-Sep-2007 |
yamt | sync with head.
|
1.50.16.3 |
| 26-Feb-2007 |
yamt | sync with head.
|
1.50.16.2 |
| 30-Dec-2006 |
yamt | sync with head.
|
1.50.16.1 |
| 21-Jun-2006 |
yamt | sync with head.
|
1.54.6.2 |
| 01-Jun-2006 |
kardel | Sync with head.
|
1.54.6.1 |
| 22-Apr-2006 |
simonb | Sync with head.
|
1.54.4.1 |
| 09-Sep-2006 |
rpaulo | sync with head
|
1.54.2.1 |
| 18-Feb-2006 |
yamt | sync with head.
|
1.55.4.2 |
| 11-May-2006 |
elad | sync with head
|
1.55.4.1 |
| 19-Apr-2006 |
elad | sync with head.
|
1.55.2.6 |
| 14-Sep-2006 |
yamt | sync with head.
|
1.55.2.5 |
| 03-Sep-2006 |
yamt | sync with head.
|
1.55.2.4 |
| 11-Aug-2006 |
yamt | sync with head
|
1.55.2.3 |
| 24-May-2006 |
yamt | sync with head.
|
1.55.2.2 |
| 01-Apr-2006 |
yamt | sync with head.
|
1.55.2.1 |
| 13-Mar-2006 |
yamt | sync with head.
|
1.58.2.2 |
| 24-May-2006 |
tron | Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
|
1.58.2.1 |
| 28-Mar-2006 |
tron | Merge 2006-03-28 NetBSD-current into the "peter-altq" branch.
|
1.62.4.1 |
| 13-Jul-2006 |
gdamore | Merge from HEAD.
|
1.65.2.1 |
| 18-Nov-2006 |
ad | Sync with head.
|
1.66.2.1 |
| 22-Oct-2006 |
yamt | sync with head
|
1.67.6.1 |
| 07-Apr-2008 |
skrll | Oops, missed this one.
|
1.67.4.2 |
| 15-Apr-2007 |
yamt | sync with head.
|
1.67.4.1 |
| 27-Feb-2007 |
yamt | - sync with head. - move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
|
1.67.2.1 |
| 19-Apr-2008 |
bouyer | Pull up following revision(s) (requested by skrll in ticket #1129): share/mk/bsd.own.mk: revision 1.489.4.3 gnu/dist/gcc4/gcc/config/vax/vax.h: revision 1.2.6.1 gnu/dist/gcc4/gcc/config/vax/builtins.md: revision 1.2.10.2 sys/arch/vax/conf/Makefile.vax: revision 1.77.22.1 gnu/dist/gcc4/gcc/config/vax/vax-protos.h: revision 1.1.1.1.6.1 gnu/dist/binutils/gas/config/tc-vax.h: revision 1.1.1.1.18.1 gnu/lib/libgcc4/libgcc/Makefile: revision 1.2.6.1 sys/arch/vax/include/macros.h: revision 1.37.14.1 gnu/lib/crtstuff4/Makefile: revision 1.1.6.1 gnu/dist/gcc4/gcc/config/vax/elf.h: revision 1.1.1.1.6.1 gnu/dist/gcc4/gcc/config/vax/vax.c: revision 1.1.1.1.6.1 sys/arch/vax/boot/Makefile.inc: revision 1.12.16.1 tools/gcc/Makefile: revision 1.22.4.1 lib/libcrypto/Makefile: revision 1.46.4.2 gnu/dist/gcc4/gcc/config/vax/netbsd-elf.h: revision 1.1.1.1.6.1 sys/lib/libkern/libkern.h: revision 1.67.6.1 gnu/dist/gcc4/gcc/config/vax/predicates.md: revision 1.3.10.2 gnu/dist/binutils/bfd/elf32-vax.c: revision 1.5.6.1 gnu/dist/gcc4/gcc/config/vax/vax.md: revision 1.1.1.1.4.1.2.1 gnu/dist/gcc4/gcc/config/vax/vax.opt: revision 1.1.1.1.6.1 gnu/dist/binutils/gas/config/tc-vax.c: revision 1.4.4.1.2.1 Pullup changes to get vax shlibs working from the wrstuden-fixsa branch.
|
1.68.6.1 |
| 11-Jul-2007 |
mjf | Sync with head.
|
1.68.4.3 |
| 09-Oct-2007 |
ad | Sync with head.
|
1.68.4.2 |
| 20-Aug-2007 |
ad | Sync with HEAD.
|
1.68.4.1 |
| 10-Apr-2007 |
ad | Sync with head.
|
1.69.4.1 |
| 15-Aug-2007 |
skrll | Sync with HEAD.
|
1.70.10.2 |
| 29-Jul-2007 |
ad | Disable kernel assertions if panicstr != NULL.
|
1.70.10.1 |
| 29-Jul-2007 |
ad | file libkern.h was added on branch matt-mips64 on 2007-07-29 11:46:03 +0000
|
1.70.8.1 |
| 06-Oct-2007 |
yamt | sync with head.
|
1.70.6.3 |
| 23-Mar-2008 |
matt | sync with HEAD
|
1.70.6.2 |
| 09-Jan-2008 |
matt | sync with HEAD
|
1.70.6.1 |
| 06-Nov-2007 |
matt | sync with HEAD
|
1.70.4.1 |
| 02-Oct-2007 |
joerg | Sync with HEAD.
|
1.71.10.1 |
| 02-Jan-2008 |
bouyer | Sync with HEAD
|
1.71.6.1 |
| 26-Dec-2007 |
ad | Sync with head.
|
1.71.4.1 |
| 18-Feb-2008 |
mjf | Sync with HEAD.
|
1.75.6.4 |
| 17-Jan-2009 |
mjf | Sync with HEAD.
|
1.75.6.3 |
| 28-Sep-2008 |
mjf | Sync with HEAD.
|
1.75.6.2 |
| 02-Jul-2008 |
mjf | Sync with HEAD.
|
1.75.6.1 |
| 03-Apr-2008 |
mjf | Sync with HEAD.
|
1.79.8.1 |
| 03-Jul-2008 |
simonb | Sync with head.
|
1.79.6.2 |
| 24-Sep-2008 |
wrstuden | Merge in changes between wrstuden-revivesa-base-2 and wrstuden-revivesa-base-3.
|
1.79.6.1 |
| 18-Sep-2008 |
wrstuden | Sync with wrstuden-revivesa-base-2.
|
1.79.4.5 |
| 11-Aug-2010 |
yamt | sync with head.
|
1.79.4.4 |
| 11-Mar-2010 |
yamt | sync with head
|
1.79.4.3 |
| 19-Aug-2009 |
yamt | sync with head.
|
1.79.4.2 |
| 16-May-2009 |
yamt | sync with head
|
1.79.4.1 |
| 04-May-2009 |
yamt | sync with head.
|
1.81.2.2 |
| 13-Dec-2008 |
haad | Update haad-dm branch to haad-dm-base2.
|
1.81.2.1 |
| 19-Oct-2008 |
haad | Sync with HEAD.
|
1.82.8.5 |
| 14-Feb-2014 |
matt | Change KASSERTMSG/KDASSERTMSG to use varadic arguments like HEAD. panic -> vpanic, add panic wrapper to vpanic.
|
1.82.8.4 |
| 27-Dec-2011 |
matt | Add popcount32 and popcount64 for flash/nand
|
1.82.8.3 |
| 29-Apr-2011 |
matt | Move CTASSERT to __CTASSERT in <sys/cdefs.h> (from current) Add KDASSERTMSG (from current)
|
1.82.8.2 |
| 03-Feb-2011 |
cliff | fix KASSERTMSG
|
1.82.8.1 |
| 21-Apr-2010 |
matt | sync to netbsd-5
|
1.82.4.2 |
| 03-May-2009 |
snj | branches: 1.82.4.2.4; Pull up following revision(s) (requested by tls in ticket #611): common/dist/zlib/zlib.h: revision 1.3 sys/lib/libkern/crc32.c: revision 1.2 sys/lib/libkern/libkern.h: revision 1.90 via patch sys/lib/libsa/cread.c: revision 1.23 sys/lib/libz/Makefile: revision 1.16 Fix build problems caused by crc32 addition to libkern. Also, this makes the i386 bootblocks about 2K smaller than they were before we monkeyed with crc32 at all.
|
1.82.4.1 |
| 03-May-2009 |
snj | Pull up following revision(s) (requested by tls in ticket #611): sys/lib/libkern/Makefile: patch sys/lib/libkern/crc32.c: revision 1.1 sys/lib/libkern/crc32.h: revision 1.1 sys/lib/libkern/libkern.h: revision 1.89 sys/lib/libkern/arch/i386/Makefile.inc: revision 1.28 sys/net/zlib.h: revision 1.14 via patch sys/opencrypto/crypto.c: revision 1.33 sys/opencrypto/cryptodev.c: revision 1.46 sys/opencrypto/cryptodev.h: revision 1.16 sys/opencrypto/cryptosoft.c: revision 1.24 sys/opencrypto/cryptosoft.h: revision 1.6 sys/opencrypto/deflate.h: revision 1.6 sys/opencrypto/cryptosoft_xform.c: revision 1.12 sys/opencrypto/deflate.c: revision 1.13 sys/opencrypto/files.opencrypto: revision 1.20 sys/opencrypto/ocryptodev.c: revision 1.1 sys/opencrypto/ocryptodev.h: revision 1.1 sys/opencrypto/xform.c: revision 1.18 sys/opencrypto/xform.h: revision 1.10 Fixes PR kern/41069 and PR kern/41070.
Extends the Opencrypto API to allow the destination buffer size to be specified when its not the same size as the input buffer (i.e. for operations like compress and decompress). The crypto_op and crypt_n_op structures gain a u_int dst_len field. The session_op structure gains a comp_alg field to specify a compression algorithm. Moved four ioctls to new ids; CIOCGSESSION, CIOCNGSESSION, CIOCCRYPT, and CIOCNCRYPTM. Added four backward compatible ioctls; OCIOCGSESSION, OCIOCNGSESSION, OCIOCCRYPT, and OCIOCNCRYPTM.
Backward compatibility is maintained in ocryptodev.h and ocryptodev.c which implement the original ioctls and set dst_len and comp_alg to 0.
Adds user-space access to compression features.
Adds software gzip support (CRYPTO_GZIP_COMP).
Adds the fast version of crc32 from zlib to libkern. This should be generally useful and provide a place to start normalizing the various crc32 routines in the kernel. The crc32 routine is used in this patch to support GZIP.
With input and support from tls@NetBSD.org.
|
1.82.4.2.4.1 |
| 07-Jan-2011 |
matt | Fix KASSERTMSG.
|
1.82.2.2 |
| 28-Apr-2009 |
skrll | Sync with HEAD.
|
1.82.2.1 |
| 19-Jan-2009 |
skrll | Sync with HEAD.
|
1.85.2.2 |
| 23-Jul-2009 |
jym | Sync with HEAD.
|
1.85.2.1 |
| 13-May-2009 |
jym | Sync with HEAD.
Commit is split, to avoid a "too many arguments" protocol error.
|
1.93.4.4 |
| 06-Mar-2011 |
rmind | sync with head (and fix few botches with this)
|
1.93.4.3 |
| 05-Mar-2011 |
rmind | sync with head
|
1.93.4.2 |
| 30-May-2010 |
rmind | sync with head
|
1.93.4.1 |
| 25-Apr-2010 |
rmind | Pull-up rev 1.94
|
1.93.2.1 |
| 30-Apr-2010 |
uebayasi | Sync with HEAD.
|
1.94.4.2 |
| 05-Mar-2011 |
bouyer | Sync with HEAD
|
1.94.4.1 |
| 08-Feb-2011 |
bouyer | Sync with HEAD
|
1.94.2.1 |
| 06-Jun-2011 |
jruoho | Sync with HEAD.
|
1.103.2.3 |
| 22-May-2014 |
yamt | sync with head.
for a reference, the tree before this commit was tagged as yamt-pagecache-tag8.
this commit was splitted into small chunks to avoid a limitation of cvs. ("Protocol error: too many arguments")
|
1.103.2.2 |
| 30-Oct-2012 |
yamt | sync with head
|
1.103.2.1 |
| 17-Apr-2012 |
yamt | sync with head
|
1.104.2.1 |
| 18-Feb-2012 |
mrg | merge to -current.
|
1.106.2.2 |
| 03-Dec-2017 |
jdolecek | update from HEAD
|
1.106.2.1 |
| 20-Aug-2014 |
tls | Rebase to HEAD as of a few days ago.
|
1.107.2.2 |
| 18-May-2014 |
rmind | sync with head
|
1.107.2.1 |
| 28-Aug-2013 |
rmind | sync with head
|
1.113.2.3 |
| 10-Aug-2014 |
tls | Rebase.
|
1.113.2.2 |
| 09-Aug-2014 |
tls | (Temporarily) disable LZF in libkern -- it introduces a dependency from src/sys to src/external which I'll need to fix by moving the LZF sources.
|
1.113.2.1 |
| 07-Apr-2014 |
tls | LZF in the kernel. As an entropy estimator for now but it's very small, and we could use it for ipcomp, for hibernation, for paging, for core dumps, etc.
|
1.115.2.1 |
| 22-Apr-2015 |
snj | Pull up following revision(s) (requested by roy in ticket #648): common/lib/libc/stdlib/_strtoi.h: revisions 1.1, 1.2 common/lib/libc/stdlib/strtoi.c: revision 1.1 common/lib/libc/stdlib/strtou.c: revision 1.1 distrib/sets/lists/base/ad.aarch64: patch distrib/sets/lists/base/ad.arm: patch distrib/sets/lists/base/ad.mips: patch distrib/sets/lists/base/ad.powerpc: patch distrib/sets/lists/base/md.amd64: patch distrib/sets/lists/base/md.sparc64: patch distrib/sets/lists/base/shl.mi: patch distrib/sets/lists/comp/mi: revision 1.1939 distrib/sets/lists/debug/ad.aarch64: patch distrib/sets/lists/debug/ad.arm: patch distrib/sets/lists/debug/ad.mips: patch distrib/sets/lists/debug/ad.powerpc: patch distrib/sets/lists/debug/md.amd64: patch distrib/sets/lists/debug/md.sparc64: patch distrib/sets/lists/debug/shl.mi: patch include/inttypes.h: revision 1.11 lib/libc/shlib_version: patch lib/libc/stdlib/Makefile.inc: revision 1.84 lib/libc/stdlib/strtol.3: revisions 1.27-1.31 lib/libc/stdlib/strtoul.3: revisions 1.26-1.29 sys/lib/libkern/Makefile.libkern: revision 1.37 sys/lib/libkern/libkern.h: revision 1.117 tools/compat/Makefile: revision 1.73 tools/compat/compat_defs.h: revision 1.101 tools/compat/configure.ac: revision 1.83 tools/compat/configure: revision 1.82 tools/compat/nbtool_config.h.in: revision 1.36 add strto{i,u} from Kamil Rytarowski as discussed in tech-userlevel. -- strtoi and strtou additions -- strtoi and strtou for the kernel -- strtoi and strtou additions -- strtoi and strtou man pages -- strto{i,u} -- regen -- Remove trailing whitespace. -- match variable names with man page (Kamil Rytarowski) -- cleanups from (Kamil Rytarowski) -- add strtoi strtou (Kamil Rytarowski) -- PR/49640: Kamil Rytarowski: Improve error printing -- Use existing month for Dd.
|
1.116.2.4 |
| 29-May-2016 |
skrll | Sync with HEAD
|
1.116.2.3 |
| 22-Sep-2015 |
skrll | Sync with HEAD
|
1.116.2.2 |
| 06-Jun-2015 |
skrll | Sync with HEAD
|
1.116.2.1 |
| 06-Apr-2015 |
skrll | Sync with HEAD
|
1.126.4.4 |
| 21-Apr-2020 |
martin | Sync with HEAD
|
1.126.4.3 |
| 13-Apr-2020 |
martin | Mostly merge changes from HEAD upto 20200411
|
1.126.4.2 |
| 08-Apr-2020 |
martin | Merge changes from current as of 20200406
|
1.126.4.1 |
| 10-Jun-2019 |
christos | Sync with HEAD
|
1.126.2.2 |
| 06-Sep-2018 |
pgoyette | Sync with HEAD
Resolve a couple of conflicts (result of the uimin/uimax changes)
|
1.126.2.1 |
| 28-Jul-2018 |
pgoyette | Sync with HEAD
|
1.139.2.1 |
| 20-Apr-2020 |
bouyer | Sync with HEAD
|
1.140.2.1 |
| 03-Apr-2021 |
thorpej | Sync with HEAD.
|
1.142.6.1 |
| 31-May-2021 |
cjep | sync with head
|
1.142.4.1 |
| 17-Jun-2021 |
thorpej | Sync w/ HEAD.
|