2004-01-11 01:57:29

by Justin Pryzby

[permalink] [raw]
Subject: personality.h: struct map_segment

include/linux/personality.h defines

struct exec_domain {
const char *name; /* name of the execdomain */
handler_t handler; /* handler for syscalls */
unsigned char pers_low; /* lowest personality */
unsigned char pers_high; /* highest personality */
unsigned long *signal_map; /* signal mapping */
unsigned long *signal_invmap; /* reverse signal mapping */
struct map_segment *err_map; /* error mapping */
struct map_segment *socktype_map; /* socket type mapping */
struct map_segment *sockopt_map; /* socket option mapping */
struct map_segment *af_map; /* address family mapping */
struct module *module; /* module context of the ed. */
struct exec_domain *next; /* linked list (internal) */
};

However, as best as I can tell, struct map_segment is never defined.
I've grepped 2.4 and 2.5, and googled to no avail. I'm just curious, is
this simply unimplemented functionality? And what is it ultimately
supposed to do?

Justin


2004-01-11 13:59:52

by Christoph Hellwig

[permalink] [raw]
Subject: Re: personality.h: struct map_segment

On Sat, Jan 10, 2004 at 08:57:24PM -0500, Justin Pryzby wrote:
> However, as best as I can tell, struct map_segment is never defined.
> I've grepped 2.4 and 2.5, and googled to no avail. I'm just curious, is
> this simply unimplemented functionality? And what is it ultimately
> supposed to do?

It's used in the linux-abi modules to map between constants of foreign
OSes to the Linux native ones, e.g. for error numbers, signal numbers
and whatever. It probably does not have much business beeing in mainline
personality.h..