Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: [netbsd-9] src



Module Name:    src
Committed By:   martin
Date:           Wed Feb 12 19:55:57 UTC 2020

Modified Files:
        src/external/cddl/osnet/dev/dtrace/aarch64 [netbsd-9]: dtrace_isa.c
            dtrace_subr.c
        src/external/cddl/osnet/dev/fbt/aarch64 [netbsd-9]: fbt_isa.c
        src/external/cddl/osnet/dist/lib/libdtrace/common [netbsd-9]: dt_impl.h
            dt_module.c dt_open.c
        src/sys/arch/aarch64/aarch64 [netbsd-9]: vectors.S
        src/sys/arch/aarch64/include [netbsd-9]: cpu.h
        src/sys/modules/cyclic [netbsd-9]: Makefile

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #701):

        external/cddl/osnet/dev/dtrace/aarch64/dtrace_isa.c: revision 1.2
        external/cddl/osnet/dist/lib/libdtrace/common/dt_open.c: revision 1.17
        external/cddl/osnet/dist/lib/libdtrace/common/dt_module.c: revision 1.18
        sys/modules/cyclic/Makefile: revision 1.5
        external/cddl/osnet/dev/dtrace/aarch64/dtrace_subr.c: revision 1.2
        external/cddl/osnet/dev/dtrace/aarch64/dtrace_subr.c: revision 1.3
        sys/arch/aarch64/aarch64/vectors.S: revision 1.10
        external/cddl/osnet/dev/fbt/aarch64/fbt_isa.c: revision 1.2
        external/cddl/osnet/dev/fbt/aarch64/fbt_isa.c: revision 1.3
        external/cddl/osnet/dev/fbt/aarch64/fbt_isa.c: revision 1.4
        external/cddl/osnet/dev/fbt/aarch64/fbt_isa.c: revision 1.5
        external/cddl/osnet/dev/fbt/aarch64/fbt_isa.c: revision 1.6
        sys/arch/aarch64/include/cpu.h: revision 1.20
        external/cddl/osnet/dist/lib/libdtrace/common/dt_impl.h: revision 1.9

Create a buffer space of 512 bytes before the trapframe.

dtrace fbt needs enough space to emulate an

        stp     x29, x30, [sp,#-FRAMESIZE]!

instruction in a function prologue.  In the aarch64 instruction
encoding, FRAMESIZE can be as large as 512 bytes, so reserve this
much space when KDTRACE_HOOKS is enabled.

Use db_write_bytes to overwrite kernel text.

Tidy up a bit.  No functional change intended.

aarch64 fbt_invop doesn't actually use the argument, but it would
make more sense for it to be the return value and/or first argument
register.  Certainly it's not `eax'!

Tidy up a bit: don't set things we won't use; assert nonzeroness.

Use /dev/ksyms, not /netbsd, for the running kernel's symbols.

Teach dtrace about el1_trap_exit frames on aarch64.

Implement dtrace_getarg and dtrace_getreg while here.

Count the number of artificial frames in aarch64 fbt probe correctly.

Change the address ranges that aarch64 considers toxic for dtrace.
`Toxic' means dtrace forbids D scripts from even attempting to read
or write at them.

Previously we considered [0, VM_MIN_KERNEL_ADDRESS) toxic, but
VM_MIN_KERNEL_ADDRESS is only the minimum address of the kernel map;
the direct-mapped region lies below it, and with PMAP_MAP_POOLPAGE we
allocate virtual pages for pool backing directly from physical pages
through the direct-mapped region.  Also, this did not consider I/O
mappings to be toxic, which they probably should be.

Instead, treat:

[0, AARCH64_KSEG_START)
and
[VM_KERNEL_IO_ADDRESS, 0xfff...ff)

as toxic.  (The upper bound for 0xfff...ff ought to be inclusive, not
exclusive, but I think we'll need another mechanism for expressing
that to dtrace!)

Switch from db_write_bytes to using direct-mapping.

This way there's no dependency on ddb.

Define the MULTIPROCESSOR cpu_number() for modules too.
Modules should work whether the main kernel is multiprocessor or not.
In particular, dtrace should not think cpu_number() is 0 while
cpu_index(curcpu()) and curcpu()->ci_index are nonzero, leading to
rather spectacularly bogus results...

cyclic.kmod needs -Wno-sign-compare for aarch64 CPU_INFO_FOREACH.
Provisional workaround; feel free to fix.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 \
    src/external/cddl/osnet/dev/dtrace/aarch64/dtrace_isa.c \
    src/external/cddl/osnet/dev/dtrace/aarch64/dtrace_subr.c
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 \
    src/external/cddl/osnet/dev/fbt/aarch64/fbt_isa.c
cvs rdiff -u -r1.8 -r1.8.4.1 \
    src/external/cddl/osnet/dist/lib/libdtrace/common/dt_impl.h
cvs rdiff -u -r1.17 -r1.17.4.1 \
    src/external/cddl/osnet/dist/lib/libdtrace/common/dt_module.c
cvs rdiff -u -r1.16 -r1.16.2.1 \
    src/external/cddl/osnet/dist/lib/libdtrace/common/dt_open.c
cvs rdiff -u -r1.9 -r1.9.4.1 src/sys/arch/aarch64/aarch64/vectors.S
cvs rdiff -u -r1.13.4.1 -r1.13.4.2 src/sys/arch/aarch64/include/cpu.h
cvs rdiff -u -r1.3.34.1 -r1.3.34.2 src/sys/modules/cyclic/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index