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: <20171027080006.GA609@tigerII.localdomain>
Date:   Fri, 27 Oct 2017 17:00:06 +0900
From:   Sergey Senozhatsky <sergey.senozhatsky@...il.com>
To:     Jeetesh Burman <jburman@...dia.com>
Cc:     sergey.senozhatsky@...il.com, keescook@...omium.org,
        linux-kernel@...r.kernel.org, bbasu@...dia.com
Subject: Re: [PATCH] panic: add support to update panic_timeout via DT

On (10/27/17 09:27), Jeetesh Burman wrote:
> Add support to set 'panic_timeout' value via dtb to have
> control from device tree. This makes sense when you have
> multiple platforms support from same defconfig and
> differentiated only through device tree blob.
> The patch will check for panic time out value coming
> from dtb if it exists, otherwise continues with
> defconfig provided option.

*my personal opinion* - I'm not super happy to see more and more
of_find_node_by_name()'s in random places. but that's just IMHO.

>  static int init_oops_id(void)
>  {
> +	struct device_node *np;
> +
> +	np = of_find_node_by_name(NULL, "panic_timeout");
> +	if (np)
> +		of_property_read_u32(np, "panic-timeout-value", &panic_timeout);
> +
>  	if (!oops_id)
>  		get_random_bytes(&oops_id, sizeof(oops_id));
>  	else

why init_oops_id()? you are going to re-read it every time you call
print_oops_end_marker(), and the system can be configured not to
panic on oops. put it to oops_setup()? or, at least, move it to
`if (!oops_id)' branch, maybe?

	-ss

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ