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: <CANLsYkwxkXZ5t5L1_=2e9FLdkwOg7KUT=u2o-KeEfH8QYOfStA@mail.gmail.com>
Date:   Mon, 15 May 2017 11:47:01 -0600
From:   Mathieu Poirier <mathieu.poirier@...aro.org>
To:     SF Markus Elfring <elfring@...rs.sourceforge.net>
Cc:     "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "Suzuki K. Poulose" <suzuki.poulose@....com>,
        kernel-janitors@...r.kernel.org,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/3] coresight: etb10: Improve a size determination in etb_alloc_buffer()

On 12 May 2017 at 12:53, SF Markus Elfring
<elfring@...rs.sourceforge.net> wrote:
> From: Markus Elfring <elfring@...rs.sourceforge.net>
> Date: Fri, 12 May 2017 20:36:03 +0200
>
> Replace the specification of a data structure by a pointer dereference
> as the parameter for the operator "sizeof" to make the corresponding size
> determination a bit safer according to the Linux coding style convention.
>
> Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
> ---
>  drivers/hwtracing/coresight/coresight-etb10.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/hwtracing/coresight/coresight-etb10.c b/drivers/hwtracing/coresight/coresight-etb10.c
> index d5b96423e1a5..7096c4562e15 100644
> --- a/drivers/hwtracing/coresight/coresight-etb10.c
> +++ b/drivers/hwtracing/coresight/coresight-etb10.c
> @@ -278,8 +278,7 @@ static void *etb_alloc_buffer(struct coresight_device *csdev, int cpu,
>         if (cpu == -1)
>                 cpu = smp_processor_id();
>         node = cpu_to_node(cpu);
> -
> -       buf = kzalloc_node(sizeof(struct cs_buffers), GFP_KERNEL, node);
> +       buf = kzalloc_node(sizeof(*buf), GFP_KERNEL, node);

I'm fine with this change but if it's going to happen, it has to be in
all the coresight drivers and not just this one - please respin with
all instances fixed.  One patch per driver would be much appreciated.

Thanks,
Mathieu


>         if (!buf)
>                 return NULL;
>
> --
> 2.12.3
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@...ts.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ