Commit Graph

20154 Commits

Author SHA1 Message Date
joerg
bb682c3920 Optimize CPU and memory use of cdbw(3)
Reduce memory footprint and processing time by dropping the vertex parts
of the edges kept during the peeling. Hook up the
division-by-multiplication logic to help older platforms.
2021-01-07 14:41:50 +00:00
reinoud
e6b71c1487 Implement support for trapping REP CMPS instructions in NVMM.
Qemu would abort hard when NVMM would get a memory trap on the instruction
since it didn't know it.
2020-12-27 20:56:14 +00:00
nia
c1f0400234 ossaudio(3): Do not reuse results from AUDIO_GETBUFINFO in SETINFO
Should help PR 55876.
2020-12-19 12:55:28 +00:00
skrll
95cc57f231 spaces to tab 2020-12-05 11:18:21 +00:00
nia
aab2f38b54 Add some missing channel order related ioctl defines.
These are no-ops (unimplemented) on both FreeBSD and Solaris
and the one piece of code I've found that uses it seems to assume the
call will fail so it should be safe to leave this returning EINVAL.

However, it does need the definitions to compile...
2020-12-03 22:10:21 +00:00
wiz
0fff63c9f6 comparision -> comparison 2020-12-02 14:20:19 +00:00
riastradh
3766bfcd77 Note that open(O_ASYNC) does not work as advertised.
This matches Linux, which also advertises the same semantics and
fails to implement it, according to:

https://man7.org/linux/man-pages/man2/fcntl.2.html

(At what point should we collectively stop advertising the semantics
that doesn't work and call the bug a feature?)
2020-11-30 00:21:35 +00:00
kamil
e6959f1f85 Refine the documentation
Sort includes.
Correct the historical note, pipe first appeared in AT&T UNIX v3.
Document ENOMEM.
2020-11-27 16:42:00 +00:00
rillig
8f547784a9 fix typo in manual page for strchrnul(3) 2020-11-26 23:13:55 +00:00
is
84206f8865 Don't complain about additional DNAME records received when resolving A or
AAAA (like already done for SIG/KEY and CNAME).
2020-11-18 12:49:52 +00:00
rin
a8c74629f6 Support aarch64eb in */config.guess.
Cherry-picked from upstream:
https://git.savannah.gnu.org/gitweb/?p=config.git;a=commit;h=1c4398015583eb77bc043234f5734be055e64bea

Everything except external/apache2/llvm/dist/llvm/cmake/config.guess
is patched, which is under vendor tag and cannot be modified. I expect
that this file is not actually used as we use hand-crafted version of
configure script instead of cmake for building LLVM.

Note that external/apache2/llvm/autoconf/autoconf/config.guess has
already been committed on Oct. 20, but commit message disappeared as
cvs aborted due to "permission denied" when trying to modify the file
mentioned above. Sorry for confusing you.

Also note that GMP uses its own config.guess Patch for
external/lgpl3/gmp/dist/config.guess is provided by ryo@. Thanks!
2020-11-17 10:35:10 +00:00
nia
f7f198978e ossaudio(3): Clone some useful behaviour from the Solaris kernel
Both SNDCTL_DSP_SPEED and SNDCTL_DSP_CHANNELS support a special value
0 to "query the configured value without changing it". In our case,
this actually means setting and querying the hardware rate.

I don't know if OSSv3 or FreeBSD or other implementations also do this.
But it seems safe and sensible to support.
2020-11-13 09:02:39 +00:00
skrll
87529819eb Catch up with aa64 is not mips change 2020-11-10 19:14:11 +00:00
nia
8a0fd92fc8 ossaudio(3): Set errno and return -1 rather than returning errno. 2020-11-04 22:59:24 +00:00
nia
a9d493a299 ossaudio(3): Reduce code duplication for querying capabilities 2020-11-03 09:46:00 +00:00
nia
f0eecf651f ossaudio(3): Return device playback and capture capabilities in GETCAPS 2020-11-03 09:36:12 +00:00
nia
54df53aac3 ossaudio(3): More capability defines from OSSv4 2020-11-03 09:33:53 +00:00
nia
7a66cf0ffc ossaudio(3): return correctly initialized return value in unlikely
error case. pointed out by tnn.
2020-11-03 08:24:33 +00:00
reinoud
b5bbc77284 Revert (REPE) CMPS support per request of Maxime, it is incorrect. 2020-10-31 15:44:01 +00:00
christos
2987e709e6 add missing sentence. 2020-10-31 14:35:28 +00:00
wiz
1848228ba3 Remove trailing whitespace. 2020-10-31 10:51:59 +00:00
christos
ed75ee8266 PR/55663: Ruslan Nikolaev: Add support for EVFILT_USER in kqueue(2) 2020-10-31 01:08:31 +00:00
kre
84c54a935f PR lib/46542
Add checks to detect overflow, and also detect other invalid
(out of range) inputs for parsedate().

There could be more, and some of what is being added is not
perfect, but many calculation overflows will be detected now
(and cause an error return) and some of the most bizarre
inputs that were previously accepted no longer will be.
2020-10-30 22:03:11 +00:00
nia
2ea12967a0 ossaudio(3): Simplify setting rate (try to supply the nearest one possible) 2020-10-30 21:44:49 +00:00
reinoud
cfe6ea549d Implement missing (REPE) CMPS instruction support in NVMMs x86_decode().
In apparently rare cases the (REPE) CMPS instruction can trigger an memory
assist. NVMM wouldn't recognize the instruction and thus couldn't assist and
Qemu would abort.
2020-10-30 21:06:13 +00:00
nia
0a229fd396 lib: Move sqlite, since it depends on libm 2020-10-29 20:11:17 +00:00
roy
07a43c5149 libossaudio: return newfd here as we return retval elsewhere 2020-10-24 14:43:53 +00:00
skrll
c20fb706db Add _UC_GREGS_* defines for all general registers 2020-10-24 07:05:52 +00:00
skrll
134a7d48fd Provide _UC_REGS_* defines for all registers 2020-10-24 07:03:11 +00:00
skrll
ecebc551e7 Update the unwinder comment to better reflect ARM64 2020-10-24 07:02:20 +00:00
skrll
3d84f9f79d s/ARM/ARM64/ in comment 2020-10-24 07:00:26 +00:00
wiz
80fb34196c Fix typo in comment. 2020-10-23 12:13:04 +00:00
nia
2cd43b36c6 ossaudio(3): Add an implementation of SNDCTL_CARDINFO
Correct some of the counts returned by SNDCTL_SYSINFO so this works.
2020-10-23 09:05:20 +00:00
nia
054aefec7a ossaudio(3): This is not compat_linux 2020-10-22 19:39:48 +00:00
thorpej
a8ff863cd7 Fix typo (thanks kamil@ for pointing it out). 2020-10-21 01:58:30 +00:00
thorpej
521b46f7aa Add call frame unwind info to the Alpha signal trampoline. Using
kamil@'s test program:

Before:
Backtrace 2 stack frames.
0x120000a74 <handler+0x54> at ./test
0x3fffdca6550 <__sigtramp_siginfo_2> at /usr/lib/libc.so.12

After:
Backtrace 4 stack frames.
0x120000a74 <handler+0x54> at ./test
0x3fffdca6554 <__sigtramp_siginfo_2> at /usr/lib/libc.so.12
0x120000b10 <main+0x38> at ./test
0x1200009b4 <___start+0x1a4> at ./test
2020-10-21 01:55:07 +00:00
thorpej
48c5aec857 - Consistently use _REG_* defines from assym.h to mean register numbers,
not offsets (i.e. *8 to get the offset).
- Define and use SIZEOF_SIGINFO and UC_GREGS constants, rather than
  hard-code magic numbers.

NFC -- same object code is generated.
2020-10-21 01:24:04 +00:00
nia
41a2db1f31 ossaudio(3): Add SNDCTL_AUDIOINFO_EX as an alias of SNDCTL_AUDIOINFO 2020-10-20 08:57:45 +00:00
wiz
0e2cbe842f Remove trailing whitespace. 2020-10-20 07:52:04 +00:00
nia
d1d954926b ossaudio(3): Plug a fd leak in the new mixer API 2020-10-20 06:53:37 +00:00
nia
bbfc3fa4fd ossaudio.3: Bump date 2020-10-20 06:43:55 +00:00
nia
6abc2e7583 ossaudio(3): Turn BUGS section into a list of potential compat issues 2020-10-20 06:43:34 +00:00
nia
988ec12f1c ossaudio(3): Add some endian-specific U16 formats
for compatibility with FreeBSD
2020-10-20 06:33:52 +00:00
kamil
c82c3566be Restore SP from mcontext
Improves unwinding of multiple frames without frame pointer.
2020-10-19 22:33:53 +00:00
kre
dbbe561cbe Check the year field of a tentative ISO-8601 date format for overflow
before committing to it being an 8601 format date, rather than after
(or the fall back grammar parser doesn't start with a clean slate).

This isn't likely to ever bother anyone, the chances of encountering
something that looks just like an 8601 format date, but with a year
field so large it overflows a long are kind of slim.   If it did happen
the chances that the string could be correctly parsed (into something
different) by the grammar are even slimmer. But better to do it properly.
2020-10-19 17:47:45 +00:00
kre
0c44d33848 Catch the parsedate man page up with recent updates, ans also include
some general improvements I've had kicking around for a long time, but
never got around to committing.
2020-10-19 15:08:39 +00:00
kre
569a03414c For touch -d (which uses parsedate()) POSIX specifies that the
ISO-8601 format yyyy-mm-ddTHH:MM:SS[radix_and+frac][Z]
be accepted.

We didn't handle that, as in parsedate(), 'T' represents the
military timezone designator, not a padding separator between
date & time as POSIX specified it.

The way parsedate() is written, fixing this in the grammar/lexer
would be hard without deleting support for T as a zone indicator
(it is *my* timezone!).

So, instead of doing that, parse an ISO-8901 string which occurs
right at the start of the input (not even any preceding white space)
by hand, before invoking the grammar, and so not involving the lexer.
This is sufficient to make touch -d conform.

After doing that, we still need to allow earlier valid inputs,
where an ISO-8601 format (using space as the separator, but without
the 'Z' (Zulu, or UTC) suffix) followed by an arbitrary timezone
designation, and other modifiers (eg: "+5 minutes" work.  So we
call the grammar on whatever is left of the input after the 8601
string has been consumed.   This all "just works" with one exception,
a format like "yyyy-mm-dd hh:mm:ss +0700" would have the grammar parse
just "+0700" which by itself would be meaningless, and so wasn't
handled.    Add a grammar rule & processing to Handle it.

Also note that while POSIX specifies "at least 4" digits in the YYYY
field, we implement "at least one" so years from 0-999 continue to be
parsed as they always have (nb: these were, and continue to be, treated
as absolute year numbers, year 10 is year 10, not 2010).  Years > 2 billion
(give or take) cannot be represented in the tm_year field of a struct tm,
so there's a limit on the max number of digits as well.
2020-10-19 15:08:17 +00:00
kre
28d278e3ae POSIX requires that when converting 2 digit year representations to
actual specific years, values from 69-99 be treated as 20th century,
and values from 0-68 be treated as 21st century.  This allows for those
unfortunate enough to reside in a timezone west of Greenwich to convert
the epoch (or a time very close to it) to text, write that with just two
digits, and correctly convert it back to a time near the epoch, rather
than to something in 2069.

We used to split things so 0-69 were 21st century, and 70-99 were 20th.
Change that (this requires a change in the parsedate ATF tests which
test this specific boundary).

While here, add support for another POSIX requirement, that the radix
char before fractional seconds can be either a ',' or a '.'.  We used
to allow only '.', add support for ','.   This is something of a meaningless
change, as parsedate() returns a time_t in which there is no way to
represent fractional seconds, so there's little point in ever specifying
them regardless of what char is used for the "decimal point" - they will
be ignored anyway.    But at least fractional seconds using a ',' as the
radix char will no longer cause the conversion to fail (or do something else
bizarre).
2020-10-19 15:05:53 +00:00
kamil
aeae5ce1c3 Restore ESP from mcontext
Improves unwinding of multiple frames without base pointer.
2020-10-19 11:31:01 +00:00
kamil
28928a88a3 Restore RSP from mcontext
Fixes unwinding of multiple frames without base pointer.

Patch by: Nikhil Benesch via PR lib/55719
2020-10-19 11:29:26 +00:00