oracle-samples / drgn-tools Goto Github PK
View Code? Open in Web Editor NEWdrgn helpers specific to Oracle UEK, along with custom CLI and reporting tool corelens
License: Universal Permissive License v1.0
drgn helpers specific to Oracle UEK, along with custom CLI and reporting tool corelens
License: Universal Permissive License v1.0
Running heavyvm tests on an AMD server in OCI, I got the following failure for OL7, UEK4:
=================================== FAILURES ===================================
_________________________________ test_cpuinfo _________________________________
prog = <_drgn.Program object at 0xe48688>
def test_cpuinfo(prog):
cpuinfo.print_cpu_info(prog)
if not (ProgramFlags.IS_LIVE & prog.flags) or not (
prog["init_uts_ns"].name.machine.string_().decode("utf-8") == "x86_64"
):
return
file = open("/proc/cpuinfo", "r")
lines = file.readlines()
cpu_data_from_proc = dict()
for line in lines:
try:
title, value = line.split(":")
title, value = title.strip(), value.strip()
cpu_data_from_proc[title] = value
except Exception:
continue
cpu_data_from_corelens = cpuinfo.x86_get_cpu_info(prog)
assert (
cpu_data_from_corelens["CPU VENDOR"] == cpu_data_from_proc["vendor_id"]
)
> assert (
cpu_data_from_corelens["MODEL NAME"]
== cpu_data_from_proc["model name"]
)
E AssertionError: assert 'AMD EPYC 7J1... ' == 'AMD EPYC 7J1...ore Processor'
E - AMD EPYC 7J13 64-Core Processor
E + AMD EPYC 7J13 64-Core Processor
E ? ++++++++++++++++
tests/test_cpuinfo.py:32: AssertionError
----------------------------- Captured stdout call -----------------------------
CPU VENDOR: AuthenticAMD
MODEL NAME: AMD EPYC 7J13 64-Core Processor
CPU FAMILY: 25
CPUS : 2
CPUS NUMA0: 0-1
MICROCODE : 0x1000065
CSTATES : 9
CPU FLAGS : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm rep_good nopl extd_a
picid eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy svm cr8_legacy abm s
se4a misalignsse 3dnowprefetch osvw perfctr_core arat invpcid_single virt_ssbd ibrs stibp ia32_arch_caps ibpb ssbd npt nrip_save vmmcall fsgsbase tsc_adjust bmi1 avx2 smep bmi2 e
rms invpcid rdseed adx smap clflushopt clwb xsaveopt xsavec xgetbv1
BUG FLAGS : fxsave_leak sysret_ss_attrs spectre_v1 spectre_v2 spec_store_bypass swapgs
VULNERABILITIES:
Meltdown : Not Affected
Spectre_V1 : Mitigation: usercopy/swapgs barriers and __user pointer sanitization
Spectre_V2 : Mitigation: Full AMD retpoline, IBRS_FW, IBPB
L1TF : Not Affected
MDS : Not Affected
tsx_async_abort : Not Affected
itlb_multihit : Not Affected
SRDBS : Not Affected
mmio_stale_data : Not Affected
mmio_unknown : Not Affected
Retbleed : Not Affected
spec_store_bypass: Mitigation: Speculative Store Bypass disabled via prctl and seccomp
GDS : Not Affected
SRSO : Not Affected
fxsave_leak : Vulnerable
sysret_ss_attrs : Vulnerable
swapgs : Vulnerable
It looks like the CPU model information is padded with spaces at the end. We should probably use .strip()
to avoid this.
Since #21 was merged we have a regression on a UEK vmcore:
____________________________ test_ext4_dirlock_scan ____________________________
prog = <_drgn.Program object at 0x55cb006dab50>
def test_ext4_dirlock_scan(prog):
> ext4_dirlock.ext4_dirlock_scan(prog)
tests/test_ext4_dirlock.py:7:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
drgn_tools/ext4_dirlock.py:166: in ext4_dirlock_scan
show_lock_waiter(prog, waiter, index, stacktrace)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
prog = <_drgn.Program object at 0x55cb006dab50>
task = Object(prog, 'struct task_struct *', address=0xffff880ffc537c18)
index = 0, stacktrace = False
def show_lock_waiter(
prog: Program, task: Object, index: int, stacktrace: bool
) -> None:
"""
Show lock waiter
:param prog: drgn program
:param task: ``struct task_struct *``
:param index: index of waiter
:param stacktrace: true to dump stack trace of the waiter
:returns: None
"""
prefix = "[%d] " % index
> ncpu = task.cpu.value_()
E AttributeError: 'struct task_struct' has no member 'cpu'
drgn_tools/locking.py:55: AttributeError
def test_show_mounts(prog):
prog_table = mounts.get_mountinfo(prog)
proc_table = get_proc_mounts()
for row in proc_table:
> assert row in prog_table
E AssertionError: assert ['securityfs', 'securityfs', '/sys/kernel/security'] in [['none', 'rootfs', '/'], ['proc', 'proc', '/proc'], ['sysfs', 'sysfs', '/sys'], ['devtmpfs', 'devtmpfs', '/dev'], ['securityfs', 'securityfs', '/kernel/security'], ['tmpfs', 'tmpfs', '/shm'], ...]
tests/test_mounts.py:30: AssertionError
Failure in the new mounts code on the securityfs. You can see we're expecting['securityfs', 'securityfs', '/sys/kernel/security']
, but in fact,['securityfs', 'securityfs', '/kernel/security']
is what's actually generated by the module.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.