Posts
4399
Following
315
Followers
467
Software Engineer at Opinsys Oy
Entrepreneur at Siltakatu Solutions Oy

OpenPGP: 3AB05486C7752FE1
Edited 11 months ago

note to myself: when #zsh completions are not working as expected in any OS, 9/10 times it is missing -u flag for compinit ;-) Had forgotten this.

From zshcompsys man page:

To avoid these tests and make all files found be used without asking, use the option -u, and to make compinit silently ignore all insecure files and directories use the option -i. This security check is skipped entirely when the -C option is given.

1
0
0
Edited 11 months ago
This would be great for #audio #plugins, as they don't need an enormous subset of Win32 API.

This could be realized in practical manner for instance in a future version of #CLAP, which could have up-calls whose API signatures would be along the lines with stuff commonly used for from Win32 API. I.e. basic graphics context stuff, file picker etc. Most of the plugins neither sample nor produce audio. They are just plain data processors with a fancy GUI.

A plugin using only those API's would be universal to all operating systems.

And since PE/COFF is widely know format and used across the operating systems for EFI support, DLL would be perfect format for the binary. That way one could have plugin binary that is cross-operating system compatible. I.e. host would implement the API and provide PE/COFF loader to initialize the plugin.

In addition to PE/COFF there should probably be target for wasm, which would enable plugin ecosystem for web daw's.a

https://www.youtube.com/watch?v=H5v0CK249rI

#MusicProduction
1
0
0

Great I get in my “hello bpf” truncated stacks delivered through a ringbuf:

❯ sudo build/hello-ebpf
[0]: 0xffffa5c74e6e9498
[1]: 0x0000000000000000
[2]: 0x0000000000000000
[3]: 0x0000000000000000
[4]: 0x0000000000000000
[5]: 0x0000000000000000
[6]: 0x0000000000000000
[7]: 0x0000000000000000

It looks like this because I temporarily hooked kprobe to a syscall. Next I change the hook to tpm_transmit.

I do all post-processing from this at the host.

#linux #kernel #bpf #profiler

0
1
0

#iLok comes much more nicer to use once you discover by accident that there is a command-line tool installed to /usr/local/bin

iloktool - 5.9.0 (b5097,  edaa5278, Release, 64 bit, built Oct 25 2023)
Copyright 2023, PACE Anti-Piracy, Inc., All rights reserved. CONFIDENTIAL.

Usage: iloktool <operation> <options>

<operation> is one of the following:
help            Prints this help message.
auths           Show all of the authorizations (licenses) available to your computer.
cloud --open    Open an iLok cloud session. Requires --account & --password for the iLok account.
cloud --close   Close all iLok cloud sessions or with --account & --password close a single session.
cloud --status  Returns the cloud status: "Open" or "Closed".
list            List iLok devices attached to this machine.

<options>:
  -h [ --help ]         Show these usage instructions.
  -a [ --account ] arg  This is the account login ID in the "cloud" operation.
  -c [ --close ]        This is used with the "cloud" operation to close all or
                        a single open cloud session.
  -o [ --open ]         This is used with the "cloud" operation to open a cloud
                        session.
  -p [ --password ] arg This is the account password for the "cloud" operation.
  -s [ --status ]       This is used with the "cloud" operation to get the
                        cloud status (Open or Closed).
  -t [ --type ] arg     If specified, this filters the "list" operation by the
                        specified iLok type.
  -V [ --version ]      Show the version number.
  -v [ --verbose ]      Indicate verbose output.

Examples (omit the -v at the end if you don't want verbose):

If you specify no operation, you get a non-verbose list of all local and
remote iLoks:
    iloktool

List all, just iLok1, just iLok2 and just iLok3 type devices respectively:
    iloktool list -v
    iloktool list --type 1 -v
    iloktool list --type 2 -v
    iloktool list --type 3 -v

Display all auths (licenses) available to your computer:
    iloktool auths -v

Open a cloud session, close a cloud session, close all cloud sessions or get
cloud status respectively:
    iloktool cloud --open --account your_account --password your_password -v
    iloktool cloud --close --account your_account --password your_password -v
    iloktool cloud --close -v
    iloktool cloud --status -v

Once you successfully use your account and password to open or close a cloud
session, your password will be saved in the computer's key chain, and you can
omit the password in subsequent open and close operations:
    iloktool cloud --open --account your_account -v
    iloktool cloud --close --account your_account -v

I used to hate iLok but these days I think that it would best if all #audio #plugin companies would use the only solution that has matured somewhat usable instead of inventing their own factors worse licensing schemes.

#MusicProduction #licensing

0
0
0
Anyone who works with #embedded toolchains knows that #build2 fixed #toolchain approach neither works for C nor C++. It has benefits, yes, but it is simply unusable in wide range of applications.

#C #cplusplus
1
0
0
Edited 11 months ago

Life hack for github-cli gh repo clone $(printf 'squidowl/halloy%.0s ' {1..2}), i.e. clone into owner/repo directory, not just repo. #github

EDIT:

I wrote a small #bash (obviously works also for #zsh) function to make cloning easier in my environment:

gh-repo-work() {
  local url=$1
  # Strip path from URL:
  local url_path=${url#*\.*/}
  # Clone to the Github tree:
  gh repo clone $url_path "$HOME/work/github/$url_path"
}

“Demo”:

~ main*
❯ gh-repo-work m4b/goblin
Cloning into '/Users/jarkko/work/github/m4b/goblin'...
remote: Enumerating objects: 7261, done.
remote: Counting objects: 100% (1215/1215), done.
remote: Compressing objects: 100% (326/326), done.
remote: Total 7261 (delta 977), reused 922 (delta 889), pack-reused 6046
Receiving objects: 100% (7261/7261), 3.22 MiB | 4.69 MiB/s, done.
Resolving deltas: 100% (5565/5565), done.

~ main*
❯ ls -1 work/github/m4b/goblin
CHANGELOG.md
Cargo.toml
LICENSE
Makefile
README.md
assets
etc
examples
fuzz
fuzz-afl
src
tests

~ main*
❯ rm -rf work/github/m4b/goblin

~ main*
❯ gh-repo-work https://github.com/m4b/goblin
Cloning into '/Users/jarkko/work/github/m4b/goblin'...
remote: Enumerating objects: 7261, done.
remote: Counting objects: 100% (1227/1227), done.
remote: Compressing objects: 100% (337/337), done.
remote: Total 7261 (delta 988), reused 923 (delta 890), pack-reused 6034
Receiving objects: 100% (7261/7261), 3.23 MiB | 6.68 MiB/s, done.
Resolving deltas: 100% (5564/5564), done.

~ main*
❯ ls -1 work/github/m4b/goblin
CHANGELOG.md
Cargo.toml
LICENSE
Makefile
README.md
assets
etc
examples
fuzz
fuzz-afl
src
tests
0
0
0

The list of papers accepted at the 2nd workshop has been published by ACM: https://dl.acm.org/doi/proceedings/10.1145/3672197#tableOfContent.

1
2
1
Edited 11 months ago
Since I use #IRC "professionally" I spent 50 something euros to for annual #IRCCloud subscription.

The main reason is the bouncer they have in it that "just works" without even trying: https://blog.irccloud.com/bouncer/

If I ever build a company I will get IRCCloud Teams instead of Slack ;-)
0
0
4
Edited 11 months ago
Would be cool if there was TUI client for Google Sheets. I use it for tax reports etc. thanks to GoogleFinance() macro. Can't live without it. ****ings to #Google for this horrible vendor lock-in.

At #Intel I even developed a tax reporting template that became a minor internal hit among Intel #Finland employees :-) I hate myself for loving web app but it is soo convenient for moneyz.
0
0
1
Edited 11 months ago

Trump to the press: I will crush you like the bugs you are.

Journalists: Haha there goes Trump again.

Biden: I'm incredibly disappointed in your coverage:

Journalists: How dare you? Resign immediately, you ungrateful pathetic SOB.

4
6
0

Flow planned for my cheapo #BPF flame graph for a single driver:

  1. tpm_transmit()
  2. Chop the backtrace into two pieces.
  3. Keep the top N rows, forget the the bottom.
  4. Publish N rows with 256 bytes per row room for a call entry, i.e. 0x100*N bytes to the BPF ring buffer.

The host side then consumes the fixed-size packets and puts matching stacks to the same bucket. A second thread can periodically then compose flame graph of the data corrected so far.

Somehow got into learning this eBPF stuff during the holidays :-) Super interesting and addicting.

#eBPF

0
0
0
#ladybird is compatible with #lwn ;-)
0
0
0

GitHub's co-founder and former CEO launched the Ladybird initiative, a brand-new independent browser written from scratch and backed by a non-profit.
https://linuxiac.com/ladybird-is-a-new-browser-initiative-backed-up-by-1m/

1
2
1
Edited 11 months ago

I think, just based on experience on previous tech revolutions, that #AI is neither useless nor it is going to repeal and replace human labor.

It just hasn’t hit the its roof, or more precisely constraints, yet.

Media only giving voice to either AI companies or AI researchers turned into doomsday predictors, is at least quite strong signal of a bubble.

If you feel that AI is evil, here’s couple of suggestions what you can do:

  1. Engage and support open source ecosystem. It is essentially a crowd-sourced alternative to AI where people work together to realize the best possible software for other people and for themselves.
  2. Consider #GPLv3 and #AGPLv3 as an alternative to making “standard Github choice” of #Apache or #MIT. It is a self-governing and collaboration enabling licensing model. I think AI makes #GPL more relevant than it ever has been so far in its history. I’ve at least started to pro-actively rethink how I license my own projects, instead of lazily just putting MIT or similar license.
2
1
5
I think that I do as a next #BPF exercise a "poor man's" flame graph generator for #TPM driver, meaning no interaction and make most of VT output ;-)

I could also consider to do it for #kernel #keyring later on but TPM driver is easier to scope: only look at events that end up to tpm_transmit().

Instead of "perf sampling approach" I'm planning to use BPF ring buffer and use that to all backtraces to tpm_transmit() to the user space host program. Then the host program implemented with C will post-process that queue in parallel.

Frequency of TPM commands is low enough so that 1:1 granularity should be possible.

Can't wait to get this done, will be a fun tool for future patch reviews I make ;-)

#eBPF
1
0
1
Edited 11 months ago

Here’s a minimal shenanigans for #eBPF #C host, with bpftool taking care of header generation.

Payload (payload.c):

#include "vmlinux.h"
#include <bpf/bpf_helpers.h>
SEC("tracepoint/syscalls/sys_enter_execve")
int tracepoint__syscalls__sys_enter_execve(struct trace_event_raw_sys_enter *ctx)
{
	bpf_printk("execve");
	return 0;
}
char LICENSE[] SEC("license") = "GPL";

Host (main.c):

#include <bpf/bpf.h>
#include <bpf/libbpf.h>
#include <signal.h>
#include "payload.h"

static volatile bool interrupted = false;
struct payload *obj;

void do_sigint(int value)
{
	interrupted = true;
}

int main(void)
{
	struct sigaction sa;
	ssize_t ret;

	obj = payload__open();
	if (!obj)
		exit(1);

	ret  = payload__load(obj);
	if (ret)
		goto err;

	ret = payload__attach(obj);
	if (ret)
		goto err;

	sa.sa_handler = do_sigint;
	sigaction(SIGINT, &sa, NULL);
	while (!interrupted);
	fprintf(stderr, "\ndone\n");
	payload__destroy(obj);	
	exit(0);

err:
	payload__destroy(obj);	
	exit(1);
}

Build (build.sh):

#!/usr/bin/env sh

# vmlinux
bpftool btf dump file /sys/kernel/btf/vmlinux format c > vmlinux.h

# payload
clang -g -O2 -target bpf -I . -c payload.c -o payload.o
bpftool gen skeleton payload.o > payload.h

# main
clang -g -O2 -Wall -I . -c main.c -o main.o

# hello-ebpf
clang -Wall -O2 -g main.o -lbpf -lelf -lz -o hello-ebpf

While running trace_pipe is expected to have output like this:

             cat-61135   [011] ....1  8303.116335: bpf_trace_printk: execve
             zsh-61136   [002] ....1  8303.116691: bpf_trace_printk: execve
             zsh-61139   [004] ....1  8303.118436: bpf_trace_printk: execve

#linux #kernel #tracing

1
1
1

Submitted some ideas to rust-vmm/vm-memory how it should be extended to work for confidential (#SGX, #SNP and #TDX) payloads to make it scale for the needs of #Enarx:

https://github.com/rust-vmm/vm-memory/issues/291

#linux #kvm #rust #rustlang

0
1
0

I’ve been wondering over the years when being at #Airport check-ins how come these #PowerShell scripts can possibly ever work.

I know this because I’ve seen numerous times over the years crashed check-in machines. Latest one was late Spring when I visited #Ethprague at #Prague Airport.

I miss the “OS/2” and “Guru Meditation” times of my late 90s and early 00’s in vending machines etc. ;-)

Your local airport is actually airport.bat!

#CrowdStrike

1
0
0
Show older