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] [day] [month] [year] [list]
Message-ID: <aJsuYlRDgmpdQ_rK@gofer.mess.org>
Date: Tue, 12 Aug 2025 13:06:58 +0100
From: Sean Young <sean@...s.org>
To: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
Cc: Anna-Maria Behnsen <anna-maria@...utronix.de>,
	Frederic Weisbecker <frederic@...nel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Juri Lelli <juri.lelli@...hat.com>,
	Vincent Guittot <vincent.guittot@...aro.org>,
	Dietmar Eggemann <dietmar.eggemann@....com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
	Valentin Schneider <vschneid@...hat.com>,
	Matt Wu <wuqiang.matt@...edance.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>,
	Mauro Carvalho Chehab <mchehab@...nel.org>,
	Jan Kiszka <jan.kiszka@...mens.com>,
	Kieran Bingham <kbingham@...nel.org>, linux-kernel@...r.kernel.org,
	linux-sound@...r.kernel.org, linux-media@...r.kernel.org
Subject: Re: [PATCH 6/8] media: pwm-ir-tx: Avoid direct access to hrtimer
 clockbase

On Tue, Aug 12, 2025 at 08:08:14AM +0200, Thomas Weißschuh wrote:
> The field timer->base->get_time is a private implementation detail and
> should not be accessed outside of the hrtimer core.
> 
> Switch to an equivalent higher-level helper.
> 
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
> ---
>  drivers/media/rc/pwm-ir-tx.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/media/rc/pwm-ir-tx.c b/drivers/media/rc/pwm-ir-tx.c
> index 84533fdd61aa6ce3c0f8593aaefe5919fd05c7f9..047472dc9244afe0e56e505be20f36fd7d9c449a 100644
> --- a/drivers/media/rc/pwm-ir-tx.c
> +++ b/drivers/media/rc/pwm-ir-tx.c
> @@ -117,7 +117,6 @@ static int pwm_ir_tx_atomic(struct rc_dev *dev, unsigned int *txbuf,
>  static enum hrtimer_restart pwm_ir_timer(struct hrtimer *timer)
>  {
>  	struct pwm_ir *pwm_ir = container_of(timer, struct pwm_ir, timer);
> -	ktime_t now;
>  
>  	/*
>  	 * If we happen to hit an odd latency spike, loop through the
> @@ -139,9 +138,7 @@ static enum hrtimer_restart pwm_ir_timer(struct hrtimer *timer)
>  		hrtimer_add_expires_ns(timer, ns);
>  
>  		pwm_ir->txbuf_index++;
> -
> -		now = timer->base->get_time();
> -	} while (hrtimer_get_expires_tv64(timer) < now);
> +	} while (hrtimer_expires_remaining(timer) > 0);

Acked-by: Sean Young <sean@...s.org>



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ