From nobody Fri Jun 17 19:32:16 2022 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 909AA85415B; Fri, 17 Jun 2022 19:32:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LPq1X3YnBz3KRf; Fri, 17 Jun 2022 19:32:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655494336; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r37U5c3LQbAjD59BbTQ8IA5+4t6yixIxcijoeh8KBZc=; b=PfLgB6GKurjDSpUuJfmnCi7sN3bJ2n5JuXbdD9zY7NBiJxYBTiRAmZcWc4K01cKmhkSZ82 enLrGBrO+3+aXWxIe9JWcHp+9m9cA+fLA0Y56AJOBMsRBhxaAD9T0aApBt+cbJe2ooxgTG jKg7JKmyAu7hlRvb/5eCpRkewJX6XGCGi0KTHNwaoM+loe+KcbeCeunijuH0ZHr3hNCnBN InI8TWikd3cRNDrCbeO6cIiQP3kyUtBRY5CkMGO7w6yHhN37hFsxSGWvPj0LZl0KsO3OXF fV0+veL0UYsSOSVQKh0+DU7D9SpgSrMbgIZRkOy2D1dT81c+gHOxEJpdIVl6HQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3BFFC25C82; Fri, 17 Jun 2022 19:32:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 25HJWGpf008239; Fri, 17 Jun 2022 19:32:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 25HJWGuJ008238; Fri, 17 Jun 2022 19:32:16 GMT (envelope-from git) Date: Fri, 17 Jun 2022 19:32:16 GMT Message-Id: <202206171932.25HJWGuJ008238@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dmitry Chagin Subject: git: b4b67e41443f - stable/13 - Eliminate p_elf_machine from struct proc. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b4b67e41443f6a52a61c3f32ca9ae214080335f7 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655494336; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r37U5c3LQbAjD59BbTQ8IA5+4t6yixIxcijoeh8KBZc=; b=d9i5ilXqe0NED1tTSDmzmWODR0xPm3JUYeESmNOb6tnEKjMhQidOyMPooVnY3FvGx/fDOU DpYyjfnIlqdN6hvP/LHyiqgqeDQSLrezTrUnWZpq7IjXVEF2zvkkV9GaXQrDN7uC16Ouxt hhNKWFVtJHj9W14RbANJQCaSWwC92+QgQIZlCc6qhkpvD5cnTNXeyLF6C2GtOhgQxY5/pP +b5gdCGTkIrkNk2vkCoDVs4GZFJq1bhxMwL5oepDJUeZPptwkoKyZg0KuKLCEnLaN4dnxR eqPEKerLA0e00OZlrO7tT2Vf6x3/U5qcKzc/BhT4nqYRRe1GIcqGFLm1DMD4Wg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1655494336; a=rsa-sha256; cv=none; b=dNa2CdVfaPggP/InhDLUIfEvn5GHRW2lcK1sBJ4AadJo8ymnv/NrAvooSCJFeo8K7BNBW7 IljRSPAwsf0Ecar8wcerjPMpOuT5Ub6ENzWkS1RObte5g2UJMUfrSJizXTsSh+KhNaoHzZ DLLZaqPWcpAYzQjstNuWSuC3NFzFQq4hqTsj2RB/vF9SGRY3AqupD0KsuCfL0fSfwIYHUG f6ewVNzIEA004k5NqVO2vikE8Xmx4pgxsKyq9nxBtSG+Z9wuIOrcXAZgoQrye/6F+T4jFf HlMXl60vijSkQeBezrBsNnV29cQ2BynQtvOtC+els9EXTpYD30EZdEDFHUn/pg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=b4b67e41443f6a52a61c3f32ca9ae214080335f7 commit b4b67e41443f6a52a61c3f32ca9ae214080335f7 Author: Dmitry Chagin AuthorDate: 2022-06-17 19:30:27 +0000 Commit: Dmitry Chagin CommitDate: 2022-06-17 19:30:27 +0000 Eliminate p_elf_machine from struct proc. Instead of p_elf_machine use machine member of the Elf_Brandinfo which is now cached in the struct proc at p_elf_brandinfo member. Note to MFC: D30918, KBI Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D30926 MFC after: 2 weeks (cherry picked from commit 945accf502db0dd44522489857f461e29ef17d30) --- sys/kern/imgact_elf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index 260454e4b9f6..b57065a28a99 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -1403,7 +1403,6 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp) imgp->reloc_base = addr; imgp->proc->p_osrel = osrel; imgp->proc->p_fctl0 = fctl0; - imgp->proc->p_elf_machine = hdr->e_machine; imgp->proc->p_elf_flags = hdr->e_flags; ret: @@ -1876,8 +1875,10 @@ __elfN(puthdr)(struct thread *td, void *hdr, size_t hdrsize, int numsegs, Elf_Phdr *phdr; Elf_Shdr *shdr; struct phdr_closure phc; + Elf_Brandinfo *bi; ehdr = (Elf_Ehdr *)hdr; + bi = td->td_proc->p_elf_brandinfo; ehdr->e_ident[EI_MAG0] = ELFMAG0; ehdr->e_ident[EI_MAG1] = ELFMAG1; @@ -1890,7 +1891,7 @@ __elfN(puthdr)(struct thread *td, void *hdr, size_t hdrsize, int numsegs, ehdr->e_ident[EI_ABIVERSION] = 0; ehdr->e_ident[EI_PAD] = 0; ehdr->e_type = ET_CORE; - ehdr->e_machine = td->td_proc->p_elf_machine; + ehdr->e_machine = bi->machine; ehdr->e_version = EV_CURRENT; ehdr->e_entry = 0; ehdr->e_phoff = sizeof(Elf_Ehdr);