Skip to contentSkip to conversation

Blacklist binary-only modules lying about their license

PATCH Robert M. Stockmann 1 participant 1 message Apr 28, 2004 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 11 lines · Tim Hockin
Quoted 6 lines · Robert M. Stockmann
Quoted 2 lines

Care to show me where they use unnamed structures, and how it has anything to do with binary modules?

fasttrak.h :

#define ft3xx {							\
	next: NULL,						\
	...
Quoted 2 lines

}
#endif

Quoted 6 lines
Quoted 4 lines

This header file is needed to be able to link ft3xx.o . In which way binary incompatibility is introduced, inside this case is hard to tell. We will never know i guess , since the type and size of the above components is hidden inside the binary only part :

Do you know C, or just pretend to?

I am no kernel coder, if its that what you mean.

Quoted 9 lines

Those are structure initializers, not unnamed types. They've provided a macro to use to initialize instances of some structure.

fasttrak.c:890 shows

	static Scsi_Host_Template driver_template = ft3xx;

The structure definition for 'Scsi_Host_Template' is in /usr/src/linux/drivers/scsi/hosts.h which is included in fasttrak.c.

Ok you got me there. I would suggest to change fasttrak.h like this to obtain better readability :

#ifndef _ft3xx_h
#define _ft3xx_h

#include <linux/version.h>
#include "/usr/src/linux/drivers/scsi/hosts.h"

#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)

#define ft3xx {                                                 \
        next: NULL,                                             \
	...
};
Quoted 7 lines

If you run it thru the preprocessor, you'd see

	static Scsi_Host_Template driver_template = {
		next: NULL,
		...
	};
Quoted 6 lines

No opaque structs. No unnamed types. No magic. It's not pretty, and it's bound to break on any non-standard rig, but it's NOT what you claim it is.

The initializer style (foo: value) is probably why gcc-2.95 blows up, but I don't have it here to verify.

It does, which awakened me all up in arms. certainly if gcc-2.95.3 is still mentioned as recommended gcc version for the ia32 platform inside /usr/src/linux/Documentation/Changes. It pissed me off not being able to use gcc-2.95.3 when using that fasttrak driver.

Quoted 4 lines

You really should know what you're talking about before you launch a crusade against something.

I agree the fasttrak partial-source kit is not the all defining example. Still i believe nasty stuff is possible.

Robert

Signature · 3 lines
Robert M. Stockmann - RHCE
Network Engineer - UNIX/Linux Specialist
crashrecovery.org  [email protected]