lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 17 Aug 2016 21:39:41 +0200
From:	Colin Vidal <colin@...dal.org>
To:	linux-kernel@...r.kernel.org
Cc:	mingo@...hat.com, peterz@...radead.org
Subject: Re: sched: current instead rq->current

On Mon, 2016-08-15 at 21:30 +0200, Colin Vidal wrote:
> Hello,
> 
> At the beginning of __schedule (kernel/sched/core.c), the current
> task
> is get with rq->curr. I try to to understand why not directly using
> current instead?
> 
> Since a runqueue is specific to a CPU, it dosen't make sense to get
> the
> the current task of another CPU's runqueue. Yes?
> 
> I try the following of Linus's master branch
> 
> -       int cpu;
>  
> -       cpu = smp_processor_id();
> -       rq = cpu_rq(cpu);
> -       prev = rq->curr;
> +       rq = cpu_rq(smp_processor_id());
> +       prev = current;
> 
> and it seems to work (only tested on x86-64), but... To simple?
> 
> Thanks!
> 
> Colin

I realize that I have forgotten to add scheduler subsystem in CC... So
I do it now. Sorry for double post.

Thanks

Colin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ