Today I Learned

tags


2021/09/06

about PATH_MAX: the part of the POSIX standard which determines the maximum number of bytes allowed in an absolute path. In Linux, PATH_MAX is 4096 [src], but it’s possible to construct longer paths if you don’t care about some (most) utilities that use the current working directory to fail due to buffer overflow.

Also, I learned that most filesystems restrict file names to 255 bytes.


2021/09/21

That the IANA suggests 49152–65535 (215 + 214 to 216 − 1) for dynamic or private ports. source: https://en.wikipedia.org/wiki/Ephemeral_port#Range


2021/11/23

locate searches all filenames for a keyword using a database which you can update updatedb. whereis searches for binaries using the same mechanism.

https://www.madebygps.com/an-intro-to-finding-things-in-linux/


2022/05/09


2022/08/31

That linux has a capability system: https://man7.org/linux/man-pages/man7/capabilities.7.html

I heard about this in a discussion of privileged ports on linux, specifically about PRIV_NET_PRIVADDR.


2023/05/30

That there’s a Linux command to do sql-like JOINs of lines in files, possibly based on a field in each line: join(1)


2024/11/24

That the GPU I have in the Ubuntu workstation in my office isn’t compatible with ROCm, AMD’s GPU compatibility layer, or Vulkan. I was trying to run the binary for tabby locally. First, I looked up my graphics card:

; lshw -c video
#  *-display
#       description: VGA compatible controller
#       product: Turks PRO [Radeon HD 7570]
#       vendor: Advanced Micro Devices, Inc. [AMD/ATI]
#       physical id: ...
#       bus info: pci@0000:01:00.0
#       logical name: /dev/fb0
#       version: 00
#       width: 64 bits
#       clock: 33MHz
#       capabilities: vga_controller bus_master cap_list rom fb
#       configuration: depth=32 driver=radeon latency=0 resolution=2048,1080
#       resources: irq:42 memory:e0000000-efffffff memory:f0020000-f003ffff ioport:e000(size=256) memory:c0000-dffff

I followed a few false starts, during which I learned:

These are obvious in hindsight, but here are some of the commands I learned figuring out how I shot myself in the foot:

grep 'GRUB_CMDLINE_LINUX' /etc/default/grub 
sudo vi /etc/default/grub # edit kernel flags
cat /proc/cmdline # display kernel flags in **current** session
update-grub # actually apply edited settings

inxi -G # display graphics hardware
sudo apt install inxi
sudo apt install vulkan-tools
vulkaninfo # display vulkan config.

I finally found the smoking gun in a 2020 wiki post on old GPUs. Turns out the 7570 came out in 2012 – while Vulkan was only standardized in 2016.

This is a bummer, but there’s a nonzero chance one of my other salvaged boxes have newer chips.