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: <f982f176-c171-44db-b86c-f91b7d926949@linux.microsoft.com>
Date: Tue, 10 Sep 2024 12:07:53 +0530
From: Naman Jain <namjain@...ux.microsoft.com>
To: Michael Kelley <mhklinux@...look.com>,
 "K . Y . Srinivasan" <kys@...rosoft.com>,
 Haiyang Zhang <haiyangz@...rosoft.com>, Wei Liu <wei.liu@...nel.org>,
 Dexuan Cui <decui@...rosoft.com>, Daniel Lezcano
 <daniel.lezcano@...aro.org>, Thomas Gleixner <tglx@...utronix.de>
Cc: "linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
 "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
 "stable@...r.kernel.org" <stable@...r.kernel.org>
Subject: Re: RE: [PATCH] clocksource: hyper-v: Fix hv tsc page based
 sched_clock for hibernation



On 9/9/2024 9:16 PM, Michael Kelley wrote:
> From: Naman Jain <namjain@...ux.microsoft.com> Sent: Sunday, September 8, 2024 10:39 PM
>>
>> read_hv_sched_clock_tsc() assumes that the Hyper-V clock counter is
>> bigger than the variable hv_sched_clock_offset, which is cached during
>> early boot, but depending on the timing this assumption may be false

..

>> +	old_save_sched_clock_state = x86_platform.save_sched_clock_state;
>> +	x86_platform.save_sched_clock_state = hv_save_sched_clock_state;
>> +	old_restore_sched_clock_state = x86_platform.restore_sched_clock_state;
>> +	x86_platform.restore_sched_clock_state = hv_restore_sched_clock_state;
> 
> This Hyper-V clocksource/timer driver has intentionally been kept
> instruction set architecture independent.  See the comment at the top
> of the source code file. We've also avoided any "#ifdef x86" or similar, though
> it's OK to have #ifdef's on specific clock-related functionality like
> GENERIC_SCHED_CLOCK.
> 
> The reference to "x86_platform" violates the intended independence. The
> code to save-on-suspend and update-on-resume can probably stay in this
> module in generic form, but hooking the functions into the x86_platform
> function call mechanism should move to x86-specific code.
> 
> Michael
> 

Thanks for the review and guidance Michael. I'll take care of it in v2.


Regards,
Naman


>> +
>>   	/*
>>   	 * TSC page mapping works differently in root compared to guest.
>>   	 * - In guest partition the guest PFN has to be passed to the
>>
>> base-commit: da3ea35007d0af457a0afc87e84fddaebc4e0b63
>> --
>> 2.25.1
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ