From nobody Fri Dec 06 08:00:20 2024 X-Original-To: dev-commits-src-main@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 4Y4NwP12ghz5fp55; Fri, 06 Dec 2024 08:00:21 +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 4Y4NwN6N8zz4Y1S; Fri, 6 Dec 2024 08:00:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733472020; 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=DPf6Gmc+WJ9umgg3HKf2sWh7p/B28/yXxTH2szS64dM=; b=nEMz0qhpTgKoYksrdm58j4jvC3q/0AJzuaWgK1xbP21tMREBeBiXssJs/txXQ8T4WdxQue hufwOR/vlktJwF35hNMbuL4yi2+KCW5BHb3KojMsb6ALmd+Q0trHsC8yCC6szSX33XvOqY Bh/6mPeqEvYdQYhqEVSCaLjYudUy3rvkqfPkioICUzdjuISnhVCiSZrC7fAGFR26Z/x8ef OG+TRYOcgUVkDBXpDWgZkEn9ya2/kl4+3feTt0YE7iqAtT3BuHODZ1hqy/+5TfLyhWOFPY Lfn8YO25/9xV1n6TPnEAlHkMGvn5++DE6UUFV8XFG8rq8N5tI30yVG03Kwk+mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733472020; 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=DPf6Gmc+WJ9umgg3HKf2sWh7p/B28/yXxTH2szS64dM=; b=w9DoTgd5UoJiR5PiD8XgC0swQXIJxlasU0ykzefZ0MSzdZEDrvJpEH5f++DHiPnrvExAiT 7zufgQ6Rpy3Fd5mVweIjsQAtiv+LJUTp/My8345yVLp6yMYAAFde6U9ltPvmcuhw05a91x fJhkdzZR3qti3QavTd0TqjLh9iczTVXVilj3Xq1LuIGQKj2ikJHGrYnpsTZBV88pQeID7e WQW0CuBWI+z6pPtWodCpbYTFlGZFXbeHFo0WF+rYlUn6wWW0m6A+SRPG6L0AmTsntJ0ZO1 1iHyi+OAmH+UGvlfCxyf7ulNGyOG2YhIsf9464R2vgav2IpPuaAGUXz/7WYbZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733472020; a=rsa-sha256; cv=none; b=EfWgFNm8D2Qg8bka9Fw3Ohv6WkgaHomgVUPCrIGB0aiZmtomFeGnUKWVrADyV1IMns+WfM mwbnQmFghmUM62PskCTqzRmDObSGVLtNMriucsudRhgGumy+EwSvLtmAM3+SfH0PMwRtUh Egc9fQzJBk/Fgc9EpJLT0ib/CuFWtD4OjikxKwFAyXvv+YdV/E0aPxFYnDLac5quv1zimT SewC04vPCkwKjYern4cvfWlLXU90fTkkX9uFgnBtHUWXNDNSNQJrs9/F/qVb4bwPlQvrol J9LRJG0VJiFRD3zJ/781qCK/NVxrTx++5Ew9VMtzOfBrVY3O5qW2mmIVb1lyEA== 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 4Y4NwN60cCzTD5; Fri, 6 Dec 2024 08:00:20 +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 4B680K9A061369; Fri, 6 Dec 2024 08:00:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B680KTF061366; Fri, 6 Dec 2024 08:00:20 GMT (envelope-from git) Date: Fri, 6 Dec 2024 08:00:20 GMT Message-Id: <202412060800.4B680KTF061366@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: d302c0539307 - main - vm: rename MAP_STACK_GROWS_DOWN to MAP_STACK_AREA List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d302c0539307d1b7ae9a0206d83a1fb9ccc44900 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=d302c0539307d1b7ae9a0206d83a1fb9ccc44900 commit d302c0539307d1b7ae9a0206d83a1fb9ccc44900 Author: Konstantin Belousov AuthorDate: 2024-12-05 01:41:13 +0000 Commit: Konstantin Belousov CommitDate: 2024-12-06 07:46:59 +0000 vm: rename MAP_STACK_GROWS_DOWN to MAP_STACK_AREA Reviewed by: alc, dougm, markj Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D47892 --- sys/kern/kern_exec.c | 2 +- sys/vm/vm_map.c | 20 ++++++++++---------- sys/vm/vm_map.h | 2 +- sys/vm/vm_mmap.c | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 4a11be5b42b8..51bbdeaaa55e 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -1240,7 +1240,7 @@ exec_map_stack(struct image_params *imgp) } error = vm_map_find(map, NULL, 0, &stack_addr, (vm_size_t)ssiz, sv->sv_usrstack, find_space, stack_prot, VM_PROT_ALL, - MAP_STACK_GROWS_DOWN); + MAP_STACK_AREA); if (error != KERN_SUCCESS) { uprintf("exec_new_vmspace: mapping stack size %#jx prot %#x " "failed, mach error %d errno %d\n", (uintmax_t)ssiz, diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index 3d0fa6da15bc..910ebfb6dc4e 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -1667,7 +1667,7 @@ vm_map_insert1(vm_map_t map, vm_object_t object, vm_ooffset_t offset, protoeflags |= MAP_ENTRY_NOSYNC; if (cow & MAP_DISABLE_COREDUMP) protoeflags |= MAP_ENTRY_NOCOREDUMP; - if (cow & MAP_STACK_GROWS_DOWN) + if (cow & MAP_STACK_AREA) protoeflags |= MAP_ENTRY_GROWS_DOWN; if (cow & MAP_WRITECOUNT) protoeflags |= MAP_ENTRY_WRITECNT; @@ -1727,7 +1727,7 @@ charged: } } else if ((prev_entry->eflags & ~MAP_ENTRY_USER_WIRED) == protoeflags && - (cow & (MAP_STACK_GROWS_DOWN | MAP_VN_EXEC)) == 0 && + (cow & (MAP_STACK_AREA | MAP_VN_EXEC)) == 0 && prev_entry->end == start && (prev_entry->cred == cred || (prev_entry->object.vm_object != NULL && prev_entry->object.vm_object->cred == cred)) && @@ -1963,7 +1963,7 @@ vm_map_fixed(vm_map_t map, vm_object_t object, vm_ooffset_t offset, int result; end = start + length; - KASSERT((cow & MAP_STACK_GROWS_DOWN) == 0 || object == NULL, + KASSERT((cow & MAP_STACK_AREA) == 0 || object == NULL, ("vm_map_fixed: non-NULL backing object for stack")); vm_map_lock(map); VM_MAP_RANGE_CHECK(map, start, end); @@ -1972,7 +1972,7 @@ vm_map_fixed(vm_map_t map, vm_object_t object, vm_ooffset_t offset, if (result != KERN_SUCCESS) goto out; } - if ((cow & MAP_STACK_GROWS_DOWN) != 0) { + if ((cow & MAP_STACK_AREA) != 0) { result = vm_map_stack_locked(map, start, length, sgrowsiz, prot, max, cow); } else { @@ -2131,10 +2131,10 @@ vm_map_find_locked(vm_map_t map, vm_object_t object, vm_ooffset_t offset, int gap, pidx, rv, try; bool cluster, en_aslr, update_anon; - KASSERT((cow & MAP_STACK_GROWS_DOWN) == 0 || object == NULL, + KASSERT((cow & MAP_STACK_AREA) == 0 || object == NULL, ("non-NULL backing object for stack")); MPASS((cow & MAP_REMAP) == 0 || (find_space == VMFS_NO_SPACE && - (cow & MAP_STACK_GROWS_DOWN) == 0)); + (cow & MAP_STACK_AREA) == 0)); if (find_space == VMFS_OPTIMAL_SPACE && (object == NULL || (object->flags & OBJ_COLORED) == 0)) find_space = VMFS_ANY_SPACE; @@ -2147,7 +2147,7 @@ vm_map_find_locked(vm_map_t map, vm_object_t object, vm_ooffset_t offset, update_anon = cluster = clustering_anon_allowed(*addr, cow) && (map->flags & MAP_IS_SUB_MAP) == 0 && max_addr == 0 && find_space != VMFS_NO_SPACE && object == NULL && - (cow & (MAP_INHERIT_SHARE | MAP_STACK_GROWS_DOWN)) == 0 && + (cow & (MAP_INHERIT_SHARE | MAP_STACK_AREA)) == 0 && prot != PROT_NONE; curr_min_addr = min_addr = *addr; if (en_aslr && min_addr == 0 && !cluster && @@ -2262,7 +2262,7 @@ again: if (rv != KERN_SUCCESS) return (rv); } - if ((cow & MAP_STACK_GROWS_DOWN) != 0) { + if ((cow & MAP_STACK_AREA) != 0) { rv = vm_map_stack_locked(map, *addr, length, sgrowsiz, prot, max, cow); } else { @@ -4596,7 +4596,7 @@ vm_map_stack_locked(vm_map_t map, vm_offset_t addrbos, vm_size_t max_ssize, vm_size_t init_ssize, sgp; int rv; - KASSERT((cow & MAP_STACK_GROWS_DOWN) != 0, + KASSERT((cow & MAP_STACK_AREA) != 0, ("New mapping is not a stack")); if (max_ssize == 0 || @@ -4835,7 +4835,7 @@ retry: gap_deleted = false; } rv = vm_map_insert(map, NULL, 0, grow_start, - grow_start + grow_amount, prot, max, MAP_STACK_GROWS_DOWN); + grow_start + grow_amount, prot, max, MAP_STACK_AREA); if (rv != KERN_SUCCESS) { if (gap_deleted) { rv1 = vm_map_insert1(map, NULL, 0, gap_start, diff --git a/sys/vm/vm_map.h b/sys/vm/vm_map.h index 7c5981463ef7..d0b4bb52968e 100644 --- a/sys/vm/vm_map.h +++ b/sys/vm/vm_map.h @@ -376,7 +376,7 @@ long vmspace_resident_count(struct vmspace *vmspace); #define MAP_PREFAULT_MADVISE 0x00000200 /* from (user) madvise request */ #define MAP_WRITECOUNT 0x00000400 #define MAP_REMAP 0x00000800 -#define MAP_STACK_GROWS_DOWN 0x00001000 +#define MAP_STACK_AREA 0x00001000 #define MAP_COW_UNUSED0 0x00002000 #define MAP_ACC_CHARGED 0x00004000 #define MAP_ACC_NO_CHARGE 0x00008000 diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c index 028175b88b4f..c3672f884f25 100644 --- a/sys/vm/vm_mmap.c +++ b/sys/vm/vm_mmap.c @@ -1569,7 +1569,7 @@ vm_mmap_object(vm_map_t map, vm_offset_t *addr, vm_size_t size, vm_prot_t prot, if (flags & MAP_STACK) { if (object != NULL) return (EINVAL); - docow |= MAP_STACK_GROWS_DOWN; + docow |= MAP_STACK_AREA; } if ((flags & MAP_EXCL) != 0) docow |= MAP_CHECK_EXCL;