Re: struct nbd_reply not packed => trouble?

2013-01-14 Thread
在 2013-1-11,0:42,"Yann Droneaud" 写道: >> Hello kernel hackers, >> >> >> I noticed that in [linux]/include/uapi/linux/nbd.h the structure >> >> struct nbd_request { >> __be32 magic; >> __be32 type;/* == READ || == WRITE */ >> char handle[8]; >> __b

Re: What is asmlinkage ?

2013-01-11 Thread
orrect for all architectures? >> > >> > I guess not, asmlinkage is undefined for arm, so I assume this mechanism is >> > not there for arm. >> then how do they do it? >> > >> > >> > >> > On Fri, Jan 4, 2013 at 2:24 PM, 卜弋天 wrote: >> >

Re: What is asmlinkage ?

2013-01-04 Thread
在 2013-1-4,15:38,"Rajat Sharma" 写道: > > So with asmlinkage we request compiler to put args on stack. What is > > advantage of this to start_kernel or in general to other functions ? > > See its about implementation ease and little of performance too. Assuming the > default model of keeping a

Re: Find out function arguments value from stack pointer

2012-12-12 Thread
在 2012-12-12,19:28,"Manavendra Nath Manav" 写道: > On Wed, Dec 12, 2012 at 4:38 PM, Fabio Pozzi wrote: >>> When i call print values at offsets starting from >>> __builtin_frame_address (0) the function arguments start from offset >>> 2. How can I confirm that this behavior is always consistent.

RE: kernel stack memory

2012-09-13 Thread
i don't know why you want to corrupt kernel stack by using this method, stack usually grow from high address to low address, if you allocate a buff in a function then use memset(), it is writing data from low address to high address.in your implementation, you allocate an array with 8000*4=3200

RE: setup_thread_stack

2012-07-17 Thread
Date: Tue, 17 Jul 2012 21:15:50 +0200 Subject: setup_thread_stack From: francesco.sc...@gmail.com To: kernelnewbies@kernelnewbies.org Hi, I'm totally new to kernel code, just trying to understand the basics of the core subsystems. During the do_fork call, there is a call to dup_task_struc

RE: Why can not processes switch in atomic context?

2012-07-05 Thread
> Date: Wed, 4 Jul 2012 08:12:25 -0700 > Subject: Re: Why can not processes switch in atomic context? > From: dhyla...@gmail.com > To: bu...@live.cn > CC: mobile.parmeni...@gmail.com; kernelnewbies@kernelnewbies.org > > Hi, > > On Wed, Jul 4, 2012 at 3:44 AM, 弋天 卜 wrote: > > > > > > 在 2012-

RE: Why can not processes switch in atomic context?

2012-07-04 Thread
> Date: Wed, 4 Jul 2012 08:12:25 -0700 > Subject: Re: Why can not processes switch in atomic context? > From: dhyla...@gmail.com > To: bu...@live.cn > CC: mobile.parmeni...@gmail.com; kernelnewbies@kernelnewbies.org > > Hi, > > On Wed, Jul 4, 2012 at 3:44 AM, 弋天 卜 wrote: > > > > > > 在 2012-

RE: vmalloc size

2012-06-26 Thread
> Now this also means that increasing vmalloc inadvertently reduces lowmem. > Why is this designed such a way? It may or may not depending on the amount of physical memory and the size of the vmalloc space. vmalloc space will normally increase vmalloc_end, which won't reduce lowmem. If the

RE: vmalloc size

2012-06-25 Thread
> Suppose your machine has 1 GB of RAM with a physical addresses of > 0x4000 thru 0x7FFF > > Let's suppose that PHYS_OFFSET = 0xC000 > Let's suppose that VMALLOC_START is set to 0xE000 and VMALLOC_END > is at 0xEFFF (256 Mb) > is this PAGE_OFFSET or PHYS_OFFSET? > So what w

how to get create/compile time of vmlinux

2012-04-20 Thread
Hi All:i have a vmlinux file, how can i know when it is created/compiled? thanks. Best Regards ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/k

RE: how to use the memory allocated in kernel?

2012-04-18 Thread
Hi :you can find out the meaning in vmalloc.c, function vmalloc(). vmalloc accept only one parameter, the size of memory that you want to allocate. this function will return the virtual address which you can use to read/write data inside it. vmalloc hides some implementation details

RE: static I/O device mapping of UART for early prints & console

2012-03-11 Thread
> Date: Sun, 11 Mar 2012 12:29:44 +0530 > Subject: static I/O device mapping of UART for early prints & console > From: pcuser.ma...@gmail.com > To: kernelnewbies@kernelnewbies.org > > I'm doing kernel porting to arm926 based FPGA board (similar to > samsung-s3c6410 board). I'm trying to setup

How to avoid kernel Oops 0x81F in function do_alignment() ?

2012-03-03 Thread
Hi experts: an user application generates a un-alignment data abort, then in function do_alignment, kernel read the instruction from the address where data abort occurs by: fault = __get_user(instr, (u32 *)instrptr);after this sentence, instr is the error instruction that generate

is there any Android APK that generate the SIGBUG error because of ARM NEON instructions?

2012-02-24 Thread
Hi All: anybody who met such error of Android application? the logcat will be something like below: signal 7 (SIGBUS), code 128 (?), fault addr #00 pc 00015cec /data/data/com.pccw.mobile.sip/lib/libavcodec.so <--this lib use ARM NEON instructions

RE: pagetables used in interrupt context

2012-02-23 Thread
re > completely disabled, (I mean no other can interrupt the processor) > while executing an interrupt handler. > > > > 2012/2/23 卜弋天 : > > Hi : > > > > for ARM architecture, from the point of my view, interrupt can be > > handled in IRQ, SVC, or SYSTEM mo

RE: pagetables used in interrupt context

2012-02-23 Thread
context > From: c.a.subraman...@gmail.com > To: bu...@live.cn > CC: dhyla...@gmail.com; subingangadha...@gmail.com; > kernelnewbies@kernelnewbies.org > > On Thu, Feb 23, 2012 at 6:52 AM, 卜弋天 wrote: > > Hi Subin: > > > > for kernel version 2.6.35, ARM architectu

RE: pagetables used in interrupt context

2012-02-23 Thread
Hi Subin: for kernel version 2.6.35, ARM architecture, when interrupt occurs, kernel will change from USER/SVC mode to IRQ mode,backup some registers and change to SVC mode immediately, handle the real interrupt handler in SVC mode, which people say in interrupt context.kernel will use

RE: SA_INTERRUPT or SA_SHIRQ

2012-02-23 Thread
Hi Devendra:can you please tell me your kernel version? SA_INTERRUPT is deprecated for many years. it is changed to be IRQF_DISABLED, which is also deprecated since 2.6.35. in kernel 2.6.35, top half interrupt handler will be called with interrupts disabled, and for SA_SHIRQ, it is

RE: arm assembly doubt

2012-02-18 Thread
Hi: the SWI is used for system APIs such as open, read, write. user mode applications call system APIs via SWI, which will change ARM mode from USER to SVC. so when vector_swi is called, Linux will do as below: 1. store r0~r12, these registers are universal for USR mode SVC mode.

RE: Memory barrier

2011-12-09 Thread
t cores within a cache coherent SMP system. > > When compiling a kernel without CONFIG_SMP, all SMP barriers are > > converted into plain compiler barriers. > > > > 2011/12/9 卜弋天 : > >> Hi : > >> > >> memory barriers can not make order on other cpus

RE: Memory barrier

2011-12-08 Thread
Hi : memory barriers can not make order on other cpus, only the current cpu's order will be promised. > Date: Fri, 9 Dec 2011 12:54:40 +0530 > Subject: Memory barrier > From: trisha1ma...@gmail.com > To: Kernelnewbies@kernelnewbies.org > > Hi All, > > I need small clarification