From nobody Thu May 12 22:56:27 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 0EBD91AE48A9; Thu, 12 May 2022 22:56:29 +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 4KznFm2blGz3GDV; Thu, 12 May 2022 22:56:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652396188; 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=67690FdHDUmnM6hutgqjdubyWkdhsFwidjHFXoN0EHk=; b=pJmTUXmY0JKtKBeMisyQoVU7ItLBdfaareMse2uj/auIL7EV/yZymYepbVTq6VP4u5kXa1 5b1OeSLRf8n/9Yiv6rQIpvKIGeENolNRmy+akw7/SHsSc6I9dcx09u5ERxZXaAonURKaxI 2h5vp3lOvTUPJhxR7sY2Tcp1umpuqbgKsChkL7IviBPXM/+8zlR5bNsbpHjb8QoKHYMt9W CxkrfN0zuglvuoNyuB27lb9qhxBK5WYc/Oth1HaK+bXuBUkKvjM3Y05z3h0lRiVfzLdu/k lEYQe9ldeEcXfRofSynTXSmVAhIaktudhfObeuXyFnW9KPGdj/7PZpZoywLAwA== 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 DA1C317240; Thu, 12 May 2022 22:56:27 +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 24CMuRZ9020513; Thu, 12 May 2022 22:56:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 24CMuR3u020512; Thu, 12 May 2022 22:56:27 GMT (envelope-from git) Date: Thu, 12 May 2022 22:56:27 GMT Message-Id: <202205122256.24CMuR3u020512@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 392611f28695 - stable/13 - imgact_elf: compute auxv buffer size instead of using magic value 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 392611f2869573cc41551d5b6c6504f8e604d163 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652396188; 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=67690FdHDUmnM6hutgqjdubyWkdhsFwidjHFXoN0EHk=; b=WVIosxmkj0b+GEyU8oj4CSl8oJthR43gcrmhAtAs1bOp+l8euZV346u14RElx7meYwYh3P Bjdh1KlSoYxga2yNhE1+pHGlE1AIfGney5CFLqrreORAk4xpEDbhdILBQn+y1BITjq6Oxr f1Ll/S0uZlTgXWVcYiPhmVOfFecKXXShWyeQ5yQ3sZK0tsRAFdM+SZauwjgnM/bHMPESHg p6oos+yD4/tWMTsKftAqKmOTCIJZlgqUz47AR0ck/J17bBkKPCwAFi9RiEYwqvLlVcBoMk A5uGGzFzA5cY1BqVPllM/f6BMcFx34LBvZ0M5w1MRjsc7A01ECVt4+UzmWaimA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1652396188; a=rsa-sha256; cv=none; b=gOOGrPWDJobxCfAa3hQnzfbKXJ/nW5XWoiXQaHZofZZMm7SdQeBMVtYMlQTXsWZxN3XMU6 PlPn9H2KjVKCynvPHNhl0lm9Wn3f6eZD0GQvYlUQgavVHL0EdgcCN/YFzmvXL4TZyWT3qg vDOO9sJAsc6CW3XUVpWEUHLtzUPvVLb/n7kJr7BJ2Uj1fbu2GIV6FmeVb2MAoOx9OY5suY HsGg7h34Ggys+UMmEtRJ7iOA4USZDvWu1zCyy5LQCO/GA3iJtG3otY7+B+jbwvTdASrvOx 8N228wrlVZnNed2ORNb3OOO1q8Jj6jIrV9R8728pkYHuMuoyiEpbS/zMtJKTDA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=392611f2869573cc41551d5b6c6504f8e604d163 commit 392611f2869573cc41551d5b6c6504f8e604d163 Author: Edward Tomasz Napierala AuthorDate: 2021-06-21 14:34:19 +0000 Commit: John Baldwin CommitDate: 2022-05-12 22:12:59 +0000 imgact_elf: compute auxv buffer size instead of using magic value The new buffer is somewhat larger, but there should be no functional changes. Reviewed By: kib, imp Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D30821 (cherry picked from commit 06250515cff552217d14145e8932cb1a543a7e07) --- sys/kern/imgact_elf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index d189339283a7..1732b0dbe23d 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -2526,7 +2526,8 @@ __elfN(note_procstat_auxv)(void *arg, struct sbuf *sb, size_t *sizep) p = (struct proc *)arg; if (sb == NULL) { size = 0; - sb = sbuf_new(NULL, NULL, 128, SBUF_FIXEDLEN); + sb = sbuf_new(NULL, NULL, AT_COUNT * sizeof(Elf_Auxinfo), + SBUF_FIXEDLEN); sbuf_set_drain(sb, sbuf_count_drain, &size); sbuf_bcat(sb, &structsize, sizeof(structsize)); PHOLD(p);