From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 488C9CA0EFB for ; Fri, 30 Aug 2024 10:02:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D641C6B00EE; Fri, 30 Aug 2024 06:02:09 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D14AE6B00EF; Fri, 30 Aug 2024 06:02:09 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BDC376B00F0; Fri, 30 Aug 2024 06:02:09 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 9DBD66B00EE for ; Fri, 30 Aug 2024 06:02:09 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 14B49141698 for ; Fri, 30 Aug 2024 10:02:09 +0000 (UTC) X-FDA: 82508471178.02.83414A7 Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by imf06.hostedemail.com (Postfix) with ESMTP id A7552180037 for ; Fri, 30 Aug 2024 10:02:06 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=ellerman.id.au header.s=201909 header.b=NNcmrTyt; dmarc=none; spf=pass (imf06.hostedemail.com: domain of mpe@ellerman.id.au designates 150.107.74.76 as permitted sender) smtp.mailfrom=mpe@ellerman.id.au ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1725012054; a=rsa-sha256; cv=none; b=fwUUc7bZWK0KV1R9/1xdnSDxc5h083AzhxwO2VIeW4BTl7MMwUDbGGQcgCdHxSBPI/xL5K CVoSluAiEtrRBenqo4ktm4o34pwidAZ7Ru7J1MbY8/AI/ubTkEvSfFr5ZXq2AdyA1Y4Fhe M7ymLkOkiQpvUsqnndA0qxemxBTttX0= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=ellerman.id.au header.s=201909 header.b=NNcmrTyt; dmarc=none; spf=pass (imf06.hostedemail.com: domain of mpe@ellerman.id.au designates 150.107.74.76 as permitted sender) smtp.mailfrom=mpe@ellerman.id.au ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1725012054; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=lPcPtY81gFF3u7n0A2RVPpHqZKSc08Lj9bnrJizsMEQ=; b=tcbeCgnD2H04YFVsx7bK3u+i4KFSChlID0JKaZmgmr6Xk9fUQZdGSx5+ztjhlbZ7XIIZO9 FDVnZhuIqYwT1wqbhxT6vVIWuHglpVwwCz/vcuxxPb+8sJ6wRHD8C/yUfdj198A12sNjFZ 3jSyC+p/sbFUI+J84t7lmvqie+1uUio= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ellerman.id.au; s=201909; t=1725012123; bh=lPcPtY81gFF3u7n0A2RVPpHqZKSc08Lj9bnrJizsMEQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=NNcmrTytNe5K01YNEaaZ19cRsK3cVkZsPx09KELB11fMi0p0LaIX5DEwSFpG6peNy ISAellXAO+xLaSRbUK+pojAHnpn4mXhQ6Xi7aXgPNSvfk1Fhhy97z3qo3PUX1Q1jRr 2dNrvbGjMGW1FqKKrMfKdMnOYumxQuAOYNTy0i1fviy9HjXmvUY4p8bDjh83ht9EjH yYNATupCNzqj23A6fjAnQZotlcbf/AcIWq7SPsN2wMldKWCJpNeeAVJfDGraO9mfkL nu1POz8pU9cnmrPtuY8NQqHP6jmqW67hqV/EN6svLc1HdzcViESWbiCV6jJzitD/1o cUcK4jBAfhGPw== Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mail.ozlabs.org (Postfix) with ESMTPSA id 4WwDG04LmLz4wnw; Fri, 30 Aug 2024 20:01:59 +1000 (AEST) From: Michael Ellerman To: Segher Boessenkool , Christophe Leroy Cc: Ard Biesheuvel , Arnd Bergmann , "Jason A . Donenfeld" , Eric Biggers , Nicholas Piggin , Naveen N Rao , Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Theodore Ts'o , Andrew Morton , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers , Vincenzo Frascino , shuah , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Linux-Arch , linux-mm@kvack.org, linux-trace-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH v2 05/17] vdso: Avoid call to memset() by getrandom In-Reply-To: <20240829180241.GJ29862@gate.crashing.org> References: <20240827180819.GB2049@sol.localdomain> <20240827225330.GC29862@gate.crashing.org> <20240828124519.GE29862@gate.crashing.org> <20240828162025.GG29862@gate.crashing.org> <20240828172538.GI29862@gate.crashing.org> <20240829180241.GJ29862@gate.crashing.org> Date: Fri, 30 Aug 2024 20:01:58 +1000 Message-ID: <87jzfye3c9.fsf@mail.lhotse> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: A7552180037 X-Stat-Signature: sajud3b19urursca8cqwxiqkr4xiracz X-Rspam-User: X-HE-Tag: 1725012126-982636 X-HE-Meta: U2FsdGVkX18ciDgzYR5JAH7ECxHaJCdVP6xN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cTJC6EnCdlqu6LrIilWJZtqQf7bHRuASehRoYnMQ3BHSI6Sa/SX0svXYKV6Zf5+rJVl+NhF4X2RZHttZMttxOAG3mz8F7DSkn/tiX5j/5BPk/Z8co+4I4pLykD4989HjdfVX7oGR+K3JzgEbJ51EOuF6GvwTlusb2rlDEiGHTA4e X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Segher Boessenkool writes: > On Thu, Aug 29, 2024 at 07:36:38PM +0200, Christophe Leroy wrote: >>=20 >>=20 >> Le 28/08/2024 =C3=A0 19:25, Segher Boessenkool a =C3=A9crit=C2=A0: >> > >> >>Not sure about static binaries, though: do those even use the VDSO? >> > >> >With "static binary" people usually mean "a binary not using any DSOs", >> >I think the VDSO is a DSO, also in this respect? As always, -static >> >builds are *way* less problematic (and faster and smaller :-) ) >> > >>=20 >> AFAIK on powerpc even static binaries use the vDSO, otherwise signals=20 >> don't work. > > How can that work? Non-dynamic binaries do not use ld.so (that is the > definition of a dynamic binary, even). So they cannot link (at runtime) > to any DSO (unless that is done manually?!) At least for signals I don't think the application needs to know anything about the VDSO. The kernel sets up the return to the signal trampoline (in the VDSO), and as long as userspace returns from its signal handler with blr it will land back on the trampoline. cheers