Commit Graph
28 Commits
Author SHA1 Message Date
Scott Haseley b488b7dcea Added a test.h file for userland.
Currently, this file has tsay() and nsay(), which are atomic vararg print operations
that are loud or quiet (respectively) during automated testing. These are used
throughout userland when output might get intermingled.
2016-04-06 13:29:48 -04:00
Scott Haseley 16bfdcf406 Added new line before printing secured messages. For quint/triple tests, the secured message
might print on a progress line, which makes test161 fail.
2016-04-06 13:27:51 -04:00
Scott Haseley e0fc622e00 Added progress functions that print '.'. There are versions that are always loud or
only loud during automated testing.
2016-04-06 13:26:05 -04:00
Scott Haseley 76672bd17b whitespace 2016-03-30 17:16:24 -04:00
Scott Haseley 177821c2f3 Put asst3 back on the leaderboard 2016-03-30 17:12:12 -04:00
Scott Haseley 2873c513d4 Assignment 3 target will now be cumulative instead of split into subparts 2016-03-30 17:11:41 -04:00
Scott Haseley eede850f54 The km4 thread was checking the correct magic value, but printing the one on the first page.
The test result is correct, but might look like it is failing when it shouldn't.
2016-03-30 16:09:24 -04:00
Scott Haseley 78265c6da4 Set leaderboard to false for ASST3 coremap target. We'll work on aggregating multi-part targets, but for now, don't show subparts.
Also, explicitly set userland to false.
2016-03-30 14:58:59 -04:00
Scott Haseley 7f3f686b1a Updated km4 to write to, and check, each page allocated in the multi-page allocation.
This should find cases where students ignore npages and just allocate one page, which
would previously work.
2016-03-28 15:43:39 -04:00
Scott Haseley b4bcf45932 Initial tests, commands, and target for asst3.1 2016-03-25 11:13:31 -04:00
Scott Haseley 8380115efa Added new kmalloc test (km5) that tests various coremap properties. Also, km1-km4 were
cleaned up for test161.
2016-03-25 11:12:09 -04:00
Scott Haseley 501773f90e Added a global variable for the number of cpus 2016-03-25 11:11:08 -04:00
Scott Haseley 25a1d7debc Changed kheap_getused so that it doesn't double-count the pages it's using for
subpage allocation. We run into problems in determining memory leaks due to
kmalloc framgmentation, which can happen because of delayed thread cleanup.
2016-03-25 11:09:15 -04:00
Scott Haseley 922370ebd4 Changed forkbomb to only print one success message 2016-03-11 14:56:01 -05:00
Scott Haseley 196bb3b684 Now using static buffers (and protecting with a semaphore) for kernel secprintf.
We have to do this because we need secure output in kmalloc.
2016-03-07 15:05:58 -05:00
Scott Haseley 0230d87de4 Changed make_salt to call srandom with time in ms since epoch (lower 32 bits). 2016-03-01 15:24:26 -05:00
Scott Haseley e7ec655415 Removed printsf, an unused secure testing printf variant. This variant does not apply now that each test has its own secret.
Fixed unused variable in libtest161 in kernel compiles.
2016-02-29 16:43:35 -05:00
Scott Haseley a5963a0e31 Removed secret printing in the shell 2016-02-26 11:46:35 -05:00
Scott Haseley 874a211af9 Changed userspace secprintf to use "say" function, which should be atomic wrt
console writing if write works properly.
2016-02-26 11:41:27 -05:00
Scott Haseley 0cda18234c Undefine secret testing 2016-02-23 15:43:57 -05:00
Scott Haseley 1b99c0e18f Refactored ksecprintf -> secprintf. Secure code is now all in common libtest161.
This library gets linked in by default in userland, and the common files are
included in the kernel.
2016-02-23 15:31:37 -05:00
Scott Haseley b9b2924ccf Changed the hashed signed message to be in line with what test161 is expecting (id: message) 2016-02-17 13:44:22 -05:00
Scott Haseley 2b0c91ff4b test161: Adding assignment 1 commands, tests, and targets 2016-02-16 01:28:22 -05:00
Scott Haseley e9e9b91904 Previous change that changed SECRET to a string broke userland compiles 2016-02-12 00:57:16 -05:00
Scott Haseley 5f7d1f5611 Previous change that changed SECRET to a string broke userland compiles 2016-02-12 00:14:51 -05:00
Scott Haseley 01f2d3ea2c Added ksecprintf for securely printing messages from the kernel.
If SECRET_TESTING is defined, the function will compute and print
a salt value and the hmac/sha256 hash of the message, which can be
verified from the test161 server.
2016-02-11 01:30:33 -05:00
Scott Haseley a97b1c80b2 Added sha256 hash function and hmac functions (with and without salt) to the kernel
and userspace.

In userspace, this is accessed through #include <secure.h>
In the kernel, this is access through #include <kern/secure.h>

There is a unit test for this (hm1) that computes the hmac and compares it to
the known value.  The salted vesion tested offline.

-----

Also, fixed usespace compile issue with not changing KERNEL_SECRET => SECRET.
2016-02-01 01:35:53 -05:00
Scott Haseley 0ab862abfa 1) Moved tprintf and related functions to their own file in common/libc/printf/tprintf.c.
This file is included by both libc and hostcompat.

2) Changed printf -> tprintf in all testbin programs
2016-01-15 13:33:11 -05:00