From nobody Thu Jun 29 08:20:06 2023 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 4QsBFz1t8Wz4knNM; Thu, 29 Jun 2023 08:20:07 +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 4QsBFz1QVWz3t4g; Thu, 29 Jun 2023 08:20:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026807; 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=Ktrg75QSrrQldCmByER5LLM8KFpKtrbv1i0z3AwBFS4=; b=pTv3lbxw72AjjRqVlxzCd0WFJzOPznc1eGRmbuy6y4S/5sEVxyB78HwosCgS5Ma8wyHIlc RM4ecHWo9YZa3VIKHzaIJuLg3B8on3kiBfjpHhfDd6ARqueLXwvpWg1iDobhTZChByF7IJ yAeM2jCFfWKQn10IIzXVC77uHaGr/ItEczlk1igsYK74jSxFNEfiuNMjPtq8E82XzvUrHF GBt5KiqfF658xE8ILHcIEbBaTEDvTvEnwoZsm3ctNhFecsy4Vjwc8wLs6aQG+jD6Cv9FRY /9I1NviqB2YRPe3odSoBLrOmEiDfKiJmHgOsOn0IHempM7F+QNpVL7Ug/GZNgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688026807; 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=Ktrg75QSrrQldCmByER5LLM8KFpKtrbv1i0z3AwBFS4=; b=G5hdq5H5HbKvWb6RtPOG5lPjExU3U6GqGZs4PaB+vlOOy0dGPBm8lXO6mbzoYBDovdID7v alQYqxzLqZEHr0Q4SD72Spp/SoUBB9OTPCN0SzZnHoy8Dx1q7O6giLrOikzxYmy9SY9TR5 7RFttOHFxB0GgpQ/SBbBkuL94+Y3KiJWUyt7IHiGNPJWGoj7fWcNaU3MsYHCvNQ7Ra/1A7 BP5x5yz4pxvIyef8QxdwyK8SXPxxmzfP+5aq+8PvBLN2supvozwmgBlkhs7n2qpBV5cGr3 Urt5LofFxP/tYgdydZYlLMmilseBGpDoX0poENr+oIorRc2EIHG5ulhne/oxCA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688026807; a=rsa-sha256; cv=none; b=hRXy5WRJ9rqnet6/sG1V/qOmZGHFJig8gUWXOfEs0up93fAppAQ9BfDBpuVBuhgWrs8Ysv 6Ety9xtOjQvkvoxCWSsQqNtqWIEVtWzhugpDXPQE9e8O/+/wFPzjwRwCoAfmc/LhnJPcit zRXYpJiPNhP2iX7q/vxaNrO6eRCa/a0qwcNi56YI5FNpyfgFwK9AXUJthrHh7QBEsP/BS3 cOLTRcqKXDl7iLyYqdbrsMA9fEBeXxwKSXLzRlrjx4DRax7wFO7VdHqVIwwVmF1DzXsoxJ ySUX8qEhEdsuy5NSnpZWW7qqOA72Y2cjQZG7NcKF8Rv/oLwEWfrPi1Z8q4t0Xw== 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 4QsBFz0PlZz17QL; Thu, 29 Jun 2023 08:20:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 35T8K6I1077735; Thu, 29 Jun 2023 08:20:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 35T8K6Lq077733; Thu, 29 Jun 2023 08:20:06 GMT (envelope-from git) Date: Thu, 29 Jun 2023 08:20:06 GMT Message-Id: <202306290820.35T8K6Lq077733@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: 364bdf887ae3 - stable/13 - linux(4): Export the AT_EXECFN depending on the process osreldata 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: 364bdf887ae3d9298834038b1a755e4c27719888 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=364bdf887ae3d9298834038b1a755e4c27719888 commit 364bdf887ae3d9298834038b1a755e4c27719888 Author: Dmitry Chagin AuthorDate: 2023-04-22 19:17:36 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-29 08:15:27 +0000 linux(4): Export the AT_EXECFN depending on the process osreldata AT_EXECFN has appeared in the 2.6.26 Linux kernel first time. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D39647 MFC after: 1 month (cherry picked from commit 70eab81d6ffecf0ba4c7f19a8b6389178eda5259) --- sys/compat/linux/linux_elf.c | 3 ++- sys/compat/linux/linux_mib.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/compat/linux/linux_elf.c b/sys/compat/linux/linux_elf.c index d0e547c1b882..a1a04e23d43d 100644 --- a/sys/compat/linux/linux_elf.c +++ b/sys/compat/linux/linux_elf.c @@ -528,7 +528,8 @@ __linuxN(copyout_auxargs)(struct image_params *imgp, uintptr_t base) AUXARGS_ENTRY(pos, LINUX_AT_SECURE, issetugid); if (p->p_osrel >= LINUX_KERNVER_2006030 || p->p_osrel == 0) AUXARGS_ENTRY_PTR(pos, LINUX_AT_RANDOM, imgp->canary); - if (imgp->execpathp != 0) + if ((p->p_osrel >= LINUX_KERNVER_2006026 || p->p_osrel == 0) && + imgp->execpathp != 0) AUXARGS_ENTRY(pos, LINUX_AT_EXECFN, PTROUT(imgp->execpathp)); if (args->execfd != -1) AUXARGS_ENTRY(pos, AT_EXECFD, args->execfd); diff --git a/sys/compat/linux/linux_mib.h b/sys/compat/linux/linux_mib.h index b1d5a0981a7d..05068bbf1029 100644 --- a/sys/compat/linux/linux_mib.h +++ b/sys/compat/linux/linux_mib.h @@ -58,6 +58,7 @@ int linux_kernver(struct thread *td); #define LINUX_VERSION_STR LINUX_XKERNVERSTR(LINUX_KVERSION.LINUX_KPATCHLEVEL.LINUX_KSUBLEVEL) #define LINUX_KERNVER_2004000 LINUX_KERNVER(2,4,0) +#define LINUX_KERNVER_2006026 LINUX_KERNVER(2,6,26) #define LINUX_KERNVER_2006030 LINUX_KERNVER(2,6,30) #define LINUX_KERNVER_2006039 LINUX_KERNVER(2,6,39) #define LINUX_KERNVER_5004000 LINUX_KERNVER(5,4,0)