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:   Thu, 17 May 2018 14:24:02 +0800
From:   Shawn Lin <shawn.lin@...k-chips.com>
To:     Mathieu Malaterre <malat@...ian.org>
Cc:     shawn.lin@...k-chips.com, Linus Walleij <linus.walleij@...aro.org>,
        Ulf Hansson <ulf.hansson@...aro.org>,
        Adrian Hunter <adrian.hunter@...el.com>,
        Wolfram Sang <wsa+renesas@...g-engineering.com>,
        linux-mmc@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mmc: block: propagate correct returned value in
 mmc_rpmb_ioctl

On 2018/5/17 14:16, Mathieu Malaterre wrote:
> On Thu, May 17, 2018 at 4:45 AM, Shawn Lin <shawn.lin@...k-chips.com> wrote:
>>
>> On 2018/5/17 3:20, Mathieu Malaterre wrote:
>>>
>>> In commit 97548575bef3 ("mmc: block: Convert RPMB to a character device")
>>> a
>>> new function `mmc_rpmb_ioctl` was added. The final return is simply
>>> returning a value of `0` instead of propagating the correct return code.
>>>
>>> Discovered during a compilation with W=1, silence the following gcc
>>> warning
>>>
>>>     drivers/mmc/core/block.c:2470:6: warning: variable ‘ret’ set but not
>>> used [-Wunused-but-set-variable]
>>>
>>
>> Good catch! But hey, which gcc are you using now? Mine, gcc-linaro-
>> 6.3.1-2017.05-x86_64_aarch64-linux-gnu, with W=1 doesn't warn about
>> this.
> 
> $ powerpc-linux-gnu-gcc --version
> powerpc-linux-gnu-gcc (Debian 6.3.0-18) 6.3.0 20170516
> Copyright (C) 2016 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> 

Thanks for sharing.

> This is the default powerpc cross compiler on Debian stable (no
> change). Config is simply a ppc32 (with some minor customization).
> 
> 
>> And it's worth backporting to stable.
> 
> I am not familiar with the process, do I need to submit a v2 to add the line:
> 
> Cc: <stable@...r.kernel.org> # v4.15+
> 

In general Ulf could kindly help with it when applied. :)

> ?
> 
>> Reviewed-by: Shawn Lin <shawn.lin@...k-chips.com>
>>
>>
>>> Signed-off-by: Mathieu Malaterre <malat@...ian.org>
>>> ---
>>>    drivers/mmc/core/block.c | 2 +-
>>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c
>>> index 9e923cd1d80e..38a7586b00cc 100644
>>> --- a/drivers/mmc/core/block.c
>>> +++ b/drivers/mmc/core/block.c
>>> @@ -2485,7 +2485,7 @@ static long mmc_rpmb_ioctl(struct file *filp,
>>> unsigned int cmd,
>>>                  break;
>>>          }
>>>    -     return 0;
>>> +       return ret;
>>>    }
>>>      #ifdef CONFIG_COMPAT
>>>
>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ