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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <191213e2-2053-982f-fb24-8b05b96d594d@roeck-us.net>
Date:   Sat, 24 Dec 2016 08:19:15 -0800
From:   Guenter Roeck <linux@...ck-us.net>
To:     Bhumika Goyal <bhumirks@...il.com>, julia.lawall@...6.fr,
        wim@...ana.be, linux-watchdog@...r.kernel.org,
        linux-kernel@...r.kernel.org
Cc:     keescook@...omium.org
Subject: Re: [PATCH] drivers: watchdog: booke_wdt: add __ro_after_init to
 booke_wdt_info

On 12/24/2016 08:07 AM, Bhumika Goyal wrote:
> The object booke_wdt_info of watchdog_info structure is not
> modified after getting initialized by booke_wdt_init. Apart from getting
> referenced in init it is also stored in the info field of watchdog_device
> structure which is of type const struct watchdog_info *info. So, it
> becomes read only after init and therefore add __ro_after_init to it's
> declaration.
>
> Signed-off-by: Bhumika Goyal <bhumirks@...il.com>

Reviewed-by: Guenter Roeck <linux@...ck-us.net>

> ---
>  drivers/watchdog/booke_wdt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/watchdog/booke_wdt.c b/drivers/watchdog/booke_wdt.c
> index 04da4b6..ae034bb 100644
> --- a/drivers/watchdog/booke_wdt.c
> +++ b/drivers/watchdog/booke_wdt.c
> @@ -192,7 +192,7 @@ static int booke_wdt_set_timeout(struct watchdog_device *wdt_dev,
>  	return 0;
>  }
>
> -static struct watchdog_info booke_wdt_info = {
> +static struct watchdog_info booke_wdt_info __ro_after_init = {
>  	.options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING,
>  	.identity = "PowerPC Book-E Watchdog",
>  };
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ