Commit Graph

264688 Commits

Author SHA1 Message Date
martin
0053548254 msg_prompt_win: if the default string fits, show it separately even
in fixed size windows. Previously it would only show up when auto-sizing
prompts figured it would fit (probably an oversight).
2019-01-21 20:28:08 +00:00
dholland
0bd4d1d80a Fix wrong scoping of {U,}LLONG_MAX.
PR 53298 from Roberto E. Vargas Caballero.
2019-01-21 20:22:48 +00:00
sevan
f555b79219 Add Alfred North Whitehead quote. 2019-01-21 16:58:47 +00:00
jmcneill
918e5fb8e9 No need to specify root and console bootargs on amlogic 2019-01-21 16:28:39 +00:00
jmcneill
1b14cfdabc Auto-detect root device on Meson8b 2019-01-21 16:27:48 +00:00
kre
f2dc4639fa DEBUG mode shell cleanups (NFC for any normal shell).
Add an error DEBUG trace in exraise() (when the shell has detected
some error or signal, and is aborting what it is doing)

Fix an arith error in DEBUG bit assignments (harmless as we haven't
reached the limit of flags yet), and add some missing (recently added)
debug flags so they are turned on when the user (ie: me) asks for
"everything".
2019-01-21 14:29:12 +00:00
kre
9cef82b269 Fix an amazing crazy botch (of mine) when expanding prompt strings
(PS1 etc) which, if the shell were already exiting, and a prompt
were to be expanded (which only really happens if -x is enabled,
and an exit trap is set, so the commands in the trap need PS4
expanded and written, last thing, before the shell exits) the shell
would instead simply exit when it finished expanding PS4 (before
even writing it, or the xtrace output).

There were more conditions required to set up the environment for
this to actually occur (it seems to only happen when the exit trap
is set in a function, called in a command substitution) but that's
unimportant, the code was nonsense.

Problem noticed by Martijn Dekker.

XXX pullup -8
2019-01-21 14:24:44 +00:00
kre
6b3f958390 When we are about to execute something, and the traps are invalid
(which means this is the very first execution in a new subshell)
clear the traps completely, unless the command is "trap".   We were
allowing any special builtin, which was probably harmless, but not
intended.

Also (though not required) permit "command trap" and "eval trap"
and combinations thereof, because they might be useful, and there is
no particular reason why not.   This is all a part of making t=$(trap)
work as POSIX requires, but almost nothing beyond that.  The "trap"
command must be alone (modulo eval and command) in the subshell for
the exception to apply, no t=$(trap; echo) or anything like that.

Martijn Dekker asked for "command trap" to work (no idea why though,
it converts "trap" from being a special builtin, to a normal one,
which means an error won't cause the shell to exit ... if there's
an error, the "trap" command won't do anything useful, and as we
permit no more commands (for this special treatment) the shell is
going to exit anyway, this difference is not really significant.
2019-01-21 14:18:59 +00:00
kre
f499a5853f Add an explanation of the error (warning)
RANDOM initialisation failed
when the shell might print after RANDOM has been reseeded
(which includes at sh startup) the next time RANDOM is accessed.
It indicates that /dev/urandom was not available or did not
provide data - in that case, sh uses a (weak) seed made out of
the pid and time (but otherwise nothing else changes).
2019-01-21 14:09:24 +00:00
kre
dd761e12dc Fix an off by one buffer length problem. Fortunately, it was off by
one in the "safe" way (it was ensuring the buffer always ended in 2 \0
characters ... one is enough.)   This could affect the expansions of
LINENO RANDOM and SECONDS, though only if they have at least 8 digits
(and then, only sometimes).   RANDOM thus is safe, as it never produces
a number with more than 5 digits, you'd need a script with 10000000
lines before there might be an issue with LINENO (and even autoconf
generated scripts don't generally get that bit) and a shell would need
to be running for almost 4 months for SECONDS to climb that high.

Nevertheless: XXX pullup -8.
2019-01-21 13:27:29 +00:00
kre
15320a4ac2 Add subtests to verify that both "sleep 0.2" and "sleep 0,2" work
when the locale is ru_RU.UTF-8 (which has ',' as its decimal radix char).
Inspired by a problem with rc.subr experiened by ru_RU.UTF-8 reported on
netbsd-users.  These are in the "fraction" test case.

While here, add some more (sub-)tests of invalid input, to make sure they
fail (in the "nonnumeric" test case), and for fun, a couple of subtests
testing hex input fractional delays (in the "hex" test case).
2019-01-21 13:19:18 +00:00
skrll
d29b3aba0c Use ci_{package,core,smt}_id instead of ci_data.cpu_{package,core,smt}_id
NFC
2019-01-21 08:04:26 +00:00
skrll
539eb04e48 Make more KVA available 2019-01-21 07:49:45 +00:00
skrll
6c83fe9640 Remove redundant pmap_devmap_register(netwalker_devmap) call 2019-01-21 07:47:30 +00:00
skrll
e0b64ed158 G/C 2019-01-21 07:46:40 +00:00
skrll
340a5db42f Wrong long lined comment 2019-01-21 07:46:20 +00:00
skrll
ff9e533ffb Sort 2019-01-21 07:29:36 +00:00
skrll
314240bfb3 G/C 2019-01-21 07:26:14 +00:00
macallan
2b6d546e2a apply patches from PR 49639
compile tested only for lack of hardware
2019-01-21 06:23:17 +00:00
msaitoh
1f87c10270 Regen. 2019-01-21 04:15:50 +00:00
msaitoh
9c8521166f Marvell 0x4365 is 88E8070. 2019-01-21 04:15:22 +00:00
pgoyette
f24c721fc4 Note that kernels with NET_MPSAFE won't work with non-NET_MPSAFE modules.
XXX The initial merge of the [pgoyette-compat] branch will NOT address
XXX this issue.
2019-01-21 02:28:25 +00:00
alnsn
ee8812412f Update sljit version. 2019-01-21 01:02:50 +00:00
alnsn
8cef4130c5 Add sljit rump glue for aarch64.
XXX arm_icache_sync_range() and mips_icache_sync_range() call

	(void)rumpcomp_sync_icache((void *)va, (uint64_t)sz);

but linking fails if I do the same on aarch64 (I suspect it also
fails on 32bit arm and mips).

As a workaround, I call __builtin___clear_cache().
2019-01-21 00:30:14 +00:00
alnsn
9459cddf74 Add bpfjit and sljit modules. 2019-01-21 00:22:24 +00:00
alnsn
1ca7425140 Build bpfjit and sljit modules on aarch64. 2019-01-21 00:21:48 +00:00
alnsn
fa2feddd77 Add #ifndef _KERNEL guard around userspace #includes 2019-01-21 00:07:10 +00:00
alnsn
42037f4ee4 Add missing include. 2019-01-20 23:36:57 +00:00
alnsn
98705263f1 Update sljit revision. 2019-01-20 23:23:01 +00:00
alnsn
e35f55c6f0 Resolve conflicts. 2019-01-20 23:14:16 +00:00
alnsn
06eb4e7bdb Update sljit to version 0.93 (svn revision r333).
Changes since the last import:

r333 More x86 fixes and a new stack test.
r332 Improve stack allocation on x86.
r331 Make sljit_free_unused_memory_exec public, PPC flush takes priority.
r330 Reverse the stack utility to top-down.
r329 Add sljit_set_current_flags function.
r328 Add two more virtual registers to x86/32, ARM-32 refactor.
r327 Remove value caching on ARM-32.
r326 Remove value caching on ARM-Thumb2.
r325 Move with update rework.
r324 Arm32 store fixes.
r323 Update macros and remove copyright years.
r322 Reworking flags, removing keep flags.
r321 Quick fix for regexjit.
r320 Improve protected executable allocator. Patch insipred by Christian Persch.
r319 Fully support dynamic code modifications again.
r318 Support protected allocator on all architectures except TILEGX.
r317 Rework protected allocator, only x86 linux is supported now.
r316 Add protected executable allocator.
r315 Remove SLJIT_MEMMOVE.
r314 Fix unaligned accesses on x86. Patch by Marc Mutz.
2019-01-20 22:44:25 +00:00
bad
92e0fba179 tftproot_getfile(): return E2BIG when bootfile is to long.
tftproot_getfile() must return something != 0 to indicate error when
the bootfile is to long.
error just got set to 0 when nfs_boot_setrecvtimo() was called.

found during code review. compile tested only.
2019-01-20 21:26:13 +00:00
jmcneill
fb4c68f694 todr_attach -> fdtbus_todr_attach 2019-01-20 20:22:13 +00:00
jmcneill
b42754bb07 Add mesonrtc 2019-01-20 17:58:37 +00:00
jmcneill
f9c08fdbcf Add Amlogic Meson RTC driver (FDT version) 2019-01-20 17:58:22 +00:00
jmcneill
96e4c98280 Add rtc node (non-standard bindings) 2019-01-20 17:57:29 +00:00
jmcneill
d07861fae1 Add operating points and clocks for CPUs 2019-01-20 17:29:04 +00:00
jmcneill
69b0424a71 Add support for changing CPU frequency 2019-01-20 17:28:34 +00:00
jmcneill
bce8d6d72a Add CLK_SET_RATE_PARENT for mux clocks and add MESON_CLK_PLL_RATE which is like MESON_CLK_PLL but accepts a custom set_rate function 2019-01-20 17:28:00 +00:00
jmcneill
c4f6d95afe Always honour MESON_CLK_DIV_SET_RATE_PARENT 2019-01-20 17:27:30 +00:00
maxv
116f85b12d Improvements in NVMM
* Handle the FPU differently, limit the states via the given mask rather
   than via XCR0. Align to 64 bytes. Provide an initial gXCR0, to be sure
   that XCR0_X87 is set. Reset XSTATE_BV when the state is modified by
   the virtualizer, to force a reload from memory.

 * Hide RDTSCP.

 * Zero-extend RBX/RCX/RDX when handling the NVMM CPUID signature.

 * Take ECX and not RCX on MSR instructions.
2019-01-20 16:55:21 +00:00
jmcneill
f4728349c8 Re-add support for awge0.mac-address, fb.scale, and fb.depth cmdline options 2019-01-20 16:02:32 +00:00
jmcneill
deba12f9c1 Only enable RX interrupts if the device is open. Previously interrupts were
enabled unconditionally, which caused the interrupt handler to consume
input before WSDISPLAY_MULTICONS had a change to poll for data.
2019-01-20 15:56:40 +00:00
gson
0bd23f10c8 Call rump_pub_lwproc_newlwp() in the lfs cleaner thread to make its
rump system calls all use the same lwp.  Hopefully this will fix
PR kern/53884.  Also call rump_pub_lwproc_releaselwp() at the end.
2019-01-20 14:50:58 +00:00
jmcneill
e23248decd Remove unused file. 2019-01-20 13:07:28 +00:00
skrll
4893317e26 G/C 2019-01-20 11:09:11 +00:00
skrll
2922428b48 G/C VEXPRESS_A15 2019-01-20 10:50:06 +00:00
skrll
1521ad8a22 Another kernel bites te dust.
Remove ODROID-C1 as it is now replaced by GENERIC. Thanks jmcneill.
2019-01-20 10:18:03 +00:00
jmcneill
4442a22185 Add mesonsdhc 2019-01-20 00:44:17 +00:00
jmcneill
fb172c8ae3 Add Amlogic Meson SDHC driver (non-standard bindings) 2019-01-20 00:44:01 +00:00