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:   Mon, 26 Aug 2019 17:01:31 +0800
From:   "Tanwar, Rahul" <rahul.tanwar@...ux.intel.com>
To:     Andy Shevchenko <andriy.shevchenko@...el.com>
Cc:     tglx@...utronix.de, mingo@...hat.com, bp@...en8.de, hpa@...or.com,
        tony.luck@...el.com, x86@...nel.org, a.zummo@...ertech.it,
        alexandre.belloni@...tlin.com, robh+dt@...nel.org,
        mark.rutland@....com, linux-rtc@...r.kernel.org,
        devicetree@...r.kernel.org, alan@...ux.intel.com,
        linux-kernel@...r.kernel.org, qi-ming.wu@...el.com,
        cheol.yong.kim@...el.com, rahul.tanwar@...el.com
Subject: Re: [PATCH v1 1/2] x86/rtc: Add option to skip using RTC


Hi Andy,

On 23/8/2019 8:56 PM, Andy Shevchenko wrote:
>>>> get_wallclock() and set_wallclock() are function pointers of platform_ops
>>>>
>>>> which are initialized to mach_get_cmos_time() and mach_set_rtc_mmss()
>>>>
>>>> at init time. Since adding a new platform to override these functions is
>>>>
>>>> discouraged, so the only way is to modify RTC get/set functions.
>>> Shouldn't it be platform agnostic code?
>>> So, my point is, instead of hacking two functions, perhaps better to avoid them
>>> at all.
>> Sorry, i could not understand your point. The changes are platform
>>
>> agnostic i.e. it doesn't break existing use cases. Are you recommending
>>
>> to add a new platform and make changes there ?
> Nope, I propose to do something like
>
> void __init foo()
> {
> 	if (platform has RTC)
> 		return;
>
> 	set_wallclock = noop;
> 	get_wallclock = noop;
> }

Thanks. I will work out a V2 patch as per your suggestion

and send out for review again.

Regards,

Rahul

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ