Commit Graph

1394 Commits

Author SHA1 Message Date
joerg
4d12bfcd15 Pass PICFLAGS down to cc-as-as and use __PIC__ to decide if it is small
vs big PIC mode. Retire -DPIC and -DBIGPIC.
2013-09-12 15:36:14 +00:00
riastradh
04e877f3a1 Fix libkern's prototype for explicit_memset. 2013-08-28 16:20:38 +00:00
matt
f0f9ccc930 Use LIBISPRIVATE?= yes 2013-08-21 08:30:50 +00:00
matt
b3356a40df Thumbify 2013-08-21 08:30:18 +00:00
matt
e1512a262a Simplify by using LIBISPRIVATE?= yes 2013-08-21 05:50:14 +00:00
matt
9a5bd26b35 Some assembly files need to compiled -marm since they are Thumb compatible. 2013-08-20 21:43:03 +00:00
matt
99a7d6ba8e Fix typos (prX not cpX) 2013-08-12 23:42:14 +00:00
matt
0009e83bf7 Add EHABI unwind stubs to libkern so prevent errors in linking if unwind
tables are present.
2013-08-12 23:22:12 +00:00
matt
015cebed78 Support thumb 2013-08-11 04:58:01 +00:00
skrll
0bdf107fbc Another codegen bug that fixes (in this case lots of) atf tests.
rump_server doesn't die so much now.
2013-07-23 14:52:07 +00:00
matt
516ab0fa43 Adjust for coldfire 2013-07-18 22:14:48 +00:00
matt
6b35aaa5b7 Fix typo. 2013-07-18 12:54:08 +00:00
matt
10fa00e357 Reorder a little to make clearer. 2013-07-18 12:53:09 +00:00
matt
0ad8b94ed8 Keep stack longword aligned.
Use longword ops for %d2.
2013-07-18 12:42:24 +00:00
matt
8d43a067dd Convert to motorola syntax 2013-07-18 12:40:42 +00:00
matt
6dedf03e19 Convert to morotola syntax 2013-07-18 12:29:30 +00:00
matt
547d5de4df Don't use %d2 (violates the ABI since it wasn't saved), use %a0 instead.
Use a pcrelative access for the local data avoiding the GOT.
2013-07-18 12:16:40 +00:00
rmind
7ae1c4ed1b libkern: add murmurhash module. 2013-06-29 16:02:01 +00:00
riastradh
82db4b9858 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.
2013-06-24 04:21:19 +00:00
dholland
e1610ba4cb Stick ffs_, ext2_, chfs_, filecore_, cd9660_, or mfs_ in front of
the following symbols so as to disambiguate fully. (Christos already
did the lfs ones.)

   lblkno
   lblktosize
   lfragtosize
   numfrags
   blkroundup
   fragroundup
2013-06-23 07:28:36 +00:00
riastradh
bfb8ca3f2e Account bytes drawn from initial call to libkern arc4random.
XXX This unlocked initialization looks rather bogus...
2013-06-23 02:38:22 +00:00
riastradh
6290b0987e Rework rndsink(9) abstraction and adapt arc4random(9) and cprng(9).
rndsink(9):
- Simplify API.
- Simplify locking scheme.
- Add a man page.
- Avoid races in destruction.
- Avoid races in requesting entropy now and scheduling entropy later.

Periodic distribution of entropy to sinks reduces the need for the
last one, but this way we don't need to rely on periodic distribution
(e.g., in a future tickless NetBSD).

rndsinks_lock should probably eventually merge with the rndpool lock,
but we'll put that off for now.

cprng(9):
- Make struct cprng_strong opaque.
- Move rndpseudo.c parts that futz with cprng guts to subr_cprng.c.
- Fix kevent locking.  (Is kevent locking documented anywhere?)
- Stub out rump cprng further until we can rumpify rndsink instead.
- Strip code to grovel through struct cprng_strong in fstat.
2013-06-23 02:35:23 +00:00
dholland
2737439da3 fsbtodb() -> FFS_FSBTODB(), EXT2_FSBTODB(), or MFS_FSBTODB()
dbtofsb() -> FFS_DBTOFSB() or EXT2_DBTOFSB()

(Christos already did the lfs ones a few days back)
2013-06-23 02:06:04 +00:00
matt
47a6ce0396 Add back {,u}modsi3 for libkern since if we are building standalone tools
we might be using the old ABI and might need them.
2013-06-21 05:06:24 +00:00
matt
7213984b98 modsi3/umodsi3 are only needed !EABI arm 2013-06-20 07:29:50 +00:00
dholland
64912b9b11 blkoff() -> mfs_blkoff()
XXX: this shouldn't be using "mfs" for its symbols as we also have
XXX: sys/ufs/mfs.
2013-06-19 18:18:12 +00:00
dholland
f1333577b5 Rename ambiguous macros:
MAXDIRSIZE -> UFS_MAXDIRSIZE or LFS_MAXDIRSIZE
   NINDIR -> FFS_NINDIR, EXT2_NINDIR, LFS_NINDIR, or MFS_NINDIR
   INOPB -> FFS_INOPB, LFS_INOPB
   INOPF -> FFS_INOPF, LFS_INOPF
   blksize -> ffs_blksize, ext2_blksize, or lfs_blksize
   sblksize -> ffs_blksize

These are not the only ambiguously defined filesystem macros, of
course, there's a pile more. I may not have found all the ambiguous
definitions of blksize(), too, as there are a lot of other things
called 'blksize' in the system.
2013-06-19 17:51:25 +00:00
christos
855bb66ef7 Prefix most of the cpp macros with lfs_ and LFS_ to avoid conflicts with ffs.
This was done so that boot blocks that want to compile both FFS and LFS in
the same file work.
2013-06-18 18:18:57 +00:00
dholland
5a420c1b9a Stick UFS_ in front of these symbols:
DIRBLKSIZ
   DIRECTSIZ
   DIRSIZ
   OLDDIRFMT
   NEWDIRFMT

Part of PR 47909.
2013-06-09 17:57:08 +00:00
dholland
89582ef58a Build properly against the lfs changes. 2013-06-09 00:02:33 +00:00
tsutsui
ab5da9a864 Wrap >80 char lines that overflowed on NDADDR -> EXT2FS_NDADDR changes. 2013-05-10 15:22:37 +00:00
matt
5f058922b3 This change arm, armeb, earm, earmeb, earmhf, earmhfeb so all builds that
share a MACHINE_ARCH for userland so that except for etc, will produce
identical sets.

usr/include/machine now points to usr/include/arm
2013-05-02 03:56:38 +00:00
martin
e7f80397d9 Make the check in close() for a non-deflatable file mode symetric to
the one in open().
Avoids dealloc() calls on NULL.
2013-04-14 22:23:28 +00:00
nakayama
99b8f1ddbf Remove duplicate source files. 2013-03-17 04:47:16 +00:00
nakayama
e923193871 Revert previous. christos fixed the root cause. 2013-03-17 04:45:46 +00:00
christos
ab495c9f87 undo sparc64 kludge 2013-03-17 00:47:13 +00:00
nakayama
809b806d54 Make sparc64 32-bit kernel buildable. 2013-03-14 11:53:33 +00:00
christos
d3a58d87a8 amend previous sparc64 fix: rump does not know about memcpyset.s 2013-03-11 11:44:48 +00:00
christos
49d47d88c9 On sparc64 memcpy and memset are provided by memcpyset.s (should have been
memcpyset.S, but...). Don't include them in the build because it breaks the
modular build where the kernel library is built as an object.
2013-03-10 07:31:03 +00:00
christos
642baa00c2 recognize OpenBSD too 2013-03-02 22:04:06 +00:00
matt
f35a96a42a Modify earm rule to match any machine_arch starting with earm. 2013-02-06 07:18:15 +00:00
matt
080a1c2724 Add strnlen.c to SRCS (which will automatically use the .S version if it
exists).
2013-01-23 22:34:37 +00:00
macallan
b3be12c418 pull in strnlen.S 2013-01-23 20:38:27 +00:00
dholland
dcd34a91c5 Stuff UFS_ in front of a few of ufs's symbols to reduce namespace
pollution. Specifically:
   ROOTINO -> UFS_ROOTINO
   WINO -> UFS_WINO
   NXADDR -> UFS_NXADDR
   NDADDR -> UFS_NDADDR
   NIADDR -> UFS_NIADDR
   MAXSYMLINKLEN -> UFS_MAXSYMLINKLEN
   MAXSYMLINKLEN_UFS[12] -> UFS[12]_MAXSYMLINKLEN (for consistency)

Sort out ext2fs's misuse of NDADDR and NIADDR; fortunately, these have
the same values in ext2fs and ffs.

No functional change intended.
2013-01-22 09:39:11 +00:00
matt
e140e7a99f Pass down an empty CPUFLAGS since CPUFLAGS is contained in CFLAGS. 2012-12-12 15:12:11 +00:00
matt
d341a32e61 Don't pass down CPUFLAGS since its value is already in CFLAGS. 2012-12-12 15:10:27 +00:00
christos
293b3c5124 add new divsi3 related files. 2012-10-30 16:36:03 +00:00
christos
58e206816c add split files. 2012-10-10 02:15:31 +00:00
matt
325a8822fe Add ARMv5 support the clz instruction 2012-09-01 11:24:36 +00:00
drochner
8588929dc5 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.
2012-08-30 12:16:48 +00:00