Age | Commit message (Collapse) | Author |
|
They were meant to be temporary, but that got longer, and people seem to
expect them to be there now.
|
|
This avoids using system headers, which may result in
kern/strings.c: In function 'strchr':
kern/strings.c:188:32: error: 'NULL' undeclared (first use in this function)
In file included from util/atoi.c:77:
./util/atoi.h:65:29: error: unknown type name 'u_char'
device/net_io.c: In function 'bpf_do_filter':
device/net_io.c:1636:34: error: 'u_int' undeclared (first use in this function); did you mean 'int'?
In file included from device/subrs.c:36:
./device/if_ether.h:43:9: error: unknown type name 'u_char'
43 | u_char ether_dhost[6];
./linux/dev/include/linux/fs.h:304:5: error: unknown type name 'loff_t'
304 | loff_t f_pos;
This is a follow-up to commit
d5e5dd3401ea0d0475aa830c2171be5b8a72f4fa
Update configure.ac so that we don't need glibc when running ./configure.
Message-ID: <20240122075549.26207-1-janneke@gnu.org>
|
|
TESTED: By booting gnumach off an HP T620 with console=com0 and receiving 115200 8N1 console
on another machine connected via the serial port in minicom.
Without this patch, part of the console is garbled by mismatching com params (9600 7N1).
Message-ID: <20240119031214.691086-1-damien@zamaudio.com>
|
|
We are for now lacking proper dependencies between the source headers and
the test-installed headers, but we can at least clean them out.
|
|
Message-ID: <20240111210907.419689-11-luca@orpolo.org>
|
|
Message-ID: <20240111210907.419689-10-luca@orpolo.org>
|
|
Message-ID: <20240111210907.419689-9-luca@orpolo.org>
|
|
Message-ID: <20240111210907.419689-8-luca@orpolo.org>
|
|
Message-ID: <20240111210907.419689-7-luca@orpolo.org>
|
|
Message-ID: <20240111210907.419689-6-luca@orpolo.org>
|
|
* vm/vm_map.c: use actual limits instead of min/max boundaries to
change pageability of the currently mapped memory.
This caused the initial vm_wire_all(host, task VM_WIRE_ALL) in glibc
startup to fail with KERN_NO_SPACE.
Message-ID: <20240111210907.419689-5-luca@orpolo.org>
|
|
Message-ID: <20240111210907.419689-4-luca@orpolo.org>
|
|
Message-ID: <20240111210907.419689-3-luca@orpolo.org>
|
|
Message-ID: <20240111210907.419689-2-luca@orpolo.org>
|
|
* configure.ac: move test fragment to have USER32
* tests/Makefrag.am: add user tests
* tests/README: add basic info on how to run and debug user tests
* tests/configfrag.ac: allow the test compiler/flags to be
autoconfigured or customized
* tests/grub.cfg.single.template: add minimal grub config to boot a
module
* tests/include/device/cons.h: add a simplified version of
device/cons.h usable for tests
* tests/include/kern/printf.h: symlink to kern/printf.h
* tests/include/mach/mig_support.h: add basic version for user-space
tests
* tests/include/syscalls.h: add prototypes for syscalls used in tests.
* tests/include/testlib.h: add definitions for common test
functionalities
* tests/include/util/atoi.h: symlink to util/atoi.h
* tests/run-qemu.sh.template: add a simple qemu test runner
* tests/start.S: add arch-specific entry point
* tests/syscalls.S: generate syscalls entry points
* tests/test-hello.c: add basic smoke test
* tests/testlib.c: add the minimal functionality to run a user-space
executable and reboot the system, and some test helpers.
* tests/user-qemu.mk: add rules to build simple user-space test
modules, including generating mig stubs. The tests reuse some kernel
code (like printf(), mach_atoi(), mem*(), str*() functions) so we can
use the freestanding environment and not depend on glibc.
Message-ID: <20240111210907.419689-1-luca@orpolo.org>
|
|
Message-ID: <20231228194301.745811-11-luca@orpolo.org>
|
|
* configfrag.ac: add the global option USER32; although it makes sense
for 64-bit versions only, it can be used by future 64-bit
architectiures and not only x86_64.
Also, change the default setting to be disabled; now that we have a
working full 64-bit system, it makes sense to consider it the common
choice.
* x86_64/configfrag.ac: define the correct 32-bit cpu if USER32 is
enabled.
Message-ID: <20231228194301.745811-2-luca@orpolo.org>
|
|
aligned
msgt_unused appears right after msgt_size since msgt_size can be reduced
to only 8 bits in the future, so we leave the door opened to make
msgt_unused 13 bits long.
|
|
If a port is inlined in a message, the user has to use
mach_port_name_inlined_t to define each port. Out of line memory
continues to use mach_port_name_t since that memory has to be copied to
the kernel anyway.
Both copyinmsg and copyoutmsg can be reduced to nothing (if we ignore
USER32) as a follow up but kept this patch simple for ease of review.
|
|
byte aligned"
This reverts commit 2db6b9b7b23b3bab944665b3b6012d24dd425d97.
|
|
This reverts commit 29d4bcaafc4c2040df27a6247603c68e7757205c.
|
|
|
|
push %es actually cannot be compiled
|
|
If a port is inlined in a message, the user has to use
mach_port_name_inlined_t to define each port. Out of line memory
continues to use mach_port_name_t since that memory has to be copied to
the kernel anyway.
Both copyinmsg and copyoutmsg can be reduced to nothing (if we ignore
USER32) as a follow up but kept this patch simple for ease of review.
Message-ID: <ZWg00XzFPqqL1yF-@jupiter.tail36e24.ts.net>
|
|
aligned
msgt_unused appears right after msgt_size since msgt_size can be reduced
to only 8 bits in the future, so we leave the door opened to make
msgt_unused 13 bits long.
Message-ID: <ZWGT6a6GeqFAtOUn@jupiter.tail36e24.ts.net>
|
|
dead rights
Comparing mach_port_name_t that is MACH_PORT_NAME_DEAD against
MACH_PORT_DEAD will always return false.
Message-ID: <ZWbMBrk7qrl15sKL@jupiter.tail36e24.ts.net>
|
|
When
- extending an existing entry,
- changing protection or inheritance of a range of entries,
we can get several entries that could be coalesced. Attempt to do that.
Message-ID: <20230705141639.85792-4-bugaevc@gmail.com>
|
|
This function attempts to coalesce a VM map entry with its preceeding
entry. It wraps vm_object_coalesce.
Message-ID: <20230705141639.85792-3-bugaevc@gmail.com>
|
|
It may be enough to get an idea of the origin of the port without having
to produce a stack trace.
|
|
Looking up a bogus port name is generally a sign of a real bug, such as a
spurious mach port deallocation.
|
|
|
|
static_assert was introduced in C++11.
|
|
Message-ID: <ZUlwWGgc2kXNH5dN@jupiter.tail36e24.ts.net>
|
|
|
|
The userland allocation is for port names, not ports (as translated
below), so we need to allocate less.
|
|
|
|
To allow references to int_stack_base to be quite unconstrained, we need
to use 64bit register indexing.
CPU_NUMBER_NO_GS was missing a 64bit variant.
CPU_NUMBER_NO_STACK assumes being passed a 32bit register.
|
|
simple locks use natural_t, and indexes for bt/bts/btr have to be 32bit.
|
|
Message-ID: <20231028001347.448826-1-damien@zamaudio.com>
|
|
|
|
and harmonize i386/x86_64.
This btw fixes not using dx in 32-on-64's alltraps.
|
|
|
|
Logic for interrupts:
- interrupt.S raises spl (thus IF cleared)
- interrupt.S EOI
- interrupt.S calls the handler
- for pure in-kernel handlers, they do whatever they want with IF
cleared.
- when a userland handler is registers, queue_intr masks the irq.
- interrupt.S lowers spl with splx_cli, thus IF still cleared
- iret, that sets IF
- later on, userland acks the IRQ, that unmasks the irq
The key to this change is that all interrupts, including IPIs, are
treated the same way. Eg. the spl level is now raised before an IPI and
restored after. Also, EOI is not needed inside irq_acknowledge.
With this change and the experimental change not to dispatch threads
direct to idle processors in the scheduler, I no longer observe kernel
faults, but an occasional hang does occur.
Message-Id: <20231002033906.124427-1-damien@zamaudio.com>
|
|
The xen build is not multiboot.
|
|
|
|
This if of course too late in case of a failure, but better assert than get
awful bugs, and it's really not supposed to happen.
|
|
Otherwise ipc_kmsg_copyin_body will overflow.
|
|
We need to check against the actual user size that will be used, not the
current kernel size.
Usually userland uses amply-large reception buffer, but better be exact.
|
|
|
|
|