Hilarious code in Linux Kernel 2.6!!
Whoever thought kernel hackers are just nerds who do not have fun was completely wrong. I have evidence from the kernel code! Kernel hackers have a lot of humour, probably the most humuorous bunch of people! Here are some extremely hilariously lines of code from the kernel!!!! If you want to extract all the code yourself, run the following command inside your kernel source folder:
grep -Eir "( hilarious word of your choice, eg f**k, sh*t, pu**y)" *
On my Ubuntu Edgy Eft, with the following as my base folder, I extracted these lines of code.
/usr/src/linux-source-2.6.17/
<blockquote>
Code
for (i = 0; i < tmp =" pussy</span> + i; // <span style="font-weight: bold; font-style: italic;">
ointer to pussy with skipped shit (spaces and tabs) </span>
len2 = strlen (tmp); //calculate length again
if (len1 > len2)
return -1; //<span style="font-weight: bold; font-style: italic;">Fuck off, no fucking</span>
if (!strncmp (prick, tmp, len1))
return i + len1;
return -1;
}
drivers/net/3c59x.c
-------------------------------------------------
/* Acknowledge the IRQ. */
iowrite16(AckIntr | IntReq | IntLatch, ioaddr + EL3_CMD);
if (vp->cb_fn_base) /* <span style="font-weight: bold;">The PCMCIA people are idiots.</span> */
iowrite32(0x8000, vp->cb_fn_base + 4);
} while ((status = ioread16(ioaddr + EL3_STATUS)) & IntLatch);
net/ipv4/ip_gre.c
----------------------------------------------------------
static void ipgre_err(struct sk_buff *skb, u32 info)
{
#ifndef I_WISH_WORLD_WERE_PERFECT
/* It is not :-( All the routers (except for Linux) return only
8 bytes of packet payload. It means, that precise relaying of
ICMP in the real Internet is absolutely infeasible.
Moreover, Cisco "wise men" put GRE key to the third word
in GRE header. It makes impossible maintaining even soft state for keyed
GRE tunnels with enabled checksum. Tell them "thank you".
<span style="font-weight: bold;">Well, I wonder, rfc1812 was written by Cisco employee,</span>
<span style="font-weight: bold;">what the hell these idiots break standrads established</span>
<span style="font-weight: bold;">by themself???</span>
*/
arch/mips/pci/pci-ip27.c
--------------------------------------------------------------------
<span style="font-weight: bold;">/*</span>
<span style="font-weight: bold;">* IOC3 is fucked fucked beyond believe ... Don't try to access</span>
<span style="font-weight: bold;">* anything but 32-bit words ...</span>
<span style="font-weight: bold;">*/</span>
addr = &bridge->b_type0_cfg_dev[slot].f[fn].l[where >> 2];
arch/mips/kernel/sysirix.c
----------------------------------------------------------------------------
<span style="font-weight: bold;">/* 2,191 lines of complete and utter shit coming up... */</span>
extern int max_threads;
/* The sysmp commands supported thus far. */
#define MP_NPROCS 1 /* # processor in complex */
#define MP_NAPROCS 2 /* # active processors in complex */
#define MP_PGSIZE 14 /* Return syste
arch/sparc64/mm/ultra.S
----------------------------------------------------------------------------
/* Basically, most of the Spitfire vs. Cheetah madness
* has to do with the fact that Cheetah does not support
* IMMU flushes out of the secondary context. Someone needs
* to throw a south lake birthday party for the folks
* in Microelectronics who refused to fix this shit.
*/
/* This file is meant to be read efficiently by the CPU, not humans.
* Staraj sie tego nikomu nie pierdolnac...
*/
.text
.align 32
.globl __flush_tlb_mm
__flush_tlb_mm: /* 18 insns */
/* %o0=(ctx & TAG_CONTEXT_BITS), %o1=SECONDARY_CONTEXT */
ldxa [%o1] ASI_DMMU, %g2
cmp %g2, %o0
bne,pn %icc, __spitfire_flush_tlb_mm_slow
mov 0x50, %g3
stxa %g0, [%g3] ASI_DMMU_DEMAP
stxa %g0, [%g3] ASI_IMMU_DEMAP
sethi %hi(KERNBASE), %g3
flush %g3
retl
</blockquote>