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: <1857082.urnTVIQKcg@aspire.rjw.lan>
Date:   Sat, 02 Sep 2017 15:47:20 +0200
From:   "Rafael J. Wysocki" <rjw@...ysocki.net>
To:     Kees Cook <keescook@...omium.org>
Cc:     Thomas Gleixner <tglx@...utronix.de>, Pavel Machek <pavel@....cz>,
        Len Brown <len.brown@...el.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Mike Marciniszyn <mike.marciniszyn@...el.com>,
        Dennis Dalessandro <dennis.dalessandro@...el.com>,
        Doug Ledford <dledford@...hat.com>,
        Sean Hefty <sean.hefty@...el.com>,
        Hal Rosenstock <hal.rosenstock@...il.com>,
        Dmitry Torokhov <dmitry.torokhov@...il.com>,
        Jeff Kirsher <jeffrey.t.kirsher@...el.com>,
        linux-pm@...r.kernel.org, linux-rdma@...r.kernel.org,
        linux-input@...r.kernel.org, intel-wired-lan@...ts.osuosl.org,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 31/31] timer: Switch to testing for .function instead of .data

On Friday, September 1, 2017 1:29:43 AM CEST Kees Cook wrote:
> In several places, .data is checked for initialization to gate early
> calls to del_timer_sync(). Checking for .function is equally valid, so
> switch to this in all callers.
> 
> Cc: "Rafael J. Wysocki" <rjw@...ysocki.net>
> Cc: Pavel Machek <pavel@....cz>
> Cc: Len Brown <len.brown@...el.com>
> Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> Cc: Mike Marciniszyn <mike.marciniszyn@...el.com>
> Cc: Dennis Dalessandro <dennis.dalessandro@...el.com>
> Cc: Doug Ledford <dledford@...hat.com>
> Cc: Sean Hefty <sean.hefty@...el.com>
> Cc: Hal Rosenstock <hal.rosenstock@...il.com>
> Cc: Dmitry Torokhov <dmitry.torokhov@...il.com>
> Cc: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
> Cc: linux-pm@...r.kernel.org
> Cc: linux-rdma@...r.kernel.org
> Cc: linux-input@...r.kernel.org
> Cc: intel-wired-lan@...ts.osuosl.org
> Cc: netdev@...r.kernel.org
> Signed-off-by: Kees Cook <keescook@...omium.org>
> ---
>  drivers/base/power/wakeup.c                 |  3 +--
>  drivers/infiniband/hw/hfi1/chip.c           |  6 ++----
>  drivers/infiniband/hw/hfi1/init.c           |  2 +-
>  drivers/infiniband/hw/qib/qib_iba7220.c     |  2 +-
>  drivers/infiniband/hw/qib/qib_iba7322.c     |  2 +-
>  drivers/infiniband/hw/qib/qib_init.c        | 14 +++++---------
>  drivers/infiniband/hw/qib/qib_mad.c         |  2 +-
>  drivers/input/input.c                       |  5 ++---
>  drivers/net/ethernet/intel/i40e/i40e_main.c |  2 +-
>  9 files changed, 15 insertions(+), 23 deletions(-)
> 
> diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c
> index 144e6d8fafc8..79a3c1b204af 100644
> --- a/drivers/base/power/wakeup.c
> +++ b/drivers/base/power/wakeup.c
> @@ -479,8 +479,7 @@ static bool wakeup_source_not_registered(struct wakeup_source *ws)
>  	 * Use timer struct to check if the given source is initialized
>  	 * by wakeup_source_add.
>  	 */
> -	return ws->timer.function != pm_wakeup_timer_fn ||
> -		   ws->timer.data != (unsigned long)ws;
> +	return ws->timer.function != pm_wakeup_timer_fn;
>  }
>  
>  /*

Acked-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>

for the above.

Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ