[CONTENT WARNING] code gore
YOU HAVE BEEN WARNED!
This is real code, written by real programmers.
typedef struct {
#ifdef __SI_SWAP_ERRNO_CODE
int si_signo, si_code, si_errno;
#else
int si_signo, si_errno, si_code;
#endif
union {
char __pad[128 - 2*sizeof(int) - sizeof(long)];
struct {
union {
struct {
pid_t si_pid;
uid_t si_uid;
} __piduid;
struct {
int si_timerid;
int si_overrun;
} __timer;
} __first;
union {
union sigval si_value;
struct {
int si_status;
clock_t si_utime, si_stime;
} __sigchld;
} __second;
} __si_common;
struct {
void *si_addr;
short si_addr_lsb;
union {
struct {
void *si_lower;
void *si_upper;
} __addr_bnd;
unsigned si_pkey;
} __first; } __sigfault;
struct {
long si_band;
int si_fd;
} __sigpoll;
struct {
void *si_call_addr;
int si_syscall;
unsigned si_arch;
} __sigsys;
} __si_fields;
} siginfo_t;
>  
Linux Kernel ABI hall of shame
#
# ABI hall of shame
#
config CLONE_BACKWARDS
Architecture has tls passed as the 4th argument of clone(2),
not the 5th one.
config CLONE_BACKWARDS2
Architecture has the first two arguments of clone(2) swapped.
config CLONE_BACKWARDS3
Architecture has tls passed as the 3rd argument of clone(2),
not the 5th one.
config ODD_RT_SIGACTION
Architecture has unusual rt_sigaction(2) arguments
config OLD_SIGSUSPEND
Architecture has old sigsuspend(2) syscall, of one-argument variety
config OLD_SIGSUSPEND3
Even weirder antique ABI - three-argument sigsuspend(2)
config OLD_SIGACTION
Architecture has old sigaction(2) syscall. Nope, not the same as
OLD_SIGSUSPEND | OLD_SIGSUSPEND3 - alpha has sigsuspend(2), but
fairly different variant of sigaction(2), thanks to OSF/1
compatibility...
>  
grep fuck
$ grep -ri "fuck" linux
net/core/skbuff.c:
Fuck, we are miserable poor guys...
arch/parisc/kernel/sys_parisc.c:
Fucking broken ABI
lib/vsprintf.c:
Wirzenius wrote this portably, Torvalds fucked it up :-)
drivers/net/ethernet/sun/sunhme.c:
Only Sun can take such nice parts and fuck up the programming interface
like this. Good job guys...
...
...
This card is _fucking_ hot...
drivers/scsi/qlogicpti.h:
Am I fucking pedantic or what?
fs/configfs/symlink.c:
This is really sick. What they wanted was a hybrid of link(2) and
symlink(2) - they wanted the target resolved at syscall time (as
link(2) would've done), be a directory (which link(2) would've
refused to do) *AND* be a deep fucking magic, making the target
busy from rmdir POV. symlink(2) is nothing of that sort, and the
locking it gets matches the normal symlink(2) semantics. Without
attempts to resolve the target (which might very well not even
exist yet) done prior to locking the parent directory. This
perversion, OTOH, needs to resolve the target, which would lead to
obvious deadlocks if attempted with any directories locked.
Unfortunately, that garbage is userland ABI and we should've said
"no" back in 2005. Too late now, so we get to play very ugly games
with locking.
Try *ANYTHING* of that sort in new code, and you will really regret
it. Just ask yourself - what could a BOFH do to me and do I want
to find it out first-hand?
AV, a thoroughly annoyed bastard.
kernel/irq/timings.c:
The interval type is u64 in order to deal with the same type in our
computation, that prevent mindfuck issues with overflow, sign and
division.
drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c:
This appears to be the behaviour of the VBIOS parser, and *is*
important to cache the NV_PEXTDEV_BOOT0 on later chipsets to avoid
fucking up the memory controller (somehow) by reading it on every
INIT_RAM_RESTRICT_ZM_GROUP opcode.
drivers/gpu/drm/nouveau/nvkm/subdev/pmu/fuc/macros.fuc:
#define NV_PPWR_INTR_EN_CLR_MASK /* fuck i hate envyas */ -1
drivers/cpufreq/powernow-k7.c:
Some Athlon laptops have really fucked PST tables.
drivers/mtd/mtd_blkdevs.c:
Register the notifier if/when the first device type is
registered, to prevent the link/init ordering from fucking
us over. */
include/linux/sysctl.h:
@rcu: Delays the freeing of the inode. Introduced with
"unfuck proc_sysctl ->d_compare()"
fs/notify/inotify/inotify_user.c:
We found an mark in the idr at the right wd, but it's not the mark
we were told to remove. eparis seriously fucked up somewhere.
arch/m68k/include/asm/sun3ints.h:
master list of VME vectors -- don't fuck with this
arch/mips/sgi-ip22/ip22-setup.c:
Init the INDY HPC I/O controller. Need to call this before fucking
with the memory controller because it needs to know the boardID and
whether this is a Guiness or a FullHouse machine.
>  
C++ compilers will never compile linux: struct class
struct class {
const char *name;
/* SNIP */
};
>  
No, this is not a railway system
taken from git log --oneline --graph
. Commit messages are redacted.
* | | |
|\ \ \ \
* \ \ \ \
|\ \ \ \ \
* \ \ \ \ \
|\ \ \ \ \ \
* \ \ \ \ \ \
|\ \ \ \ \ \ \
| * | | | | | |
* | | | | | | |
|\ \ \ \ \ \ \ \
* \ \ \ \ \ \ \ \
|\ \ \ \ \ \ \ \ \
* \ \ \ \ \ \ \ \ \
|\ \ \ \ \ \ \ \ \ \
* \ \ \ \ \ \ \ \ \ \
|\ \ \ \ \ \ \ \ \ \ \
* \ \ \ \ \ \ \ \ \ \ \
|\ \ \ \ \ \ \ \ \ \ \ \
* \ \ \ \ \ \ \ \ \ \ \ \
|\ \ \ \ \ \ \ \ \ \ \ \ \
* \ \ \ \ \ \ \ \ \ \ \ \ \
|\ \ \ \ \ \ \ \ \ \ \ \ \ \
* \ \ \ \ \ \ \ \ \ \ \ \ \ \
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \
* \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
* \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
* \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
| |_|_|_|_|_|_|_|_|_|_|/ / / / / / /
|/| | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | | |
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | | | | | | * | |
| | | | | | | | | | | | | | | | * | |
| | | | | | | | | | | | | | | | * | |
| | | | | | | | | | | | | | | | * | |
| | | | | | | | | | | | | | | |/ / /
| | | | | | | | | | | | | | | * / /
| | | | | | | | | | | | | | |/ / /
| | | | | | | | | | | | | | * / /
| | | | | | | | | | | | | |/ / /
| | | | | | | | | | | | | * / /
| | | | | | | | | | | | |/ / /
| | | | | | | | | | | | * / /
| | | | | | | | | | | |/ / /
| | | | | | | | | | | * / /
| | | | | | | | | | |/ / /
| | | | | | | | | | * / /
| | | | | | | | | |/ / /
| | | | | | | | | * | |
| | | | | | | | | * | |
| | | | | | | | |/ / /
| | | | | | | | * / /
| | | | | | | |/ / /
| | | | | | | * | |
| | | | | | | * | |
| | | | | | | * | |
| | | | | | |/ / /
| | | | | | * / /
| | | | | |/ / /
| | | | | * / /
| | | | |/ / /
| | | | * / /
| | | |/ / /
| | | * / /
| | |/ / /
| | * | |
| | * | |
| | * | |
| | * | |
| |/ / /
| * | |
| | | *
| |_|/
|/| |
* | |
[+] click to leave a comment [+]
>> SEND COMMENT <<