summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2025-03-18ext2fs: extend end check for ext2_free_blocksSamuel Thibault
Since it can free more than one block.
2025-03-18ext2fs: Do not try to frob inline data for regular files and directoriesSamuel Thibault
Inline data in i_data is only used by symlinks (and apparently some device nodes in linux). For regular files and directories we don't store data there. This is actually important since otherwise int fd = open("foo.txt", O_WRONLY|O_CREAT); ftruncate(fd, 1024); ftruncate(fd, 10); leads to trying to frob beyond i_data end.
2025-03-18ext2fs: Trap trying to access bogus data areasSamuel Thibault
i.e. superblock, block group descriptor table or beyond the end.
2025-03-16tmpfs: also try to start the default pagerSamuel Thibault
initscripts apparently tries to mount /run before calling swapon
2025-03-13ext2fs: Trap trying to access bogus data areasSamuel Thibault
i.e. superblock, block group descriptor table or beyond the end.
2025-03-13Revert "ext2fs: Fix failed assertion on ENOSPC"Samuel Thibault
This reverts commit 86ea895b1a208925dfc034fac22db2a512a3fab8. We are really not supposed to have failed to find the block here, it should have been allocated by pager_unlock_page already.
2025-03-08ext2fs: Fix failed assertion on ENOSPCSamuel Thibault
find_block ignores EINVAL errors, we need to reconstruct it
2025-03-05libdiskfs: Fix using unitialized value on renameSamuel Thibault
2025-03-05libpipe: Do not split writes on dgrem and seqpack pipesSamuel Thibault
They really should not be split for the application, and really should not be queued several times because otherwise we would record the source several times and get a reference miscount.
2025-03-05libpipe: Introduce pipe_wait_writable_amountSamuel Thibault
2025-03-05libpipe: Do not optimize reading pipe->write_limitSamuel Thibault
It may have changed while sleeping.
2025-02-28pfinet: Fix spurious EINTR errors from selectv0.9.git20250304Samuel Thibault
While sleeping in pthread_hurd_cond_timedwait_np, current->signal will be overwritten by the management of other RPCs, so we have to give it some value on wake up. Also, if we previously got interrupted, we shouldn't ever try to wait again until exiting from the RPC: an interrupt means we really want to try hard to finish the RPC. Thanks Zhaoming Luo <zhmingluo@163.com> for the deep investigation and draft!
2025-02-28procfs: Fix meminfo computationSamuel Thibault
For >4G size we need to force 64bit computation on 32bit systems.
2025-02-24libdiskfs: Avoid putting ref of NULL pointerSamuel Thibault
E.g in the "Negative lookup cached." error case, diskfs_lookup clears NP, so we would segfault.
2025-02-10Allow compilation with -O0Flavio Cruz
* libshouldbeinlibc/lcm.c: make gcd static since it's not exposed as a symbol. * pfinet/linux-src/net/ipv4/{tcp,udp}_ipv4.c: Drop inline from lookup functions since they are used in another module (icmp.c) and shouldn't be removed. * term/munge.c: make poutput static since it's not exposed as a symbol. Message-ID: <nmok54owdbglalqkw2ky76jzvn4vvyybpqtftruzhpixcsx7fo@jbphrribcxq5>
2025-02-09swapon: Auto-start mach-defpagerSamuel Thibault
Which allows not to start it unless swap is configured, so Mach can know when it is not and avoid trying to use a default memory manager.
2025-02-09proc: support mach_cpu_subtypes only on i386Samuel Thibault
It's "supported" only there for now.
2025-02-09Restring default_pager_paging_storage to i386Samuel Thibault
Newer ports won't have it either.
2025-02-09mach-defpager: Move default_pager_exception_port declaration to headerSamuel Thibault
2025-02-08Add names to threadsSamuel Thibault
2025-02-08term: Make term_getctty() accept pty_classZhaoming Luo
The term_getctty() should accept pty_class. The vim testsuite expects the master side to say isatty(). See https://mail.gnu.org/archive/html/bug-hurd/2025-02/msg00061.html * term/users.c: The term_getctty() accepts pty_class Message-ID: <20250208103220.853-1-zhmingluo@163.com>
2025-02-05rumpdisk: Call thread_wire in all our threadsSamuel Thibault
So the kernel gives us vm_privilege so we can work even when memory is getting low.
2025-02-04mach-defpager: comment on improving on lost dataSamuel Thibault
Instead of killing the whole object.
2025-02-04mach-defpager: also warn only once about read errorsSamuel Thibault
2025-02-04mach-defpager: Make it print warnings on out-of-swapSamuel Thibault
To give explanation to processes suddenly crashing with SIGBUS.
2025-02-04libdiskfs: Check for EROFS on io_prenotify and io_write tooSamuel Thibault
This avoids Assertion `!diskfs_readonly' failed. messages at shutdown.
2025-02-04Fix buildSamuel Thibault
2025-02-04libpipe: crash verbosely if mmap was to failSamuel Thibault
2025-02-03rumpdisk: Also link libirqhelp inSamuel Thibault
Next rumpkernel upload will use it.
2025-01-27procfs: Fix coding styleSamuel Thibault
2025-01-27Add partial /proc/cpuinfo implementationDiego Nieto Cid
* procfs/rootdir.c: (rootdir_gc_cpuinfo) new function (rootdir_entries) add entry for cpuinfo file (cpuinfo_x86, cpuinfo_aarch64) implementations for x86 and aarch64 respectively.
2025-01-17libdiskfs: Avoid crashing on system shutdownSamuel Thibault
when processes which were upgraded didn't get restarted, and stop after making the filesystem readonly.
2025-01-12typoSamuel Thibault
2025-01-12rumpusbdisk: Link completely to scsipi libraryDamien Zammit
The usb stack also uses SCSI emulation for usb mass storage. Message-ID: <20250111082129.1566079-1-damien@zamaudio.com>
2025-01-11libdiskfs: catch mmap failureSamuel Thibault
Just backtrace for now
2025-01-10rtc: Fix crash on readingSamuel Thibault
2025-01-02Header files: Install rtc.h header fileZhaoming Luo
Message-ID: <20250102004552.26250-1-zhmingluo@163.com>
2024-12-31sutils/MAKEDEV.sh: create /dev/rtc entryZhaoming Luo
2024-12-30startup: Do not emit ARGP_ERR_UNKNOWNSamuel Thibault
This is making startup completely ignore parameters when root= is passed first on the kernel command line.
2024-12-29pci-arbiter: Fix long standing bug with PCI accessDamien Zammit
Proxied memory was not rounded up to page size, causing error with vm_map'ing the underlying memory. WARNING: Assumes pci memory resources are at least page aligned. If not, this will expose part of next resource to userspace. Message-ID: <20241228073545.712061-1-damien@zamaudio.com>
2024-12-29fifo: Do not detach pipe when there are still readersSamuel Thibault
Typically for a control socket we need to be able to connect several times to it. This notably fixes the control socket of sv.
2024-12-28rumpdisk: Deallocate buffers in write during failure pathsDamien Zammit via Bug reports for the GNU Hurd
Message-ID: <20241228063834.709656-1-damien@zamaudio.com>
2024-12-28acpi: Better error handling on S_acpi_get_pci_irqDamien Zammit via Bug reports for the GNU Hurd
Return positive error code when return value indicates error. Message-ID: <20241228073512.711999-1-damien@zamaudio.com>
2024-12-27libirqhelp: Avoid loop between acpi and libirqhelpv0.9.git20241227Samuel Thibault
Now that acpi uses libirqhelp, the latter shouldn't be trying to lookup the former through the FS.
2024-12-23acpi: Look out for acpi_get_irq_number errorsSamuel Thibault
Otherwise we would take the error as irq number.
2024-12-23Fix port leaksSamuel Thibault
get_privileged_ports adds a port ref, so we have to deallocate it.
2024-12-14Add a description comment for the MIG type translation filesZhaoming Luo
Signed-off-by: Zhaoming Luo <zhmingluo@163.com> Message-ID: <20241213005831.748151-1-zhmingluo@163.com>
2024-12-11Add rtc translator and RTC CMOS driverZhaoming Luo
A /hurd/rtc translator will be created as, users can create a /dev/rtc device using the following command: ``` sudo settrans -c /dev/rtc /hurd/rtc ``` * Makefile: add rtc-cmos server into the compile chain * hurd/pioctl.defs: new file. Interfaces for rtc ioctl operations * hurd/rtc.h: new file. Interfaces for rtc device * rtc/Makefile: new file. Makefile for rtc server * rtc/main.c: new file. Initialisation for rtc translator * rtc/mig-mutate.h: new file. Type translation for rtc server * rtc/rtc-cmos_pioctl-ops.c: new file. The rtc-cmos server-side implementation Signed-off-by: Zhaoming Luo <zhmingluo@163.com> Message-ID: <20241211005415.507656-2-zhmingluo@163.com>
2024-12-09smp: Simplify passing argvSamuel Thibault
2024-12-09sutils: Add smp tool to run process on slave processorsDamien Zammit via Bug reports for the GNU Hurd
Until we make gnumach fully parallel, we need a way to execute on slave processor set on smp-enabled gnumach. For example: $ /sbin/smp /bin/bash $ will launch a shell that executes commands only within slave pset, consisting of all processors except processor 0. We can thus test parallelism on Hurd in a controlled way. Message-ID: <20241126103747.353948-1-damien@zamaudio.com>