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:   Tue, 8 Jun 2021 15:56:57 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Frederic Weisbecker <frederic@...nel.org>
Cc:     Ingo Molnar <mingo@...nel.org>, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] sched: Always print out preempt dynamic state

On Tue, Jun 08, 2021 at 02:04:42PM +0200, Frederic Weisbecker wrote:
> Previously the preempt dynamic mode wasn't printed out if it wasn't
> overriden with the "preempt=" boot option.
> 
> But now that the default preempt dynamic behaviour can be selected at
> Kconfig time, we can't assume anymore that preempt=full is the default.
> The only way to retrieve that information is to browse the kernel config
> file.
> 
> Better print it out unconditionally then.
> 
> Signed-off-by: Frederic Weisbecker <frederic@...nel.org>
> ---
>  kernel/sched/core.c | 21 ++++++++++++++++-----
>  1 file changed, 16 insertions(+), 5 deletions(-)
> 
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> index df47a8275c37..6b883adad8f7 100644
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -6262,6 +6262,21 @@ int sched_dynamic_mode(const char *str)
>  
>  void sched_dynamic_update(int mode)
>  {
> +	switch (mode) {
> +		case preempt_dynamic_none:
> +			pr_info("Dynamic Preempt: none\n");
> +			break;
> +		case preempt_dynamic_voluntary:
> +			pr_info("Dynamic Preempt: voluntary\n");
> +			break;
> +		case preempt_dynamic_full:
> +			pr_info("Dynamic Preempt: full\n");
> +			break;
> +		default:
> +			pr_info("Dynamic Preempt: incorrect\n");
> +			return;
> +	}

Indent fail; for vim, use: set cino=(0:0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ