Re: [RFC v8 13/20] um: lkl: integrate with irq infrastructure of UML

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Mon, 15 Mar 2021 05:45:23 +0900,
Johannes Berg wrote:
> 
> On Wed, 2021-01-20 at 11:27 +0900, Hajime Tazaki wrote:
> >  static irqreturn_t um_timer(int irq, void *dev)
> >  {
> > +#ifndef CONFIG_UMMODE_LIB
> >  	if (get_current()->mm != NULL)
> 
> Why is the ifdef needed - get_current()->mm should always be NULL for
> LKL? Surely get_current() must still work?

What we tried to ifdef is to avoid the following call;

   os_alarm_process(get_current()->mm->context.id.u.pid);

because we didn't use/update get_current()->mm->context.id (struct
mm_id) and calling kill(0, SIGALRM) makes a program puzzled thus,
eliminate it.

> >  	sigemptyset(&sig_mask);
> >  	sigaddset(&sig_mask, sig);
> > -	if (sigprocmask(SIG_UNBLOCK, &sig_mask, NULL) < 0)
> > -		panic("sigprocmask failed - errno = %d\n", errno);
> > +	if (pthread_sigmask(SIG_UNBLOCK, &sig_mask, NULL) < 0)
> > +		panic("pthread_sigmask failed - errno = %d\n", errno);
> 
> UML doesn't normally link with libpthread, and LKL doesn't actually
> appear to require it either (since it has its lkl_thread and all), so
> this seems wrong?

I think both UML/LKL link with libpthread.  See old
scripts/link-vmlinux.sh, or [01/20] patch.

-		${CC} ${CFLAGS_vmlinux}				\
-			${strip_debug}				\
-			-o ${output}				\
-			-Wl,-T,${lds}				\
-			${objects}				\
-			-lutil -lrt -lpthread
-		rm -f linux

-- Hajime




[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux