Commit graph

8241 commits

Author SHA1 Message Date
Ori Bernstein
c207b78d07 libdraw: add bezierpts
This patch exposes the bezierpts function,
providing a way to get the points on a path,
similar how bezsplinepts gives them for b
splines.
2021-01-09 12:20:49 -08:00
Ori Bernstein
dda99bbfe5 9pfid(2): document struct Qid (thanks sirjofri)
The Qid struct is pervasive when writing 9p servers,
but is not described in the manpages. This adds a
definition to the 9pfid manpage.
2021-01-06 10:07:10 -08:00
Ori Bernstein
888c59c07e merge 2021-01-05 19:48:26 -08:00
Ori Bernstein
1787a8b990 acid: increase hash size (thanks jonas.amoson)
when loading large binaries such as netsurf, with many
symbols, our hash table fills up with collisions and
loading the symbol table gets very slow. Bumping it up
drops the time to lstk() in acid on netsurf from 4 minutes
to 8 seconds.
2021-01-05 19:37:26 -08:00
Alex Musolino
95b9b8863d qr: fix exit status
Call exits(0) instead of returning from main.  Also call sysfatal if
writing of image data fails.  Previously, qr(1) would exit with
default non-nil status "main" unconditionally as a result of returning
from main.
2021-01-05 22:36:03 +10:30
cinap_lenrek
76ed42e31f marshal(1): fix example: upas/mail -> mail (thanks fulton) 2021-01-04 00:24:39 +01:00
Ori Bernstein
92d3abd818 ape: unify math.h copies
/$objtype/include/ape/math.h contained an almost
identical copy of math.h for each architecture.

The only difference between them architectures
was that some had an incorrect version of isinf
defined.

This change picks one of the versions of math.h
with a correct definition, moves it to /sys/include,
and removes the redundant versions.
2021-01-01 21:40:00 -08:00
cinap_lenrek
0e1f4288ee ape: add missing isnan() and isinf() macros for 386 (thanks Jonas) 2021-01-02 05:47:31 +01:00
Sigrid
5991e01ed7 file: ftyp mp4* is video/mp4 as well 2021-01-01 22:58:05 +01:00
Ori Bernstein
c3b30544e1 sort: fix memory leak (thanks Igor Boehm)
Free the last line that we examine when looping
through the lines in a file.
2021-01-01 11:48:39 -08:00
BurnZeZ
fd1db35c4d cc: add a couple notes to the comments regarding flags 2020-12-29 19:38:59 +00:00
cinap_lenrek
97a55e03a7 libc/arm: open #c/sysstat file with OCEXEC (internal file descriptor) 2020-12-29 19:08:08 +01:00
cinap_lenrek
fb08e3655e plumber: open rule files as OCEXEC, to avoid leaking them to sub commands 2020-12-29 18:45:42 +01:00
Sigrid
b7b740a04c text2post: check font index for out of range 2020-12-28 21:21:22 +01:00
cinap_lenrek
ceeb701a2b plumber: don't leak srvfd file descriptor into sub processes
Put OCEXEC flag on the srvfd so it wont be leaked
on sub-processes we spawn from plumb rules.
2020-12-28 21:00:15 +01:00
Sigrid
67672ffdc9 plumb: fix wrong click attribute offset (thanks umbraticus) 2020-12-28 12:24:47 +01:00
cinap_lenrek
0596178dd6 kbmap: avoid division by zero when window becomes too small 2020-12-27 23:39:28 +01:00
cinap_lenrek
0e632454e2 aux/vga: remove panning, add screen tilting support 2020-12-27 23:10:39 +01:00
cinap_lenrek
806353ec9e devvga: implement screen tilting, remove panning and overlays
Tilting allows using left/right rotated or invetrted display orientation.
This can be changed at runtime such as: echo tilt right > /dev/vgactl
This removes the old panning and vga overlays as they are only implemented
with some ancient vga controllers.
2020-12-27 23:08:59 +01:00
cinap_lenrek
874e71c8dc libauth: re-implement procsetuser() to use /proc instead of #c/user 2020-12-23 13:10:30 +01:00
cinap_lenrek
ab103ba349 devproc: allow anyone to change user of its own processes to "none" 2020-12-23 13:09:31 +01:00
Sigrid
7bcdd1b5d8 libvorbis: 1.3.5 → 1.3.7 (fixes a bunch of CVE and other small issues) 2020-12-23 12:18:07 +01:00
cinap_lenrek
a7a08647b6 ape: re-implement getlogin() by stating /proc/$pid/status 2020-12-23 02:32:13 +01:00
cinap_lenrek
dced7255ec libc: re-implement getuser() by stating /proc/$pid/status
The idea is to avoid the magic files that contain
per process information in devcons when possible.
It will make it easier to deprecate them in the future.
2020-12-23 02:31:28 +01:00
cinap_lenrek
2e6a5e7046 fax, psfax, vwhois: use $user instead of /dev/user 2020-12-23 01:44:44 +01:00
cinap_lenrek
cad697d6ed B: dont pollute the environment 2020-12-23 01:44:10 +01:00
cinap_lenrek
4675de1ba0 kill, slay, broke: dont pollute environment, use $user 2020-12-23 01:43:29 +01:00
cinap_lenrek
e45c7480b6 Kill: don't pollute environment 2020-12-23 01:42:52 +01:00
cinap_lenrek
c8c5499d7f start, stop: avoid null list in concatenation witout arguments, use $user 2020-12-23 01:41:52 +01:00
cinap_lenrek
c7fd8fe47a nusbrc: delect lenovo camera 2020-12-23 01:23:09 +01:00
cinap_lenrek
f11526708e kw: use ethermii.c from port/ (thanks stuart) 2020-12-22 22:17:44 +01:00
cinap_lenrek
809a7402fc aout2uimage: fix missing \n in usage print (thanks james) 2020-12-22 19:33:49 +01:00
cinap_lenrek
1619629835 upasfs(4): fix small typos (thanks igor) 2020-12-22 17:44:26 +01:00
cinap_lenrek
157166d4fc kbdfs: fix mistake, remove leftover static user variable (thanks umbraticus and igor) 2020-12-22 16:36:45 +01:00
cinap_lenrek
29f60cace1 kernel: avoid palloc lock during mmurelease()
Previously, mmurelease() was always called with
palloc spinlock held.

This is unneccesary for some mmurelease()
implementations as they wont release pages
to the palloc pool.

This change removes pagechainhead() and
pagechaindone() and replaces them with just
freepages() call, which aquires the palloc
lock internally as needed.

freepages() avoids holding the palloc lock
while walking the linked list of pages,
avoding some lock contention.
2020-12-22 16:29:55 +01:00
cinap_lenrek
2fb5fbbd73 merge 2020-12-22 00:47:53 +01:00
Alex Musolino
f2919dfd14 rio(4): list window states in order (thanks umbracticus) 2020-12-22 10:11:03 +10:30
cinap_lenrek
0ad4ceb8d0 kernel: make addbroken() static, remove misleading Proc* argument 2020-12-21 22:03:46 +01:00
cinap_lenrek
262d5c101b merge 2020-12-21 15:06:04 +01:00
cinap_lenrek
5a059477f8 pc, xen: move fpu setup/fork/save/restore handlers to pc/fpu.c 2020-12-21 15:04:48 +01:00
Alex Musolino
a203d90474 hpost: fix usage text 2020-12-22 00:16:26 +10:30
cinap_lenrek
932995bb27 kernel: update procsave() comment, we'r not holding up->rlock anymore 2020-12-21 14:41:10 +01:00
cinap_lenrek
41c60689b3 ndb/dns: handle dnskey RR's (thanks moody)
On 12/18/20, Jacob Moody wrote:
> Hello,
>
> I recently ran in to some issues with pointing an unbound server towards a
> 9front dns server as its upstream.
> The parsing seemed to fail when ndb/dns received a DNSKEY RR from it's own
> upstream source on behalf of unbound.
> This patch catches and stores the DNSKEY from the upstream server to prevent
> this.
2020-12-20 23:08:11 +01:00
cinap_lenrek
e4ce6aadac kernel: handle tos and per process pcycle counters in port/
we might as well handle the per process cycle
counter in the portable part instead of duplicating the code
in every arch and have inconsistent implementations.

we now have a portable kenter() and kexit() function,
that is ment to be used in trap/syscall from user,
which updates the counters.

some kernels missed initializing Mach.cyclefreq.
2020-12-20 22:34:41 +01:00
cinap_lenrek
08c1622b0d [12kq]l: remove unix compat code for cputime() 2020-12-19 19:15:02 +01:00
cinap_lenrek
0527345e0a libthread: remove unused _times() function 2020-12-19 18:47:17 +01:00
cinap_lenrek
58e6750401 kernel: remove Proc* argument from procsetuser() function 2020-12-19 18:07:12 +01:00
cinap_lenrek
eb1dfed9ab libauth: change programs to use the new procsetuser() function 2020-12-19 18:02:37 +01:00
cinap_lenrek
fc5070c600 libauth: add procsetuser() function to change user id of the calling process
Provide a central function to change the user id
of the calling process.

This is mostly used by programs to become the none
user, followed by a call to newns().
2020-12-19 17:46:55 +01:00
cinap_lenrek
daccd2b226 aux/kbdfs: use getuser() from libc 2020-12-19 15:52:41 +01:00