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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHG_u-kVbFzMg8FrNFaa58SOmtkKnG8pxXh88KTWC5C_3it9xA@mail.gmail.com>
Date:	Sat, 23 Mar 2013 17:25:35 -0300
From:	Eduardo Cruz <eduardohmdacruz@...il.com>
To:	Clemens Ladisch <clemens@...isch.de>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: remap kernel static memory to user space

I'm adding some asm code in arch/ia64/kernel/ivt.S
to gather some memory usage statistics.

>From whatever reason, when I allocate the memory using
kmalloc/vmalloc, my assembly code cashes the machine when I load the
allocated memory.

If I use static allocated memory, the asm code works.

I know the problem is not the assembly code.

The problem is that I want to be able to read this data from user space.
Since the code performance critical, I don't want to do a
copy_to_user, I prefer to mmap this data into user space.

The problem is, if I use kmalloc/vmalloc, I managed to map the memory
to user space.
However, the asm interrupt handler crashs.

On the other hand, if I use static data, the asm interrupt handler
works, while the mmap fails.

Do you have any clues?

2013/3/22 Clemens Ladisch <clemens@...isch.de>:
> Eduardo Cruz wrote:
>> Please, anyone knows how to solve this problem?
>>
>> 2013/3/20 Eduardo Cruz <eduardohmdacruz@...il.com>:
>>> I'm trying to remap some kernel static memory to user space using
>>> remap_pfn_range.
>
> Well, don't do that.
>
> What is the actual problem you're trying to solve?
>
>
> Regards,
> Clemens



-- 
Eduardo Henrique Molina da Cruz
PhD student
Parallel and Distributed Processing Group
Federal University of Rio Grande do Sul (UFRGS)
--
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