how can I get the AUFS kernel module on a Google Compute Engine (GCE) kernel? - kernel-module

The latest compute engine kernel is a 3.3.8 variant, and does not appear to have AUFS support configured in. The kernel is distributed outside the main file system image (I am using the default Debian image), and the Debian image does not appear to include AUFS as a module.
Is there already a binary module for AUFS on GCE available somewhere?
If not, how would I go about compiling a module against the kernel provided by the system?
My end goal is to get the Docker LXC manager running, and AUFS is a dependency.

The Google Compute Engine kernels do not currently support AUFS or allow dynamic module loading but I've submitted an internal feature request to address this need. Of course, that's not a commitment, just a way to ensure this gets considered for the future.

Related

Vulkan fails to load layer library

I am using MoltenVK on MacBook Air with Apple Silicon. I have set my environment according to instructions on Vulkan Tutorial website but when I try to run my program in Xcode I get the following two error messages from validation layer:
ERROR (Callback: Validation Layer): Loading layer library /usr/local/share/vulkan/explicit_layer.d/../../../lib/libVkLayer_api_dump.dylib
ERROR (Callback: Validation Layer): Loading layer library /usr/local/share/vulkan/explicit_layer.d/../../../lib/libVkLayer_khronos_validation.dylib
I have played around with the settings in vkconfig and added environment variable VK_INSTANCE_LAYERS pointing to list of those two layers that failed to load and VK_LAYER_PATH that points to path /Users/jakub/VulkanSDK/1.3.224.1/macOS/share/vulkan/explicit_layer.d. None of that worked.
Those environment variables only work on macOS if you launch the apps from the command line. Apple does not allow environment variables to be set for GUI apps launched from the desktop, etc. A better way to use layers on macOS is to use VKConfig. You can create a configuration with the layers you want (and there's a nice GUI for tweaking layer parameters). This creates a "metalayer" that the loader will always see and make use without the need for environment variables. Also, make sure you do not link statically to MoltenVK, as this does not use the actual loader and layers will not work (although linking statically is perfectly fine for shipping your apps).

WebkitGtk application is not loading file URL

I am building a kiosk application using webkitgtk on the raspberry pi 4.
This application will not be connected to the internet and all the html,css, javascript for the UI are all located on the local filesystem.
I am using buildroot to setup the Linux system, starting with the pi 4 defconfig provided in buildroot.
I have enabled all the packages needed to get webkitgtk running.
Also, the kiosk application has been tested on my desktop, using the same software stack and it works
However, when i try to launch the application on the raspberry pi, a blank page pops up. I have played around with the WebKitWebSettings object associated with my WebKitWebView by enabling local file access. It still shows up a blank screen.
Also included in my pi4 application bundle is a simple gtk3+ application. This launches successfully!
I will really appreciate some pointers as to why this is happening as i have sort of reached a dead end
UPDATE
I enabled the MiniBrowser app that comes with the Webkitgtk package.
Entering the local url, The page does not load. It only gives me a message at the top saying "Successfully downloaded".
It seems to be treating my input as a download
UPDATE 2
After some more experimenting, i was finally able to get webkitgtk working on the pi 4.
The problem seems to originate from using the webkit_web_view_load_uri() api.
It does not seem to recognize my html document as a web page.
I got around it using the webkit_web_view_load_html() call. This included some hacks by first reading in the contents of the html doc into a character buffer, and passing it to webkit_web_view_load_html().
You also have to provide a base path to this function call to be able to resolve all the urls (scripts, css, images etc) in your html document.
Another problem i haven't been able to work around is, SVG images are not loading in webkitgtk. I have used jpg formats and they work. I suspect this my be due to a configuration switch in building webkigtk
It's hard for me to figure out what might be happening without having access to your environment and settings. My gut feeling is that pages are showing blank because perhaps some shared libraries are missing. You can check that with:
$ ldd WebKitBuild/GTK/Release/bin/MiniBrowser
I am using buildroot to setup the Linux system, starting with the pi 4 defconfig provided in buildroot.
There's a buildroot repository for building WPE for RPi. WPE (WebPlatform for Embeded) is like WebKitGTK but doesn't depend on GTK toolkit. Another important difference is that WPE runs natively on Wayland.
If you're interested in having a webapp embedded in a browser running in a device with limited capabilities, WPE is a better choice than WebKitGTK. The buildroot repo for building WPE for RPi is here:
https://github.com/WebPlatformForEmbedded/buildroot
There's is also this very interesting step-by-step guide on how to build WPE for RPi3:
https://samdecrock.medium.com/building-wpe-webkit-for-raspberry-pi-3-cdbd7b5cb362
I'm not sure whether the buildroot recipe would work for RPi4. It seems to work for all previous versions, so you might be stepping in new land if you try to build WPE on RPi4.
If you have an RPi3 available I'd try to build WPE for RPi3 first, and make sure that works. Then try for RPi4.

How to design a system for offline updates of Linux systems that use Debian's apt?

I'm developing an update / upgrade service with an offline SDK for Linux devices.
The idea is to replicate the update / upgrade Linux services into an offline device. The "offline" device is capable to reach "internet" but only through message exchange using the SDK and through other devices (multi-hop). Devices are from different architectures, therefore the device that has "internet" capabilities (gateway) has to be capable to request and download the packages to be upgraded to/from a different architecture. the gateway device has to be capable to cache the downloaded requested packages from updates (to act as a CDN), avoiding repo requests.
The offline device doesn't have have IP address and the way it communicates is irrelevant, because the offline SDK guaranties internet reachability over multi-hop.
What I need - I need someone to provide me some help or guidance about the update / upgrade work flow on Linux.
What I found so far:
update
update command loads the /etc/apt/sources.list
don't know how update resolves each line on /etc/apt/sources.list, it seems it has a function where it loads the "deb" a "link" and "arguments" that match the corresponding repo folders.
after that it starts to download all the corresponding "Packages" files in each resolved link.
upgrade
makes a comparison between the updated local "Packages" files and the "Packages" files in the repo.
Is there any source code from update / upgrade available ?
I did some web search on the apt repos, but I couldn't find the update / upgrade functions.

Debugging & profiling a runtime-loaded module

I need to load and run a C module using dlopen() / LoadLibrary(), and be able to review extensive profiling & debugging information of the hosted module only (not the host program), via a live log displayed as part of the host:
How exactly would I go about extracting stack state and profiling info from the hosted module, at runtime? gprof and gdb? And doing so without slowing things down awfully?
Could any of the debugging and profiling information that comes back, be mixed up (i.e. between host and hosted), provided that I compile both the host and hosted modules with the correct, respective compiler switches? I need a completely clean separation of log data i.e. just the hosted module.

Windows display driver hooking, 64 bit

Once I've written a sort of a driver for Windows, which had to intercept the interaction of the native display driver with the OS. The native display driver consists of a miniport driver and a DLL loaded by win32k.sys into the session space. My goal was to meddle between the win32k.sys and that DLL. Moreover, the system might have several display drivers, I had to hook them all.
I created a standard WDM driver, which was configured to load at system boot (i.e. before win32k). During its initialization it hooked the ZwSetSystemInformation, by patching the SSDT. This function is called by the OS whenever it loads/unloads a DLL into the session space, which is exactly what I need.
When ZwSetSystemInformation is invoked with SystemLoadImage parameter - one of its parameters is the pointer to a SYSTEM_LOAD_IMAGE structure, and its ModuleBase is the module base mapping address. Then I analyze the mapped image, patch its entry point with my function, and the rest is straightforward.
Now I need to port this driver to a 64-bit Windows. Needless to say it's not a trivial task at all. So far I found the following obstacles:
All drivers must be signed
PatchGuard
SSDT is not directly exported.
If I understand correctly, PatchGuard and driver signing verification may be turned off, the driver should be installed on a dedicated machine, and we may torture it the way we want.
There're tricks to locate the SSDT as well, according to online sources.
However recently I've discovered there exists a function called PsSetLoadImageNotifyRoutine. It may simplify the task considerably, and help avoid dirty tricks.
My question are:
If I use PsSetLoadImageNotifyRoutine, will I receive notifications about DLLs loaded into the session space? The official documentation talks about "system space or user space", but does "system space" also includes the session space?
Do I need to disable the PatchGuard if I'm going to patch the mapped DLL image after it was mapped?
Are there any more potential problems I didn't think about?
Are there any other ways to achieve what I want?
Thanks in advance.
Do I need to disable the PatchGuard if I'm going to patch the mapped DLL image after it was mapped?
To load any driver on x64 it must be signed. With admin rights you can disabled PatchGuard and I personally recommend using DSEO, a GUI application made for this. Or you can bypass PatchGuard by overwriting the MBR (or BIOS), although this is typically considered a bootkit - malware.

Resources