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:   Wed, 23 Feb 2022 20:42:26 +0800
From:   Guo Ren <guoren@...nel.org>
To:     Rolf Eike Beer <eb@...ix.com>
Cc:     Palmer Dabbelt <palmer@...belt.com>, Arnd Bergmann <arnd@...db.de>,
        Anup Patel <anup@...infault.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        liush <liush@...winnertech.com>, Wei Fu <wefu@...hat.com>,
        Drew Fustini <drew@...gleboard.org>,
        Wang Junqiang <wangjunqiang@...as.ac.cn>,
        Christoph Hellwig <hch@....de>,
        linux-arch <linux-arch@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-riscv <linux-riscv@...ts.infradead.org>,
        linux-csky@...r.kernel.org,
        linux-s390 <linux-s390@...r.kernel.org>,
        sparclinux <sparclinux@...r.kernel.org>,
        linuxppc-dev <linuxppc-dev@...ts.ozlabs.org>,
        Parisc List <linux-parisc@...r.kernel.org>,
        "open list:BROADCOM NVRAM DRIVER" <linux-mips@...r.kernel.org>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        "the arch/x86 maintainers" <x86@...nel.org>,
        Guo Ren <guoren@...ux.alibaba.com>
Subject: Re: [PATCH V5 17/21] riscv: compat: vdso: Add setup additional pages implementation

On Wed, Feb 23, 2022 at 8:19 PM Rolf Eike Beer <eb@...ix.com> wrote:
>
> > @@ -66,35 +68,35 @@ static int vdso_mremap(const struct vm_special_mapping
> > *sm, return 0;
> >  }
> >
> > -static int __init __vdso_init(void)
> > +static int __init __vdso_init(struct __vdso_info *vdso_info)
> >  {
> >       unsigned int i;
> >       struct page **vdso_pagelist;
> >       unsigned long pfn;
> >
> > -     if (memcmp(vdso_info.vdso_code_start, "\177ELF", 4)) {
> > +     if (memcmp(vdso_info->vdso_code_start, "\177ELF", 4)) {
> >               pr_err("vDSO is not a valid ELF object!\n");
> >               return -EINVAL;
> >       }
> >
>
> Does anyone actually guarantee that this is at least this 4 bytes long?

You can ref:
arch/arm64/kernel/vdso.c
arch/arm/kernel/vdso.c
arch/nds32/kernel/vdso.c

and in arch/powerpc/boot/elf.h:
arch/powerpc/kernel/fadump.c:   memcpy(elf->e_ident, ELFMAG, SELFMAG);
arch/powerpc/boot/elf.h:#define ELFMAG0         0x7f    /* EI_MAG */
arch/powerpc/boot/elf.h:#define ELFMAG1         'E'
arch/powerpc/boot/elf.h:#define ELFMAG2         'L'
arch/powerpc/boot/elf.h:#define ELFMAG3         'F'
arch/powerpc/boot/elf.h:#define ELFMAG          "\177ELF"
arch/powerpc/boot/elf.h:#define SELFMAG         4


>
> Eike
> --
> Rolf Eike Beer, emlix GmbH, https://www.emlix.com
> Fon +49 551 30664-0, Fax +49 551 30664-11
> Gothaer Platz 3, 37083 Göttingen, Germany
> Sitz der Gesellschaft: Göttingen, Amtsgericht Göttingen HR B 3160
> Geschäftsführung: Heike Jordan, Dr. Uwe Kracke – Ust-IdNr.: DE 205 198 055
>
> emlix - smart embedded open source



-- 
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