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]
Message-ID: <20180329114114.GQ4082@hirez.programming.kicks-ass.net>
Date:   Thu, 29 Mar 2018 13:41:14 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Dominik Brodowski <linux@...inikbrodowski.net>
Cc:     linux-kernel@...r.kernel.org, viro@...IV.linux.org.uk,
        torvalds@...ux-foundation.org, arnd@...db.de,
        linux-arch@...r.kernel.org, Ingo Molnar <mingo@...hat.com>
Subject: Re: [PATCH 043/109] sched: add do_sched_yield() helper; remove
 in-kernel call to sched_yield()

On Thu, Mar 29, 2018 at 01:23:20PM +0200, Dominik Brodowski wrote:
> Using the sched-internal do_sched_yield() helper allows us to get rid of
> the sched-internal call to the sys_sched_yield() syscall.
> 
> This patch is part of a series which removes in-kernel calls to syscalls.
> On this basis, the syscall entry path can be streamlined. For details, see
> http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net
> 
> Cc: Ingo Molnar <mingo@...hat.com>

Acked-by: Peter Zijlstra (Intel) <peterz@...radead.org>

> Signed-off-by: Dominik Brodowski <linux@...inikbrodowski.net>
> ---
>  kernel/sched/core.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> index e7c535eee0a6..8de4919c889a 100644
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -4892,7 +4892,7 @@ SYSCALL_DEFINE3(sched_getaffinity, pid_t, pid, unsigned int, len,
>   *
>   * Return: 0.
>   */
> -SYSCALL_DEFINE0(sched_yield)
> +static void do_sched_yield(void)
>  {
>  	struct rq_flags rf;
>  	struct rq *rq;
> @@ -4913,7 +4913,11 @@ SYSCALL_DEFINE0(sched_yield)
>  	sched_preempt_enable_no_resched();
>  
>  	schedule();
> +}
>  
> +SYSCALL_DEFINE0(sched_yield)
> +{
> +	do_sched_yield();
>  	return 0;
>  }
>  
> @@ -4997,7 +5001,7 @@ EXPORT_SYMBOL(__cond_resched_softirq);
>  void __sched yield(void)
>  {
>  	set_current_state(TASK_RUNNING);
> -	sys_sched_yield();
> +	do_sched_yield();
>  }
>  EXPORT_SYMBOL(yield);
>  
> -- 
> 2.16.3
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ