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  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]
Date:   Thu, 9 Nov 2017 10:40:13 -0800
From:   Kees Cook <>
To:     Bartlomiej Zolnierkiewicz <>
Cc:     Benjamin Herrenschmidt <>,
        Tomi Valkeinen <>,
        David Lechner <>,
        Daniel Vetter <>,
        Sean Paul <>,
        Jean Delvare <>,
        Hans de Goede <>,
        "Gustavo A. R. Silva" <>,,
        Maling list - DRI developers 
        LKML <>
Subject: Re: [PATCH] video: fbdev: Convert timers to use timer_setup()

On Thu, Nov 9, 2017 at 9:08 AM, Bartlomiej Zolnierkiewicz
<> wrote:
> On Tuesday, October 24, 2017 08:20:26 AM Kees Cook wrote:
>> diff --git a/drivers/video/fbdev/pxa3xx-gcu.c b/drivers/video/fbdev/pxa3xx-gcu.c
>> index 933619da1a94..e88447eac32c 100644
>> --- a/drivers/video/fbdev/pxa3xx-gcu.c
>> +++ b/drivers/video/fbdev/pxa3xx-gcu.c
>> @@ -513,16 +513,10 @@ pxa3xx_gcu_mmap(struct file *file, struct vm_area_struct *vma)
>>  static struct timer_list pxa3xx_gcu_debug_timer;
>> -static void pxa3xx_gcu_debug_timedout(unsigned long ptr)
>> +static void pxa3xx_gcu_debug_timedout(struct timer_list *unused)
>>  {
>> -     struct pxa3xx_gcu_priv *priv = (struct pxa3xx_gcu_priv *) ptr;
>> -
>>       QERROR("Timer DUMP");
> QERROR() macro is using priv so this code now fails to build.

Ah, yes, I see. However, in looking at this, I don't think it ever
worked. The existing code does:

static void pxa3xx_gcu_init_debug_timer(void)
        pxa3xx_gcu_debug_timedout((unsigned long) &pxa3xx_gcu_debug_timer);
static void pxa3xx_gcu_debug_timedout(unsigned long ptr)
        struct pxa3xx_gcu_priv *priv = (struct pxa3xx_gcu_priv *) ptr;

        QERROR("Timer DUMP");

But pxa3xx_gcu_debug_timer is not a struct pxa3xx_gcu_priv, so
QERROR() will be reporting garbage.

I will send a patch that fixes this and switches to timer_setup(),
though it might make more sense to just remove the debug timer

> [ Please compile these timer changes with PXA3XX_GCU_DEBUG and
>   PXA3XX_GCU_DEBUG_TIMER defined. ]

Hm, these appear to be manual knobs? What do you think about wiring
these up to a Kconfig so build tests for things like "make
allmodconfig" would enable it? This would allow for much greater build

> Also please port your changes over fbdvev-for-next tree as
> currently this patch doesn't apply (fbdev tree contains
> "video: fbdev: pxa3xx_gcu: Use setup_timer and mod_timer"
> cleanup).

Sure thing, thanks!


Kees Cook
Pixel Security

Powered by blists - more mailing lists