Re: Where to find the information how to write a state of the art USB driver?

2022-01-13 Thread Greg KH
On Thu, Jan 13, 2022 at 04:33:50PM +0100, Greg KH wrote: > On Thu, Jan 13, 2022 at 07:39:38AM +0100, Philipp Hortmann wrote: > > On 1/12/22 10:54 AM, Greg KH wrote: > > > That driver tried to be an example for an unknown device, doing multiple > > > different things that no single driver/device

Re: Where to find the information how to write a state of the art USB driver?

2022-01-13 Thread Greg KH
On Thu, Jan 13, 2022 at 07:39:38AM +0100, Philipp Hortmann wrote: > On 1/12/22 10:54 AM, Greg KH wrote: > > That driver tried to be an example for an unknown device, doing multiple > > different things that no single driver/device would probably ever need. > > Also it can almost always just be

Re: How to disable address randomization ?

2022-01-13 Thread Jeffrey Walton
On Thu, Jan 13, 2022 at 4:04 PM admin LI wrote: > > I'm developing a kernel module for an ARM machine, while debugging I found > addresses > printed are all randomized and useless for debugging. > > To prove I was not crazy I wrote this small program: > > - >

Re: How to disable address randomization ?

2022-01-13 Thread Aruna Hewapathirane
> > When I search randomization the only thing I found is KASLR which I > don't think is the same thing. > Think about this carefully. When you insmod that kernel module which address space is it using ? Kernel or Userspace ? :-) This will help:

How to disable address randomization ?

2022-01-13 Thread admin LI
Hi, I'm developing a kernel module for an ARM machine, while debugging I found addresses printed are all randomized and useless for debugging. To prove I was not crazy I wrote this small program: - #include #include #include #include MODULE_LICENSE("GPL");

Re: Where to find the information how to write a state of the art USB driver?

2022-01-13 Thread Greg KH
On Thu, Jan 13, 2022 at 08:01:04PM +0100, Greg KH wrote: > On Thu, Jan 13, 2022 at 07:54:19PM +0100, Philipp Hortmann wrote: > > On 1/13/22 4:33 PM, Greg KH wrote: > > > On Thu, Jan 13, 2022 at 07:39:38AM +0100, Philipp Hortmann wrote: > > > > On 1/12/22 10:54 AM, Greg KH wrote: > > > > > That

Re: Where to find the information how to write a state of the art USB driver?

2022-01-13 Thread Greg KH
On Thu, Jan 13, 2022 at 07:54:19PM +0100, Philipp Hortmann wrote: > On 1/13/22 4:33 PM, Greg KH wrote: > > On Thu, Jan 13, 2022 at 07:39:38AM +0100, Philipp Hortmann wrote: > > > On 1/12/22 10:54 AM, Greg KH wrote: > > > > That driver tried to be an example for an unknown device, doing multiple >

Re: Where to find the information how to write a state of the art USB driver?

2022-01-13 Thread Philipp Hortmann
On 1/13/22 4:33 PM, Greg KH wrote: On Thu, Jan 13, 2022 at 07:39:38AM +0100, Philipp Hortmann wrote: On 1/12/22 10:54 AM, Greg KH wrote: That driver tried to be an example for an unknown device, doing multiple different things that no single driver/device would probably ever need. Also it can

RE: How to disable address randomization ?

2022-01-13 Thread Chan Kim
Hi, To print kernel virtual address, you should use %px instead of %p in the printk. Probably that’s why you couldn’t see the pointer values correctly. Chan From: admin LI Sent: Friday, January 14, 2022 6:02 AM To: kernelnewbies@kernelnewbies.org Subject: How to disable address

RE: How to disable address randomization ?

2022-01-13 Thread admin LI
Hi Chan, Thank you for pointing me to the right direction. Pointer Types = Pointers printed without a specifier extension (i.e unadorned %p) are hashed to give a unique identifier without leaking kernel addresses to user space. On 64 bit machines the first 32 bits are zeroed. If

Re: How to disable address randomization ?

2022-01-13 Thread admin LI
Hi Jeff, Thanks for your help, finally I found this in kernel document. Pointer Types = Pointers printed without a specifier extension (i.e unadorned %p) are hashed to give a unique identifier without leaking kernel addresses to user space. On 64 bit machines the first 32 bits are