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: <47674485-194b-0b09-81ed-5d855284ebd9@gmail.com>
Date:   Sat, 14 Sep 2019 18:18:03 +0300
From:   Ivan Safonov <insafonov@...il.com>
To:     Dan Carpenter <dan.carpenter@...cle.com>
Cc:     Larry Finger <Larry.Finger@...inger.net>,
        devel@...verdev.osuosl.org,
        Robert Węcławski <r.weclawski@...il.com>,
        Florian Büstgens <flbue@....de>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-kernel@...r.kernel.org,
        Nishka Dasgupta <nishkadg.linux@...il.com>
Subject: Re: [PATCH] staging: r8188eu: replace rtw_malloc() with it's
 definition

On 9/10/19 2:59 PM, Dan Carpenter wrote:
> On Sun, Sep 08, 2019 at 12:00:26PM +0300, Ivan Safonov wrote >> rtw_malloc prevents the use of kmemdup/kzalloc and others.
>>
>> Signed-off-by: Ivan Safonov <insafonov@...il.com>
>> ---
>>   drivers/staging/rtl8188eu/core/rtw_ap.c        |  4 ++--
>>   drivers/staging/rtl8188eu/core/rtw_mlme_ext.c  |  2 +-
>>   .../staging/rtl8188eu/include/osdep_service.h  |  3 ---
>>   drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 18 +++++++++---------
>>   drivers/staging/rtl8188eu/os_dep/mlme_linux.c  |  2 +-
>>   .../staging/rtl8188eu/os_dep/osdep_service.c   |  7 +------
>>   6 files changed, 14 insertions(+), 22 deletions(-)
>>
>> diff --git a/drivers/staging/rtl8188eu/core/rtw_ap.c b/drivers/staging/rtl8188eu/core/rtw_ap.c
>> index 51a5b71f8c25..c9c57379b7a2 100644
>> --- a/drivers/staging/rtl8188eu/core/rtw_ap.c
>> +++ b/drivers/staging/rtl8188eu/core/rtw_ap.c
>> @@ -104,7 +104,7 @@ static void update_BCNTIM(struct adapter *padapter)
>>   	}
>>   
>>   	if (remainder_ielen > 0) {
>> -		pbackup_remainder_ie = rtw_malloc(remainder_ielen);
>> +		pbackup_remainder_ie = kmalloc(remainder_ielen, in_interrupt() ? GFP_ATOMIC : GFP_KERNEL);
>                                                                  ^^^^^^^^^^^^^
> This stuff isn't right.  It really should be checking if spinlocks are
> held or IRQs are disabled.  And the only way to do that is by auditing
> the callers.
I hope to make these changes later as separate independent patches.
This patch do only one thing - remove rtw_malloc().

> 
> (The original rtw_malloc() implementation is buggy nonsense).
> 
> regards,
> dan carpenter
> 

Ivan Safonov.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ