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]
Message-ID: <CADyBb7vRKjDoeOfH=3Uwz+D0xyXaC9cM4ZSEO+MwL8Gw5T-Umg@mail.gmail.com>
Date:	Sun, 7 Feb 2016 02:02:12 +0800
From:	Fu Wei <fu.wei@...aro.org>
To:	Guenter Roeck <linux@...ck-us.net>
Cc:	Timur Tabi <timur@...eaurora.org>,
	Rob Herring <robh+dt@...nel.org>,
	Paweł Moll <pawel.moll@....com>,
	Mark Rutland <mark.rutland@....com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Kumar Gala <galak@...eaurora.org>,
	Wim Van Sebroeck <wim@...ana.be>,
	Jon Corbet <corbet@....net>,
	Catalin Marinas <catalin.marinas@....com>,
	Will Deacon <will.deacon@....com>,
	Suravee Suthikulpanit <Suravee.Suthikulpanit@....com>,
	LKML <linux-kernel@...r.kernel.org>,
	linux-watchdog@...r.kernel.org, linux-doc@...r.kernel.org,
	devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	Linaro ACPI Mailman List <linaro-acpi@...ts.linaro.org>,
	rruigrok@...eaurora.org, "Abdulhamid, Harb" <harba@...eaurora.org>,
	Christopher Covington <cov@...eaurora.org>,
	Dave Young <dyoung@...hat.com>,
	Pratyush Anand <panand@...hat.com>,
	G Gregory <graeme.gregory@...aro.org>,
	Al Stone <al.stone@...aro.org>,
	Hanjun Guo <hanjun.guo@...aro.org>,
	Jon Masters <jcm@...hat.com>, Arnd Bergmann <arnd@...db.de>,
	Leo Duran <leo.duran@....com>,
	Sudeep Holla <sudeep.holla@....com>
Subject: Re: [PATCH v10 5/5] Watchdog: ARM SBSA Generic Watchdog half timeout
 panic support

Hi Guenter,

On 6 February 2016 at 07:54, Guenter Roeck <linux@...ck-us.net> wrote:
> On 02/05/2016 10:21 AM, Fu Wei wrote:
>>
>> On 5 February 2016 at 22:42, Guenter Roeck <linux@...ck-us.net> wrote:
>>>
>>> On 02/05/2016 01:51 AM, Fu Wei wrote:
>>>>
>>>>
>>>> Hi Guenter,
>>>>
>>>> On 4 February 2016 at 13:17, Guenter Roeck <linux@...ck-us.net> wrote:
>>>>>
>>>>>
>>>>> On 02/03/2016 03:00 PM, Fu Wei wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>> On 4 February 2016 at 02:45, Timur Tabi <timur@...eaurora.org> wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Fu Wei wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> As you know I have made the pre-timeout support patch, If people
>>>>>>>> like
>>>>>>>> it, i am happy to go on upstream it separately.
>>>>>>>>
>>>>>>>> If we want to use pre-timeout here, user only can use get_pretimeout
>>>>>>>> and disable panic by setting pretimeout to 0
>>>>>>>> but user can not really set pretimeout, because "pre-timeout  ==
>>>>>>>> timeout / 2 (always)".
>>>>>>>> if user want to change pretimeout, he/she has to set_time instead.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Ok, I think patches 4 and 5 should be combined, and I think the
>>>>>>> Kconfig
>>>>>>> entry should be removed and just use panic_enabled.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Agreed.
>>>>
>>>>
>>>>
>>>> np, will do
>>>>
>>>>>>
>>>>>>
>>>>>> NP, will update this patchset like that ,  thanks :-)
>>>>>>
>>>>>
>>>>> Also, if panic is enabled, the timeout needs to be adjusted accordingly
>>>>> (to only panic after the entire timeout period has expired, not after
>>>>> half of it). We can not panic the system after timeout / 2.
>>>>
>>>>
>>>>
>>>> OK, my thought is
>>>>
>>>> if panic is enabled :
>>>> |--------WOR-------WS0--------WOR-------WS1
>>>> |------timeout------(panic)------timeout-----reset
>>>>
>>>> if panic is disabled .
>>>> |--------WOR-------WS0--------WOR-------WS1
>>>> |---------------------timeout---------------------reset
>>>>
>>>>    panic_enabled only can be configured when module is loaded by module
>>>> parameter
>>>>
>>>> But user should know that max_timeout(panic_enable) =
>>>> max_timeout(panic_disable) / 2
>>>>
>>>
>>> That means you'll have to update max_timeout accordingly.
>>
>>
>> panic_enabled only can be configured when module is loaded, so we
>> don't need to update it.
>>
>> max_timeout will only be set up in the init stage.
>>
>> Does it make sense ? :-)
>>
> Not sure I understand your problem or question.
>
> max_timeout will have to reflect the correct maximum timeout, under
> all circumstances. It will have to be set to the correct value before
> the watchdog driver is registered.

yes, understood,  my thought is :

in  static int sbsa_gwdt_probe(struct platform_device *pdev)

if (action) {
        wdd->min_timeout = 1;
        wdd->max_timeout = U32_MAX / gwdt->clk;
} else {
        wdd->min_timeout = 2;
        wdd->max_timeout = U32_MAX / gwdt->clk * 2;
}



>
> Guenter
>



-- 
Best regards,

Fu Wei
Software Engineer
Red Hat Software (Beijing) Co.,Ltd.Shanghai Branch
Ph: +86 21 61221326(direct)
Ph: +86 186 2020 4684 (mobile)
Room 1512, Regus One Corporate Avenue,Level 15,
One Corporate Avenue,222 Hubin Road,Huangpu District,
Shanghai,China 200021

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ