[리눅스커널][디버깅] 유저공간 abort 발생 시 커널 패닉 유발하는 패치
By Guillermo Austin Kim | 2019년 3월 24일 |
개발 도중에 유저 공간에서 abort가 발생합니다. 안드로이드 플렛폼에서는 tombstone이 생성돼 레지스터와 콜스택을 확인할 수 있습니다.Revision: '0'ABI: 'arm'pid: 16458, tid: 16513, name: thermal-engine >>> /system/vendor/bin/thermal-engine <<<signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0Cause: null pointer dereference r0 00000000 r1 a73a48c0 r2 8362dec4 r3 8362deec r4 80000000 r5 00000000 r6 83639000 r7 83c35
[Linux][Kernel] data abort@irq_affinity_notify - 리눅스 커널
By Guillermo Austin Kim | 2018년 1월 12일 |
아래 커널 로그와 함께 시스템이 커널 패닉으로 돌아가셨어요.irq_affinity_notify+0x4c 란 함수에서 data abort가 난 것을 확인할 수 있어요.[287229.435076] <c6>mmc0: mmc_start_bkops: raw_bkops_status=0x2, from_exception=1[287230.328287] <c6>mmc0: mmc_start_bkops: Starting bkops[287231.319886] <26>Unable to handle kernel NULL pointer dereference at virtual address 000000fc[287231.319920] <26>pgd = c0004000[287231.319936]
[리눅스커널] 프로세스: 유저 프로세스의 스레드 그룹 디버깅해보기
By Guillermo Austin Kim | 2020년 5월 5일 |
커널에서 실행 중인 프로세스는 커널 스레드인 커널 프로세스와 유저 프로세스로 구분할 수 있습니다.그런데 유저 공간에서 생성된 프로세스는 스레드 그룹의 리더 프로세스와 스레드 그룹에 속한 스레드로 분류할 수 있는데요. 이번 시간에는 프로세스의 태스크 디스크립터를 리뷰하면서 이 내용을 확인하겠습니다. 다음은 대부분 리눅스 시스템에서 확인할 수 있는 "swapper/1" 프로세스의 태스크 디스크립터입니다. (struct task_struct *) [-] (struct task_struct*)0xf0a1e900 = 0xF0A1E900 -> ( (long int) [D:0xF0A1E900] state = 0x0, (void *) [D:0xF0A1E904] stack = 0xF0A52000,
[리눅스커널] 워크큐: struct worker 구조체 파악하기
By Guillermo Austin Kim | 2020년 3월 11일 |
워커를 관리하고 저장하는 자료구조는 worker 구조체입니다. 이번 절에서는 worker 구조체의 세부 필드를 분석하겠습니다. worker 구조체 분석 다음은 worker 구조체의 선언부입니다. struct worker {2 union {3 struct list_head entry; 4 struct hlist_node hentry; 5 };6 struct work_struct *current_work; 7 work_func_t current_func; 8 struct pool_workqueue *current_pwq; 9 bool desc_valid;10 struct list_head scheduled; 1112 struct task_struct *task; 13 struct worker_p