Linux???????δ?????????????
???????????? ???????[ 2016/5/17 10:17:29 ] ?????????????? Linux
????sched_fork ????
????core.c
????int sched_fork(unsigned long clone_flags?? struct task_struct *p)
????{
????unsigned long flags;
????int cpu = get_cpu();
????__sched_fork(clone_flags?? p);
????//?????????????? TASK_RUNNING
????p->state = TASK_RUNNING;
????//……
????//????????? CPU
????set_task_cpu(p?? cpu);
????put_cpu();
????return 0;
????}
??????????????sched_fork?????????????????????????????????????? TASK_RUNNING???????????? CPU
????copy_thread ????
????int copy_thread(unsigned long clone_flags?? unsigned long sp??
????unsigned long arg?? struct task_struct *p)
????{
????//???????????
????struct pt_regs *childregs = task_pt_regs(p);
????struct task_struct *tsk;
????int err;
????p->thread.sp = (unsigned long) childregs;
????p->thread.sp0 = (unsigned long) (childregs+1);
????memset(p->thread.ptrace_bps?? 0?? sizeof(p->thread.ptrace_bps));
????if (unlikely(p->flags & PF_KTHREAD)) {
????//??????
????memset(childregs?? 0?? sizeof(struct pt_regs));
????p->thread.ip = (unsigned long) ret_from_kernel_thread;
????task_user_gs(p) = __KERNEL_STACK_CANARY;
????childregs->ds = __USER_DS;
????childregs->es = __USER_DS;
????childregs->fs = __KERNEL_PERCPU;
????childregs->bx = sp; /* function */
????childregs->bp = arg;
????childregs->orig_ax = -1;
????childregs->cs = __KERNEL_CS | get_kernel_rpl();
????childregs->flags = X86_EFLAGS_IF | X86_EFLAGS_FIXED;
????p->thread.io_bitmap_ptr = NULL;
????return 0;
????}
????//???????????????????????
????*childregs = *current_pt_regs();
????//????? eax ?? 0?????fork ??????????0
????childregs->ax = 0;
????if (sp)
????childregs->sp = sp;
????//?????ip ?????ret_from_fork???????????ret_from_fork??????
????p->thread.ip = (unsigned long) ret_from_fork;
????//……
????return err;
????}
????copy_thread ??δ????????????????????????????
??????????? fork ????????з???0???????childregs->ax = 0;??δ????????? eax ????0
?????????p->thread.ip = (unsigned long) ret_from_fork;???????? ip ????? ret_form_fork ??????????????????? ret_from_fork ?????е?
???????
???????????????????????
????dup_task_struct???????????μ???
??????????sched_fork?????????TASK_RUNNING
????copy_thread?н?????????????????????????????????????????????????μ?
??????ret_from_fork?????????eip????????
????????????ret_from_fork??????
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
Linux??????DDR????????????Linux?????????????????豸??????????linux???в???????????м??????????????????????????Linux????Linux??DNS????????????γ???????????Linux?????????????Linux????(???)????????Linux ????????????????????????????????Windows???У?Linux???????Linux????????????????Linux iommu??vfio???????Linux????ε???TCP???????Linux?????????????СLinux?·???????????Linux???Jexus?й?Asp.Net Core??ó???Linux?????????Щ??

???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????