Re: How to change page permission from inside the kernel?

2018-07-07 Thread Ahmed Soliman
> It sounds like the only permission you care about is > the permission of the _guest_ writing to that memory, > not the permission of the qemu-kvm userspace program > writing to that memory. Yes that is perhaps what I meant. > > You may be looking at the wrong page mapping to > manipulate. I

Re: Fwd: How to change page permission from inside the kernel?

2018-07-06 Thread Ahmed Soliman
> What happens after you've been up for 3 weeks and you're running out of > usable pages? That can't happen, it is my mistake missing some details, this is for only protecting Kernel Pages, Pages that are hold code or static data that is created once and assumed to be there for ever, like kernel

Fwd: How to change page permission from inside the kernel?

2018-07-06 Thread Ahmed Soliman
-- Forwarded message -- From: Ahmed Soliman Date: 6 July 2018 at 23:56 Subject: Re: How to change page permission from inside the kernel? To: Valdis Kletnieks >> Implementing some kernel protection against subset of rootkits that >> manipulates kernel static data (

Re: How to change page permission from inside the kernel?

2018-07-06 Thread Ahmed Soliman
> So there's two questions here: > from inside KVM lkm (/virt/kvm and arch/x86/kvm ) > 1) Why does the page's protection need to be changed? Implementing some kernel protection against subset of rootkits that manipulates kernel static data (memory pages as well as their mappings) by having them

How to change page permission from inside the kernel?

2018-07-06 Thread Ahmed Soliman
I have a memory page allocated with mmap() from user space, This address is passed to some kernel module (kvm_intel to be specific) and i want to know how can I change the page permission from inside there My goal is to achieve something like this mprotect(mem, PAGE_SIZE, PROT_READ)

porting linux to new arm board

2016-05-05 Thread Ahmed Soliman
I want to port linux to new Ti tiva C TM4C123G it is 80MHZ 32-bit ARM cortex M4 board with FPU 256KB flash /32bit SRAM /2kb EEPROM I am interested on hacking into this board and turning it to micro server (for fun and learning) or so... I compiled linux kernel few times in the past, yet I am

how it the linux implementation of double linked lists useful

2015-08-02 Thread Ahmed Soliman
while reading through linux/list.h I noticed that the linked list structure is really simple with only pointer to the previous node and pointer to next node with no other data (It can't handle anything inside it ) I started to wonder how such linked list can be useful to the kernel or (useful in

how can I find where is the macro or function deifined

2015-07-28 Thread Ahmed Soliman
Hi; when I used libc I never memorized where each function is located beyond the basics (for example I never knew if strlen is in string.h or ctype.h or strlib.h ) I just check out the functions man pages by man strlen is their such functionality for the kernel where I dont need to memorize the

Please do not generate patches purely based on checkpatch.

2015-07-25 Thread Ahmed Soliman
I have sent a patch for cleaning about 40 error and 50 warning generated checkpatch to the maintainer and all what I got in responce is Nack. Please do not generate patches purely based on checkpatch. so what did I do wrong ?! should I follow checkpatch or not ??

I dont know where to start

2015-07-24 Thread Ahmed Soliman
hi first of all I want to thank you with your real help but currently I started to get lost I can build my own kernel write patches but cannot contribute to the linux kernel because I don't know where to start learning I am really interested in the linux security module (although I know nothing

Re: how to delete kernels cleanly

2015-07-22 Thread Ahmed Soliman
thanks all of you first I just want to point that nothing is available in /usr/src/ for that specific kernel and I found that the best way to remove a kernel built by me is to remove /boot/vmlinuz*KERNEL-VERSION* /boot/initrd.img*KERNEL-VERSION* /boot/System-map*KERNEL-VERSION*

how to delete kernels cleanly

2015-07-22 Thread Ahmed Soliman
I have many kernels on my machine and I want to delete some of them what can I do some of these kernels are shipped with the OS ubuntu 14.04 and others I built by make oldconfig make all make modules sudo make modules_install sudo make install now how can I these kernels

what is the use of #ifndefs

2015-07-20 Thread Ahmed Soliman
currently I started reading through the linux kernel and I started reading liunx/include/linux/list.h I understood some of the functions but still I dont know what does these lines of code do #ifndef _LINUX_LIST_H #define _LINUX_LIST_H which exist at the very beginning of the file I also noticed

how to build Documentation/DocBook/

2015-07-17 Thread Ahmed Soliman
I have fresh kernel downloaded by git and I want to know how to build Documentation/DocBook/ as pdf I have tried make pdfdocs output but I got those warnings Warning(.//include/linux/init.h): no structured comments found Warning(.//kernel/sys.c): no structured comments found