Skip to content

Instantly share code, notes, and snippets.

diff -N -r -u linux-4.19.72/arch/arm64/hyperv/hv_hvc.S WSL2-Linux-Kernel-4.19.72-microsoft-standard/arch/arm64/hyperv/hv_hvc.S
--- linux-4.19.72/arch/arm64/hyperv/hv_hvc.S 1969-12-31 16:00:00.000000000 -0800
+++ WSL2-Linux-Kernel-4.19.72-microsoft-standard/arch/arm64/hyperv/hv_hvc.S 2019-09-15 02:24:17.000000000 -0700
@@ -0,0 +1,54 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+
+/*
+ * Microsoft Hyper-V hypervisor invocation routines
+ *
+ * Copyright (C) 2018, Microsoft, Inc.
14156 execve("/usr/bin/x86_64-linux-gnu-g++-8", ["x86_64-linux-gnu-g++-8", "-O1", "-c", "ice_gcc.cpp"], 0x7fffe8701680 /* 18 vars */) = 0
14156 brk(NULL) = 0x167b000
14156 arch_prctl(0x3001 /* ARCH_??? */, 0x7fffffbcd780) = -1 EINVAL (Invalid argument)
14156 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
14156 openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
14156 fstat(3, {st_mode=S_IFREG|0644, st_size=51597, ...}) = 0
14156 mmap(NULL, 51597, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f57a3453000
14156 close(3) = 0
14156 openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
14156 read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360r\2\0\0\0\0\0"..., 832) = 832
C:\> wsl --shutdown
C:\> wsl -d Ubuntu-18.04
$ sudo apt install libsecret-tools gnome-keyring \
build-essential meson ninja git wget m4 gperf libudev-dev pkg-config \
libcap-dev gettext python3-setuptools # probably other stuff
$ mkdir 4254 && cd 4254
$ wget https://github.com/mesonbuild/meson/releases/download/0.51.0/meson-0.51.0.tar.gz
$ tar xf meson-0.51.0.tar.gz
$ cd meson-0.51.0/
$ sudo python3 ./setup.py install
@therealkenc
therealkenc / rootston_rdp_xkp_segv.backtrace
Created May 27, 2019 23:06
rootston rdp segv libxkbcommon
(gdb) set args -l 4
(gdb) run
Starting program: /home/ken/Devel/wayland/wlroots/build/rootston/rootston -l 4
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
2019-05-27 16:04:16 - [rootston/config.c:405] Configured output VGA-1 with mode [email protected]
2019-05-27 16:04:16 - [backend/rdp/backend.c:89] Creating RDP backend
[New Thread 0x7fffeccfe700 (LWP 14935)]
2019-05-27 16:04:16 - [render/egl.c:172] Using EGL 1.4
2019-05-27 16:04:16 - [render/egl.c:173] Supported EGL extensions: EGL_ANDROID_blob_cache EGL_ANDROID_native_fence_sync EGL_EXT_create_context_robustness EGL_EXT_image_dma_buf_import EGL_EXT_image_dma_buf_import_modifiers EGL_IMG_context_priority EGL_KHR_config_attribs EGL_KHR_create_context EGL_KHR_create_context_no_error EGL_KHR_fence_sync EGL_KHR_get_all_proc_addresses EGL_KHR_gl_colorspace EGL_KHR_gl_renderbuffer_image EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_3D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_image_b
(gdb) set args -l 4
(gdb) run
Starting program: /home/ken/Devel/wayland/wlroots/build/rootston/rootston -l 4
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
2019-05-27 15:52:59 - [rootston/config.c:405] Configured output VGA-1 with mode [email protected]
2019-05-27 15:52:59 - [backend/rdp/backend.c:89] Creating RDP backend
[New Thread 0x7fffe9184700 (LWP 14321)]
[New Thread 0x7fffe8983700 (LWP 14322)]
[New Thread 0x7fffe3fff700 (LWP 14323)]
@therealkenc
therealkenc / wsltub.cpp
Created May 13, 2019 20:47
wsltub leftovers
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <sys/mount.h>
#include <sys/sysmacros.h>
#include <fcntl.h>
#include <sched.h>
#include <signal.h>
#include <unistd.h>
#include <array>
This file has been truncated, but you can view the full file.
917 execve("/usr/sbin/sshd", ["/usr/sbin/sshd", "-D"], 0x7fffd4446f70 /* 15 vars */) = 0
917 brk(NULL) = 0x7fffc5088000
917 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
917 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
917 openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
917 fstat(3, {st_mode=S_IFREG|0644, st_size=80580, ...}) = 0
917 mmap(NULL, 80580, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f1e147fd000
917 close(3) = 0
917 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
917 openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libwrap.so.0", O_RDONLY|O_CLOEXEC) = 3
This file has been truncated, but you can view the full file.
917 execve("/usr/sbin/sshd", ["/usr/sbin/sshd", "-D"], 0x7fffd4446f70 /* 15 vars */) = 0
917 brk(NULL) = 0x7fffc5088000
917 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
917 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
917 openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
917 fstat(3, {st_mode=S_IFREG|0644, st_size=80580, ...}) = 0
917 mmap(NULL, 80580, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f1e147fd000
917 close(3) = 0
917 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
917 openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libwrap.so.0", O_RDONLY|O_CLOEXEC) = 3
// stub-sfr.c
#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <fcntl.h>
int sync_file_range(int fd, off64_t offset, off64_t nbytes,
unsigned int flags)
{
return 0;
}
powershell.exe "Get-CimInstance -Namespace root/SecurityCenter2 -ClassName AntivirusProduct" | grep displayName