KernelTrap, OS/kernel, Linux, FreeBSD, Life, NetBSD, GNU/Hurd, OpenBSD, Applications/tools, Other, Nothing, Me, Personal, Linux, FreeBSD

Why do the function prototypes use extern

Submitted by Eus
on May 18, 2008 - 8:14am

It is a universal truth that with or without the extern keyword a function prototype will just do the same. So, why does almost all function prototypes in Linux kernel source code prefixed with the extern keyword?

Getting the size of a member of a struct or union

Submitted by Eus
on May 18, 2008 - 8:07am

Looking at Getting the offset of a member in a struct, I realized that you can also use the same technique to get the size of a member of a struct or a union without declaring a variable of that struct. Suppose a struct has been defined as follows:

struct person
{
	int id;
	char name [50];
	double salary;
};

Getting the offset of a member in a struct

Submitted by Eus
on May 18, 2008 - 8:02am
struct aligned_struct
{
	char a [5];
	int b;
};

get a key: small elaboration about keyboard input

Submitted by olecom
on May 17, 2008 - 12:13am
Better and less ugly key-navigation is possible, if key-release
event and no repeating will be available; application must decide what
to do with input and how to do it. Stupid repeat, don't know ways
to configure it: ESC?, stty?, kbd_rate?, putty?, /sysfs/wtf?, xset?,
KDE?, GNOME?; even `xev` shows it as "press+release", raw mode from
kernel/keyboard i suppose. Geee!!!

ssh brute force

Submitted by olecom
on May 16, 2008 - 5:02am

Follow up to: "Brute-Force SSH Server Attacks Surge (InformationWeek)"

* default debian's "rootlogins: on" is bad;
* it's not easy to make multiple port sshds (dummy and real) due to bad /etc/init.d/ssh;
* i have login-only and work-sh-only accounts;
* script for login-only ones: ftp://flower.upol.cz/sys-olecom/+.profile

Programming Language Critiques

Submitted by olecom
on May 15, 2008 - 5:16am

I wonder, what would be there:
TO DO: What's so special about string and text processing?
trace:
http://pdos.csail.mit.edu/~engler/cool-people.html
http://pdos.csail.mit.edu/~engler/
http://www.stanford.edu/~engler/
big Q: where is Open Source of all that cool stuff?

nice spammy day, but i wanted to make (yet another) post about `sed`

Submitted by olecom
on May 14, 2008 - 4:48am

"You know sokoban. Everybody knows sokoban."

Best gameplay with:

stty -icanon -echo -echoctl; printf '\033c\233?25l'
while echo; do dd count=1; done 2>&- | sed -ne "
  `sed 's :q ^C g' <sokoban.sed`"
printf '\233?25h'; stty echo echoctl icanon

Animation: ftp://flower.upol.cz/dts/Sed0000/sokoban-intro.sh

Another way to use the C ternary operator (? :)

Submitted by Eus
on May 12, 2008 - 5:58am

I found in Linux kernel 2.6.21.5 in include/net/netinet_hastables.h in function __inet_lookup this interesting expression:

	return sk ? : __inet_lookup_listener(hashinfo, daddr, hnum, dif);

#!/bin/sh: designing features for efficiency, flexibility and ease of use.

Submitted by olecom
on May 9, 2008 - 8:41am
$ sed '' << 'EOF'
Before i will continue my anti-`make`, anti-kconfig/kbuild, i need you
to know about `sh` ideas. `sh` is power, integral part of UNIX. This is
the first and main userspace tool, as important as kernel itself. But
it has its legacy and design problems, as well as complete lack of
development in last 20 or so years.

ftp://flower.upol.cz/dts/ash0000_var/ideas
EOF

sp@m: simply

Submitted by olecom
on May 5, 2008 - 7:18pm
After this comment about Jeremy's spam module for this site i think,
i have context to post some ideas about simple non-CPU, bandwidth
sucking, non GUI means of fighting cheap, non-human spam. I'm
stupid text-mode guy, thus:

* CSS obscurity (non-)captcha like for web
* To, In-reply-to, From, Message-id for SMTP/e-mail.

Linux: need of working and simple euidaccess() syscall

Submitted by olecom
on May 5, 2008 - 11:14am

* another bug report (thread)
http://thread.gmane.org/gmane.comp.shells.dash/36/focus=37
* another nice conversation with kernel hackers
http://thread.gmane.org/gmane.linux.file-systems/23151/focus=23160

the most simple shell `test` tool fail, yet they discuss case-insensitive renames, oh gee. Code part is raceless stripped linux-2.6/fs/open.c:sys_faccessat():

IDE (file changing/edit, flexible configure, building on-the-go): Linux kernel kconfig and kbuild alternatives.

Submitted by olecom
on May 4, 2008 - 9:10am

Important stuff. But it needs much more work, than linux kernel has and all useless GUI stuff does.

1) message after coding one smaller replacement of `test` in `dash`
2) message after yesterday's exercises with input, adds UI part.
3) side note about recurcive `make` and useless `make` itself.

LKML: No comments...

Submitted by olecom
on April 30, 2008 - 10:48am
From: Matthew Wilcox;
Cc: linux-kernel@vger.kernel.org

On Wed, Apr 30, 2008 at 07:57:16PM +0200, Oleg Verych wrote:
> Why? Why GNU C compiler developers didn't do such (obviously useful)
> tool? C compiler (some part of it) *is* responsible for parsing,
> tokenizing, etc. Why there is development of never-ending buggy
> optimizations only[0]?

Shut up.

--

DSO howto comments

Submitted by olecom
on April 26, 2008 - 2:19am

Today's second item in http://www.google.com/search?q=Oleg+Verych

is my mail about commets to DSO howto by mister Drepper.
http://sourceware.org/ml/libc-alpha/2007-09/msg00004.html

Haven't any feedback (as usual). So, please, take a look.
About first item (coloring stdout && stderr, small kbuild example) and /bin/sh latter.
EOF

Finally! Imagination of programmers: keyboard and pointer devices.

Submitted by olecom
on April 24, 2008 - 9:48pm
Message-ID: <8499950a0804242134i16747008yd49bf15782c318bd@mail.gmail.com>
Date: Fri, 25 Apr 2008 05:34:56 +0100
From: "Oleg Verych" <olecom?ENOMSG@gmail.com>
To: "GCC for MSP430 - http://mspgcc.sf.net"
Subject: keyboard and pointer devices (Re: super-macro intention description language)

>  > But maybe I'm missing the point.  My programming keyboard has exactly two