Link [ NetBSD | NetBSD OpenGrok source search | PR fulltext-search | Summary of daily snapshot builds | history of daily build result | pkgsrc commit viewer ]


   
        usage: [branch:branch] [user:user] [path@revision] keyword [... [-excludekeyword [...]]] (e.g. branch:MAIN sys/arch/arm, if_wm.c@1.234 )




switch to index mode

recent branches: MAIN (2h)  netbsd-10 (6d)  netbsd-9 (6d)  netbsd-8 (11d) 

2024-05-23 05:21:59 UTC Now

2020-10-27 08:32:36 UTC MAIN commitmail json YAML

Add tests for AVX-512 registers (zmm0..zmm31, k0..7)

Thanks to David Seifert <soap@gentoo.org> for providing a VM
on an AVX-512 capable hardware

Reviewed by kamil

(mgorny)

2020-10-24 09:01:56 UTC MAIN commitmail json YAML

Fix compat with Linux programs that use longer namelen for sockets

Linux is less strict than NetBSD and permits namelen to be larger
than valid struct sockaddr_in*.  If this is the case, truncate the value
to the correct size, so that NetBSD networking does not return an error.

Reviewed by kamil

(mgorny)

2020-10-24 07:14:30 UTC MAIN commitmail json YAML

Issue 64-bit versions of *XSAVE* for 64-bit amd64 programs

When calling FXSAVE, XSAVE, FXRSTOR, ... for 64-bit programs on amd64
use the 64-suffixed variant in order to include the complete FIP/FDP
registers in the x87 area.

The difference between the two variants is that the FXSAVE64 (new)
variant represents FIP/FDP as 64-bit fields (union fp_addr.fa_64),
while the legacy FXSAVE variant uses split fields: 32-bit offset,
16-bit segment and 16-bit reserved field (union fp_addr.fa_32).
The latter implies that the actual addresses are truncated to 32 bits
which is insufficient in modern programs.

The change is applied only to 64-bit programs on amd64.  Plain i386
and compat32 continue using plain FXSAVE.  Similarly, NVMM is not
changed as I am not familiar with that code.

This is a potentially breaking change.  However, I don't think it likely
to actually break anything because the data provided by the old variant
were not meaningful (because of the truncated pointer).

(mgorny)

2020-10-16 08:51:12 UTC MAIN commitmail json YAML

Remove leftover commented out #if 0

(mgorny)

2020-10-16 07:12:26 UTC MAIN commitmail json YAML

Try to fix tests/sys/x86 again

Thank to Martin Husemann for the suggestion.

(mgorny)

2020-10-15 22:15:08 UTC MAIN commitmail json YAML

2020-10-15 17:44:45 UTC MAIN commitmail json YAML

2020-10-15 17:43:30 UTC MAIN commitmail json YAML

Remove unnecessary <sys/systm.h> include

(mgorny)

2020-10-15 17:43:09 UTC MAIN commitmail json YAML

Fix s87_tw reconstruction to correctly indicate register states

Fix the code reconstructing s87_tw (full tag word) from fx_sw (abridged
tag word) to correctly represent all register states.  The previous code
only distinguished between empty/non-empty registers, and assigned
'regular value' to all non-empty registers.  The new code explicitly
distinguishes the two other tag word values: empty and special.

(mgorny)

2020-10-15 17:42:31 UTC MAIN commitmail json YAML

Revert "Merge convert_xmm_s87.c into fpu.c"

I am going to add ATF tests for these two functions, and having them
in a separate file will make it more convenient to build and run them
in userspace.

(mgorny)

2020-10-15 17:40:14 UTC MAIN commitmail json YAML

Revert "Merge convert_xmm_s87.c into fpu.c"

I am going to add ATF tests for these two functions, and having them
in a separate file will make it more convenient to build and run them
in userspace.

(mgorny)

2020-10-15 17:38:41 UTC MAIN commitmail json YAML

9.99.74 changes ptrace_machdep_dorequest() to fix LWP support

(mgorny)

2020-10-15 17:37:36 UTC MAIN commitmail json YAML

Fix the machine-dependent ptrace requests to respect LWP number

Fix the machine-dependent ptrace register-related requests (e.g.
PT_GETXMMREGS, PT_GETXSTATE on x86) to correctly respect the LWP number
passed as the data argument.  Before this change, these requests
did not operate on the requested LWP of a multithreaded program.

This change required moving ptrace_update_lwp() out of unit scope,
and changing ptrace_machdep_dorequest() function to take a pointer
to pointer as the second argument, consistently with ptrace_regs().

I am planning to extend the ATF ptrace() register tests in the future
to check for regressions in multithreaded programs, as time permits.

Reviewed by kamil.

(mgorny)

2020-10-09 17:43:30 UTC MAIN commitmail json YAML

Add tests for x87 FPU registers

Reviewed by kamil

(mgorny)

2020-10-09 17:43:07 UTC MAIN commitmail json YAML

Rename MM_REG macro to ST_MAN, and cover fpr/xstate with it

Rename the MM_REG macro to ST_MAN, to make it clearer that it gets
mantissa of ST registers which overlaps with MM registers but can be
also used to read ST registers (to be used in the next commit).  Extend
it to cover the difference between GETFPREGS and GETXSTATE,
and therefore avoid additional condition on i386.

Reviewed by kamil.

(mgorny)

2020-03-08 22:42:35 UTC MAIN commitmail json YAML

2020-03-08 22:27:38 UTC MAIN commitmail json YAML

Bump new libc minor due to new errno codes

(mgorny)

2020-03-08 22:19:15 UTC MAIN commitmail json YAML

Bump kernel version after errno changes in compat and nfs

(mgorny)

2020-03-08 22:12:43 UTC MAIN commitmail json YAML

Update NFS errno mapping and add assert for correctness

Add the mapping for errno values missing in nfsrv_v2errmap[].  While
at it, add a compile-time assert to make sure that the array does not
become out-of-date again.

(mgorny)

2020-03-08 22:11:48 UTC MAIN commitmail json YAML

Update dtrace errno.d mapping and add a script for it

Add a new script to autogenerate errno.d from errno.h, and use it
to regenerate the list to match NetBSD errno codes.

(mgorny)

2020-03-08 22:11:08 UTC MAIN commitmail json YAML

src/external/gpl3/gcc.old/lib/libstdc++-v3/arch/aarch64/c++config.h@1.7 / diff / nxr@1.7
src/external/gpl3/gcc.old/lib/libstdc++-v3/arch/alpha/c++config.h@1.14 / diff / nxr@1.14
src/external/gpl3/gcc.old/lib/libstdc++-v3/arch/arm/c++config.h@1.14 / diff / nxr@1.14
src/external/gpl3/gcc.old/lib/libstdc++-v3/arch/armeb/c++config.h@1.14 / diff / nxr@1.14
src/external/gpl3/gcc.old/lib/libstdc++-v3/arch/coldfire/c++config.h@1.9 / diff / nxr@1.9
src/external/gpl3/gcc.old/lib/libstdc++-v3/arch/earm/c++config.h@1.14 / diff / nxr@1.14
src/external/gpl3/gcc.old/lib/libstdc++-v3/arch/earmeb/c++config.h@1.14 / diff / nxr@1.14
src/external/gpl3/gcc.old/lib/libstdc++-v3/arch/earmhf/c++config.h@1.14 / diff / nxr@1.14
src/external/gpl3/gcc.old/lib/libstdc++-v3/arch/earmhfeb/c++config.h@1.14 / diff / nxr@1.14
src/external/gpl3/gcc.old/lib/libstdc++-v3/arch/earmv4/c++config.h@1.14 / diff / nxr@1.14
src/external/gpl3/gcc.old/lib/libstdc++-v3/arch/earmv4eb/c++config.h@1.14 / diff / nxr@1.14
src/external/gpl3/gcc.old/lib/libstdc++-v3/arch/earmv6/c++config.h@1.14 / diff / nxr@1.14
src/external/gpl3/gcc.old/lib/libstdc++-v3/arch/earmv6eb/c++config.h@1.14 / diff / nxr@1.14
src/external/gpl3/gcc.old/lib/libstdc++-v3/arch/earmv6hf/c++config.h@1.14 / diff / nxr@1.14
src/external/gpl3/gcc.old/lib/libstdc++-v3/arch/earmv6hfeb/c++config.h@1.14 / diff / nxr@1.14
src/external/gpl3/gcc.old/lib/libstdc++-v3/arch/earmv7/c++config.h@1.14 / diff / nxr@1.14
src/external/gpl3/gcc.old/lib/libstdc++-v3/arch/earmv7eb/c++config.h@1.14 / diff / nxr@1.14
src/external/gpl3/gcc.old/lib/libstdc++-v3/arch/earmv7hf/c++config.h@1.14 / diff / nxr@1.14
src/external/gpl3/gcc.old/lib/libstdc++-v3/arch/earmv7hfeb/c++config.h@1.14 / diff / nxr@1.14
src/external/gpl3/gcc.old/lib/libstdc++-v3/arch/hppa/c++config.h@1.14 / diff / nxr@1.14
      :
(more 58 files)
Enable EOWNERDEAD & ENOTRECOVERABLE in libstdc++

(mgorny)

2020-03-08 22:09:43 UTC MAIN commitmail json YAML

PR standards/44921: Add errno consts for robust mutexes

Add the two missing errno.h constants: EOWNERDEAD and ENOTRECOVERABLE.
While technically they're used for robust mutexes which we do not
support at the moment, they are listed in POSIX and used by libc++.
While libc++ can be made to build without it, it just locally redefines
the values then, so we may as well define them globally.

(mgorny)

2020-03-08 22:08:46 UTC MAIN commitmail json YAML

2020-03-08 22:06:06 UTC MAIN commitmail json YAML

Sync signal messages between catalog and sys_siglist

(mgorny)

2020-03-08 22:05:41 UTC MAIN commitmail json YAML

Sync errno messages between catalog and errno.h

(mgorny)

2020-02-29 20:44:16 UTC MAIN commitmail json YAML

Workaround build failure due to -Werror=format-nonliteral

Reviewed by kamil.

(mgorny)

2020-02-13 15:27:41 UTC MAIN commitmail json YAML

Enable combined breakpoint, watchpoint and signal tests

(mgorny)

2020-02-13 15:27:25 UTC MAIN commitmail json YAML

2020-02-13 15:27:05 UTC MAIN commitmail json YAML

Extend concurrent events test to breakpoints

Add testing for concurrent breakpoint hits.  The code is currently
x86-specific but since it reuses most of the generic concurrent event
test code, it's put in t_ptrace_wait.c with arch-specific hooks.

(mgorny)

2020-02-13 15:26:45 UTC MAIN commitmail json YAML

Include LWP events in concurrent event test

LWP events will be necessary when breakpoint/watchpoint support is added
to the test.  However, they also benefit us by testing whether TRAP_LWP
events do not break signal reporting.

(mgorny)

2020-02-13 15:26:18 UTC MAIN commitmail json YAML

Test whether signal handler is called in concurrent bombarding

(mgorny)

2020-02-13 15:25:58 UTC MAIN commitmail json YAML

Extend concurrent signal tests to pass signal back to the thread

(mgorny)

2020-02-13 15:25:29 UTC MAIN commitmail json YAML

Generalize thread_concurrent_signals to a generic factory

Build thread_concurrent_signals on a generic parametrized
thread_concurrent_test() function.  At first, this permits adjusting
the number of running signal threads but in the followup commits
support for different concurrent events (breakpoints, watchpoints)
and different signal handling will be added.

(mgorny)

2020-01-22 16:07:40 UTC MAIN commitmail json YAML

Fix using gcc's unwind.h

(mgorny)

2020-01-22 15:10:32 UTC MAIN commitmail json YAML

Install gcc's unwind.h instead of libexecinfo's

The prototypes in libexecinfo's unwind.h do not match those commonly
used (e.g. by gcc, clang, GNU libunwind, LLVM libunwind...), causing
C++ programs to fail to build on type mismatches (e.g. compiler-rt,
libc++abi).  Rather than providing our own header, reuse the one
included in gcc.

(mgorny)

2020-01-08 17:23:34 UTC MAIN commitmail json YAML

Add tests for reading registers from x86 core dumps

(mgorny)

2020-01-08 17:23:15 UTC MAIN commitmail json YAML

Combine x86 register tests into unified test function

Reduce the code duplication and improve maintainability of x86 register
tests by combining all of them to a single base function.

(mgorny)

2020-01-08 17:22:40 UTC MAIN commitmail json YAML

Fix alignment when reading core notes

Both desc and note header needs to be aligned.  Therefore, we need
to realign after skipping past desc as well.

While at it, fix the other alignment fix to use roundup() macro.

(mgorny)

2020-01-08 17:21:38 UTC MAIN commitmail json YAML

Include XSTATE note in x86 core dumps

Introduce a simple COREDUMP_MACHDEP_LWP_NOTES logic to provide machdep
API for injecting per-LWP notes into coredumps, and use it to append
PT_GETXSTATE note.

Since the XSTATE block uses the same format on i386 and amd64, the code
does not have to conditionalize between 32-bit and 64-bit ELF format
on that.  However, it does need to distinguish between 32-bit and 64-bit
PT_* values.  In order to do that, it reuses PT32_* constant already
present for ptrace(), and adds a matching PT64_GETXSTATE to satisfy
the cpp logic.

(mgorny)

2019-10-21 17:07:01 UTC MAIN commitmail json YAML

Fix a race condition when handling concurrent LWP signals and add a test

Fix a race condition that caused PT_GET_SIGINFO to return incorrect
information when multiple signals were delivered concurrently
to different LWPs.  Add a regression test that verifies that when 50
threads concurrently use pthread_kill() on themselves, the debugger
receives all signals with correct information.

The kernel uses separate signal queues for each LWP.  However,
the signal context used to implement PT_GET_SIGINFO is stored in 'struct
proc' and therefore common to all LWPs in the process.  Previously,
this member was filled in kpsignal2(), i.e. when the signal was sent.
This meant that if another LWP managed to send another signal
concurrently, the data was overwritten before the process was stopped.

As a result, PT_GET_SIGINFO did not report the correct LWP and signal
(it could even report a different signal than wait()).  This can be
quite reliably reproduced with the number of 20 LWPs, however it can
also occur with 10.

This patch moves setting of signal context to issignal(), just before
the process is actually stopped.  The data is taken from per-LWP
or per-process signal queue.  The added test confirms that the debugger
correctly receives all signals, and PT_GET_SIGINFO reports both correct
LWP and signal number.

Reviewed by kamil.

(mgorny)

2019-07-30 20:18:11 UTC MAIN commitmail json YAML

Include pe_lwp member in 'struct ptrace_state'

Reviewed by kamil.

(mgorny)

2019-07-11 03:30:01 UTC MAIN commitmail json YAML

Fix thinko: syscalls -> signals

(mgorny)

2019-07-10 19:51:14 UTC MAIN commitmail json YAML

Improve/fix doc of PT_SETSTEP and PT_CLEARSTEP.

Reviewed by kamil.

(mgorny)

2019-07-10 19:03:47 UTC MAIN commitmail json YAML

Fix typo: SIGRAP -> SIGTRAP

(mgorny)

2019-06-30 21:20:04 UTC MAIN commitmail json YAML

Add a test for verifying procinfo note inside coredumps.

Add a first test for triggering a core dump in the debugged process
(via PT_DUMPCORE) and verifying it.  The test finds procinfo note
and checks its contents.

The core dump is processed through libelf.  However, it only provides
for finding all note segments (or sections?).  I had to implement
finding and processing individual notes myself.  I've added
a core_find_note() function that will be reused in future tests.

Reviewed by kamil.

(mgorny)

2019-06-26 12:30:13 UTC MAIN commitmail json YAML

Implement PT_GETXSTATE and PT_SETXSTATE

Introduce two new ptrace() requests: PT_GETXSTATE and PT_SETXSTATE,
that provide access to the extended (and extensible) set of FPU
registers on amd64 and i386.  At the moment, this covers AVX (YMM)
and AVX-512 (ZMM, opmask) registers.  It can be easily extended
to cover further register types without breaking backwards
compatibility.

PT_GETXSTATE issues the XSAVE instruction with all kernel-supported
extended components enabled.  The data is copied into 'struct xstate'
(which -- unlike the XSAVE area itself -- has stable format
and offsets).

PT_SETXSTATE issues the XRSTOR instruction to restore the register
values from user-provided 'struct xstate'.  The function replaces only
the specific XSAVE components that are listed in 'xs_rfbm' field,
making it possible to issue partial updates.

Both syscalls take a 'struct iovec' pointer rather than a direct
argument.  This requires the caller to explicitly specify the buffer
size.  As a result, existing code will continue to work correctly
when the structure is extended (performing partial reads/updates).

(mgorny)

2019-06-26 12:29:01 UTC MAIN commitmail json YAML

Fetch XSAVE area component offsets and sizes when initializing x86 CPU

Introduce two new arrays, x86_xsave_offsets and x86_xsave_sizes,
and initialize them with XSAVE area component offsets and sizes queried
via CPUID.  This will be needed to implement getters and setters for
additional register types.

While at it, add XSAVE_* constants corresponding to specific XSAVE
components.

(mgorny)

2019-06-04 16:30:19 UTC MAIN commitmail json YAML

compat32: Implement PT_GETDBREGS and PT_SETDBREGS

Uncomment and improve the implementation of compat32 support for
PT_GETDBREGS and PT_SETDBREGS requests.

The new implementation uses x86_dbregs_read() and x86_dbregs_write()
function instead of accessing pcb directly.  While this might be
a little slower, it guarantees that the needed pcb field is allocated
correctly.

Furthermore, the code introduces necessary sanity checks
for PT_SETDBREGS arguments.

(mgorny)

2019-06-04 16:29:53 UTC MAIN commitmail json YAML

compat32: Translate userland PT_* request values into kernel codes

Currently, the compat32 passes PT_* request values to kernel functions
without translation.  This works fine for low PT_* requests that happen
to have the same values both on i386 and amd64.  However, for requests
higher than PT_SETFPREGS, the value passed from userland (matching i386
const) does not match the correct kernel (amd64) request.  As a result,
e.g. when compat32 process calls PT_GETDBREGS, kernel actually processes
it as PT_SETSTEP.

To resolve this, introduce support for compat32 PT_* request
translation.  The interface is based on PTRACE_TRANSLATE_REQUEST32 macro
that is defined to a mapping function on architectures needing it.
In case of amd64, this function maps userland i386 PT_* values into
appropriate amd64 PT_* values.

For the time being, the two additional PT_GETXMMREGS and PT_SETXMMREGS
requests are unsupported due to lack of matching free amd64 constant.

(mgorny)

2019-06-04 12:17:42 UTC MAIN commitmail json YAML

Fix alignment of SSE filling data

(mgorny)

2019-06-04 12:17:05 UTC MAIN commitmail json YAML

2019-05-10 21:08:26 UTC MAIN commitmail json YAML

Fix typo: PT_GETFOREGS -> PT_GETFPREGS (NFC)

(mgorny)

2019-05-10 18:07:10 UTC MAIN commitmail json YAML

Add PT_SET*REGS tests for mm/xmm registers.

(mgorny)

2019-05-10 17:34:27 UTC MAIN commitmail json YAML

Remove obsolete size asserts.

(mgorny)

2019-05-10 16:28:00 UTC MAIN commitmail json YAML

Use newly-filled i386 reg structs in PT_GETFPREGS & PT_GETXMMREGS tests.

(mgorny)

2019-05-10 16:27:03 UTC MAIN commitmail json YAML

Fill 'struct fpreg' & 'struct xmmregs' in

The 'struct fpreg' data type used by PT_GETFPREGS, and 'struct xmmregs'
used by PT_GETXMMREGS are currently opaque.  Define them to contain
correct data structs instead, the same way they are defined for amd64.
For 'struct fpreg' this means 'struct save87', and for 'struct xmmregs'
this means 'struct fxsave'.  This makes it more transparent for
consumers how the data is formatted, and allows using it without need
for explicit casts.

Reviewed by <kamil>.

(mgorny)

2019-05-10 16:24:35 UTC MAIN commitmail json YAML

2019-05-09 13:07:35 UTC MAIN commitmail json YAML

2019-05-05 18:16:39 UTC MAIN commitmail json YAML

Introduce tests for reading r8..r15 registers.

(mgorny)

2019-05-05 18:15:40 UTC MAIN commitmail json YAML

Reintroduce i386 tests for general-purpose registers, without MMX req

Reintroduce the test for reading i386 general-purpose register values
from the debugged program.  This time it's split into one test for the six
registers not normally used by the compiler (eax..edx, esi, edi), and another
for ebp, esp.  This leaves enough free registers for the latter to work
without MMX.

(mgorny)

2019-05-05 15:05:22 UTC MAIN commitmail json YAML

Revert i386_regs_gp_read as it fails on non-MMX systems.

(mgorny)

2019-05-05 10:04:11 UTC MAIN commitmail json YAML

Add tests for reading pre-set general purpose register values via PT_GETREGS.

Add new tests verifying that PT_GETREGS provides correct register values
from the underlying program.  The test uses inline assembly in the child program
to set registers to well-known constants, then compares the results obtained
via PT_GETREGS against them.

Reviewed by kamil.

(mgorny)

2019-05-02 15:08:35 UTC MAIN commitmail json YAML

Explicitly indicate that nexttowardl() is identical to nextafterl().

Requested by kamil.

(mgorny)

2019-02-15 18:57:15 UTC MAIN commitmail json YAML

Fix reporting EOF via kevent and add a test case

Fix the kernel pty driver to report closed slave via master's kevent
EVFILT_READ.  This behavior matches the behavior for pipes, is
consistent with how FreeBSD implements it and is relied upon by LLDB's
main loop implementation.

Includes feedback by kre and kamil (from tech-kern), commit approved
by kamil.

(mgorny)

2019-01-29 20:07:03 UTC MAIN commitmail json YAML

2019-01-29 20:02:34 UTC MAIN commitmail json YAML

2019-01-29 19:59:10 UTC MAIN commitmail json YAML

2019-01-29 19:56:38 UTC MAIN commitmail json YAML