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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 2 Feb 2021 19:49:20 +0100
From:   Pavel Machek <pavel@....cz>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     linux-kernel@...r.kernel.org, stable@...r.kernel.org,
        Rouven Czerwinski <r.czerwinski@...gutronix.de>,
        Sumit Garg <sumit.garg@...aro.org>,
        Jens Wiklander <jens.wiklander@...aro.org>
Subject: Re: [PATCH 5.10 067/142] tee: optee: replace might_sleep with
 cond_resched

Hi!

> From: Rouven Czerwinski <r.czerwinski@...gutronix.de>
> 
> commit dcb3b06d9c34f33a249f65c08805461fb0c4325b upstream.
> 
> might_sleep() is a debugging aid and triggers rescheduling only for
> certain kernel configurations. Replace with an explicit check and
> reschedule to work for all kernel configurations. Fixes the following
> trace:

The need_resched() part is unneccessary/wrong AFAICT. And it seems
there's already a follow up patch that fixes this one.

(I'm not sure it causes any problem).

Best regards,
								Pavel
								
> @@ -148,7 +149,8 @@ u32 optee_do_call_with_arg(struct tee_co
>  			 */
>  			optee_cq_wait_for_completion(&optee->call_queue, &w);
>  		} else if (OPTEE_SMC_RETURN_IS_RPC(res.a0)) {
> -			might_sleep();
> +			if (need_resched())
> +				cond_resched();
>  			param.a0 = res.a0;
>  			param.a1 = res.a1;
>  			param.a2 = res.a2;
> 

-- 
http://www.livejournal.com/~pavelmachek

Download attachment "signature.asc" of type "application/pgp-signature" (196 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ