X-Received: by 2002:a17:906:64e:b0:6b7:667c:bec with SMTP id t14-20020a170906064e00b006b7667c0becmr288960ejb.165.1645631776662; Wed, 23 Feb 2022 07:56:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645631776; cv=none; d=google.com; s=arc-20160816; b=Ag5MM7mvvLg0MiQC+emJw0bp/98nPFD8pxNIHkkUuutP0ibTt+KDWrxtGHW5/6WPP2 Wu2hna6pUxFiu4OQ3u0PHwGD9uGSRvaMqOxJAursiQ2NNtMRDIBsiNJYj4txsLCIfL1e 1fnsftq5vA6gI608nyUtiY5e/RsR16Jp1e3lJefRdDH6l8thI5el2J+nDJKDbsu9eQax 6NvBJogkc8dGcWu8jOGqyezenat7yIA+wJlnMUZ/knHsEX4On131fzS7qcvwxi+YT1Is ag1V/yZypvqG6PpNkMwgtcZ5xvkszmF9dZshmT5OXJZUO/QNnA5ig8XygJinA4dzUfXo NNBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=NQkgui9jIxqc5SpGivB+ZaCpiVf/jOnw4nzA7rstaho=; b=UhB/3pgkPak2jxXIjOB2XVClpFhl+Gcy8QCxwuCAuLTxsBPEsiBKwSST9tDqOUnZ+h C6afcWb8NuOTAK6l7a+oTd1reYa9ERrp27b3KMwOnJTVj96lAG5JYwTj2kYRXplsETBE zxc4SZLAx2fdaDh3TRgQJ+p26JbaARD1yxa7LanPE85CuwMTkK6kGtNLVvobgAqVEaUm eWHX22DhQZEqv8BFFEIulCp5dAjrkbdR8fWaA4TyAn8wYiVecAtikDING4Rt5XB5Qsc1 Ne653SdHLFDLjNC4Ovo2uQg0j5Tzu8xdTBTA0lVjWNn5v0FSijwkDoFOheW9qzmyTduN M96A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="O/3TthIL"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fw30si11175366ejc.191.2022.02.23.07.55.53; Wed, 23 Feb 2022 07:56:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="O/3TthIL"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240557AbiBWMnI (ORCPT + 99 others); Wed, 23 Feb 2022 07:43:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230084AbiBWMnG (ORCPT ); Wed, 23 Feb 2022 07:43:06 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29CE535DED; Wed, 23 Feb 2022 04:42:39 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B910761179; Wed, 23 Feb 2022 12:42:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2F58BC340F1; Wed, 23 Feb 2022 12:42:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645620158; bh=vfHK+gkNDrAvQXi1VtrHdfwiLvh+3euoD4Z2MIR/0m0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=O/3TthIL4XfWE4YBU4n+//W2s9Oow3MOp0B72JrNSWI9KdK60Fxzenp1OHUXkcfNg wQ7nSn9LwIWUM+G3FYGfPJNfyAsXufq6P/hrN4O65dMg+sODhN+Eq+xESdDU6kkZPn KGWyOsXBMn0QXs3d1k/784mt2AhszZ2hGQ24pD0l+ywIQ8PdW3Lv6NpsT3QhFcby8J IgUqm/pVBKu3CC3PrhVeIq9ZhkFShwNCPKjC2XoyoUGEOvbYj6krNNEmELypMGKImn A7z8e4rFe7arHT49oeRXRQiNaNFWqRLSlQSuF6qDCG+RKV0Sg8fWcV0Xrgo04qcTyl ivzYRC93uGpoA== Received: by mail-vk1-f174.google.com with SMTP id x62so4366408vkg.6; Wed, 23 Feb 2022 04:42:38 -0800 (PST) X-Gm-Message-State: AOAM531YwYtI9iDBDvlNUPjT8kU2y9b/HaDU8fp3bGlb95NKjgDCUCzW Y6qqFfmi2jzk7G1tB2c8rrU6pXWyD/UtnapWBGs= X-Received: by 2002:a05:6122:887:b0:332:699e:7e67 with SMTP id 7-20020a056122088700b00332699e7e67mr1166442vkf.35.1645620157156; Wed, 23 Feb 2022 04:42:37 -0800 (PST) MIME-Version: 1.0 References: <20220201150545.1512822-1-guoren@kernel.org> <20220201150545.1512822-18-guoren@kernel.org> <4379941.LvFx2qVVIh@eto.sf-tec.de> In-Reply-To: <4379941.LvFx2qVVIh@eto.sf-tec.de> From: Guo Ren Date: Wed, 23 Feb 2022 20:42:26 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH V5 17/21] riscv: compat: vdso: Add setup additional pages implementation To: Rolf Eike Beer Cc: Palmer Dabbelt , Arnd Bergmann , Anup Patel , Greg Kroah-Hartman , liush , Wei Fu , Drew Fustini , Wang Junqiang , Christoph Hellwig , linux-arch , Linux Kernel Mailing List , linux-riscv , linux-csky@vger.kernel.org, linux-s390 , sparclinux , linuxppc-dev , Parisc List , "open list:BROADCOM NVRAM DRIVER" , Linux ARM , "the arch/x86 maintainers" , Guo Ren Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 23, 2022 at 8:19 PM Rolf Eike Beer wrote: > > > @@ -66,35 +68,35 @@ static int vdso_mremap(const struct vm_special_mapp= ing > > *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=C3=B6ttingen, Germany > Sitz der Gesellschaft: G=C3=B6ttingen, Amtsgericht G=C3=B6ttingen HR B 31= 60 > Gesch=C3=A4ftsf=C3=BChrung: Heike Jordan, Dr. Uwe Kracke =E2=80=93 Ust-Id= Nr.: DE 205 198 055 > > emlix - smart embedded open source --=20 Best Regards Guo Ren ML: https://lore.kernel.org/linux-csky/