From nobody Sat Aug 02 05:32:01 2025 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 4bvBJy39zNz63c1t; Sat, 02 Aug 2025 05:32:02 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bvBJx4SQWz3D2X; Sat, 02 Aug 2025 05:32:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1754112721; 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=5OHW39W9OBPWZtqELXnd6kaIjNOTUjCNUjRzgG0vOHM=; b=ayU03OzfHR5EWMGr9GkpHKiprNpoG0raT6uSG5c1l27rv+mBVBRrroEIt4b3PPr9AwALWM QqQiPncNbPPtcfyXcfBtxST1fk+5P60yyCH2wNS+P+1ek7QN1O0YV4Jo7XNJwaf+k20KHk pvfdKIY5/piHeD+eh7aO1mXS8jGbyrXd8Y9RP6zuBHOPlQu3bXhWepQ4VveGb5QrbU+vIU 2I4p3JQmcjnLJstUuMAN2u9fzHS/RVsOSZEMVNzVxO62Kd2hlSnmJaGFxAw58C/S4sl24f Xi+x41PqwIyv4rwwtdyA+Sg0AV9aKWjdoAPu5bOhBrJPeWKG/V249r7r3WXyBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1754112721; 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=5OHW39W9OBPWZtqELXnd6kaIjNOTUjCNUjRzgG0vOHM=; b=QadB/kbEFYmtxTcJBtDN1NLoJGU02qJMv4VWncp/RNtPRDde+Lp/4secpDCoLWx4lS7CfB qL/mTGrlb9PUiDhDbOVf8ijjEHV52FeW92UALp7yufjpcSNDqd29m13V4CDb1c+CixhJ2E SvQoZOpM6OWaMXGPtw50/J6FQkcUyeypSTLjwhU2Al8dhRgi6nTNWPtbuqhkwyZkSBI2Pj 00zc7xTSA+84higtYR83jmUXUpHxm5l7veplzsWO49IFWqSBfAgzSGmzLHAWqUn85cfllW RGBREd1I42ZBDc1HpNoBILDB8bgrh7eO7E/tU0gnX1JBxPZkvQjAiYevaZhTrw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1754112721; a=rsa-sha256; cv=none; b=U8d+5IHfjBtcnP8xeN0L/n/5iL1e8qIvWmhp2rF7Q9GQuVCopXJWmUw5z16QMP+DFUMIU2 yJyHvCFWHaSxTO2My4xVwbtC4Gctn6b3FlJwfKDMeLljz0OvAwS+cOUKc4amU2/zqeyybA 8a/0AgI0eU1FaaWiqUYEcT++N/goJcpzuwF8yM6VJfNuLHbZ/jUUq+496vBy8uzvsUA9WL bLsg3wBhwDA+padOfeJzMM6bas9WRLzSiV3lqYtMTdaXIciG09E7RHDweBVpieWuokshYx w3XhQThx7NpPlpPYFD9jvQPlFh5ODzgLA5vDd0qsdVC4fXK8C3BbSKOtvrSMBg== 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 4bvBJx2wh0z1KP6; Sat, 02 Aug 2025 05:32:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5725W1G7069227; Sat, 2 Aug 2025 05:32:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5725W18b069209; Sat, 2 Aug 2025 05:32:01 GMT (envelope-from git) Date: Sat, 2 Aug 2025 05:32:01 GMT Message-Id: <202508020532.5725W18b069209@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Romain =?utf-8?Q?Tarti=C3=A8re?= Subject: git: e4624465c16a - stable/13 - vm_page: Fix loading bad memory addresses from file 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: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: romain X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e4624465c16adb0e60a6b0edeb570dc103b40831 Auto-Submitted: auto-generated The branch stable/13 has been updated by romain: URL: https://cgit.FreeBSD.org/src/commit/?id=e4624465c16adb0e60a6b0edeb570dc103b40831 commit e4624465c16adb0e60a6b0edeb570dc103b40831 Author: Romain Tartière AuthorDate: 2025-07-25 18:31:57 +0000 Commit: Romain Tartière CommitDate: 2025-08-02 05:31:38 +0000 vm_page: Fix loading bad memory addresses from file When loading bad memory addresses from a file, we are passed an end pointer that points on the first byte after the buffer. We want the buffer to be null-terminated (by changing the last byte to \0 if it is reasonable to do so), so adjust the end pointer to be on that byte. Approved by: kib, markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D51433 (cherry picked from commit 202f8bde836dc86627be2b5b98174d9a0fb2eaba) --- sys/vm/vm_page.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index d21022930396..ed43a05f0e64 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -393,7 +393,7 @@ vm_page_blacklist_load(char **list, char **end) } *list = ptr; if (ptr != NULL) - *end = ptr + len; + *end = ptr + len - 1; else *end = NULL; return;