Commit Graph

264368 Commits

Author SHA1 Message Date
christos 71d1bfd50f merge conflicts. 2019-01-07 15:43:04 +00:00
christos 8cc77b481a tpm-tools (1.3.9.1)
- Builds with openssl 1.1.0
    - Align code properly so gcc-6 does not complain
    - update symbol file.
    - drop 02-cflags-errors-unused.patch, -Werror is gone.
    - update 03-fix-bool-error-parseStringWithValues.patch, different fix
      upstream, does not look right.

tpm-tools (1.3.8.2)

  * Add patch 03 to fix FTBFS with gcc-5
  * Merge patch 04 to fix FTBFS with clang
    Thanks to Alexander <email address hidden> for the patch.
  * Bump Standards Version to 3.9.6
2019-01-07 15:37:41 +00:00
christos 1cebe59da2 merge conflicts 2019-01-07 15:18:03 +00:00
christos 1023804e38 * TROUSERS_0_3_14
- Changes to support OpenSSL 1.1.0
- Removed some warnings for proper builds
- Changes to allow building on OS X
- Fixed memory leaks
- Fixed failure to recognize connections from localhost over IPv6
- Fixed for an exploitable local denial of service in tcsd

* TROUSERS_0_3_13
- Changed exported functions which had a name too common, to avoid collision
- Assessed daemon security using manual techniques and coverit
- Fixed major security bugs and memory leaks
- Added debug support to run tcsd with a different user/group
- Daemon now properly closes sockets before shutting down

* TROUSERS_0_3_12
- Added new network code for RPC, which supports IPv6
- Users of client applications can configure the hostname of the tcsd server
they want to connect through the TSS_TCSD_HOSTNAME env var (only works if
application didn't set a hostname in the context)
- Added disable_ipv4 and disable_ipv6 config options for server

* TROUSERS_0_3_11
- Fix build process for distros
- License was changed from GPL to BSD
- Many bugfixes
- updated man pages
2019-01-07 14:57:23 +00:00
maxv 7b117cdc82 Optimize: cache the guest state entirely in the VMCB-cache, flush it on a
state-by-state basis when needed.
2019-01-07 14:08:02 +00:00
maxv 960d1f7675 Improvements and fixes:
* Decode AND/OR/XOR from Group1.

 * Sign-extend the immediates and displacements in 64bit mode.

 * Fix the storage of {read,write}_guest_memory, now that we batch certain
   IO operations we can copy more than 8 bytes, and shit hits the fan.

 * Remove the CR4_PSE check in the 64bit MMU. This bit is actually ignored
   in long mode, and some systems (like FreeBSD) don't set it.
2019-01-07 13:47:33 +00:00
martin d473da7064 When writing a kernel core dump, display the countdown w/o timestamps. 2019-01-07 13:10:44 +00:00
martin 0eae8cc98b Introduce new helper printf functions that get passed output
flags. Add a new kprintf flag to avoid adding time stamps
when outputing to the console. Mostly from Christos, any bugs
added by me.

Use above to print the "twiddle" (when using boot -z) without
timestamps.
2019-01-07 13:09:47 +00:00
msaitoh fc0204df06 Fix a bug that rlphy might ignore the link partner's advertised speed. 2019-01-07 05:01:10 +00:00
jakllsch 1b966d8474 Seperate xHCI and xhci(4) TRB structs so as to avoid some of them
(the ones that the hardware doesn't touch) ending up less-aligned
than the compiler assumed.

Additionally, fix the most obvious problems that xhci(4) had on
big endian systems.

Briefly tested on a Jetson TK1 in LE and BE w/ evbarm GENERIC kernel.
2019-01-07 03:00:39 +00:00
scole 693a7a6474 increase MEMORY_DISK_ROOT_SIZE slightly to avoid running out of space
when doing some sysinst options.

Add ahc and rtk options for my testing convenience.  The 601 kernels
are still small enough for netbooting.
2019-01-07 01:44:59 +00:00
msaitoh 909ebfa8a9 Add EEE(802.3az) support for I350, I210, I211, PCH2 and newer.
Not yet for I354(C2000). It'll be supported after implementing MI MII clause
45 register read/write API.
2019-01-07 01:43:22 +00:00
scole 08064bce7b increase IMAGESIZE slightly to avoid running out of space when doing some sysinst options 2019-01-07 01:39:26 +00:00
msaitoh dec2b78651 Add definitions of EEE advertisement(7.60) and EEE LP ability(7.61). 2019-01-07 01:37:05 +00:00
mrg a615742a1c s/1 << 31/1u << 31/.
XXX someone could __BIT() etc this file.
2019-01-07 01:03:05 +00:00
wiz 488e6a2141 Fix edito. 2019-01-06 22:30:02 +00:00
christos ba1213d69a regen 2019-01-06 22:22:02 +00:00
christos 6210d3c848 PR/53838: Scole Mail: OPENSSL_rdtsc() is reading a time counter
for randomness, and the powerpc code uses mftbu and mftb for access.
The 601 is different than other powerpcs. It doesn't have a time
base register (TBR), but a real time clock (RTC) so it needs to
use different calls like mfrtcu/mfrtcl instead.
2019-01-06 22:20:50 +00:00
joerg 06c9aa1116 When loading a non-PIE main binary, the virtual address must match.
Use MAP_TRYFIXED and verify that the result matches the expectation.
2019-01-06 19:44:54 +00:00
leot b0eace3d3a Adjust year in latest acpi(4) entry 2019-01-06 18:56:52 +00:00
maxv d89486b06d Add more VMCB fields. Also remove debugging code I mistakenly committed
in the previous revision. No functional change.
2019-01-06 18:32:54 +00:00
christos 3e93b12a17 now that our profiled c library is pic, we can use it in shared objects 2019-01-06 18:15:53 +00:00
christos a493019100 now that our profiled c library is pic we can use it in shared objects 2019-01-06 18:15:18 +00:00
christos f0d7eb24ef use the pico objects if we are making a PIC profiled library. 2019-01-06 18:14:10 +00:00
christos 9d350ea742 Since g++ uses stdc++_p when building with -pg make this PIC on the
platforms where PIC is available, so that linking shared objects with
-pg works, without needing to create a shared library version of the
profiled libraries.
2019-01-06 17:02:32 +00:00
maxv 4975c81e6c Flush the host TLB too when dealing with a guest pmap. The pmap is not
active on the host so the pages aren't cached; but the recursive PTE
entries may have been cached by our pmap code.
2019-01-06 16:19:12 +00:00
maxv 3426341fca Handle the NVMM signature. 2019-01-06 16:13:51 +00:00
maxv 809327425b Improvements and fixes in NVMM.
Kernel driver:

 * Don't take an extra (unneeded) reference to the UAO.

 * Provide npc for HLT. I'm not really happy with it right now, will
   likely be revisited.

 * Add the INT_SHADOW, INT_WINDOW_EXIT and NMI_WINDOW_EXIT states. Provide
   them in the exitstate too.

 * Don't take the TPR into account when processing INTs. The virtualizer
   can do that itself (Qemu already does).

 * Provide a hypervisor signature in CPUID, and hide SVM.

 * Ignore certain MSRs. One special case is MSR_NB_CFG in which we set
   NB_CFG_INITAPICCPUIDLO. Allow reads of MSR_TSC.

 * If the LWP has pending signals or softints, leave, rather than waiting
   for a rescheduling to happen later. This reduces interrupt processing
   time in the guest (Qemu sends a signal to the thread, and now we leave
   right away). This could be improved even more by sending an actual IPI
   to the CPU, but I'll see later.

Libnvmm:

 * Fix the MMU translation of large pages, we need to add the lower bits
   too.

 * Change the IO and Mem structures to take a pointer rather than a
   static array. This provides more flexibility.

 * Batch together the str+rep IO transactions. We do one big memory
   read/write, and then send the IO commands to the hypervisor all at
   once. This considerably increases performance.

 * Decode MOVZX.

With these changes in place, Qemu+NVMM works. I can install NetBSD 8.0
in a VM with multiple VCPUs, connect to the network, etc.
2019-01-06 16:10:51 +00:00
christos 35e98a8f6c restore original now that weak symbols are gone 2019-01-06 15:37:17 +00:00
cherry afc1468241 Rollback http://mail-index.netbsd.org/source-changes/2018/12/22/msg101629.html
This change breaks module loading due to weak alias being unsupported
in the kernel module linker.

Requested by maxv@ and others as it affects their work.

No immediate decision on a replacement method is available, but other options
suggested include pre-processing, conditional compilation (#ifdef etc) and other
source level methods to avoid linktime decision making.
2019-01-06 14:35:31 +00:00
phx e3f4d9311c Only execute dssall when the CPU has the Altivec instruction set extension. 2019-01-06 11:20:53 +00:00
martin afdad64472 Fix a potential NULL deref in previous - some menus start up with no
"opts" array allocated yet.
2019-01-06 11:08:34 +00:00
uwe 5b2acdab92 _wnoutrefresh - extend current position checks.
Also verify that dwin->cury >= begy (ditto for x), i.e. for pads make
sure that the current position is after the beginning of the displayed
portion.  While here refactor the checks for better readability.

We should probably combine the y and x checks b/c if one of them is
not in the range, the current position as a whole is not in the range
and it doesn't make sense to pick and set just the y or just the x
part of it.
2019-01-06 04:27:53 +00:00
uwe aa9d3f22ec _wnoutrefresh - fix current position checks for pads
maxy is an absolute value and should not be adjusted for begy when we
check also absolute cury.  Note that this change does not affect
calculations for normal windows as for them we always pass zero for
begy.  Ditto for x.
2019-01-06 03:59:17 +00:00
uwe 182a153ef7 prefresh - fix current position calculations
The code was copy-pasted from wrefresh(), but for pads we need to
adjust for (pbegy, pbegx).

PR lib/53801
2019-01-06 03:46:11 +00:00
christos ab87f51e55 PR/53837: Michael Scholz: src/bin/csh/func.c from current has a superfluous
fprintf
2019-01-06 01:22:50 +00:00
rin 21cad18f46 Fix kernel panic on arm reported by @furandon_pig on Twitter.
Hardware header is 2-byte aligned in RX buffer, not 4-byte.
For some architectures, __builtin_memcpy() of GCC 6 attempts to
copy 4-byte header at once, which results in alignment error.
2019-01-06 00:39:05 +00:00
christos 3ef653e5a8 don't cast pointers poorly. 2019-01-06 00:31:35 +00:00
tnn ae040fe7bf fence_referenced_p(): mark as __diagused 2019-01-05 22:24:24 +00:00
maxv 249407ab79 Apply amd64/kobj_machdep.c::rev1.7 to the prekern too, to fix the
relocation with updated binutils.
2019-01-05 22:11:07 +00:00
christos b327a76856 new tmux 2019-01-05 21:49:45 +00:00
christos bbcbdf2329 update tmux and other things that have moved. 2019-01-05 21:49:10 +00:00
christos 1761a60c58 sync with most recent (no changes) 2019-01-05 21:47:40 +00:00
christos c7e17de0c2 resolve conflicts 2019-01-05 21:44:40 +00:00
christos 8f3b94834e CHANGES FROM 2.7 to 2.8
* Make display-panes block the client until a pane is chosen or it
  times out.

* Clear history on RIS like most other terminals do.

* Add an "Any" key to run a command if a key is pressed that is not
  bound in the current key table.

* Expand formats in load-buffer and save-buffer.

* Add a rectangle_toggle format.

* Add set-hook -R to run a hook immediately.

* Add README.ja.

* Add pane focus hooks.

* Allow any punctuation as separator for s/x/y not only /.

* Improve resizing with the mouse (fix resizing the wrong pane in some
  layouts, and allow resizing multiple panes at the same time).

* Allow , and } to be escaped in formats as #, and #}.

* Add KRB5CCNAME to update-environment.

* Change meaning of -c to display-message so the client is used if it
  matches the session given to -t.

* Fixes to : form of SGR.

* Add x and X to choose-tree to kill sessions, windows or panes.

CHANGES FROM 2.6 TO 2.7

* Remove EVENT_* variables from environment on platforms where tmux uses them
  so they do not pass on to panes.

* Fixes for hooks at server exit.

* Remove SGR 10 (was equivalent to SGR 0 but no other terminal seems to do
  this).

* Expand formats in window and session names.

* Add -Z flag to choose-tree, choose-client, choose-buffer to automatically
  zoom the pane when the mode is entered and unzoom when it exits, assuming the
  pane is not already zoomed. This is now part of the default key bindings.

* Add C-g to exit modes with emacs keys.

* Add exit-empty option to exit server if no sessions (defaults to on).

* Show if a filter is present in choose modes.

* Add pipe-pane -I to to connect stdin of the child process.

* Performance improvements for reflow.

* Use RGB terminfo(5) capability to detect RGB colour terminals (the existing
  Tc extension remains unchanged).

* Support for ISO colon-separated SGR sequences.

* Add select-layout -E to spread panes out evenly (bound to E key).

* Support wide characters properly when reflowing.

* Pass PWD to new panes as a hint to shells, as well as calling chdir().

* Performance improvements for the various choose modes.

* Only show first member of session groups in tree mode (-G flag to choose-tree
  to show all).

* Support %else in config files to match %if; from Brad Town in GitHub issue
  1071.

* Fix "kind" terminfo(5) capability to be S-Down not S-Up.

* Add a box around the preview label in tree mode.

* Show exit status and time in the remain-on-exit pane text; from Timo
  Boettcher in GitHub issue 1103.

* Correctly use pane-base-index in tree mode.

* Change the allow-rename option default to off.

* Support for xterm(1) title stack escape sequences (GitHub issue 1075 from
  Brad Town).

* Correctly remove padding cells to fix a UTF-8 display problem (GitHub issue
  1090).
2019-01-05 21:32:48 +00:00
christos 86179944e8 new acpica 2019-01-05 20:42:09 +00:00
christos 69d7b046d8 add normal debug level 2019-01-05 20:40:26 +00:00
christos e81f24883d new file 2019-01-05 20:40:05 +00:00
christos 7efa3256bf - merge conflicts
- change default debug level to normal; the evaluation trace is too noisy
2019-01-05 20:39:48 +00:00
christos 4c4e8184d0 13 December 2018. Summary of changes for version 20181213:
1) ACPICA Kernel-resident Subsystem:

Fixed some buffer length issues with the GenericSerialBus, related to two
of the bidirectional protocols: AttribRawProcessBytes and AttribRawBytes,
which are rarely seen in the field. For these, the LEN field of the ASL
buffer is now ignored. Hans de Goede

Implemented a new object evaluation trace mechanism for control methods
and data objects. This includes nested control methods. It is
particularly useful for examining the ACPI execution during system
initialization since the output is relatively terse. The flag below
enables the output of the trace via the ACPI_DEBUG_PRINT_RAW interface:
   #define ACPI_LV_EVALUATION          0x00080000

Examples:
   Enter evaluation       :  _SB.PCI0._INI (Method)
   Exit evaluation        :  _SB.PCI0._INI
   Enter evaluation       :  _OSI (Method)
   Exit evaluation        :  _OSI
   Enter evaluation       :  _SB.PCI0.TEST (Method)
   Nested method call     :     _SB.PCI0.NST1
   Exit nested method     :     _SB.PCI0.NST1
   Exit evaluation        :  _SB.PCI0.TEST

Added two recently-defined _OSI strings. See
https://docs.microsoft.com/en-us/windows-hardware/drivers/acpi/winacpi-
osi.
   "Windows 2018"
   "Windows 2018.2"

Update for buffer-to-string conversions via the ToHexString ASL operator.
A "0x" is now prepended to each of the hex values in the output string.
This provides compatibility with other ACPI implementations. The ACPI
specification is somewhat vague on this issue.
   Example output string after conversion:
"0x01,0x02,0x03,0x04,0x05,0x06"

Return a run-time error for TermArg expressions within individual package
elements. Although this is technically supported by the ASL grammar,
other ACPI implementations do not support this either. Also, this fixes a
fault if this type of construct is ever encountered (it never has been).


2) iASL Compiler/Disassembler and Tools:

iASL: Implemented a new compile option (-ww) that will promote individual
warnings and remarks to errors. This is intended to enhance the firmware
build process.

AcpiExec: Implemented a new command-line option (-eo) to support the new
object evaluation trace mechanism described above.

Disassembler: Added support to disassemble OEMx tables as AML/ASL tables
instead of a "unknown table" message.

AcpiHelp: Improved support for the "special" predefined names such as
_Lxx, _Exx, _EJx, _T_x, etc. For these, any legal hex value can now be
used for "xx" and "x".

----------------------------------------
31 October 2018. Summary of changes for version 20181031:


An Operation Region regression was fixed by properly adding address
ranges to a global list during initialization. This allows OS to
accurately check for overlapping regions between native devices (such as
PCI) and Operation regions as well as checking for region conflicts
between two Operation Regions.

Added support for the 2-byte extended opcodes in the code/feature that
attempts to continue parsing during the table load phase. Skip parsing
Device declarations (and other extended opcodes) when an error occurs
during parsing. Previously, only single-byte opcodes were supported.

Cleanup: Simplified the module-level code support by eliminating a
useless global variable (AcpiGbl_GroupModuleLeveCode).


2) iASL Compiler/Disassembler and Tools:

iASL/Preprocessor: Fixed a regression where an incorrect use of ACPI_FREE
could cause a fault in the preprocessor. This was an inadvertent side-
effect from moving more allocations/frees to the local cache/memory
mechanism.

iASL: Enhanced error detection by validating that all NameSeg elements
within a NamePatch actually exist. The previous behavior was spotty at
best, and such errors could be improperly ignored at compiler time (never
at runtime, however. There are two new error messages, as shown in the
examples below:

dsdt.asl     33:     CreateByteField (TTTT.BXXX, 1, CBF1)
Error    6161 -                              ^ One or more objects within
the Pathname do not exist (TTTT.BXXX)

dsdt.asl     34:     CreateByteField (BUF1, UUUU.INT1, BBBB.CBF1)
Error    6160 -        One or more prefix Scopes do not exist ^
(BBBB.CBF1)

iASL: Disassembler/table-compiler: Added support for the static data
table TPM2 revision 3 (an older version of TPM2). The support has been
added for the compiler and the disassembler.

Fixed compilation of DOS format data table file on Unix/Linux systems.
iASL now properly detects line continuations (\) for DOS format data
table definition language files on when executing on Unix/Linux.

----------------------------------------
03 October 2018. Summary of changes for version 20181003:


2) iASL Compiler/Disassembler and Tools:

Fixed a regression introduced in version 20180927 that could cause the
compiler to fault, especially with NamePaths containing one or more
carats (^). Such as: ^^_SB_PCI0

Added a new remark for the Sleep() operator when the sleep time operand
is larger than one second. This is a very long time for the ASL/BIOS code
and may not be what was intended by the ASL writer.

----------------------------------------
27 September 2018. Summary of changes for version 20180927:


1) ACPICA kernel-resident subsystem:

Updated the GPE support to clear the status of all ACPI events when
entering any/all sleep states in order to avoid premature wakeups. In
theory, this may cause some wakeup events to be missed, but the
likelihood of this is small. This change restores the original behavior
of the ACPICA code in order to fix a regression seen from the previous
"Stop unconditionally clearing ACPI IRQs during suspend/resume" change.
This regression could cause some systems to incorrectly wake immediately.

Updated the execution of the _REG methods during initialization and
namespace loading to bring the behavior into closer conformance to the
ACPI specification and other ACPI implementations:

From the ACPI specification 6.2A, section 6.5.4 "_REG (Region):
    "Control methods must assume all operation regions are inaccessible
until the _REG(RegionSpace, 1) method is executed"

    "The exceptions to this rule are:
1.  OSPM must guarantee that the following operation regions are always
accessible:
    SystemIO operation regions.
    SystemMemory operation regions when accessing memory returned by the
System Address Map reporting interfaces."

Since the state of both the SystemIO and SystemMemory address spaces are
defined by the specification to never change, this ACPICA change ensures
that now _REG is never called on them. This solves some problems seen in
the field and provides compatibility with other ACPI implementations. An
update to the upcoming new version of the ACPI specification will help
clarify this behavior.

Updated the implementation of support for the Generic Serial Bus. For the
"bidirectional" protocols, the internal implementation now automatically
creates a return data buffer of the maximum size (255). This handles the
worst-case for data that is returned from the serial bus handler, and
fixes some problems seen in the field. This new buffer is directly
returned to the ASL. As such, there is no true "bidirectional" buffer,
which matches the ACPI specification. This is the reason for the "double
store" seen in the example ASL code in the specification, shown below:

Word Process Call (AttribProcessCall):
    OperationRegion(TOP1, GenericSerialBus, 0x00, 0x100)
    Field(TOP1, BufferAcc, NoLock, Preserve)
    {
        FLD1, 8, // Virtual register at command value 1.
    }

    Name(BUFF, Buffer(20){}) // Create GenericSerialBus data buffer
                             // as BUFF
    CreateWordField(BUFF, 0x02, DATA) // DATA = Data (Word)

    Store(0x5416, DATA)               // Save 0x5416 into the data buffer
    Store(Store(BUFF, FLD1), BUFF)    // Invoke a write/read Process Call
transaction
                           // This is the "double store". The write to
                           // FLD1 returns a new buffer, which is stored
                           // back into BUFF with the second Store.


2) iASL Compiler/Disassembler and Tools:

iASL: Implemented detection of extraneous/redundant uses of the Offset()
operator within a Field Unit list. A remark is now issued for these. For
example, the first two of the Offset() operators below are extraneous.
Because both the compiler and the interpreter track the offsets
automatically, these Offsets simply refer to the current offset and are
unnecessary. Note, when optimization is enabled, the iASL compiler will
in fact remove the redundant Offset operators and will not emit any AML
code for them.

    OperationRegion (OPR1, SystemMemory, 0x100, 0x100)
    Field (OPR1)
    {
        Offset (0),     // Never needed
        FLD1, 32,
        Offset (4),     // Redundant, offset is already 4 (bytes)
        FLD2, 8,
        Offset (64),    // OK use of Offset.
        FLD3, 16,
    }
dsdt.asl     14:         Offset (0),
Remark   2158 -                 ^ Unnecessary/redundant use of Offset
operator

dsdt.asl     16:         Offset (4),
Remark   2158 -                 ^ Unnecessary/redundant use of Offset
operator
2019-01-05 20:37:15 +00:00