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]
Date: Wed, 14 Feb 2024 12:29:38 +0100
From: Thomas Gleixner <tglx@...utronix.de>
To: Pranav Prasad <pranavpp@...gle.com>, jstultz@...gle.com, sboyd@...nel.org
Cc: linux-kernel@...r.kernel.org, krossmo@...gle.com, Pranav Prasad
 <pranavpp@...gle.com>
Subject: Re: [PATCH v3 1/2] alarmtimer: Add PM notifier to check early for
 imminent alarm

On Wed, Feb 14 2024 at 09:29, Pranav Prasad wrote:
> +static int alarmtimer_pm_callback(struct notifier_block *nb,
> +				  unsigned long mode, void *_unused)
> +{
> +	struct rtc_device *rtc;
> +	ktime_t min, expires;
> +	int type;
> +
> +	switch (mode) {
> +	case PM_SUSPEND_PREPARE:
> +		rtc = alarmtimer_get_rtcdev();
> +		/* If we have no rtcdev, just return */
> +		if (!rtc)
> +			return NOTIFY_DONE;
> +
> +		/* Find the soonest timer to expire */
> +		if (!alarmtimer_get_soonest(&min, &expires, &type))
> +			return NOTIFY_DONE;

Brilliant. Instead of a NULL pointer dereference you decided to add
undefined behaviour this time.

As it survived your "testing" it is obviously correct, right?

I'm tired of your approach to throw stuff at the wall in a hurry and see
what sticks.

Stop this frenzy. Sit down, take your time and do proper engineering
before coming back with this to me.

Thanks,

        tglx


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ