Commit graph

1469 commits

Author SHA1 Message Date
Austin Clements 7443b9649a Fix missing NUL-terminator in grep
Currently, grep read()s into a buffer and then uses the buffer as a
string. Since there's no NUL-terminator, this can cause it to falsely
identify line breaks and matches from leftover data on earlier lines
and, if a line fills up the entire buffer, to read past the end of the
buffer.

Fix this by NUL-terminating any data returned by read().

Thanks to Keiichi Watanabe for the report.
2015-03-24 20:54:39 -04:00
Cody Cutler 3d2dedd427 fix buf where concurrent fs syscalls race on log entries 2015-02-19 11:51:47 -05:00
Austin Clements 41f16c2183 Increase VM memory when running qemu-memfs
Presumably because of the pre-loaded file system, the default RAM is
insufficient when running kernelmemfs
2014-10-03 09:44:26 -04:00
Austin Clements 8e54196355 Make kernelmemfs depend on kernel.ld 2014-10-03 09:43:44 -04:00
Austin Clements 0dd991dd20 Fix kernelmemfs linking
Commit 9aa0337d introduced a linker script for linking the kernel image,
but only changed the kernel target to use it.  kernelmemfs was still
using the old linker command line arguments, which weren't sufficient.
2014-10-03 09:39:09 -04:00
Frans Kaashoek 053082fbed ggdb -> gdwarf-2 for gcc4.8 2014-09-23 07:39:32 -04:00
Cody Cutler e7d77aad2b whoops. forgot date.h 2014-09-12 18:41:38 -04:00
Cody Cutler aae4e7490f cmosgetdate() for system-call homework
the day of reckoning has come for the debug port "Shutdown" hack.

instead of mucking with ACPI or using a new hack, the student will now write
sys_date() using the cmosgetdate() helper.
2014-09-12 18:09:51 -04:00
Frans Kaashoek 75dee1219f Oops (thanks David Lawrence) 2014-09-08 18:00:53 -04:00
Frans Kaashoek 9ba21267e7 no need to generate postscript version 2014-08-29 17:10:32 -04:00
Frans Kaashoek 74c77da6f8 Nice layout for a printout of the code 2014-08-29 17:06:49 -04:00
Frans Kaashoek ac83a21a5b Ack all bug reports and patches. Is this all of them? 2014-08-29 09:03:29 -04:00
Frans Kaashoek 698b8fb598 update for 2014 2014-08-28 17:28:40 -04:00
Robert Morris e2b4583d05 xx 2014-08-28 17:04:47 -04:00
Robert Morris 8d618cab78 Merge branch 'master' of git+ssh://amsterdam.csail.mit.edu/home/am0/6.828/xv6 2014-08-28 16:13:58 -04:00
Robert Morris 2b2c1971fc write log blocks from cache only at end of transaction 2014-08-28 16:06:12 -04:00
Robert Morris 11183588dc nits 2014-08-28 06:27:01 -04:00
Robert Morris 48aa917403 i think this is a working concurrent logging scheme 2014-08-28 05:57:47 -04:00
Robert Morris 71453f72f2 a start at concurrent FS system calls 2014-08-27 17:15:30 -04:00
Robert Morris 12eeefc72d comments 2014-08-27 14:14:52 -04:00
Robert Morris 2c56547272 every iput() and namei() must be inside a transaction 2014-08-04 13:06:48 -04:00
Robert Morris 020c8e2384 use acquire/release to force order for pid=np->pid;np->state=RUNNING
for bug reported by symingz@gmail.com and cs1100254@cse.iitd.ernet.in
2014-08-04 06:13:49 -04:00
Frans Kaashoek 86188d9d49 newer versions of qemu have different binary names (per Joel Nider <joel@nider.org>) 2014-07-31 11:15:15 -04:00
Stephen Tu ff2783442e Correct a security bug in copyuvm()
copyuvm() should not allow new copied pages to inherit more
permissions than the original pages.
2013-03-04 16:16:54 -05:00
Cam Tenny 241c068066 Prevent extra rebuild of fs.img by keeping intermediate object files. 2012-10-24 18:52:40 -04:00
Frans Kaashoek c440b5cd97 Use static assert instead of _LP64 (thanks Eddie!) 2012-09-10 21:58:18 -04:00
Frans Kaashoek cf57e525c1 Remove -m32 flag from native gcc compiler
But check that mkfs.c is building with LP64
2012-09-07 17:39:04 -04:00
Robert Morris 2ae8392a5c make the book happy 2012-08-28 14:41:08 -04:00
Robert Morris 792d83cad1 nits 2012-08-28 14:11:23 -04:00
Robert Morris c1ee7eb4d3 Merge branch 'master' of git+ssh://amsterdam.csail.mit.edu/home/am0/6.828/xv6 2012-08-28 12:57:13 -04:00
Robert Morris 8960f60b30 junk 2012-08-28 12:57:05 -04:00
Austin Clements 951b77f7ec Various fixes and improvements to printpcs
Search for an addr2line that supports elf32-i386.  Don't print the
path of addr2line as a side-effect of which.  Don't uselessly pipe
"grep '^ '" to addr2line's stdin.  Enable as many pretty-printing and
otherwise helpful options as possible (this makes the output *much*
more pleasant on modern addr2lines).
2012-08-24 14:51:52 -04:00
Frans Kaashoek 020acb4f10 For the convenience of students 2012-08-23 09:35:00 -04:00
Frans Kaashoek 6650cc934a Use addr2line (or i386-jos-elf-addr2line, if you cross compile) 2012-08-22 21:25:19 -04:00
Frans Kaashoek 3fb7eceea7 Runoff still complaints these lines are too long, but it is now ok on printout 2012-08-22 21:24:13 -04:00
Frans Kaashoek f3f4b0fd88 chmod +x 2012-08-22 20:54:47 -04:00
Frans Kaashoek c2d393df13 Decode getcallerpcs() (thanks to Peter Froehlich) 2012-08-22 20:51:29 -04:00
Frans Kaashoek 95692c4a8c Remove left-over from some logging plan making complete syscalls atomic
0 is not a system call (thanks to Peter Froehlich)
2012-08-22 20:28:58 -04:00
Frans Kaashoek 432acbaf9e Merge branch 'master' of git+ssh://amsterdam.csail.mit.edu/home/am0/6.828/xv6 2012-08-22 20:20:17 -04:00
Frans Kaashoek 4ce832ddd2 Remove unused argument to setupkvm (thanks to Peter Froehlich) 2012-08-22 20:19:37 -04:00
Frans Kaashoek 70c555574a Remove unused argument from lapicinit (thanks to Peter Froehlich) 2012-08-22 20:13:43 -04:00
Frans Kaashoek b08d16f61d Fix from Peter Froehlich 2012-08-22 20:07:04 -04:00
Austin Clements 9d59eb0151 Make fetchint and fetchstr use proc instead of taking a struct proc
Previously, these were inconsistent: they used their struct proc
argument for bounds checking, but always copied the argument from the
current address space (and hence the current process).  Drop the
struct proc argument and always use the current proc.

Suggested by Carmi Merimovich.
2012-02-17 23:20:13 -05:00
Robert Morris 12abb1a561 don't let dirty blocks be evicted from cache! 2011-10-14 10:23:23 -04:00
Robert Morris 38eee5bca7 more FS comment clarification 2011-10-11 10:11:53 -04:00
Robert Morris a5fbfe418a clarify some FS comments 2011-10-11 06:41:37 -04:00
Austin Clements d73dd097a5 Fix compile error on newer gcc's 2011-09-30 15:28:33 -04:00
Frans Kaashoek 0ca1c0407d Merge branch 'master' of git+ssh://amsterdam.csail.mit.edu/home/am0/6.828/xv6 2011-09-27 13:00:20 -04:00
Frans Kaashoek 9b972c06b1 Update stressfs to trigger race now the logging code serializes writes 2011-09-27 12:59:47 -04:00
Austin Clements 1e6f0146d2 Use | instead of + for entrypgdir. Linker doesn't get in our way here. 2011-09-14 13:47:04 -04:00