F*ck твоё ядро=)

Тут на баше в бездне:

Zubchick: была, кажется, шутка о том, что если выкинуть все комментарии со словом «f*ck» из кода ядра линукса он похудеет на несколько сотен килобайт.
kurokikaze: … и перестанет загружаться )

Я не мог удержаться=) Отчёт:

$ cd linux-source-2.6.31/
$ rgrep -iIHn -C 10 «fuck» . > /tmp/fuck.my.kernel

Вот лучшее, что я получил в итоге:

./fs/xfs/xfs_btree.h-119-	switch (cur->bc_btnum) {  
./fs/xfs/xfs_btree.h-120- case XFS_BTNUM_BNO: __XFS_BTREE_STATS_INC(abtb, stat); break;
./fs/xfs/xfs_btree.h:124: case XFS_BTNUM_MAX: ASSERT(0); /* fucking gcc */ ; break;
./fs/xfs/xfs_btree.h-125- }

./fs/notify/inotify/inotify_user.c-394- if (unlikely(found_ientry != ientry)) {
./fs/notify/inotify/inotify_user.c-395- /* We found an entry in the idr with the right wd, but it's
./fs/notify/inotify/inotify_user.c-396- * not the entry we were told to remove. eparis seriously
./fs/notify/inotify/inotify_user.c:397: * fucked up somewhere. */
./fs/notify/inotify/inotify_user.c-398- WARN_ON(1);
./fs/notify/inotify/inotify_user.c-399- ientry->wd = -1;
./fs/notify/inotify/inotify_user.c-400- goto out;
./fs/notify/inotify/inotify_user.c-401- }

./Documentation/DocBook/kernel-locking.tmpl-1417- Deadlocks are problematic, but not as bad as data
./Documentation/DocBook/kernel-locking.tmpl-1418- corruption. Code which grabs a read lock, searches a list,
./Documentation/DocBook/kernel-locking.tmpl-1419- fails to find what it wants, drops the read lock, grabs a
./Documentation/DocBook/kernel-locking.tmpl-1420- write lock and inserts the object has a race condition.
./Documentation/DocBook/kernel-locking.tmpl:1424: If you don't see why, please stay the fuck away from my code.

./sound/oss/opl3.c-832- /*
./sound/oss/opl3.c:833: * What the fuck is going on here? We leave junk in the beginning
./sound/oss/opl3.c-834- * of ins and then check the field pretty close to that beginning?
./sound/oss/opl3.c-835- */
./sound/oss/opl3.c-836- if(copy_from_user(&((char *) &ins)[offs], addr + offs, sizeof(ins) - offs))
./sound/oss/opl3.c-837- return -EFAULT;

./net/ipv4/netfilter/nf_nat_snmp_basic.c-1029- * Parse and mangle SNMP message according to mapping.
./net/ipv4/netfilter/nf_nat_snmp_basic.c:1030: * (And this is the fucking 'basic' method).
./net/ipv4/netfilter/nf_nat_snmp_basic.c-1031- */
./net/ipv4/netfilter/nf_nat_snmp_basic.c-1032-static int snmp_parse_mangle(unsigned char *msg,
./net/ipv4/netfilter/nf_nat_snmp_basic.c-1033- u_int16_t len,
./net/ipv4/netfilter/nf_nat_snmp_basic.c-1034- const struct oct1_map *map,
./net/ipv4/netfilter/nf_nat_snmp_basic.c-1035- __sum16 *check)

./net/core/skbuff.c-2935- if (copyflag ||
./net/core/skbuff.c-2936- skb_cloned(skb1) ||
./net/core/skbuff.c-2937- ntail ||
./net/core/skbuff.c-2938- skb_shinfo(skb1)->nr_frags ||
./net/core/skbuff.c-2939- skb_has_frags(skb1)) {
./net/core/skbuff.c-2940- struct sk_buff *skb2;
./net/core/skbuff.c:2942: /* Fuck, we are miserable poor guys... */
./net/core/skbuff.c-2943- if (ntail == 0)
./net/core/skbuff.c-2944- skb2 = skb_copy(skb1, GFP_ATOMIC);
./net/core/skbuff.c-2945- else
./net/core/skbuff.c-2946- skb2 = skb_copy_expand(skb1,
./net/core/skbuff.c-2947- skb_headroom(skb1),
./net/core/skbuff.c-2948- ntail,
./net/core/skbuff.c-2949- GFP_ATOMIC);

./arch/mips/sgi-ip22/ip22-setup.c-41- /* Init the INDY HPC I/O controller. Need to call this before
./arch/mips/sgi-ip22/ip22-setup.c:42: * fucking with the memory controller because it needs to know the
./arch/mips/sgi-ip22/ip22-setup.c-43- * boardID and whether this is a Guiness or a FullHouse machine.
./arch/mips/sgi-ip22/ip22-setup.c-44- */
./arch/mips/sgi-ip22/ip22-setup.c-45- sgihpc_init();

А вот это супер. Море ненависти:

./arch/mips/pci/ops-bridge.c-58- /*
./arch/mips/pci/ops-bridge.c:59: * IOC3 is fucked fucked beyond believe ... Don't even give the
./arch/mips/pci/ops-bridge.c-60- * generic PCI code a chance to look at it for real ...
./arch/mips/pci/ops-bridge.c-61- */
./arch/mips/pci/ops-bridge.c-62- if (cf == (PCI_VENDOR_ID_SGI | (PCI_DEVICE_ID_SGI_IOC3 << 16)))
./arch/mips/pci/ops-bridge.c-63- goto oh_my_gawd;
./arch/mips/pci/ops-bridge.c-78- /*
./arch/mips/pci/ops-bridge.c:79: * IOC3 is fucked fucked beyond believe ... Don't even give the
./arch/mips/pci/ops-bridge.c-80- * generic PCI code a chance to look at the wrong register.
./arch/mips/pci/ops-bridge.c-81- */
./arch/mips/pci/ops-bridge.c-82- if ((where >= 0x14 && where < 0x40) || (where >= 0x48)) {
./arch/mips/pci/ops-bridge.c-83- *value = emulate_ioc3_cfg(where, size);
./arch/mips/pci/ops-bridge.c-84- return PCIBIOS_SUCCESSFUL;
./arch/mips/pci/ops-bridge.c-85- }
./arch/mips/pci/ops-bridge.c-87- /*
./arch/mips/pci/ops-bridge.c:88: * IOC3 is fucked fucked beyond believe ... Don't try to access
./arch/mips/pci/ops-bridge.c-89- * anything but 32-bit words ...
./arch/mips/pci/ops-bridge.c-90- */
./arch/mips/pci/ops-bridge.c-91- addr = &bridge->b_type0_cfg_dev[slot].f[fn].l[where >> 2];

.... и так далее ещё несколько раз.

./arch/m68k/include/asm/sun3ints.h:30:/* master list of VME vectors -- don't fuck with this */
./arch/m68k/include/asm/sun3ints.h-31-#define SUN3_VEC_FLOPPY (IRQ_USER+0)
./arch/m68k/include/asm/sun3ints.h-32-#define SUN3_VEC_VMESCSI0 (IRQ_USER+0)
./arch/m68k/include/asm/sun3ints.h-33-#define SUN3_VEC_VMESCSI1 (IRQ_USER+1)
./arch/m68k/include/asm/sun3ints.h-34-#define SUN3_VEC_CG

./arch/parisc/kernel/sys_parisc.c:157:/* Fucking broken ABI */
./arch/parisc/kernel/sys_parisc.c-159-#ifdef CONFIG_64BIT
./arch/parisc/kernel/sys_parisc.c-160-asmlinkage long parisc_truncate64(const char __user * path,
./arch/parisc/kernel/sys_parisc.c-161- unsigned int high, unsigned int low)
./arch/parisc/kernel/sys_parisc.c-163- return sys_truncate(path, (long)high << 32 | low);

./arch/x86/kernel/cpu/cpufreq/powernow-k7.c:620: * Some Athlon laptops have really fucked PST tables.
./arch/x86/kernel/cpu/cpufreq/powernow-k7.c-621- * A BIOS update is all that can save them.
./arch/x86/kernel/cpu/cpufreq/powernow-k7.c-622- * Mention this, and disable cpufreq.
./arch/x86/kernel/cpu/cpufreq/powernow-k7.c-623- */
./arch/x86/kernel/cpu/cpufreq/powernow-k7.c-624-static struct dmi_system_id __initdata powernow_dmi_table[] = {
./arch/x86/kernel/cpu/cpufreq/powernow-k7.c-625- {

./arch/sparc/kernel/head_32.S:878: /* XXX Fucking Cypress... */
./arch/sparc/kernel/head_32.S-879- lda [%g0] ASI_M_MMUREGS, %g5
./arch/sparc/kernel/head_32.S-880- srl %g5, 28, %g4

./drivers/mtd/mtd_blkdevs.c-350- /* Register the notifier if/when the first device type is
./drivers/mtd/mtd_blkdevs.c:351: registered, to prevent the link/init ordering from fucking
./drivers/mtd/mtd_blkdevs.c-352- us over. */
./drivers/mtd/mtd_blkdevs.c-353- if (!blktrans_notifier.list.next)
./drivers/mtd/mtd_blkdevs.c-354- register_mtd_user(&blktrans_notifier);

./drivers/scsi/qlogicpti.h:64:/* Am I fucking pedantic or what? */
./drivers/scsi/qlogicpti.h-65-struct Entry_header {
./drivers/scsi/qlogicpti.h-66-#ifdef __BIG_ENDIAN
./drivers/scsi/qlogicpti.h-67- u8 entry_cnt;
./drivers/scsi/qlogicpti.h-68- u8 entry_type;
./drivers/scsi/qlogicpti.h-69- u8 flags;
./drivers/scsi/qlogicpti.h-70- u8 sys_def_1;
./drivers/scsi/qlogicpti.h-71-#else /* __LITTLE_ENDIAN */
./drivers/scsi/qlogicpti.h-72- u8 entry_type;
./drivers/scsi/qlogicpti.h-73- u8 entry_cnt;
./drivers/scsi/qlogicpti.h-74- u8 sys_def_1;

./drivers/watchdog/shwdt.c-116-#ifdef CONFIG_CPU_SH2
./drivers/watchdog/shwdt.c-117- /*
./drivers/watchdog/shwdt.c-118- * Whoever came up with the RSTCSR semantics must've been smoking
./drivers/watchdog/shwdt.c-119- * some of the good stuff, since in addition to the WTCSR/WTCNT write
./drivers/watchdog/shwdt.c:120: * brain-damage, it's managed to fuck things up one step further..
./drivers/watchdog/shwdt.c-121- *
./drivers/watchdog/shwdt.c-122- * If we need to clear the WOVF bit, the upper byte has to be 0xa5..
./drivers/watchdog/shwdt.c-123- * but if we want to touch RSTE or RSTS, the upper byte has to be
./drivers/watchdog/shwdt.c-124- * 0x5a..
./drivers/watchdog/shwdt.c-125- */
./drivers/watchdog/shwdt.c-126- csr = sh_wdt_read_rstcsr();
./drivers/watchdog/shwdt.c-127- csr &= ~RSTCSR_RSTS;
./drivers/watchdog/shwdt.c-128- sh_wdt_write_rstcsr(csr);

Тоже смачные коменты:

./drivers/net/sunhme.c:986:/* Only Sun can take such nice parts and fuck up the programming interface
./drivers/net/sunhme.c-987- * like this. Good job guys...
./drivers/net/sunhme.c-988- */
./drivers/net/sunhme.c-989-#define TCVR_RESET_TRIES 16 /* It should reset quickly */
./drivers/net/sunhme.c-990-#define TCVR_UNISOLATE_TRIES 32 /* Dis-isolation can take longer. */

./drivers/net/sunhme.c:2067: /* This card is _fucking_ hot... */
./drivers/net/sunhme.c-2068- skb->csum = csum_unfold(~(__force __sum16)htons(csum));
./drivers/net/sunhme.c-2069- skb->ip_summed = CHECKSUM_COMPLETE;

./drivers/ide/cmd640.c:14: * These chips are basically fucked by design, and getting this driver
./drivers/ide/cmd640.c-15- * to work on every motherboard design that uses this screwed chip seems
./drivers/ide/cmd640.c-16- * bloody well impossible. However, we're still trying.

И вот совсем отлично:

./lib/vsprintf.c-2- * linux/lib/vsprintf.c
./lib/vsprintf.c-3- *
./lib/vsprintf.c-4- * Copyright (C) 1991, 1992 Linus Torvalds
./lib/vsprintf.c-5- */
./lib/vsprintf.c-7-/* vsprintf.c -- Lars Wirzenius & Linus Torvalds. */
./lib/vsprintf.c:9: * Wirzenius wrote this portably, Torvalds fucked it up :-)
./lib/vsprintf.c-10- */

Добавить комментарий

Войти с помощью: