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] [day] [month] [year] [list]
Message-ID: <CAJF2gTThvx36XmatbxyuYBEj5b264ueA8NGrS_KuFVtcA_CD-g@mail.gmail.com>
Date:   Tue, 13 Apr 2021 12:01:06 +0800
From:   Guo Ren <guoren@...nel.org>
To:     Randy Dunlap <rdunlap@...radead.org>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-csky@...r.kernel.org, Arnd Bergmann <arnd@...db.de>
Subject: Re: [PATCH] csky: fix syscache.c fallthrough warning

Acked-by: Guo Ren <guoren@...nel.org>

It's a fallthrough is for BCACHE, but affects ICACHE with more
expensive. I'll fix up it later.

        }

On Mon, Apr 12, 2021 at 12:41 AM Randy Dunlap <rdunlap@...radead.org> wrote:
>
> This case of the switch statement falls through to the following case.
> This appears to be on purpose, so declare it as OK.
>
> ../arch/csky/mm/syscache.c: In function '__do_sys_cacheflush':
> ../arch/csky/mm/syscache.c:17:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
>    17 |   flush_icache_mm_range(current->mm,
>       |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>    18 |     (unsigned long)addr,
>       |     ~~~~~~~~~~~~~~~~~~~~
>    19 |     (unsigned long)addr + bytes);
>       |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ../arch/csky/mm/syscache.c:20:2: note: here
>    20 |  case DCACHE:
>       |  ^~~~
>
> Fixes: 997153b9a75c ("csky: Add flush_icache_mm to defer flush icache all")
> Signed-off-by: Randy Dunlap <rdunlap@...radead.org>
> Cc: Guo Ren <guoren@...nel.org>
> Cc: linux-csky@...r.kernel.org
> Cc: Arnd Bergmann <arnd@...db.de>
> ---
> @Guo, should this be a "break" instead of fallthrough?
>
>  arch/csky/mm/syscache.c |    1 +
>  1 file changed, 1 insertion(+)
>
> --- linux-next-20210409.orig/arch/csky/mm/syscache.c
> +++ linux-next-20210409/arch/csky/mm/syscache.c
> @@ -17,6 +17,7 @@ SYSCALL_DEFINE3(cacheflush,
>                 flush_icache_mm_range(current->mm,
>                                 (unsigned long)addr,
>                                 (unsigned long)addr + bytes);
> +               fallthrough;
>         case DCACHE:
>                 dcache_wb_range((unsigned long)addr,
>                                 (unsigned long)addr + bytes);



--
Best Regards
 Guo Ren

ML: https://lore.kernel.org/linux-csky/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ