Commit Graph

253182 Commits

Author SHA1 Message Date
msaitoh
8dabdd9fc2 Fix calculation the offset of the Action Table in WDAT to print each
entries correctly.
2017-09-04 07:59:15 +00:00
nat
e68c19236b Remove references to BlueCore.
Enable XON/XOFF flowcontrol in SLIP layer depending on config response.
Send an acknowlegment packet on timeout/retry.
Compute tx{ack,seq} and rx{ack,seq} according to the specification.
2017-09-03 23:11:19 +00:00
nat
866993a422 Fix copyright error.
Ok plunky@.
2017-09-03 22:54:12 +00:00
jmcneill
4738af239e Add 'console=fb' cmdline support. 2017-09-03 13:59:17 +00:00
wiz
2168981001 Fix verb form. 2017-09-03 13:41:19 +00:00
maya
d498d301ce Use a global double to stop GCC from optimizing the test away
Better diagnostic messages
More familiar test for 'even number'
2017-09-03 13:29:55 +00:00
maxv
57b09b2fff Declare onfault_restore, and be stricter with SMEP. 2017-09-03 09:19:51 +00:00
maxv
d87dc9d77e Treat page faults from iretq/etc as fatal, otherwise we could hide kernel
stack bugs. Note that it would be good to call check_swapgs from trap0e,
but a few things need to be fixed before that.
2017-09-03 09:01:03 +00:00
maxv
e62f2ef145 Remove useless debug code, and split trap() into smaller functions, easier
to understand. NMIs take another, faster path now. No functional change
beyond that.
2017-09-03 08:52:18 +00:00
cherry
5589baa825 Remove redundant static function declaration 2017-09-03 06:24:49 +00:00
wiz
d1e94a1225 Remove reference to non-existing mac68k/bm.4. 2017-09-02 22:14:29 +00:00
scole
0ed5cf62e0 Add powermac 7200 to list of supported hardware 2017-09-02 21:27:08 +00:00
jmcneill
c2f505596f Add a simplefb node for H3 SoCs 2017-09-02 17:35:07 +00:00
isaki
05338f8c10 - Finally MI audio supports 4bit precision format without null_filter hack!
- Fix reusing play/rec argument as local variables.  It is in/out parameter.
2017-09-02 15:40:31 +00:00
isaki
afd2573085 Separete sc->sc_pr/rr (mix ring) block size and hwvc->sc_mpr/mrr (hw ring)
block size.  Now MI audio supports(revives) device with different precision
than mix ring's precision like vs(4) (4bit ADPCM).
2017-09-02 15:26:43 +00:00
isaki
eab2ddfde4 Remove duplicated code.
For hwvc, audio_calc_blksize() appears soon again.
For user vc, the userland format and HW format are separeted, so
audio_calc_blksize() here is no longer necessary.  In addition,
vc->sc_mpr.blksize is already initialized in audio_open().
2017-09-02 13:28:11 +00:00
isaki
ae42b57fad Don't assign sc->sc_pr/rr.blksize in audio_initbufs().
For hwvc, it is calculated in audiosetinfno().  And the user vc should
not change sc->sc_pr/rr.blksize.  In addition, this assignments appear twice.
2017-09-02 13:22:51 +00:00
isaki
7f22a55c63 Revert previous local conversion for vs(4). 2017-09-02 12:57:35 +00:00
maxv
5eea203ec8 Fix a subtle ring0 escalation vulnerability in amd64, and implement a
mitigation against similar bugs.

The operations on segment registers can generate a page fault if there is
an issue when touching the in-memory gdt. Theoretically, it is never
supposed to happen, since the gdt is mapped correctly. However, in the
kernel we allow the gdt to be resized, and to do that, we allocate the
maximum amount of va needed by it, but only kenter a few pages until we
need more. Moreover, to avoid reloading the gdt each time we grow it, the
'size' field of gdtr is set to the maximum value. All of this means that
if a mov or iretq is done with a segment register whose index hits a page
that has not been kentered, a page fault is sent.

Such a page fault, if received in kernel mode, does not trigger a swapgs
on amd64; in other words, the kernel would be re-entered with the userland
tls.

And there just happens to be a place in compat_linux32 where the index of
%cs is controlled by userland, making it easy to trigger the page fault
and get kernel privileges.

The mitigation simply consists in abandoning the gdt_grow mechanism and
allocating/kentering the maximum size right away, in such a way that no
page fault can be triggered because of segment registers.
2017-09-02 12:57:03 +00:00
isaki
c939a3b265 - Revert temporary local conversion introduced at rev 1.43.
- But does not revert to trigger method.  trigger method is not suitable for
  x68k ADPCM+DMA mechanism.
- Don't (re)start ADPCM when DMA is running.  This solves the noise.
  From Y.Sugahara.
- Cache dmac xfer.
2017-09-02 12:52:55 +00:00
skrll
5766248861 Perform tracking of unmanaged mappings for VIVT and call vac_me_harder
as appropriate.

PR/52102 shark: ffs_newvnode panic when unpacking sets installing -current

Thanks to Felix Deichmann for bisecting the problem and testing the fix.
2017-09-02 12:24:39 +00:00
skrll
7caa77ab68 KNF 2017-09-02 11:57:09 +00:00
skrll
4b89a6638e Remove an #ifdef PMAP_CACHE_VIVT that's inside #ifdef PMAP_CACHE_VIVT
already
2017-09-02 11:52:30 +00:00
wiz
3e39477b0a Remove trailing whitespace; convert Xr readline to Nm readline, since
we won't get a readline man page in base.
2017-09-02 06:48:10 +00:00
ryoon
58bb514de8 Support some Wacom pen tablets:
* Graphire (pen)
* Graphire2 (pen)
* Intuos2 A4 (pen)
* Intuos Art (pen, no finger touch)

Remove report descriptor override workaround for
Graphire and Graphire2.
2017-09-02 04:35:51 +00:00
macallan
6192e4d1de add iic at pmu and admtemp 2017-09-01 20:58:14 +00:00
macallan
3c8b989b82 support MAX6642 - yet another adm1021 kinda-sorta clone 2017-09-01 20:11:59 +00:00
macallan
83a9b38a52 support I2C bus and direct config of slave devices 2017-09-01 20:10:08 +00:00
msaitoh
5d527485aa Decode the following entries:
- DBG2 (Debug Port Table 2)
 - SPMI (Server Platform Management Interface Table)
 - WDDT (Watchdog Timer Description Table)
 - UEFI (UEFI, not fully decoded yet)
2017-09-01 18:35:50 +00:00
kre
5f35bae3a5 Allow the test to build on systems where sys/mman.h does not provide
PROT_MPROTECT(), or if the test is built without _NETBSD_SOURCE defined,
by providing a dummy #define if the real one does not exist.  The test
might then fail, if the PROT_MPROTECT() is really needed, but that's
better than not building.
2017-09-01 16:51:58 +00:00
kre
70238ca755 Use PROT_MPROTECT() (which would have been better had it been called
PROT_MAXPROTECT or PROT_ALLOWPROTECT or something) on the mmap() call
which specifies PROT_NONE, and which we later want to change to PROT_READ,
otherwise when PAX is enabled, the mprotect() will fail.
2017-09-01 16:27:02 +00:00
skrll
2ca785ae43 Add a missing break that should have been included in revision 1.163.
Spotted by "sc dying" and reported on current-users
2017-09-01 15:19:59 +00:00
christos
f2df1a6a72 more no-error-ssp 2017-09-01 14:38:23 +00:00
christos
27916d7c22 PR/51517: Jay West: Tty settings not restored on exit
PR/51518: Jay West: prompt is interleaved with client output

Both these issues are caused by rl_restore_handler not DTRT; fix
it so that it kills the internal libedit state completely. This is
inefficient, but it works.

Also fix:
1. add append_history()/H_NSAVE_FP
2. call the rl_startup_hook before printing the first prompt as documented.
   callint it from rl_initialize breaks python, because the callback ends
   up being invoked before the readline module is installed, and we end up
   dereferencing a NULL pointer.
3. add el_resize_terminal.

With those changes, s/lreadline/ledit/g in python works.
2017-09-01 10:19:10 +00:00
skrll
1a113622d0 Use the same linker script as sys/arch/hppa/stand/boot and fix the gcc
5.3 problem here as well.
2017-09-01 07:29:56 +00:00
mlelstv
6798bdb86d When resizing nvi in xterm, a scroll region is set with the old size
which garbles the display.

The scroll region is set for a terminfo scroll operation and then
reset to the current window size. While xterm lets you clear a
scroll region, there is no way to do this in terminfo except by
resetting the terminal which has a visual side effect.

Xterm actually clears the scroll region as part of the resize but
that happens before a program gets the SIGWINCH signal. When nvi sees
the SIGWINCH signal, it exits the vi mode using a scroll operation to
tidy up the display before it reenters vi mode with the new window size.

This patch does two things:
- make nvi also invoke a previous SIGWINCH handler (not sufficient,
  but that's how curses wants it).
- skip the tidy up in case of a restart (avoids the scroll region)
2017-09-01 07:21:01 +00:00
christos
77b64f0a5c PR/52516: Guy Incognito: Fix memory leak; setsymtab already calls tostring()
for the buffer, don't do it twice.
XXX: pullup-8
2017-09-01 07:01:06 +00:00
msaitoh
ff98ea4622 - Add "Performance Server" and "Tablet" for Preferred_PM_Profile.
- Don't print FADT_RESET_REG if FADT version is 1.
- Print FADT ArmBootFlags, MinorRevision, SleepControl, SleepStatus and
  HypervisorId.
- Print "{}" even if any flags aren't set.
2017-09-01 05:53:09 +00:00
maya
295a581e4c Disable MSI on DRMKMS (again).
It is causing problems on some older nvidia graphics cards:
http://mail-index.netbsd.org/netbsd-users/2017/08/02/msg020026.html
http://mail-index.netbsd.org/pkgsrc-users/2017/08/26/msg025492.html
PR kern/52440
2017-08-31 23:47:50 +00:00
christos
5106efb953 add vfp 2017-08-31 22:19:51 +00:00
jmcneill
66995669d3 Instead of a Linux keymap, convert Linux event codes to USB scan codes and
use the ukbd keymaps instead.
2017-08-31 19:55:43 +00:00
maxv
4954e9a25d check sc_eip in the ldt branch too 2017-08-31 15:41:14 +00:00
maxv
fbe5cb919d Add a layer of mitigation against the intel sysret vuln: restore %gs when
sysretq faults. Right now we try to make sure that %rip is canonical by
performing sanity checks in several places, but I've already found missing
checks two times already, and there may be others.

By performing an additional swapgs here, we are turning ring0 exploits to
simple DoSes - which are still security bugs, but of a lower impact.
2017-08-31 10:30:58 +00:00
maxv
0f82f494b2 Reorder for clarity, and style. 2017-08-31 09:33:19 +00:00
msaitoh
1c01428a98 Part of FreeBSD r323045:
- Print Valid Field in ACPI_NFIT_CONTROL_REGION with 0x%02x.
 - Fix Flags of ACPI_NFIT_CONTROL_REGION.
2017-08-31 09:27:51 +00:00
maxv
9aa3f48cc3 Construct the trap frame with interrupts disabled, for safety, just like
the rest of the interrupt entry points.
2017-08-31 09:27:28 +00:00
pgoyette
1c284673f6 When adding a new veriexec_file_entry, if an entry already exists with
all the same values (except for the filename) just ignore it.  Otherwise
report the duplicate-entry error.

This allows the user to create a signature file with veriexegen(8) and
not worry about duplicate entries (due to hard-linked files) which will
otherwise cause /etc/rc.d/veriexec to report an error.

Fixes PR kern/52512

XXX Pull-up for -8
2017-08-31 08:47:19 +00:00
msaitoh
287fff2eb1 If _ENABLED flag of ACPI_SRAT_TYPE_CPU_AFFINITY, ACPI_SRAT_TYPE_MEMORY_AFFINITY
or ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY isn't set, don't use the table.
2017-08-31 08:45:03 +00:00
wiz
1209ffc3a2 Revert probably unintentional case changes from previous.
Remove superfluous Tn.
2017-08-31 08:36:32 +00:00
pgoyette
dbfbddfd9b Add a note that some external software is available only via loadable
modules due to licensing concerns.

Also add an additional example of how to build modules only, using
build.sh
2017-08-31 07:47:59 +00:00