]> git.lizzy.rs Git - plan9front.git/log
plan9front.git
6 years agospin: Update to most recent version. (thanks Ori_B)
cinap_lenrek [Wed, 22 Nov 2017 20:09:31 +0000 (21:09 +0100)]
spin: Update to most recent version. (thanks Ori_B)

from Ori_B:

There were a small number of changes needed from the tarball
on spinroot.org:

  - The mkfile needed to be updated
  - Memory.h needed to not be included
  - It needed to invoke /bin/cpp instead of gcc -E
  - It depended on `yychar`, which our yacc doesn't
    provide.

I'm still figuring out how to use spin, but it seems to do
the right thing when testing a few of the examples:

% cd $home/src/Spin/Examples/
% spin -a peterson.pml
% pcc pan.c -D_POSIX_SOURCE
% ./6.out

(Spin Version 6.4.7 -- 19 August 2017)
+ Partial Order Reduction

Full statespace search for:
never claim          - (none specified)
assertion violations +
acceptance   cycles  - (not selected)
invalid end states +

State-vector 32 byte, depth reached 24, errors: 0
40 states, stored
27 states, matched
67 transitions (= stored+matched)
0 atomic steps
hash conflicts:         0 (resolved)

Stats on memory usage (in Megabytes):
0.002 equivalent memory usage for states (stored*(State-vector + overhead))
0.292 actual memory usage for states
128.000 memory used for hash table (-w24)
0.534 memory used for DFS stack (-m10000)
128.730 total actual memory usage

unreached in proctype user
/tmp/Spin/Examples/peterson.pml:20, state 10, "-end-"
(1 of 10 states)

pan: elapsed time 1.25 seconds
pan: rate        32 states/second

6 years agolibsec: write optimized _chachablock() function for amd64 / sse2
cinap_lenrek [Sun, 19 Nov 2017 23:10:35 +0000 (00:10 +0100)]
libsec: write optimized _chachablock() function for amd64 / sse2

doing 4 quarterround's in parallel using 128-bit
vector registers. for second round shuffle the columns and
then shuffle back.

code is rather obvious. only trick here is for the first
quaterround PSHUFLW/PSHUFHW is used to swap the halfwords
for the <<<16 rotation.

6 years agolibmach: fix format for 8db sse shift ops
cinap_lenrek [Sun, 19 Nov 2017 20:11:41 +0000 (21:11 +0100)]
libmach: fix format for 8db sse shift ops

6 years ago6l: fix typo in optab table for APSLLQ (0x7e -> 0x73)
cinap_lenrek [Sun, 19 Nov 2017 20:10:36 +0000 (21:10 +0100)]
6l: fix typo in optab table for APSLLQ (0x7e -> 0x73)

6 years agokernel: make isaconfig() consistent, not inplace tokenizing the conf string
cinap_lenrek [Sun, 19 Nov 2017 16:17:04 +0000 (17:17 +0100)]
kernel: make isaconfig() consistent, not inplace tokenizing the conf string

6 years agoinst/mounthjfs: use /dev/swap instead of #c/swap to determine memory size (thanks...
cinap_lenrek [Sun, 19 Nov 2017 14:42:15 +0000 (15:42 +0100)]
inst/mounthjfs: use /dev/swap instead of #c/swap to determine memory size (thanks aap)

6 years ago6in4: add -m mtu option to specify outer MTU
cinap_lenrek [Sat, 18 Nov 2017 15:03:44 +0000 (16:03 +0100)]
6in4: add -m mtu option to specify outer MTU

instead of hardcoding the tunnel interface MTU to 1280,
we calculate the tunnel MTU from the outside MTU, which
can now be specified with the -m mtu option. The deault
outside MTU is 1500 - 8 (PPPoE).

6 years ago9pc64: handle special case in fpurestore() for procexec()/procsetup()
cinap_lenrek [Thu, 16 Nov 2017 22:15:08 +0000 (23:15 +0100)]
9pc64: handle special case in fpurestore() for procexec()/procsetup()

when a process does an exec, it calls procsetup() which
unconditionally sets the sets the TS flag and fpstate=FPinit
and fpurestore() should not revert the fpstate.

6 years agoaudio/flacdec: add eof handler avoiding endless spinning on broken files (thanks...
cinap_lenrek [Thu, 16 Nov 2017 13:15:00 +0000 (14:15 +0100)]
audio/flacdec: add eof handler avoiding endless spinning on broken files (thanks deuteron)

6 years agopc64: fix mistake fpurestore() mistake
cinap_lenrek [Mon, 13 Nov 2017 23:16:21 +0000 (00:16 +0100)]
pc64: fix mistake fpurestore() mistake

cannot just reenable the fpu in FPactive case as we might have
been procsaved() an rescheduled on another cpu. what was i thinking...
thanks qu7uux for reproducing the problem.

6 years agoigfx: allocate backing memory for framebuffer and hw cursor when not done by bios...
cinap_lenrek [Sun, 12 Nov 2017 23:48:46 +0000 (00:48 +0100)]
igfx: allocate backing memory for framebuffer and hw cursor when not done by bios (from qu7uux)

new approach to graphics memory management:

the kernel driver never really cared about the size of stolen memory
directly. that was only to figure out the maximum allocation
to place the hardware cursor image somewhere at the end of the
allocation done by bios.

qu7uux's gm965 bios however wont steal enougth memory for his
native resolution so we have todo it manually.

the userspace igfx driver will figure out how much the bios
allocated by looking at the gtt only. then extend the memory by
creating a "fixed" physical segment.

the kernel driver allocates the memory for the cursor image
from normal kernel memory, and just maps it into the gtt at the
end of the virtual kernel framebuffer aperture.

thanks to qu7uux for the patch.

6 years agolibsec: AES-NI support for amd64
cinap_lenrek [Sun, 12 Nov 2017 22:15:15 +0000 (23:15 +0100)]
libsec: AES-NI support for amd64

Add assembler versions for aes_encrypt/aes_decrypt and the key
setup using AES-NI instruction set. This makes aes_encrypt and
aes_decrypt into function pointers which get initialized by
the first call to setupAESstate().

Note that the expanded round key words are *NOT* stored in big
endian order as with the portable implementation. For that reason
the AESstate.ekey and AESstate.dkey fields have been changed to
void* forcing an error when someone is accessing the roundkey
words. One offender was aesXCBmac, which doesnt appear to be
used and the code looks horrible so it has been deleted.

The AES-NI implementation is for amd64 only as it requires the
kernel to save/restore the FPU state across syscalls and
pagefaults.

6 years agopc64: allow using the FPU in syscall and pagefault handlers
cinap_lenrek [Sun, 12 Nov 2017 21:55:54 +0000 (22:55 +0100)]
pc64: allow using the FPU in syscall and pagefault handlers

The aim is to take advantage of SSE instructions such as AES-NI
in the kernel by lazily saving and restoring FPU state across
system calls and pagefaults. (everything can can do I/O)

This is accomplished by the functions fpusave() and fpurestore().

fpusave() remembers the current state and disables the FPU if it
was active by setting the TS flag. In case the FPU gets used,
the current state gets saved and a new PFPU.fpslot is allocated
by mathemu().

fpurestore() restores the previous FPU state, reenabling the FPU
if fpusave() disabled it.

In the most common case, when userspace is not using the FPU,
then fpusave()/fpurestore() just toggle the FPpush bit in
up->fpstate.

When the FPU was active, but we do not use the FPU, then nothing
needs to be saved or restored. We just switched the TS flag on
and off agaian.

Note, this is done for the amd64 kernel only.

6 years agopc64: set ts flag before schedinit()
cinap_lenrek [Tue, 7 Nov 2017 23:34:08 +0000 (00:34 +0100)]
pc64: set ts flag before schedinit()

6 years agomerge
cinap_lenrek [Sat, 4 Nov 2017 19:11:20 +0000 (20:11 +0100)]
merge

6 years agokernel: introduce per process FPU struct (PFPU) for more flexible machine specific...
cinap_lenrek [Sat, 4 Nov 2017 19:08:22 +0000 (20:08 +0100)]
kernel: introduce per process FPU struct (PFPU) for more flexible machine specific fpu handling

introducing the PFPU structue which allows the machine specific
code some flexibility on how to handle the FPU process state.

for example, in the pc and pc64 kernel, the FPsave structure is
arround 512 bytes. with avx512, it could grow up to 2K. instead
of embedding that into the Proc strucutre, it is more effective
to allocate it on first use of the fpu, as most processes do not
use simd or floating point in the first place. also, the FPsave
structure has special 16 byte alignment constraint, which further
favours dynamic allocation.

this gets rid of the memmoves in pc/pc64 kernels for the aligment.

there is also devproc, which is now checking if the fpsave area
is actually valid before reading it, avoiding debuggers to see
garbage data.

the Notsave structure is gone now, as it was not used on any
machine.

6 years ago/lib/rsc: It only works when we're in the process of preparing a release.
stanley lieber [Thu, 2 Nov 2017 23:55:04 +0000 (19:55 -0400)]
/lib/rsc: It only works when we're in the process of preparing a release.

6 years agotinc(8): mash -> mesh
cinap_lenrek [Thu, 2 Nov 2017 08:05:03 +0000 (09:05 +0100)]
tinc(8): mash -> mesh

6 years agotinc(8): more spelling spam
cinap_lenrek [Wed, 1 Nov 2017 17:40:17 +0000 (18:40 +0100)]
tinc(8): more spelling spam

6 years agotinc(8): spelling, thanks jpm
cinap_lenrek [Wed, 1 Nov 2017 17:34:58 +0000 (18:34 +0100)]
tinc(8): spelling, thanks jpm

6 years agotinc(8): outout -> output
cinap_lenrek [Tue, 31 Oct 2017 21:58:55 +0000 (22:58 +0100)]
tinc(8): outout -> output

6 years agotinc: implement experimental mash peer to peer VPN from http://www.tinc-vpn.org/
cinap_lenrek [Tue, 31 Oct 2017 21:44:25 +0000 (22:44 +0100)]
tinc: implement experimental mash peer to peer VPN from http://www.tinc-vpn.org/

6 years agoaes(2): document aes_xts_encrypt() and aes_xts_decrypt() functions
cinap_lenrek [Mon, 30 Oct 2017 02:04:05 +0000 (03:04 +0100)]
aes(2): document aes_xts_encrypt() and aes_xts_decrypt() functions

6 years agokernel: pc/pc, fix comment line
cinap_lenrek [Mon, 30 Oct 2017 01:08:05 +0000 (02:08 +0100)]
kernel: pc/pc, fix comment line

6 years agoswap(3): document permissions and encryption behaviour, reference to memory(8)
cinap_lenrek [Mon, 30 Oct 2017 00:55:58 +0000 (01:55 +0100)]
swap(3): document permissions and encryption behaviour, reference to memory(8)

6 years agodevcons: remove obsolete comment
cinap_lenrek [Mon, 30 Oct 2017 00:24:18 +0000 (01:24 +0100)]
devcons: remove obsolete comment

6 years agokernel: track more header dependencies in port/portmkfile
cinap_lenrek [Mon, 30 Oct 2017 00:23:48 +0000 (01:23 +0100)]
kernel: track more header dependencies in port/portmkfile

6 years agodevswap: fix mistake
cinap_lenrek [Sun, 29 Oct 2017 22:24:42 +0000 (23:24 +0100)]
devswap: fix mistake

6 years agokernel: introduce devswap #¶ to serve /dev/swap and handle swapfile encryption
cinap_lenrek [Sun, 29 Oct 2017 22:09:54 +0000 (23:09 +0100)]
kernel: introduce devswap #¶ to serve /dev/swap and handle swapfile encryption

6 years agodevfs: rewrite cryptio()
cinap_lenrek [Sun, 29 Oct 2017 21:01:58 +0000 (22:01 +0100)]
devfs: rewrite cryptio()

adjust to new aes_xts routines.

allow optional offset in the 4th argument where the encrypted
sectors start instead of hardcoding the 64K header area for
cryptsetup.

avoid allocating temporary buffer for cryptio() reads, we can
just decrypt in place there.

use sdmalloc() to allocate the temporary buffer for cryptio()
writes so that devsd wont need to allocate and copy in case
it didnt like our alignment.

do not duplicate the error reporting code, just use io()
that is what it is for.

allow 2*256 bit keys in addition to 2*128 bit keys.

6 years agolibsec: rewrite aex_xts_encrypt()/aes_xts_decrypt()
cinap_lenrek [Sun, 29 Oct 2017 20:49:24 +0000 (21:49 +0100)]
libsec: rewrite aex_xts_encrypt()/aes_xts_decrypt()

the previous implementation was not portable at all, assuming
little endian in gf_mulx() and that one can cast unaligned
pointers to ulong in xor128(). also the error code is likely
to be ignored, so better abort() when the length is not a
multiple of the AES block size.

we also pass in full AESstate structures now instead of
the expanded key longs, so that we do not need to hardcode
the number of rounds. this allows each indiviaul keys to
be bigger than 128 bit.

6 years agocwfs: use /dev/swap instead of #c/swap to determine memory size
cinap_lenrek [Sun, 29 Oct 2017 20:41:35 +0000 (21:41 +0100)]
cwfs: use /dev/swap instead of #c/swap to determine memory size

6 years agolibc: improve alignment of QLp structure on amd64, cosmetics
cinap_lenrek [Sat, 28 Oct 2017 16:53:27 +0000 (18:53 +0200)]
libc: improve alignment of QLp structure on amd64, cosmetics

the QLp structure used to occupy 24 bytes on amd64.
with some rearranging the fields we can get it to 16 bytes,
saving 8K in the data section for the 1024 preallocated
structs in the ql arena.

the rest of the changes are of cosmetic nature:

- getqlp() zeros the next pointer, so there is no need to set
  it when queueing the entry.

- always explicitely compare pointers to nil.

- delete unused code from ape's qlock.c

6 years agolibc: wunlock() part 2
cinap_lenrek [Thu, 26 Oct 2017 00:42:26 +0000 (02:42 +0200)]
libc: wunlock() part 2

the initial issue was that wunlock() would wakeup readers while
holding the spinlock causing deadlock in libthread programs where
rendezvous() would do a thread switch within the same process
which then can acquire the RWLock again.

the first fix tried to prevent holding the spinlock, waking up
one reader at a time with releasing an re-acquiering the spinlock.
this violates the invariant that readers can only wakup writers
in runlock() when multiple readers where queued at the time of
wunlock(). at the first wakeup, q->head != nil so runlock() would
find a reader queued on runlock() when it expected a writer.

this (hopefully last) fix unlinks *all* the reader QLp's atomically
and in order while holding the spinlock and then traverses the
dequeued chain of QLp structures again to call rendezvous() so
the invariant described above holds.

6 years agoupas/smtpd: don't call syslog() from the note handler, this can deadlock
cinap_lenrek [Mon, 23 Oct 2017 04:08:18 +0000 (06:08 +0200)]
upas/smtpd: don't call syslog() from the note handler, this can deadlock

when the alarm hits while the process is currently in syslog(), holding
the sl lock, then calling syslog again will deadlock:

/proc/1729193/text:386 plan 9 executable
/sys/lib/acid/port
/sys/lib/acid/386
acid: lstk()
sleep()+0x7 /sys/src/libc/9syscall/sleep.s:5
lock(lk=0x394d8)+0xb7 /sys/src/libc/port/lock.c:25
i=0x3e8
syslog(logname=0x41c64,cons=0x0,fmt=0x41c6a)+0x2d /sys/src/libc/9sys/syslog.c:60
err=0x79732f27
d=0x0
ctim=0x0
buf=0x0
p=0x0
arg=0x0
n=0x0
catchalarm(msg=0xdfffc854)+0x7a /sys/src/cmd/upas/smtp/smtpd.c:71
notifier+0x30 /sys/src/libc/port/atnotify.c:15

6 years agolibc: cleanup atexit and put exits() in its own compilation unit
cinap_lenrek [Fri, 20 Oct 2017 18:58:38 +0000 (20:58 +0200)]
libc: cleanup atexit and put exits() in its own compilation unit

this avoids having to pull in atexit() and its dependencies
(lock(), unlock()) into every program. (as exits() is called
by _main() from main9.s).

6 years agovt: block when sending input to host (fixes truncated paste)
cinap_lenrek [Fri, 20 Oct 2017 18:31:30 +0000 (20:31 +0200)]
vt: block when sending input to host (fixes truncated paste)

6 years agolibsec: make sectorNumber argument for aes_xts routines uvlong
cinap_lenrek [Tue, 17 Oct 2017 19:36:45 +0000 (21:36 +0200)]
libsec: make sectorNumber argument for aes_xts routines uvlong

6 years agolibsec: add AES CFB and AES OFB stream ciphers
cinap_lenrek [Tue, 17 Oct 2017 19:34:01 +0000 (21:34 +0200)]
libsec: add AES CFB and AES OFB stream ciphers

6 years agoaux/wpa: prevent PTK re-installation attack by replaying AP retransmits
cinap_lenrek [Tue, 17 Oct 2017 18:15:48 +0000 (20:15 +0200)]
aux/wpa: prevent PTK re-installation attack by replaying AP retransmits

this implements the mitigation suggested in section "6.5 Countermeasures" of
"Key Reinstallation Attacks: Forcing Nonce Resuse in WPA2" [1].

[1] https://papers.mathyvanhoef.com/ccs2017.pdf

6 years agoape/libsec: fix the build, bring ape libsec.h in sync with plan9 version
cinap_lenrek [Mon, 16 Oct 2017 02:06:17 +0000 (04:06 +0200)]
ape/libsec: fix the build, bring ape libsec.h in sync with plan9 version

6 years agossh: remove extern declarations for pkcs1padbuf() and asn1encodedigest() (now in...
cinap_lenrek [Fri, 6 Oct 2017 19:00:08 +0000 (21:00 +0200)]
ssh: remove extern declarations for pkcs1padbuf() and asn1encodedigest() (now in libsec.h)

6 years agorsa: add auth/rsa2asn1, check write error in auth/rsa2x509 and auth/rsa2pub, document...
cinap_lenrek [Fri, 6 Oct 2017 18:55:57 +0000 (20:55 +0200)]
rsa: add auth/rsa2asn1, check write error in auth/rsa2x509 and auth/rsa2pub, document in rsa(8)

6 years agolibsec: export asn1encodedigest(), asn1encodeRSApub(), asn1toRSApub(), pkcs1padbuf...
cinap_lenrek [Fri, 6 Oct 2017 18:52:18 +0000 (20:52 +0200)]
libsec: export asn1encodedigest(), asn1encodeRSApub(), asn1toRSApub(), pkcs1padbuf() and pkcs1unpadbuf()

6 years agolibsec: allow \r\n terminated lines in decodePEM()
cinap_lenrek [Thu, 5 Oct 2017 18:33:46 +0000 (20:33 +0200)]
libsec: allow \r\n terminated lines in decodePEM()

6 years agocheck for fs= in netaudit
aiju [Wed, 4 Oct 2017 15:56:53 +0000 (15:56 +0000)]
check for fs= in netaudit

6 years agohgwebfs: simplify retry loop construction
cinap_lenrek [Wed, 4 Oct 2017 03:06:54 +0000 (05:06 +0200)]
hgwebfs: simplify retry loop construction

6 years agondb/cs: icmp only supports version 4 addresses, icmpv6 only version 6 addresses
cinap_lenrek [Wed, 4 Oct 2017 03:04:33 +0000 (05:04 +0200)]
ndb/cs: icmp only supports version 4 addresses, icmpv6 only version 6 addresses

6 years agolibauthsrv: preserve readcons() error message from read() error
cinap_lenrek [Wed, 4 Oct 2017 03:01:54 +0000 (05:01 +0200)]
libauthsrv: preserve readcons() error message from read() error

6 years agohg: disable tag caching, allows accessing hg repo from dump
cinap_lenrek [Wed, 4 Oct 2017 01:59:17 +0000 (03:59 +0200)]
hg: disable tag caching, allows accessing hg repo from dump

6 years ago9boot: limit read size to 4K for efi simple file system protocol
cinap_lenrek [Fri, 29 Sep 2017 19:19:12 +0000 (21:19 +0200)]
9boot: limit read size to 4K for efi simple file system protocol

copying files from the uefi shell works, reading plan9.ini works,
loading the kernel by calling Read to read in the DATA section of
the kernel *FAILS*. my guess is that uefi filesystem driver or
nvme driver tries to allocate a temporary buffer and hasnt got
the space. limiting the read size fixes it.

6 years agopc64: add ether82598 driver to configuration
cinap_lenrek [Wed, 27 Sep 2017 12:13:58 +0000 (14:13 +0200)]
pc64: add ether82598 driver to configuration

6 years agoether82598: support for T540-T1, use physical addresses for isaconf port
cinap_lenrek [Wed, 27 Sep 2017 12:13:18 +0000 (14:13 +0200)]
ether82598: support for T540-T1, use physical addresses for isaconf port

reading mac doesnt work yet, requires ea= option in isaconf.

6 years agosdnvme: identify namespace list fails on intel ssd, just assume nsid=[1]
cinap_lenrek [Wed, 27 Sep 2017 12:02:13 +0000 (14:02 +0200)]
sdnvme: identify namespace list fails on intel ssd, just assume nsid=[1]

6 years agokernel: don't tokenize inplace in isaconfig() to make /dev/reboot work
cinap_lenrek [Wed, 27 Sep 2017 11:59:55 +0000 (13:59 +0200)]
kernel: don't tokenize inplace in isaconfig() to make /dev/reboot work

6 years agokernel: get rid of 36 bit Paerange mask in mtrr (supporting machines with more than...
cinap_lenrek [Wed, 27 Sep 2017 11:58:00 +0000 (13:58 +0200)]
kernel:  get rid of 36 bit Paerange mask in mtrr (supporting machines with more than 64GB of memory)

6 years agoupas/fs: fix putcache(), sub-part messages should never go into the lru
cinap_lenrek [Sat, 23 Sep 2017 15:33:05 +0000 (17:33 +0200)]
upas/fs: fix putcache(), sub-part messages should never go into the lru

we accidentally added non-top messages (attatchments) to the lru,
resulting in attachments to be freed. this is wrong.

6 years agoxhci: do bounds checking in capability walking, check if controller vanished on init...
cinap_lenrek [Fri, 22 Sep 2017 10:55:26 +0000 (12:55 +0200)]
xhci: do bounds checking in capability walking, check if controller vanished on init (thunderbolt unplug)

6 years agosshfs: use mtime for qid.vers, fix wstat without name change, fix wstat memory leak
cinap_lenrek [Fri, 22 Sep 2017 09:48:41 +0000 (11:48 +0200)]
sshfs: use mtime for qid.vers, fix wstat without name change, fix wstat memory leak

6 years agoupas/fs: replace fixed cache table with lru linked list
cinap_lenrek [Wed, 13 Sep 2017 21:24:10 +0000 (23:24 +0200)]
upas/fs: replace fixed cache table with lru linked list

the cachetab just keeps track of recent messages that have not
been called cachefree() on. under some conditions, the fixed
table could overflow (all messages having refs > 0). with a
linked list, overflow becomes non fatal and the algorithm is
simpler to implement.

6 years agowinwatch: show windows with empty labels (thanks jpm)
cinap_lenrek [Mon, 11 Sep 2017 17:17:12 +0000 (19:17 +0200)]
winwatch: show windows with empty labels (thanks jpm)

6 years agorename pcf kernel to pc, remove pcf, pccpuf, pccpu64 kernels, update documentation
cinap_lenrek [Sun, 10 Sep 2017 20:35:23 +0000 (22:35 +0200)]
rename pcf kernel to pc, remove pcf, pccpuf, pccpu64 kernels, update documentation

there isnt much of a point in keep maintaining separate
kernel configurations for terminal and cpu kernels as
the role can be switched with service=cpu boot parameter.

to make stuff cosistent, we will just have one "pc" kernel
and one "pc64" kernel configuration now.

6 years agoaudiohda: add pci id for nvidia GM204
BurnZeZ [Sun, 10 Sep 2017 02:27:31 +0000 (02:27 +0000)]
audiohda: add pci id for nvidia GM204

6 years agoaudiohda: add pci id for Intel 9 Series
BurnZeZ [Sun, 10 Sep 2017 02:21:31 +0000 (02:21 +0000)]
audiohda: add pci id for Intel 9 Series

6 years agovmx(3): document changes to devvmx interface
cinap_lenrek [Sun, 10 Sep 2017 01:12:00 +0000 (03:12 +0200)]
vmx(3): document changes to devvmx interface

6 years agoaudiohda: add pci id for ICH10 (thanks echoline)
cinap_lenrek [Sat, 9 Sep 2017 23:37:30 +0000 (01:37 +0200)]
audiohda: add pci id for ICH10 (thanks echoline)

6 years agodevvmx: call vmxshutdown from reboot() function manually
aiju [Sat, 2 Sep 2017 10:43:37 +0000 (10:43 +0000)]
devvmx: call vmxshutdown from reboot() function manually

6 years agosshfs: fork ssh in its own namespace so it wont keep the mountpoint open
cinap_lenrek [Tue, 29 Aug 2017 19:22:31 +0000 (21:22 +0200)]
sshfs: fork ssh in its own namespace so it wont keep the mountpoint open

6 years agosshfs: start sendproc and recvproc in the sane notegroup as the fs process so theadex...
cinap_lenrek [Tue, 29 Aug 2017 17:49:38 +0000 (19:49 +0200)]
sshfs: start sendproc and recvproc in the sane notegroup as the fs process so theadexitsall() works on sshfs: ending.

6 years agoether82563: make the ethernet of thinkpad p50 work (thanks sam-d)
cinap_lenrek [Tue, 29 Aug 2017 17:38:29 +0000 (19:38 +0200)]
ether82563: make the ethernet of thinkpad p50 work (thanks sam-d)

6 years agoaudiohda: Intel Sunrise Point-H support (thanks sam-d)
cinap_lenrek [Tue, 29 Aug 2017 17:37:26 +0000 (19:37 +0200)]
audiohda: Intel Sunrise Point-H support (thanks sam-d)

6 years agosdnvme: pass 0 instead of 0xffffffff as NSID for identify controller and create compl...
cinap_lenrek [Tue, 29 Aug 2017 07:52:53 +0000 (09:52 +0200)]
sdnvme: pass 0 instead of 0xffffffff as NSID for identify controller and create completion/submission queue commands (thanks Ori_B)

Samsung SSD 960 EVO fails with invalid namespace error otherwise...

6 years agodevdup: remove useless OCEXEC check, handled by namec()
cinap_lenrek [Mon, 28 Aug 2017 17:45:49 +0000 (19:45 +0200)]
devdup: remove useless OCEXEC check, handled by namec()

6 years agomerge
cinap_lenrek [Mon, 28 Aug 2017 17:42:19 +0000 (19:42 +0200)]
merge

6 years agodevsegment: handle ORCLOSE on segment directory correctly, fix wrong qid, missing...
cinap_lenrek [Mon, 28 Aug 2017 17:40:53 +0000 (19:40 +0200)]
devsegment: handle ORCLOSE on segment directory correctly, fix wrong qid, missing COPEN flag for segmentcreate()

6 years agodevvmx, vmx: lilu dallas multivm
aiju [Mon, 28 Aug 2017 17:27:41 +0000 (17:27 +0000)]
devvmx, vmx: lilu dallas multivm

6 years agovmx(1): don't realloc virtio queues -- breaks pointers
aiju [Mon, 28 Aug 2017 17:19:13 +0000 (17:19 +0000)]
vmx(1): don't realloc virtio queues -- breaks pointers

6 years agosdiahci: Intel 200 Series Chipset Family PCH support (thanks aiju)
cinap_lenrek [Sun, 27 Aug 2017 19:20:20 +0000 (21:20 +0200)]
sdiahci: Intel 200 Series Chipset Family PCH support (thanks aiju)

we used to tweak arround in the ICH registers for all intel controllers,
which is wrong, as the 200 series has different magic registes. see
the datasheet:

https://www.intel.com/content/www/us/en/chipsets/200-series-chipset-pch-datasheet-vol-2.html

this caused the clocks to be disabled for the 6th port causing a full
machine lockup touching the 6th port registers.

the next problem was that aiju's bios disabled the unused ports somehow
but didnt clear ther PI bits, so that they would stay in Sbist status even
after a port reset. so the port would get stuck in the Dportreset state
forever. the fix for this was to use a one second timeout for the
port reset procedure.

6 years agolibmach: support disassembling from memory
aiju [Thu, 24 Aug 2017 13:02:27 +0000 (13:02 +0000)]
libmach: support disassembling from memory

6 years agovmx(1): VGA framebuffer should be normal memory
aiju [Thu, 24 Aug 2017 09:25:23 +0000 (09:25 +0000)]
vmx(1): VGA framebuffer should be normal memory

6 years agovmx(1): fixed code that assumed uintptr==uvlong
aiju [Thu, 24 Aug 2017 09:01:30 +0000 (09:01 +0000)]
vmx(1): fixed code that assumed uintptr==uvlong

6 years agovmx(1): memory map improvements, x86 simulator for MMIO
aiju [Thu, 24 Aug 2017 08:06:41 +0000 (08:06 +0000)]
vmx(1): memory map improvements, x86 simulator for MMIO

6 years agodevvmx: more efficient data structure for memory map; simplified (more reliable)...
aiju [Thu, 24 Aug 2017 07:53:10 +0000 (07:53 +0000)]
devvmx: more efficient data structure for memory map; simplified (more reliable) step function

6 years agoigfx: fix cdclk and dpll settings for dual channel lvds on sandybridge
qwx [Tue, 22 Aug 2017 21:25:39 +0000 (00:25 +0300)]
igfx: fix cdclk and dpll settings for dual channel lvds on sandybridge

6 years agovt: turn off nl -> nl+cr translation default in raw mode, don't scroll more than...
cinap_lenrek [Tue, 22 Aug 2017 20:48:01 +0000 (22:48 +0200)]
vt: turn off nl -> nl+cr translation default in raw mode, don't scroll more than screen height

6 years agovt: block selection mode for snarf
cinap_lenrek [Sun, 20 Aug 2017 20:18:09 +0000 (22:18 +0200)]
vt: block selection mode for snarf

6 years agomerge
cinap_lenrek [Sun, 20 Aug 2017 17:23:56 +0000 (19:23 +0200)]
merge

6 years agovt: implement /dev/cons and /dev/consctl as a fileserver, winch, incremental redraw
cinap_lenrek [Sun, 20 Aug 2017 17:22:30 +0000 (19:22 +0200)]
vt: implement /dev/cons and /dev/consctl as a fileserver, winch, incremental redraw

we used to bind a pipe to /dev/cons and /dev/consctl with some
shared segment hack to pass tty info arround. now we implement
this as a fileserver.

add support for "winchon"/"winchoff" ctl message to enable interrupt
on window size change. (used by ssh)

keep track of fullscreen scrolls, avoiding redrawing the whole
screen each time.

6 years agossh: issue "winchon" ctl request to /dev/consctl to get interrupt on window size...
cinap_lenrek [Sun, 20 Aug 2017 17:17:46 +0000 (19:17 +0200)]
ssh: issue "winchon" ctl request to /dev/consctl to get interrupt on window size change from vt(1)

6 years agoigfx: add did for x220
qwx [Sun, 20 Aug 2017 10:52:52 +0000 (13:52 +0300)]
igfx: add did for x220

6 years agoigfx: fix sandybridge fdi link training bits and ordering
qwx [Sun, 20 Aug 2017 10:47:01 +0000 (13:47 +0300)]
igfx: fix sandybridge fdi link training bits and ordering

- fix wrong bitfield for txctl (different between snb and ivb),
  and enable tx before rx
- DPLL_CTL_x snb/ivb: don't touch reserved bits

6 years agovmx: allocate sticky instead of more expensive fixed segment
cinap_lenrek [Mon, 14 Aug 2017 02:18:13 +0000 (04:18 +0200)]
vmx: allocate sticky instead of more expensive fixed segment

6 years agovmx: pass multiboot framebuffer info to kernel
cinap_lenrek [Sun, 13 Aug 2017 17:19:55 +0000 (19:19 +0200)]
vmx: pass multiboot framebuffer info to kernel

6 years agoether82563: add more pci ids for i210 and i354 from 9atom / openbsd
cinap_lenrek [Sun, 13 Aug 2017 13:26:24 +0000 (15:26 +0200)]
ether82563: add more pci ids for i210 and i354 from 9atom / openbsd

6 years agoether82563: support for i211 with iNVM. (thanks mfny and brennan for testing)
cinap_lenrek [Sat, 12 Aug 2017 21:36:24 +0000 (23:36 +0200)]
ether82563: support for i211 with iNVM. (thanks mfny and brennan for testing)

6 years agoawk: allow string as exit status
cinap_lenrek [Sat, 12 Aug 2017 19:34:06 +0000 (21:34 +0200)]
awk: allow string as exit status

6 years agoawk: don't get into a infinite loop with eof while in string (thanks BurnZeZ)
cinap_lenrek [Fri, 11 Aug 2017 01:38:10 +0000 (03:38 +0200)]
awk: don't get into a infinite loop with eof while in string (thanks BurnZeZ)

6 years agokernel: double READSTR buffer size to 8000 bytes for devusb
cinap_lenrek [Thu, 10 Aug 2017 23:32:24 +0000 (01:32 +0200)]
kernel: double READSTR buffer size to 8000 bytes for devusb

6 years agodevusb: superspeed bandwidth allocation handled by controller, skip usbload() calculation
cinap_lenrek [Thu, 10 Aug 2017 23:08:13 +0000 (01:08 +0200)]
devusb: superspeed bandwidth allocation handled by controller, skip usbload() calculation

with xhci, bandwidth allocations are handled by the controller
and there are various speed settings possible that currently
not exposed in the Udev. so just keep usbload() as it is for
usb2 and keep ep->load as zero for superspeed.

6 years agonusb/disk: add a 100ms sleep after ums reset, remove unused note handler, cleanup
cinap_lenrek [Thu, 10 Aug 2017 23:00:09 +0000 (01:00 +0200)]
nusb/disk: add a 100ms sleep after ums reset, remove unused note handler, cleanup

my pretec usb stick sometimes hangs on the first inquiry request,
waiting for the inquiry response forever. adding a 100ms delay after
the reset command seems to fix it.

getting rid of unused "ding()" note handler and simplify umsrequest()
incomplete read handling.