전체 글 (507) 썸네일형 리스트형 [리눅스커널] 인터럽트 후반부 기법은 왜 적용할까? 인터럽트 후반부 기법을 적용하는 이유 인터러트 후반부 기법을 쓰는 이유에 대해 알아보기 전에 커널이 인터럽트를 어떤 방식으로 처리하는지 살펴볼 필요가 있습니다. 5장에서 배운 내용을 정리해보겠습니다. 1. 인터럽트가 발생하면 커널은 실행 중인 프로세스를 멈추고 인터럽트 벡터를 실행해서 인터럽트 핸들러를 실행합니다. 2. 인터럽트 핸들러는 짧고 빨리 실행해야 합니다. 3. 인터럽트를 처리하는 구간이 인터럽트 컨택스트인데 이를 in_interrupt() 함수가 알려줍니다. 인터럽트 후반부 기법을 적용해야 하는 이유는 인터럽트 컨택스트에서 빨리 실행을 끝내야 하기 때문입니다. 인터럽트는 실행 중인 코드를 멈추고 인터럽트를 핸들링하기 때문입니다. 자연스럽게 임베디드 리눅스 개발자뿐만 아니라 임베디드 .. [LinuxKernel][ARM] char buf[32]; vs char buf[32]={0}; Quite interesting patch was released under the following url.https://source.codeaurora.org/quic/la/kernel/msm-3.18/commit/?h=rel/msm-3.18&id=a0039b1e721b7b3ee1cbe7f7f9d44d451ac74543 The detailed patch is to initialize the stack array with a different way as below.-------------------------------------------------------------------------------------usb : dwc3: Initialize kernel stack variables pro.. [KernelCrash] panic due to voltage droop in the specific device Kernel panic log 2107.232713 / 01-01 11:11:03.809][7] init: cannot find '/system/bin/qrngp' (No such file or directory), disabling 'qrngp'[ 2107.239317 / 01-01 11:11:03.809][5] Unable to handle kernel NULL pointer dereference at virtual address 00000028[ 2107.239351 / 01-01 11:11:03.809][5] pgd = e37ec000[ 2107.239366 / 01-01 11:11:03.809][0] [00000028] *pgd=00000000[ 2107.239388 / 01-01 11:11:0.. [KernelCrash] Abort at do_raw_spin_lock() with "cat /d/shrinker" When I enter the command adb shell "cat /d/shrinker", the system crashes with 100% after dumping the following kernel message as below.[ 761.636711] Unable to handle kernel paging request at virtual address f38a9a84[ 761.645048] pgd = e8074000[ 761.649800] [f38a9a84] *pgd=a0721811, *pte=00000000, *ppte=00000000[ 761.658106] Internal error: Oops: 7 [#1] PREEMPT SMP ARM[ 761.665481] Modules linked.. [LinuxKernel][ARM] Aarch64: How stack is pushed in Aarch64? [1]: SP address is now FFFFFFEB67BE7A40[2]: With "str x21,[SP,#-0x30]!" instruction, the stack is pushed up to 0x30 byte.[3]: X19 and X20 is pushed into stack.[4]: X29 and X30 is pushed into stack. 15 collision = find_worker_executing_work(pool, work);16 if (unlikely(collision)) {17 move_linked_works(work, &collision->scheduled, NULL);18 return;19 } ZSX:FFFFFF8B40CE71B8|F81D0FF5 set_next_entity:.. [Liunx][Kernel] Abort at __list_del_entry() inside process_one_work() Debugging Kernel panic occurs at 68 line inside __list_del_entry() whose caller function is process_one_work().Code Review at the moment of kernel panic 49void __list_del_entry(struct list_head *entry)50{51 struct list_head *prev, *next;5253 prev = entry->prev;54 next = entry->next;5556 if (WARN(next == LIST_POISON1,57 "list_del corruption, %p->next is LIST_POISON1 (%p)\n",58 entry, LIST_POISON1.. [KernelCrash] Abort at tty_wakeup() due to port_tty(null) I can restore callstack using T32 as followings;[] do_page_fault+0x338/0x3f8 [] do_DataAbort+0x38/0x98 [] __dabt_svc+0x38/0x60 [] tty_wakeup+0xc/0x64 [] gs_start_io+0x94/0xf4 [] gserial_connect+0xe0/0x180[] acm_set_alt+0x88/0x1a8 [] composite_setup+0xd34/0x1520 [] android_setup+0x1f4/0x1fc [] forward_to_driver+0x64/0x100 [] musb_g_ep0_irq+0x7d8/0x1c18 [] musb_interrupt+0x94/0xc78 [] generic_inte.. [LinuxKernel] Crash-Utility: add new command "ps -e" Why I added new features to crash tool?Sometimes, some linux kernel in another platform are missing struct task_struct.sched_info.last_arrival element. For this matter, it is hard to know how the processes are executed at the time of order.The "ps -e" command allows for listing the process at the time of order based on execution launching time.crash> ps -eps: exec_start - task_struct.se.exec_sta.. 이전 1 ··· 58 59 60 61 62 63 64 다음