Commit graph

443 commits

Author SHA1 Message Date
Ben Gras 10e6ba68d2 vm: restartability improvements (#1)
Two bugs fixed wrt vm restartability.

	. make sure pagetable data is only allocated
	  using dynamic data instead of static spare pages
	  (bootstrap pages). They are needed for bootstrap
	  but now repeat some of the initialization so only
	  dynamic data remains. This solves the problem of
	  physical addresses changing (as static pages are
	  re-allocated for the new instance) after update.
	. pt_ptalloc has to be specified in bytes instead of
	  pde slot numbers. leaving pt_pt NULL causes mapping
	  transfers to fail because NULL happens to be mapped in
	  then and updates then happen there.
	. added some sanity checks against the above happening.

The new state is that VM can update many times, but the system
isn't fully reliable afterwards yet.

Change-Id: I7313602c740cdae8590589132291116ed921aed7
2015-09-17 13:41:26 +00:00
Ben Gras 8bab0dfa2a Kernel: delivermsg improvements
. make arch-independent, and local to proc.c, reduce code duplication
    . make vm_suspend public but unduplicated in proc.c
    . ask VM for handling once, 2nd time SIGSEGV process
    . remove debug printfs
    . test case for bogus sendrec() address argument

Change-Id: I3893758910c01de60b8fe3e50edd594296a0b73e
2015-09-17 13:41:09 +00:00
Cristiano Giuffrida 36f477c20e vm: Allow in-band metadata for cache blocks
Allow extra space for in-band metadata when allocating cache blocks.

Edited by David van Moolenbroek: since this effectively halves the
potential size of the typical file system cache, do this only when
compiling with instrumentation.

Change-Id: I0840af6420899ede2d5bb7539e79c0a456b5128d
2015-09-17 13:40:39 +00:00
Cristiano Giuffrida 75206e2f3e libmthread: Fix guard page mapping.
Edited by David van Moolenbroek to deallocate the guard page as well.
Note that while the new approach is better in theory (previously, the
hole could end up being filled by another allocated page), guard page
protection is now broken in practice, because VM does not support
setting specific page permissions (in this case, PROT_NONE).

Change-Id: I882624f5d152d3ebe82fca649cbad85aa4931780
2015-09-17 13:38:44 +00:00
Lionel Sambuc 0485087c58 testrelpol: let test specific services
If arguments are provided, the services list to test is set from those,
instead of initializing it with every currently running service.

If such arguments are present, also skip LiveUpdate tests.

Change-Id: I14f874666a610072a5ff4a60516e59cf04dc9e31
2015-09-17 13:37:55 +00:00
Cristiano Giuffrida 0c474453d1 tests: Expand the reliability test suite.
Change-Id: Ic7f90f2d4edae1f72f98b34bda70891330c27941
2015-09-17 13:37:40 +00:00
Cristiano Giuffrida 43065aa378 sef: Support for LLVM ltckpt instrumentation.
Change-Id: I86073bddc3a820ab3d7c5d016ea1348840b0260a
2015-09-17 13:36:35 +00:00
Cristiano Giuffrida 3f82ac6a4e services: Selectively enable stateful restart.
Change-Id: Ibf6afa3041013ca714e28b673abb1329cd72d2d5
2015-09-17 13:36:01 +00:00
Cristiano Giuffrida dc76d7e9da rs: Update recovery policies for sched and mfs.
Edited by David van Moolenbroek.

Change-Id: I7bbe543e2349dca3856a17abddc8366d1f19fe10
2015-09-17 13:34:59 +00:00
Cristiano Giuffrida 3837bb5c0b rs: Add support for RS_FI.
Change-Id: Id8663859accfc4e3587db35dec7000059860fd49
2015-09-17 13:29:47 +00:00
Cristiano Giuffrida eacaa8290b vm: Fix heap preallocation.
Change-Id: I5b7f6473b9bbff69eae6ab26c889ad8ed902ff3a
2015-09-17 13:28:17 +00:00
Cristiano Giuffrida 0be084004f vm: Fix vm cloning.
Change-Id: I996410ab1b9628cde797d9e5dd73ed07f13a884b
2015-09-17 13:27:24 +00:00
David van Moolenbroek 37489f8a24 Resolve boot-time VM/RS deadlock
VM used to call sendrec to send a boot-time RS_INIT reply to RS, but
RS could run into a pagefault at the same time, thus spawning a
message to VM, resulting in a deadlock.  We resolve this situation by
making VM acknowledge RS_INIT asynchronously at boot time, while
retaining the synchronous sendrec for subsequent RS_INIT responses.

Change-Id: I3cb72d7f8d6b9bfdc59a85958ada739c37fa3bde
2015-09-17 13:27:05 +00:00
Cristiano Giuffrida 0e78c0166c Switch to stateful restart.
The following services have been updated to support stateful restarts:
 - Drivers: tty
 - Filesystems: isofs, mfs, pfs, libvtreefs-based file servers
 - System servers: tty, ds, pm, vfs, vm

Change-Id: Ie84baa3ba1774047b3ae519808fe4116928edabb
2015-09-17 13:26:22 +00:00
Cristiano Giuffrida 2b641b28b1 ds: Add live update extensions.
Change-Id: I093c462ddad4a5e9b3dc39140f45f0e25e83bb55
2015-09-17 13:26:09 +00:00
Cristiano Giuffrida 50b7f13f9f Add live update-friendly annotations.
Change-Id: I7d7d79893836a20799ca548a350f3288e92581f0
2015-09-17 13:25:38 +00:00
Cristiano Giuffrida 5c8eb53d49 libsys: mark regions allocated for DMA as special
This ensures that they will not be relocated.

Edited by David van Moolenbroek.

Change-Id: Ic2a97bc65b94dfcf364c06577aa340a9a5299e74
2015-09-16 15:31:55 +00:00
Cristiano Giuffrida 162b8995bb vm: Let SEF know about special mmapped regions.
Change-Id: I742529a6747ddd181937aa1a45264b87677c01c8
2015-09-16 15:31:40 +00:00
David van Moolenbroek e3f3566e33 RS: clean up dead services during shutdown
Previously, RS would clean up dead services only when it is idle.
During shutdown, all services are marked with the 'exiting' flag,
and these flags lead RS to conclude it is not idle.  Therefore, at
shutdown time, no services were cleaned up anymore, leading to
deadlock situations.  For example, VFS could end up waiting for a
service that was already dead, or one driver could end up waiting
for an interrupt on a line shared with another dead driver.

While it may be possible to ignore RS_EXITING when checking idle
status, other flags may have the same ultimate effect.  Therefore,
this patch skips the idle check altogether when in shutdown mode.

Change-Id: I071fa9545da1d43c5e5c2e0bc2b6c173e3bb57c3
2015-09-16 15:31:29 +00:00
David van Moolenbroek 1aa4eb6a85 RS: reset heartbeat status after rollback
While in a multicomponent live update that includes RS, the new RS
instance may receive heartbeat replies which, after a rollback, the
old RS instance will then never see.  As a result, the rolled-back
RS instance may end up killing well-behaving services.

Change-Id: I0f0af283c33502d5d55b27e353b62aec2e301285
2015-09-16 15:31:19 +00:00
David van Moolenbroek f16b761d2a RS: use IPC filters to do a timed receive
Change-Id: I28df9920d8a65b47f3cf974ed9c5eb3174479d8a
2015-09-16 15:31:10 +00:00
Cristiano Giuffrida fb6bd596bf rs: New RS.
Change-Id: I46e335d5dac49104028d7cb0706b3e85de752bfe
2015-09-16 15:30:48 +00:00
Cristiano Giuffrida d196e2c333 sef: Extensions for new RS.
Change-Id: I89b6f8015b1f9c46bf98694450bdaa80b7777940
2015-09-16 15:30:34 +00:00
Cristiano Giuffrida 006d6e94f9 sef: New definitions and event loop refactory.
Change-Id: I0cd0906e513b2b804b94eebc86c76b5c402b572b
2015-09-16 15:30:24 +00:00
Cristiano Giuffrida d40f735640 service: Extensions for new RS.
Change-Id: Ifb72c7e8c912709edce0fb9ba9efb570901be5fb
2015-09-16 11:22:14 +00:00
Cristiano Giuffrida ac03aa4f32 include: Header file changes for new RS.
Change-Id: I33602adb6a8c42050fc5ee6dbdf6ee6a7aeabaab
2015-09-16 11:21:28 +00:00
Cristiano Giuffrida e6f5b0cc65 sef: Naming refactory.
Change-Id: Id313e73fde577e48a17f2c16c808c9156a1be804
2015-09-16 11:07:18 +00:00
Cristiano Giuffrida dd09614042 sef: GCOV cleanup.
Change-Id: I2e5a6ae10f45108a2c112f78e5a0af4f93e0bed1
2015-09-16 11:07:01 +00:00
Cristiano Giuffrida 65b4b95259 vm: Allow VM to make self calls when needed.
Change-Id: I7aada24adad3dc6bfe5b0bd4a50b5005c79ff887
2015-09-16 11:06:51 +00:00
Cristiano Giuffrida 63483e02e6 vm: Improve live update support.
Change-Id: I02da3ea32cd05c4ed84a6e199236e5df6e25cb60
2015-09-16 11:06:41 +00:00
Cristiano Giuffrida 53398d733f vm: Separate mmap regions.
Add support for compact address layout.  This feature can be enabled
through the ac_layout=1 boot option.

Change-Id: Ie20b808fce32b5c54d0a7e7210e0084a540e9613
2015-09-16 11:06:17 +00:00
Cristiano Giuffrida 48f446ecd5 vm: Extend the vm_memctl() interface.
Change-Id: I87b7c188bd1fc54a3ec943e7ff1d05c6f4c8a56a
2015-09-16 11:04:09 +00:00
Cristiano Giuffrida 7f439d4656 rs: Ditch dead code to munmap zero pages.
Change-Id: Ib184839e3b607986716fc48aec5ebd8ee796a065
2015-09-16 11:03:52 +00:00
Cristiano Giuffrida 704033fd9d libsys: Increase number of static grants.
This is required by the state transfer framework.

Change-Id: I6bc08cee6c70ff406fbd8d45a12721a26c86d45a
2015-09-16 11:03:42 +00:00
Cristiano Giuffrida d639cffec9 libsys: Support for senda_reload().
Change-Id: I67f94515d2b89199643195d32d92f1bef9770359
2015-09-16 11:03:30 +00:00
Cristiano Giuffrida e1f889d228 libsys: Change SEF Live Update state callback API.
The following callbacks are concerned:
 - state_save
 - state_isvalid

Change-Id: I75f71fe162ccd8b23b18cae15f844b79b290a8c1
2015-09-16 11:03:17 +00:00
Cristiano Giuffrida 01c875ce91 kernel: Debug printing at live update time.
Change-Id: I0fa896eb248b3b62e1858f76196d3d6862a30f2b
2015-09-16 11:03:04 +00:00
Cristiano Giuffrida 062400c0e2 kernel: Handle IPC properly at live update time.
Change-Id: I2dfc6c6cf4d2bfe198e159d3e4b7c50d0bb499c8
2015-09-16 11:02:53 +00:00
Cristiano Giuffrida 56e56d2af2 kernel: Inherit allowed memory, IRQ & I/O ranges
Inherit at live update time all the priviledges previously acquired by
the process.

Change-Id: I1fd6ab16680ea85a1f3d8d1c106a7c716bf65e8e
2015-09-16 11:02:44 +00:00
Cristiano Giuffrida 9e6b1315c3 kernel: Allow kernel calls to return ENOTREADY.
This is required to avoid races with safecopy() at live update time.

Change-Id: I1f3e22d40f22d94bd2b850915f9b8163a08b5616
2015-09-16 11:02:31 +00:00
Cristiano Giuffrida c8a9900b0c kernel: Add support for IPC filters.
Edited by David van Moolenbroek.

Change-Id: Ia0052c42a0f218d011dd2da1e3db6c5b2107adc7
2015-09-16 11:02:24 +00:00
Cristiano Giuffrida 6fc5006250 kernel: Add SYS_PRIV_CLEAR_IPC_REFS support.
Change-Id: Ie5e86191d5040f305a5a42942d83319cd600bfb6
2015-09-16 11:02:13 +00:00
Cristiano Giuffrida a1760b573b kernel: Extend the {sys,vm}_update() interfaces.
Change-Id: I9ada3c04c08d219b198e9081f4e1942b11c722f6
2015-09-16 11:01:47 +00:00
Cristiano Giuffrida 76bf77a21f kernel: Extend the sys_whoami() interface.
Add support for init flags.

Change-Id: Ibb4d7eb9064d2bbee6d51112ad0c56b2750a5f8e
2015-09-16 11:01:36 +00:00
Cristiano Giuffrida 41022be182 kernel: Extend the sys_statectl() interface.
Change-Id: Ica37640f61513db9466dacf861a8148e3fb799d5
2015-09-16 11:01:15 +00:00
Cristiano Giuffrida 606626c691 include: Add sys flags definitions.
Change-Id: I8ecbe636641467efea058a9527416fc25d954daf
2015-09-16 10:59:34 +00:00
David van Moolenbroek de95c84d3e VFS: fix short select(2) timeouts
Some select queries require a response from device drivers.  If a
select call is nonblocking (with a zero timeout), the response to
the caller may have to be deferred until all involved drivers have
responded to the initial query.  This is handled just fine.

However, if the select call has a timeout that is so short that it
triggers before all the involved drivers have responded, the
resulting alarm would be discarded, possibly resulting in the call
blocking forever.  This fix changes the alarm handler such that if
the alarm triggers too early, the select call is further handled
as though it was nonblocking.

This fix resolves a test77 deadlock on really slow systems.

Change-Id: Ib487c8fe436802c3e11c57355ae0c8480721f06e
2015-09-16 10:41:46 +00:00
David van Moolenbroek fefec20e6b procfs: do not list init in /proc/services
It is not a system service.

Change-Id: Ibfbf08aa52095826c19172e517bcbd292e7944a0
2015-09-07 22:56:19 +00:00
David van Moolenbroek d09f72c453 Kernel: improve stacktrace printing
- corrupt stack traces could trigger a kernel panic;
- output consistency and spelling.

Change-Id: I04c9ac7db77593d6e837a28c83f1734adc8d9da7
2015-09-07 22:56:00 +00:00
David van Moolenbroek 1d9856e713 inet: resolve some compile and runtime warnings
- ping(1) triggers warnings about unimplemented exceptions for select;
  even if there could be a useful implementation (which is doubtful),
  the warnings are not helping anyone right now;
- the clock_t data type has changed.

Change-Id: Ie5b1383e7657e8501f63bb4b9d255c6502567a15
2015-09-01 16:21:20 +00:00
David van Moolenbroek 4b12166f26 VFS: workaround to allow TIOCSCTTY on PTYs
Fix /dev/tty-related issues in tmux(1) by hardcoding the PTY major
in VFS in addition to the TTY major.  Even though this is exactly
what we did NOT want to have to do, the actual fix for this issue
is going to take a little longer.

Change-Id: I24c75eaf688b9ebd28e931f2e445b8442cfdac78
2015-09-01 11:42:03 +00:00
David van Moolenbroek 29e004d23b VFS: make message pointer management more robust
The previous approach of storing pointers to messages structures for
thread-blocking sendrec operations relied on several assumptions,
which if violated could lead to odd cases of memory corruption.
With this patch, VFS resets pointers right after use, avoiding that
any dangling pointers are accidentally dereferenced later.  This
approach was already used in some cases, but not all of them.

Change-Id: I752d994ea847b46228bd2ccf4e537deceb78fbaf
2015-08-31 12:58:39 +00:00
David van Moolenbroek 56ac45c10b VFS: check X bit, not R bit, opening executables
For dynamically linked executables, the interpreter is passed a
file descriptor of the binary being executed.  To this end, VFS
opens the target executable, but opening the file fails if it is
not readable, even when it is executable.  With this patch, when
opening the executable, it verifies the X bit rather than the R
bit on the file, thus allowing the execution of dynamically
linked binaries that are executable but not readable.

Add test86 to verify correctness.

Change-Id: If3514add6a33b33d52c05a0a627d757bff118d77
2015-08-31 12:55:55 +00:00
David van Moolenbroek 9f15e7b366 VFS: tweak coredump wrapper code
Change-Id: I6c1f50910d906b25f6df2b48f2cbfb899850924e
2015-08-31 12:55:48 +00:00
David van Moolenbroek 253dbfc285 VFS: resolve noassert warning
Change-Id: I647f5a7b3c2935be3df032873705be83de9aaffb
2015-08-31 12:55:43 +00:00
David van Moolenbroek 6c31058de4 sched: simplify
- do not use timers when there is only ever one timer;
- do not include kernel header files for no reason;
- do not reply to notifications ever.

Change-Id: I5817e22c1b46c4e30e5135069df318af0b4f87fd
2015-08-31 12:55:30 +00:00
David van Moolenbroek 736b88cf53 DS: fix regex memory leaks
The regcomp(3) calls had no matching regfree(3) calls.

Change-Id: I5250d62e6ab22821aff18bcdc336cb485df6868e
2015-08-31 12:55:18 +00:00
David van Moolenbroek 4472b590c7 libminixfs: rework prefetch API
This patch changes the prefetch API so that file systems must now
provide a set of block numbers, rather than a set of buffers.  The
result is a leaner and more well-defined API; linear computation of
the range of blocks to prefetch; duplicates no longer interfering
with the prefetch process; guaranteed inclusion of the block needed
next into the prefetch range; and, limits and policy decisions better
established by libminixfs now actually being moved into libminixfs.

Change-Id: I7e44daf2d2d164bc5e2f1473ad717f3ff0f0a77f
2015-08-14 18:39:30 +00:00
David van Moolenbroek 6c46a77d95 libminixfs: better support for read errors and EOF
- The lmfs_get_block*(3) API calls may now return an error.  The idea
  is to encourage a next generation of file system services to do a
  better job at dealing with block read errors than the MFS-derived
  implementations do.  These existing file systems have been changed
  to panic immediately upon getting a block read error, in order to
  let unchecked errors cause corruption.  Note that libbdev already
  retries failing I/O operations a few times first.

- The libminixfs block device I/O module (bio.c) now deals properly
  with end-of-file conditions on block devices.  Since a device or
  partition size may not be a multiple of the root file system's block
  size, support for partial block retrival has been added, with a new
  internal lmfs_get_partial_block(3) call.  A new test program,
  test85, tests the new handling of EOF conditions when reading,
  writing, and memory-mapping a block device.

Change-Id: I05e35b6b8851488328a2679da635ebba0c6d08ce
2015-08-14 18:39:26 +00:00
David van Moolenbroek 1311233cfb libminixfs: keep track of block usage
This patch changes the libminixfs API and implementation such that the
library is at all times aware of how many total and used blocks there
are in the file system.  This removes the last upcall of libminixfs
into file systems (fs_blockstats).  In the process, make this part of
the libminixfs API a little prettier and more robust.  Change file
systems accordingly.  Since this change only adds to MFS being unable
to deal with zones and blocks having different sizes, fail to mount
such file systems immediately rather than triggering an assert later.

Change-Id: I078e589c7e1be1fa691cf391bf5dfddd1baf2c86
2015-08-14 18:39:21 +00:00
David van Moolenbroek 0314acfb2d libminixfs: miscellaneous API cleanup
Mostly removal of unused parameters from calls.

Change-Id: I0eb7b568265d1669492d958e78b9e69d7cf6fc05
2015-08-14 18:39:00 +00:00
David van Moolenbroek b8f6d4a649 libminixfs: do not flush blocks that are in use
This removes an implicit requirement for the way the libminixfs API is
to be used, namely that a block is to be marked as dirty only once its
contents have been fully updated, within a single get_block/put_block
window.  The requirement may not be appropriate for all file systems.

Change-Id: I6a129d51b1a5e9aec1572039dc7c1c82dd795db5
2015-08-13 13:46:52 +00:00
David van Moolenbroek cb9453ca63 libminixfs: add support for peeking blocks
With this change, the lmfs_get_block*(3) functions allow the caller to
specify that it only wants the block if it is in the cache or the
secondary VM cache.  If the block is not found there, the functions
return NULL.  Previously, the PREFETCH method would be used to this
end instead, which was both abuse in name and less efficient.

Change-Id: Ieb5a15b67fa25d2008a8eeef9d126ac908fc2395
2015-08-13 13:46:50 +00:00
David van Moolenbroek d75faf18d9 libminixfs: add support for memory-mapped holes
When VM asks a file system to provide a block to satisfy a page fault
on a file memory mapping, the file system previously had no way to
inform VM that the block is a hole, since there is no corresponding
block on the underlying device.  To work around this, MFS and ext2
would actually allocate a block for the hole when asked by VM, which
not only defeats the point of holes in the first place, but also does
not work on read-only file systems.  With this patch, a new libminixfs
call allows the file system to inform VM about holes.  This issue does
raise the question as to whether the VM cache is using the right data
structures, since there are now two places where we have to fake a
device offset.  This will have to be revisited in the future.

The patch changes file systems accordingly, and adds a test to test74.

Change-Id: Ib537d56b3f30a8eb05bc1f63c92b5c7428d18f4c
2015-08-13 13:46:48 +00:00
David van Moolenbroek e94f856b38 libminixfs/VM: fix memory-mapped file corruption
This patch employs one solution to resolve two independent but related
issues.  Both issues are the result of one fundamental aspect of the
way VM's memory mapping works: VM uses its cache to map in blocks for
memory-mapped file regions, and for blocks already in the VM cache, VM
does not go to the file system before mapping them in.  To preserve
consistency between the FS and VM caches, VM relies on being informed
about all updates to file contents through the block cache.  The two
issues are both the result of VM not being properly informed about
such updates:

 1. Once a file system provides libminixfs with an inode association
    (inode number + inode offset) for a disk block, this association
    is not broken until a new inode association is provided for it.
    If a block is freed and reallocated as a metadata (non-inode)
    block, its old association is maintained, and may be supplied to
    VM's secondary cache.  Due to reuse of inodes, it is possible
    that the same inode association becomes valid for an actual file
    block again.  In that case, when that new file is memory-mapped,
    under certain circumstances, VM may end up using the metadata
    block to satisfy a page fault on the file, due to the stale inode
    association.  The result is a corrupted memory mapping, with the
    application seeing data other than the current file contents
    mapped in at the file block.

 2. When a hole is created in a file, the underlying block is freed
    from the device, but VM is not informed of this update, and thus,
    if VM's cache contains the block with its previous inode
    association, this block will remain there.  As a result, if an
    application subsequently memory-maps the file, VM will map in the
    old block at the position of the hole, rather than an all-zeroes
    block.  Thus, again, the result is a corrupted memory mapping.

This patch resolves both issues by making the file system inform the
minixfs library about blocks being freed, so that libminixfs can
break the inode association for that block, both in its own cache and
in the VM cache.  Since libminixfs does not know whether VM has the
block in its cache or not, it makes a call to VM for each block being
freed.  Thus, this change introduces more calls to VM, but it solves
the correctness issues at hand; optimizations may be introduced
later.  On the upside, all freed blocks are now marked as clean,
which should result in fewer blocks being written back to the device,
and the blocks are removed from the caches entirely, which should
result in slightly better cache usage.

This patch is necessary but not sufficient to resolve the situation
with respect to memory mapping of file holes in general.  Therefore,
this patch extends test 74 with a (rather particular but effective)
test for the first issue, but not yet with a test for the second one.

This fixes #90.

Change-Id: Iad8b134d2f88a884f15d3fc303e463280749c467
2015-08-13 13:46:46 +00:00
David van Moolenbroek b65ad59e08 libminixfs: add support for 64-bit block numbers
There are currently no devices out there that require this change.
The change is merely needed to support subsequent changes.

Change-Id: I64214c5f46ff4a2260815d15c15e4a17709b9036
2015-08-13 13:46:44 +00:00
David van Moolenbroek bd851af48f VFS: merge scratchpad into fproc
There is no reason to keep these tightly coupled data structures
separate.  Moreover, there is no reason to have a union of file
descriptor and file pointer, since the second can be derived from
the first.  The result are somewhat cleaner VFS internals.

Change-Id: I854da7d8291177878eecfc3077ef0a9e0cc82aaa
2015-08-13 13:45:02 +00:00
David van Moolenbroek 162f54c289 service(8): no need to include kernel headers
Change-Id: I8fb7a1a58457909b7759a74925a12cf9b11261f0
2015-08-13 13:44:57 +00:00
David van Moolenbroek e9cd054009 Restore and expand NONE_MAJOR comment
This fixes #50.

Change-Id: I318d08e8c57c12cfd409700b14c88a90c81a1715
2015-08-13 13:44:52 +00:00
David van Moolenbroek ec725af4c5 lwip: no need to retrieve own endpoint
Change-Id: I86bd20be9b1aec4116edbe112eb562737860568f
2015-08-08 16:57:14 +00:00
David van Moolenbroek efa7e3e6d2 Kernel: correctly set USE_ defines from Makefile
Without defining these to 1, #if statements on them will fail.

Change-Id: Ifc4824a6ffacc4bebcfd6f1110c864d7eb16401a
2015-08-08 16:56:37 +00:00
David van Moolenbroek a082b2af62 libsys: add Tomas Hruby's asynsend barrier
This barrier ensures that all fields of an asynchronously sent
message are properly initialized before the message is marked as
valid.

Change-Id: I7b9590c11c4e040c8f992f1dd2581e54201bf214
2015-08-08 16:56:20 +00:00
David van Moolenbroek 3091b8cf26 Kernel: fix async message failure handling crash
If an asynchronous message is delivered during an ipc_receive(2) call,
but a failure occurred while copying out the status to the sending
process, then the receiving process would be left in an inconsistent
state, leading to a kernel crash shortly after.

For now, we fix this by altogether ignoring errors while copying out
the status field to the sending process.  While this resolves the
kernel crash, it is hardly ideal, since it will likely cause the same
message to be delivered repeatedly.  It would be better to disable
asynchronous communication from the sender process altogether, but this
solution requires more changes and thus more testing.

Change-Id: Ib00bf01ad29cdd10a5dee731d4788254d9037a76
2015-08-08 16:55:52 +00:00
David van Moolenbroek e10ce184e4 libsys: make tickdelay(3) more reliable
Previously, there was a tiny chance that tickdelay(3) would return
early or that it would fail to reinstate a previous alarm.

- sys_setalarm(2) now returns TMR_NEVER instead of 0 for the time
  left if no previous alarm was set;
- sys_setalarm(2) now also returns the current time, to allow the
  caller to determine whether it got an alarm notification for the
  alarm it set or for a previous alarm that has just gone off;
- tickdelay(3) now makes use of these facilities.

Change-Id: Id4f8fe19a61ca8574f43131964e6f0317f613f49
2015-08-08 16:55:23 +00:00
David van Moolenbroek 8731fd1c47 audio: use standard Makefile structure
The previous approach of including libraries through the parent
directory's Makefile.inc created linking issues, with libchardriver
not finding snprintf in certain cases.  The new approach of including
libraries through the driver's only Makefile is the one used by all
other drivers.

Change-Id: I96e6308e12e54f0fce8ecf58bd061269860d4355
2015-08-08 16:55:03 +00:00
David van Moolenbroek ea69bfc71d tests: resolve new compiler warnings
Change-Id: I57f6602a9fe9e8524f7da4320b0d1a46889b90d6
2015-07-28 14:18:35 +00:00
Jean-Baptiste Boric 1facb0487c libc: add posix_spawn family of functions
The implementation is taken from newlib (BSD licensed) and test84 is based
on NetBSD's t_spawn.c

Change-Id: Ia4e9dd5204a0b4ef241a451978057e11fb29e3d6
2015-07-28 14:18:03 +00:00
Jacob Adams 7b2da7b2c7 update_bootcfg(8): Add actually useful information
Change-Id: I3f1aa2141827b3dc4072f2e8cedeecb40006e626
2015-07-28 10:03:50 +00:00
Jacob Adams e01448dd84 Close #83 with fix suggested
Change-Id: I83975a0963d09eab73df62adf81ce8027ca41bb0
2015-07-28 09:58:12 +00:00
Leonardo Fogel 4796287659 eMMC: add support to 8-bit mode.
Change-Id: I0470130eb5f8de319cd55c448a9aa1b9131e8e07
2015-07-26 15:53:37 +00:00
David van Moolenbroek 3e07920fe2 Import NetBSD syslogd(8)
The primary reason for the import is a likely GPL taint of the
original MINIX3 syslogd.  As a result, this import may still
have some rough edges.

Change-Id: I5c8d26eca10fc2dd50ecc9eab44a1d483cf068a9
2015-07-26 11:57:04 +00:00
David van Moolenbroek 818c405ae1 LOG: fix bugs in userland write handler
- report correct number of bytes written;
- correctly return partial writes on failure;
- do not overwrite result if there is a pending read.

Change-Id: I92aeeaee1eccb47c2aa2b6666a2f560c3cb17f42
2015-07-26 11:56:36 +00:00
Erik van der Kouwe c97d4ff6e5 test83: add test to send strange/wrong UDP and TCP packets
Change-Id: I73444d2753adab140a4f8e6bee2db32282044888
2015-07-22 22:25:09 +02:00
Erik van der Kouwe 17fbdaf514 test82: share support functions in common.[ch] for test83
Change-Id: I3dfeacc3c2c143d3b696efa39a6f257d38281742
2015-07-22 22:24:22 +02:00
David van Moolenbroek da32b6c32e orinoco: retire
This code is MPL-licensed and thus does not belong in the MINIX3
source tree.

Change-Id: I10388b05e90e83b95414cf9b469e50f49bc1db31
2015-07-20 16:55:15 +00:00
David van Moolenbroek 424cad2cd6 VFS: add support for F_DUPFD_CLOEXEC
Change-Id: Ibe422c6c99fe5fd1385884843ff9e15111810309
2015-07-20 13:55:10 +00:00
David van Moolenbroek 6d315cbf9e benchmarks: remove unixbench
This code appears to be GPL-licensed and thus does not belong in
the MINIX3 source tree.

Change-Id: I9e88c3ffd8eae8697b629899dba9728863a4413a
2015-07-20 11:05:28 +00:00
David van Moolenbroek 65b4a7fa8d mkfs.mfs: remove Linux mount check
This code is GPL-licensed and thus does not belong in the MINIX3
source tree.

Change-Id: Ie154f8a4b536df53b840e535283996b545f2bafc
2015-07-20 10:59:49 +00:00
David van Moolenbroek 4a1befb81d tests: remove IPC test set
This code appears to be GPL-licensed and thus does not belong in
the MINIX3 source tree.

Change-Id: I1d1060cd159322398284c6bb9716541819706e95
2015-07-19 17:58:10 +00:00
David van Moolenbroek 85fb986ba7 inet: fix state transitions in driver receipt code
This resolves a problem with ioctl(NIOCGETHSTAT) hanging forever
as identified by Erik van der Kouwe, and possibly many other corner
cases.

Change-Id: I2350c882dc6a0862e16454ec6b6c320d78780bcd
2015-07-17 18:44:39 +00:00
Erik van der Kouwe 86e41e22cf Add test82 (HTTP)
This test connects to a remote HTTP server to retrieve files, using various
chunk sizes and concurrency settings to exercise the network stack. The test
is only performed is USENETWORK=yes. This test requires the following URLs to
remain available: http://test82.minix3.org/test1.txt and
 http://test82.minix3.org/test2.bin. The former contains a 'Hello world'
message followed by a newline, the latter all 16-bit values in increasing
order, using big-endian notation.

Change-Id: I696106482fb1658f9657be2b6845a1b37a3d6172
2015-07-08 09:54:56 +02:00
Erik van der Kouwe 294d159017 Add new tests 80 (TCP) and 81 (UDP)
These new tests are largely based on the code from test 56 (UDS). Common code
is moved into a separate file common-socket.c. In some instances the tests
are too strict for TCP/UDP sockets, which may not always react instantly to
whatever happens on the other side (even locally). For these cases, the
ignore_* fields in struct socket_test_info indicate that there needs to be
an exception. There are also tests where it seems the functionality of inet
is either incorrect or incomplete with regard to the POSIX standard. In these
cases, the bug_* fields are used to document the issues while avoiding
failure of the test.

Change-Id: Ia860deb4559d42608790451936b1aade866faebc
2015-07-08 09:46:56 +02:00
Erik van der Kouwe 3e8d796eaa test48: skip some redundant combinations of parameters
Change-Id: I8ebecf4f61a99c653fd6dc0ae9510d5fd154dd4e
2015-07-08 09:32:17 +02:00
Erik van der Kouwe 3433559c50 test48: move can_use_network function to common code for reuse
Change-Id: I66a5f36f05fa4c4413b3b62c555fa58fbe5d73ea
2015-07-08 09:30:15 +02:00
Erik van der Kouwe c4182e08ab tests: change u32_t to uint32_t for portability
Change-Id: I8ea57fff72c3b3ed02cc9d82ee295069ca299ed9
2015-07-08 09:27:30 +02:00
Erik van der Kouwe 95b9ecf995 test48: Introduce USENETWORK variable.
This patch introduces USENETWORK environment variable to determine whether to
use the network or not, instead of the unreliable ping test; set to 'yes' to
enable network usage.                                                                      

Change-Id: I9e26fa95b5b990fd94f5978db8de0dd73496d314
2015-07-03 09:50:00 +02:00
Erik van der Kouwe 4d5b0de1fb test48: update lookup name from static.minix3.org to test48.minix3.org
Change-Id: Ie8553bee529aeba66a438eab90177551ec44bc07
2015-07-02 19:01:21 +02:00
Lionel Sambuc f837aff6e8 memory: announce presence during startup
Change-Id: Id4724c444bdca9f72fca05edb55d7614eb5c8286
2015-06-29 10:58:01 +00:00
Lionel Sambuc 68afc7715b uds: announce presence during startup
Change-Id: Ibaf2e08e80e2b0c4cf4108fff3866a2bd430ec47
2015-06-29 10:57:54 +00:00
Lionel Sambuc 67b4718325 log: announce presence during startup
Set its restart policy to "reset".

Change-Id: I54f350d9d0d9bc571abd9630f27f4c961c7c0778
2015-06-29 10:57:38 +00:00
Cristiano Giuffrida 64d15bd98e libvtreefs: allow highly dynamic directories
Change-Id: Ibf76262f943ef1a5f529384ebd4a06a2cc5897c1
2015-06-29 10:57:31 +00:00
Cristiano Giuffrida c21aa858e2 libvtreefs: dynamically allocate long inode names
Extended by David van Moolenbroek to continue using static buffers
for short inode names, so as to prevent important file system
services such as procfs from running out of memory at runtime.

Change-Id: I6f841741ee9944fc87dbdb78b5cdaa2abee9da76
2015-06-29 10:57:24 +00:00
Cristiano Giuffrida 5a7def9a94 libvtreefs: fix naming bug
Change-Id: Ib8767cfef4206ed491855bace6dd8bd58b45b8ce
2015-06-29 10:56:59 +00:00
Cristiano Giuffrida a8f606defa procfs: add service pid information
Change-Id: I163ca4c6c6db45cca41515644ac6c2acd0807ee8
2015-06-29 10:56:53 +00:00
David van Moolenbroek f5321d8d55 procfs: do not list inactive services
Each /proc/service entry must have a unique label.  With cloning,
multiple RS services may have the same label.  Since we are not
actually interested in inactive services (for now), eliminate those
entries, leaving only the active service which will then indeed have
a unique label in the list.  This resolves a procfs crash.

Change-Id: I0de7ef8fd186ab13f3e22e46416504fd981c09aa
2015-06-29 10:56:43 +00:00
David van Moolenbroek 0eabb93c0c procfs: retrieve both RS tables from RS at once
Previously, procfs would retrieve the rproc and rprocpub tables from
RS in two separate calls.  This allowed for a race condition where the
tables could change in between the calls, resulting in a panic in
procfs under certain circumstances.  RS now implements a new method
for getsysinfo that allows the retrieval of both tables at once.

Change-Id: I5ec22d25898361270c90e805a43fc6d76ad9e29d
2015-06-29 10:56:30 +00:00
David van Moolenbroek da21d85025 Add PTYFS, Unix98 pseudo terminal support
This patch adds support for Unix98 pseudo terminals, that is,
posix_openpt(3), grantpt(3), unlockpt(3), /dev/ptmx, and /dev/pts/.
The latter is implemented with a new pseudo file system, PTYFS.

In effect, this patch adds secure support for unprivileged pseudo
terminal allocation, allowing programs such as tmux(1) to be used by
non-root users as well.  Test77 has been extended with new tests, and
no longer needs to run as root.

The new functionality is optional.  To revert to the old behavior,
remove the "ptyfs" entry from /etc/fstab.

Technical nodes:

o The reason for not implementing the NetBSD /dev/ptm approach is that
  implementing the corresponding ioctl (TIOCPTMGET) would require
  adding a number of extremely hairy exceptions to VFS, including the
  PTY driver having to create new file descriptors for its own device
  nodes.

o PTYFS is required for Unix98 PTYs in order to avoid that the PTY
  driver has to be aware of old-style PTY naming schemes and even has
  to call chmod(2) on a disk-backed file system.  PTY cannot be its
  own PTYFS since a character driver may currently not also be a file
  system.  However, PTYFS may be subsumed into a DEVFS in the future.

o The Unix98 PTY behavior differs somewhat from NetBSD's, in that
  slave nodes are created on ptyfs only upon the first call to
  grantpt(3).  This approach obviates the need to revoke access as
  part of the grantpt(3) call.

o Shutting down PTY may leave slave nodes on PTYFS, but once PTY is
  restarted, these leftover slave nodes will be removed before they
  create a security risk.  Unmounting PTYFS will make existing PTY
  slaves permanently unavailable, and absence of PTYFS will block
  allocation of new Unix98 PTYs until PTYFS is (re)mounted.

Change-Id: I822b43ba32707c8815fd0f7d5bb7a438f51421c1
2015-06-23 17:43:46 +00:00
David van Moolenbroek 0a2a08739e libfsdriver: clear VM cache only if used
As part of its built-in mmap emulation support for "none" file system
services, libfsdriver clears the VM cache upon exit.  However, for
trivial file systems which do not even support reading from files, the
the VM cache need to be cleared either.  With this patch, the VM cache
is cleared only when modified, so that such trivial file systems need
not be given CLEARCACHE permission.

Change-Id: I518c092443455302b9b9728f10a3f894d2c8036b
2015-06-23 14:38:54 +00:00
David van Moolenbroek 3f30eb69f0 libfsdriver: default to noop for putnode
While putnode requests should always succeed, very simple file system
services may not care about reference counts and thus about putnode
requests at all.  For this reason, we now default to an OK response if
no fdr_putnode implementation is given.

Change-Id: I01f6421abf4546a1f69d8c21900a92d6acc45745
2015-06-23 14:38:28 +00:00
David van Moolenbroek 22840dea11 libfsdriver: preinitialize stat.st_ino
The stat.st_ino field must always be filled with the inode number
given as part of the fdr_stat request anyway, so libfsdriver can
simply fill in the number and allow the file system not to bother.

Change-Id: Ia7a849d0b23dfc83010df0d48fa26e4225427694
2015-06-23 14:38:04 +00:00
Leonardo Fogel 07cbc27cb0 Add a driver for the eMMC on the BeagleBone Black
Change-Id: I30ab36ac048c65538718e372db9502fb8f51d41f
2015-06-21 11:04:16 +00:00
David van Moolenbroek 5055c7ea51 VFS: fix pipe resumption delay bug
Commit 723e513 erroneously removed a yield() call from VFS which was
necessary to get resumed pipe read/write threads to run before VFS
blocks on receive().  The removal caused those threads to run only
once VFS received another message, effectively slowing down activity
on pipes to a crawl in some cases.

Instead of readding the yield() call, this patch restructures the
get_work() code to go back through the main message loop even when no
new work is received, thus ensuring that newly started threads are
always activated without requiring a special case.

This fixes #65.

Change-Id: I59b7fb9e403d87dba1a5deecb04539cc37517742
2015-06-19 22:13:34 +00:00
rlfnb e1e2bc96d2 handle lack of pckbd more gracefully
kb_init() panics, if no keyboard controller is found during self-test.
Instead of panic, the driver should quit the init process and tell it the SEF .

Change-Id: Icdfb7125f5d4062f46cfbbdbbb9e54ac4b273642
2015-06-15 17:11:29 +02:00
David van Moolenbroek af4345b097 isofs: do not link against libc
This change requires a small patch to libc, in order to avoid that
libminc has to pull in a large chunk of libc just for mktime(3).

Change-Id: I48e598b3716eff626cac461f78a41e32334e6b28
2015-06-07 17:01:45 +00:00
David van Moolenbroek 44707c1900 inet: do not link against libc
This should make its printed errors show up again.

Change-Id: I6839a584dc2a544bae7973ded3ab1dacf04e4ec0
2015-06-07 14:38:12 +00:00
David van Moolenbroek dfc3261535 PFS, inet: use static UID to drop privileges
Previously, services would obtain the user ID of "service" through
getpwnam(3).  While this approach is conceptually better, it also
imposes linking against libc which in turn causes problems with
printf(3), which already led to PFS no longer dropping privileges at
all.  For now, we hardcode SERVICE_UID and use that instead.

In the future, two changes should allow removal of SERVICE_UID again:
- "service edit" should cause RS to request that a service (such as
  PFS) drop privileges through SEF, using the user ID resolved by
  service(8), or something similar;
- a future devfs should make it possible for inet to start without
  root privileges altogether.

Change-Id: Ie02a1e888cde325806fc0ae76909943ac42c9b96
2015-06-06 21:42:48 +00:00
David van Moolenbroek 7eb698ea4a VFS: during initial mount, receive but block work
For VFS, initialization is a special case for processing work: PFS
and the ramdisk MFS must be fully mounted before VFS can process any
other requests, in particular from init(8). This case was handled by
receiving reply messages only from the FS service being mounted, but
this effectively disallowed PFS from calling setuid(2) at startup.

This patch lets VFS receive all messages during the mounting process,
but defer processing any new requests. As a result, the FS services
have a bit more freedom in what they can do during startup.

Change-Id: I18275f458952a8d790736a9c9559b27bbef97b7b
2015-06-06 18:45:23 +00:00
David van Moolenbroek 179bddcf5d VFS: fix error behavior for partial pipe writes
This patch fixes two related issues:

- If a large (>PIPE_BUF) pipe write is processed partially, only to be
  followed by a write error condition, then the process is left in an
  incorrect state, possibly causing VFS to crash on a subsequent call.

- If such a partially processed large pipe write ends up resulting in
  an EPIPE error, no corresponding SIGPIPE signal is generated.

The corrected behavior is tested in test68.

Change-Id: I5540e61ab6bcc60a31201485eda04bc49ece2ca8
2015-06-05 18:40:57 +00:00
Jacob Adams d9494baa34 cawf: Update K&R function declarations
Change-Id: Ib18171089c7b389f7f2643d7298f9659e882f65c
2015-05-18 15:20:39 +02:00
Jacob Adams c6748a4a93 cawf: Fix buffer scope
Change-Id: I03f9066c20da142034626b07d0b07c446075b8af
2015-05-18 15:20:36 +02:00
Jacob Adams c14bb31e67 sprofalyze: Fix minor typo
Change-Id: I0a419833fb2f438808613737680ace7246713ee9
2015-05-18 13:54:19 +02:00
Jacob Adams be4841096d Add manpage for sprofdiff
Change-Id: Ifa98ab133ef818d21921f05db650069448ea52ff
2015-05-18 13:52:13 +02:00
Jacob Adams 2a6b817353 Add manpage for sprofalyze
Change-Id: I206a5878e8f788ea4ff742453148462959263a6a
2015-05-18 13:41:29 +02:00
Jacob Adams c19d619d42 Importing bin/dd
Change-Id: Ibdfed821aa834419c9713dc80f698c8ed74ff269
2015-04-15 13:50:57 +02:00
Jacob Adams 3a1943c1c1 devmand: properly prevent overflow
closes #22

Change-Id: Ia10f352a7ff5b05b1095dbb65d36316f9165a6f0
2015-04-15 08:28:59 +02:00
Jacob Adams 1cd28eb8e4 libc: Fix incomplete fprintf
Closes #23

Change-Id: Ibe6362de0d2d1d94442401b92bc126e63bf9f9b0
2015-03-31 15:45:48 +02:00
Thomas Cort 79444d163d mined: increase the size of the tgetent() buffer.
From the termcap section of the GNU termutils manual:

"There is no way you can tell how much space is needed, so the convention
is to allocate a buffer 2048 characters long and assume that is enough.
(Formerly the convention was to allocate 1024 characters and assume that
was enough. But one day, for one kind of terminal, that was not
enough.)"

Change-Id: Ia5937366ae89e886dbaef7d180bee40669d0c488
2015-03-28 08:39:19 +01:00
Thomas Cort 93cdb3a735 mined: move to minix/usr.bin/mined
As suggested in issue #43.

Historic Locations:

Prior to this commit

  minix/commands/mined

Prior to commit 433d6423c3

  commands

Change-Id: I374ab3ff0e3b9e47779fc21e80b47fda87698242
2015-03-28 08:39:10 +01:00
Thomas Cort e6df9032b3 mined: remove !__STDC__ code blocks.
__STDC__ is used to mitigate the differences between K&R C and the
ANSI C standard. Nearly every compiler now supports ANSI C, so
there is no need to support non-standard compilers.

Change-Id: Ifc3381ecf1c43dfde9004bee48552d8b3ac4dcdc
2015-03-28 08:38:56 +01:00
Thomas Cort f3734d6b31 mined.h: use '\a' instead of ascii code for bell.
Makes the code slightly more portable and readable.

Change-Id: I45bbecb6dc1c320c9412eeeaf598116c2ce1aac5
2015-03-28 08:38:48 +01:00
Thomas Cort e978660932 mined: built without UNIX defined.
* Remove undef NULL, EOF, getchar, putchar
* Rename putchar, getchar, _putchar, _getchar to putch, getch, _putch,
  _getch to avoid conflict with libc functions.
* Rename UP() to UP1() (for UP 1 line) to avoid conflict with UP
  definition in termcap.h. Rename DN1 LF1 RT1 for consistency.
* Add termcap.h for prototypes for tputs and friends.
* Add libterminfo references to Makefile
* Add return value to _putch() to make it work as tputs expects.
* Make putch() call _putch()
* Remove UNIX ifdefs and all code in the !UNIX branches.

closes #43

Change-Id: I0a6f7298aa8b12a74225badc88d3c236a02669ea
2015-03-28 08:38:33 +01:00
Thomas Cort fc850d580c man: clean-out man1x category.
Removes the following man pages:

* awk.1x -- for a version of awk we no longer have
* kermit.1x -- seems gone altogether
* macros.1x -- not useful for anyone anymore

Moves the following man pages:

* mined.1x -- Moved to minix/commands/mined/mined.1
and reformatted to use the mdoc macros instead of the
Minix macros so that it displays properly.

Removes /usr/man/man1x from the directory tree.

closes #44

Change-Id: I59b8bd54cf5cba6d188e51e99a92b36e90c275c1
2015-03-25 06:53:44 +01:00
Thomas Cort d1a87c1f64 mined: clean-up trailing whitespace.
Change-Id: Ic27293d7e1d0f830d635b78e7e620dcf0ef3e03f
2015-03-24 14:03:03 +01:00
Thomas Cort d131b58784 mined1.c: remove i386 guard around escape sequences.
The escape sequences for the function keys used to be separated
out in older versions of Minix when they were different for m68k
and intel. Support for m68k was dropped and that code was
removed, leaving the ifdef i386. Since the sequences are the
same for i386 and arm, there is no need to keep the ifdef i386.

Change-Id: Id96a80bcb24da120efa63acc9b248d87fc347eac
2015-03-24 14:03:03 +01:00
Thomas Cort 6a0aa6fb5e mined.h: remove irrlevant comment.
It used to refer to several NIL_* definitions. Those were removed
in commit 6e25ad8b0a leaving the
comment with nothing to comment on.

Change-Id: I52221ae5d2c5216e82391b480cf2038ad723b8f0
2015-03-24 14:03:02 +01:00
Thomas Cort 0cf05b213d mined.h: remove unused definition, MEMORY_SIZE.
Change-Id: I1ae83c427cafb15f1382b7d8ab3871a36b0eec28
2015-03-24 14:03:02 +01:00
Thomas Cort 50d246bbba mined.h: remove minix/config.h include.
Nothing defined there is used by mined.

Change-Id: I38b692be1313aaed316eebd7caf8e879178d90dc
2015-03-24 14:02:41 +01:00
Jacob Adams d82c151c9e commands/fix: create manpage for fix(8)
Change-Id: I868f1338994d6cc2cba6789b9b4e8934610d0142
2015-03-24 08:21:14 +01:00
rlfnb 31ba042920 Fix boot if no pckd device is there
Trying to boot Minix3 master on an appliance/sbc like ALIX fails, as
the service command throws an error. Making the rc script more robust
solves it.

Change-Id: I659043cbbaa2d67b70d6d6e5ab14fff8e1bba769
2015-03-23 14:57:06 +01:00
Jacob Adams 80c94e3974 swifi: Fix incorrect memset
Change-Id: I6764aff558f51cdb90b91a3e71c982e8b3f47058
2015-03-23 14:56:59 +01:00
Jacob Adams f113a7238f Make rotate manpage more detailed
Change-Id: I028550c17b87655a6e39a7f8b3233cbe982883eb
2015-03-23 11:06:37 +01:00
Christian Koch 6f55e9f11d nonamed.8: Document the -L option.
Change-Id: I1aadb50cd416e0467a87c8d75db1c293333a7969
2015-03-19 10:00:56 +01:00
Jacob Adams 271999a2f3 Do not read past the end of the buffer
closes #22

Change-Id: I239c670915d98440c176ccf23e5270c40c4fbe81
2015-03-18 08:29:46 +01:00
Jacob Adams e3cf9c04f1 properly check if configuration file is opened
closes #21

Change-Id: I2f83b5385ac38bf07d30acb14f40c14bec476830
2015-03-18 08:25:19 +01:00
Jacob Adams 3bdcd28869 Get rid of K&R functions in recwave
Change-Id: I98cf0426aedf03ec0312f58ff77b816fd231eb84
2015-03-18 08:21:31 +01:00
Jacob Adams 25223c2ae2 Check argc is greater than 1 before using on argv
closes #19

Change-Id: I50ee3fa82bce274e710434628b6c178467fd3887
2015-03-18 08:20:08 +01:00
Emmanuel Blot 41b870c890 arm: Make sure __k_unpaged_MINIX is first
Do not rely on build order to set startup symbol (`__k_unpaged_MINIX`)
at kernel binary start

Change-Id: I1ed3f9309fe66ff97e24915938c114d5a159deaf
2015-03-18 07:50:31 +01:00
Emmanuel Blot 54841c0102 Fix incorrect sanity check
Remove invalid sanity check where an array is tested against NULL -
not a pointer

Change-Id: I3d5e33585e7f97a41124af4133e8a879ab21d972
2015-03-18 07:49:44 +01:00
Emmanuel Blot d91890d288 Fix format string for size_t types
Fix missing “%z[dux]” prefix printf formatter string for `size_t`
types.

Change-Id: If216a778b0b65e8ab2cdd1c7484cb8452d1f965d
2015-03-18 07:48:09 +01:00
Jacob Adams 61890c3b2e Change rotate.sh BZIP2 to the correct path
closes #8

Change-Id: I90cb30e3d8ee2c000aca36fb9f8cc22c6d49583e
2015-03-14 16:43:04 +01:00