lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <48E8C8AB.3010308@s5r6.in-berlin.de>
Date:	Sun, 05 Oct 2008 16:01:15 +0200
From:	Stefan Richter <stefanr@...6.in-berlin.de>
To:	Thiago Lacerda <thiagotbl@...il.com>
CC:	linux-kernel@...r.kernel.org
Subject: Re: Questions about mmap

Thiago Lacerda wrote:
> typedef struct hashtable {
>    flow_t *hashBuckets[X]; // X is a natural number
>    unsigned int size;
> } Hastable;
> 
> 
> So, my question is: Can I mmap the hashtable struct and access
> directly from userspace? I'm afraid that this could turn on mess
> because of the array of pointers.
> If it's possible, does anyone know a piece of code that can match my
> problem? I've been googling and I just find codes dealing with structs
> itself, not pointers.

If you require portability, you can only use integer types of fixed size
in kernel<->userspace ABIs.  Pointers can then be exchanged as __u64
under the assumption that pointers not wider than 64 bits.  See for
example the FW_CDEV_IOC_QUEUE_ISO ioctl in include/linux/firewire-cdev.h.
-- 
Stefan Richter
-=====-==--- =-=- --=-=
http://arcgraph.de/sr/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ