walk up pagetables on ARM

2016-10-06 Thread Oscar Salvador
Hi all, for learning purposes, I wanted to emulate "lookup_address" function for ARM platforms, but I'm having some troubles which I don't know how to get over them. I'll explain it: I start by retrieving the value of swapper_pg_dir from TTBR1 register (during head.S executions the physical addr

problem init_mm undefined on arm

2016-09-30 Thread Oscar Salvador
Hi! While testing a module on arm platforms, I got an error which disturbed me. In my module I'm using pgd_offset_k [ http://lxr.free-electrons.com/source/arch/x86/include/asm/pgtable.h#L720], and this macro is working for x86 and x86_64. For arm platforms this macro is also defined here: http:

Re: check if a kernel page is read-only

2016-09-12 Thread Oscar Salvador
Thanks for the hints Valdis. 2016-09-07 18:48 GMT+02:00 : > On Wed, 07 Sep 2016 15:47:30 +0200, Oscar Salvador said: > > > You are right regarding security stuff, but was not my will either > > bypassing memory protections or crashing the system. > > Never said th

Re: check if a kernel page is read-only

2016-09-07 Thread Oscar Salvador
2016-09-07 15:47 GMT+02:00 Oscar Salvador : > > > 2016-09-06 21:47 GMT+02:00 : > >> On Tue, 06 Sep 2016 13:23:48 +0200, Oscar Salvador said: >> > I guess I explained it wrong. I'm not writing neither a rootkit nor a >> > module which is messing with

Re: check if a kernel page is read-only

2016-09-07 Thread Oscar Salvador
2016-09-06 21:47 GMT+02:00 : > On Tue, 06 Sep 2016 13:23:48 +0200, Oscar Salvador said: > > I guess I explained it wrong. I'm not writing neither a rootkit nor a > > module which is messing with kernel memory. I'm writing a module to be > able > > to r/w kern

Re: check if a kernel page is read-only

2016-09-06 Thread Oscar Salvador
2016-09-05 18:57 GMT+02:00 : > On Mon, 05 Sep 2016 12:59:46 +0200, Oscar Salvador said: > > > I'm writing a module to read/write kernel memory, and for this I'd like > to > > check if a page is marked as read-only > > Actually, you almost certainly want to d

Re: check if a kernel page is read-only

2016-09-05 Thread Oscar Salvador
t; *lookup_address <http://lxr.free-electrons.com/ident?i=lookup_address>(unsigned long address <http://lxr.free-electrons.com/ident?i=address>, unsigned int *level <http://lxr.free-electrons.com/ident?i=level>); And then I can checks the flags of this pte. 2016-09-05 12:59

check if a kernel page is read-only

2016-09-05 Thread Oscar Salvador
Hi all, I'm writing a module to read/write kernel memory, and for this I'd like to check if a page is marked as read-only, so we don't have the right to write there (kernel code for instance). I though about the flags field from "struct page {}", but from the name I can't see any useful flag to c

Re: Learning Memory Management for linux

2014-12-03 Thread Oscar Salvador
Hey Saket! Is this email in linux mail list related to mm or in the generic mail list? Thanks! El 03/12/2014 06:28, "Saket Sinha" escribió: > Hi Dean, > > Recently, Kent Overstreet has drooped a mail on linux kernel > mailing list with the subject "Block layer projects that I haven't

Re: doubt about interrupts and spinlocks

2014-10-27 Thread Oscar Salvador
gards 2014-10-24 21:16 GMT+02:00 anish singh : > inline answers. > > On Fri, Oct 24, 2014 at 8:04 AM, Oscar Salvador < > osalvador.vilard...@gmail.com> wrote: > >> Hi! >> >> I have a doubt about interrupts and spin locks. >> I'm not sure if I'

doubt about interrupts and spinlocks

2014-10-24 Thread Oscar Salvador
erwise it can go to sleep and I can lose my lock? Thank you very much Oscar Salvador ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Re: values from pci_dev or read from config space - pci

2014-08-26 Thread Oscar Salvador
Thanks ;)! I didn't find it. Kind regards 2014-08-26 15:39 GMT+02:00 : > On Tue, 26 Aug 2014 08:33:18 +0200, Oscar Salvador said: > >> If I get the IRQ from the pci_dev, I get a X, but if I get the IRQ >> from the config space, I get another different number Y. >&g

values from pci_dev or read from config space - pci

2014-08-25 Thread Oscar Salvador
Hi everybody! I was thinking about post this question in the linux-pci list, but I'm not sure if this question is very basic for it, so maybe it's better aks here. If not, I'll ask there. My question is about that I'm writing a driver for a old realtek network card, only for learning purposes, an

Network driver ( dma, iomem.. )

2014-08-05 Thread Oscar Salvador
Hi People!, How are you doing? I write to you because I'm writing a driver for a Realtek8139D 10/100Mbps, just for fun and for practice my knowledge. I spent some time reading about PCI specifications, but I have some doubts about that: 1- I/O Port or I/O memory mapping ( RTL8139 has BAR0 for I

IRQ mismatch ifconfig and /proc/interrupts

2014-07-25 Thread Oscar Salvador
Hi People! How are you doing? I'm writting to you because I have a doubt about interrupts. If I look the interrupts assigned to my eth* with ifconfig, I get: eth0 Link encap:Ethernet HWaddr bb:aa:bb:bb:aa:aa Interrupt:20 Memory:f7e0-f7e2 eth1 Link encap:Ethernet

some project

2014-07-14 Thread Oscar Salvador
Hi to everybody! How are you? I'm new here, and I was looking the kernelnewbies website to search some information explaining how a newbie should start in this area. The problem is I think that http://kernelnewbies.org/KernelJanitors/Todo and http://kernelnewbies.org/KernelProjects are outdated, s