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]
Date:	Sat, 9 Jan 2016 01:20:42 +0300
From:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:	Tim Gardner <tim.gardner@...onical.com>
Cc:	Armin Schindler <mac@...ware.de>,
	Karsten Keil <isdn@...ux-pingi.de>, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4.4-rc8 6/7] isdn: eicon: diddfunc: Silence frame size
 warning

On 01/09/2016 01:05 AM, Tim Gardner wrote:

>>> From: Tim Gardner <tim.gardner@...onical.com>
>>>
>>> drivers/isdn/hardware/eicon/diddfunc.c: In function 'connect_didd':
>>> drivers/isdn/hardware/eicon/diddfunc.c:77:1: warning: the frame size
>>> of 1152 bytes is larger than 1024 bytes [-Wframe-larger-than=]
>>>
>>> gcc version 5.3.1 20151219 (Ubuntu 5.3.1-4ubuntu1)
>>>
>>> Cc: Armin Schindler <mac@...ware.de>
>>> Cc: Karsten Keil <isdn@...ux-pingi.de>
>>> Signed-off-by: Tim Gardner <tim.gardner@...onical.com>
>>> ---
>>>    drivers/isdn/hardware/eicon/diddfunc.c | 17 +++++++++++++----
>>>    1 file changed, 13 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/drivers/isdn/hardware/eicon/diddfunc.c
>>> b/drivers/isdn/hardware/eicon/diddfunc.c
>>> index b0b23ed..a9feb4f 100644
>>> --- a/drivers/isdn/hardware/eicon/diddfunc.c
>>> +++ b/drivers/isdn/hardware/eicon/diddfunc.c
>>> @@ -52,9 +52,13 @@ static int __init connect_didd(void)
>>>        int x = 0;
>>>        int dadapter = 0;
>>>        IDI_SYNC_REQ req;
>>> -    DESCRIPTOR DIDD_Table[MAX_DESCRIPTORS];
>>> +    DESCRIPTOR *DIDD_Table;
>>>
>>> -    DIVA_DIDD_Read(DIDD_Table, sizeof(DIDD_Table));
>>> +    DIDD_Table = kcalloc(MAX_DESCRIPTORS, sizeof(*DIDD_Table),
>>> GFP_KERNEL);
>>
>>    Previously the array didn't seem to be zeroed, perhaps it's better to
>> use kmalloc_array()?

>> [...]

> The last patch in the series (isdn: eicon: consolidate descriptor
> allocation) consolidates the allocation code into one function. I used
> kmalloc() there because I noticed that diva_didd_read_adapter_array()
> does zero the buffer before using it.
>
> Do you think that is sufficient ?

    If it worked before your patch, yes.

> rtg

MBR, Sergei

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ