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: <901f4541-ee96-5d6b-5453-559731d65e82@csgroup.eu>
Date:   Thu, 17 Jun 2021 09:20:45 +0200
From:   Christophe Leroy <christophe.leroy@...roup.eu>
To:     Dmitry Safonov <dima@...sta.com>, linux-kernel@...r.kernel.org
Cc:     Dmitry Safonov <0x7f454c46@...il.com>,
        Alexander Viro <viro@...iv.linux.org.uk>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Andy Lutomirski <luto@...nel.org>,
        Arnd Bergmann <arnd@...db.de>, Borislav Petkov <bp@...en8.de>,
        Catalin Marinas <catalin.marinas@....com>,
        Guo Ren <guoren@...nel.org>, "H. Peter Anvin" <hpa@...or.com>,
        Ingo Molnar <mingo@...hat.com>,
        Oleg Nesterov <oleg@...hat.com>,
        Russell King <linux@...linux.org.uk>,
        Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
        Thomas Gleixner <tglx@...utronix.de>,
        Vincenzo Frascino <vincenzo.frascino@....com>,
        Will Deacon <will@...nel.org>, x86@...nel.org
Subject: Re: [PATCH v3 13/23] mm/mmap: Make vm_special_mapping::mremap return
 void



Le 11/06/2021 à 20:02, Dmitry Safonov a écrit :
> Previously .mremap() callback had to return (int) to provide
> a way to restrict resizing of a special mapping. Now it's
> restricted by providing .may_split = special_mapping_split.
> 
> Removing (int) return simplifies further changes to
> special_mapping_mremap() as it won't need save ret code from the
> callback. Also, it removes needless `return 0` from callbacks.
> 
> Signed-off-by: Dmitry Safonov <dima@...sta.com>
> ---
>   arch/arm/kernel/process.c | 3 +--
>   arch/arm64/kernel/vdso.c  | 4 +---
>   arch/mips/vdso/genvdso.c  | 3 +--
>   arch/x86/entry/vdso/vma.c | 4 +---
>   include/linux/mm_types.h  | 4 ++--
>   mm/mmap.c                 | 2 +-
>   6 files changed, 7 insertions(+), 13 deletions(-)
> 

Build failure:

   CC      arch/powerpc/kernel/vdso.o
arch/powerpc/kernel/vdso.c:93:19: error: initialization of 'void (*)(const struct vm_special_mapping 
*, struct vm_area_struct *)' from incompatible pointer type 'int (*)(const struct vm_special_mapping 
*, struct vm_area_struct *)' [-Werror=incompatible-pointer-types]
    93 |         .mremap = vdso32_mremap,
       |                   ^~~~~~~~~~~~~
arch/powerpc/kernel/vdso.c:93:19: note: (near initialization for 'vdso32_spec.mremap')
arch/powerpc/kernel/vdso.c:98:19: error: initialization of 'void (*)(const struct vm_special_mapping 
*, struct vm_area_struct *)' from incompatible pointer type 'int (*)(const struct vm_special_mapping 
*, struct vm_area_struct *)' [-Werror=incompatible-pointer-types]
    98 |         .mremap = vdso64_mremap,
       |                   ^~~~~~~~~~~~~
arch/powerpc/kernel/vdso.c:98:19: note: (near initialization for 'vdso64_spec.mremap')
cc1: all warnings being treated as errors
make[3]: *** [arch/powerpc/kernel/vdso.o] Error 1
make[2]: *** [arch/powerpc/kernel] Error 2
make[1]: *** [arch/powerpc] Error 2
make: *** [__sub-make] Error 2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ