From owner-svn-src-head@freebsd.org Fri Jul 10 00:07:01 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2E10D359EDB for ; Fri, 10 Jul 2020 00:07:01 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x736.google.com (mail-qk1-x736.google.com [IPv6:2607:f8b0:4864:20::736]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B2tdJ3QVLz3ZRR for ; Fri, 10 Jul 2020 00:07:00 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x736.google.com with SMTP id 80so3655114qko.7 for ; Thu, 09 Jul 2020 17:07:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=z7zHzOnnOD1X95u7VZdM5hwkOErUuHtBOIOb4P67EME=; b=cnPTxuPo9VWD5d81Tt/gVzmd7Tafv5+Dm5e6/5/rZNvgYkp0FEyazJDV3ojRk2fUJF 8vuTCbcUXo+OsH0ramkbHiH6+btaACVJuJSk81InCqFZwCM1z9ZEyik+e66kJoXVlhJI uw8wyMns0PX0DenoCsx8qwjdwj0SwIuo6kOjFUmcb/U2PBSJEx57zaFeKgC+zk2HIE/K Q3Z2Z3RLGBy+lz437VhohnTGkEeI7jA7fI4OpdyuKdkrD9JDt2gkSMQtuYnOy+mL6Fbz xV38hm+CwMKSuuom2xy4WsPNstGylLkxU95hGqpmZIhvr1/9oVznw0+5Xsagh/4IKkqz Ng0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=z7zHzOnnOD1X95u7VZdM5hwkOErUuHtBOIOb4P67EME=; b=BO51hWqBfYs6jGDbqQ9aVImUmSMWWs0TCEihQwiLavtjNQWK1QVwAEDaWTzRkg1wyQ bg+xNFKusr88kZQG5q9L1xE5A3334hgmHrJb3sbMVKyOfzOxaRSZ2aghf5fbaX5cwyTJ Lvu+uzcw6pnFuihtVMAbiLHktP5ESgjJl9Qdb64RBslFFwD8fkOCHaIcnIy1VbqxCHdA 8F84caO36nmKwfKguR2XSe3mumYk7e2VpqcIu1QTA5A7+10/uvIl2Ii+eH5pgiRS2JzK oAJcWw8LoSXUqJTo3JdZvu3KTSuiLDQKShWVC4ph67vjmPhA4O0OiSW2/0qPApcvtEiQ 7Ngg== X-Gm-Message-State: AOAM53353AiABIkuMwVS7vgFMK8oinPmHP9V7v3voJeGAZ/nON7SHPwh WWX66CBTb2BVwskSPWXZ3Sv2OkJzdvkkP/UhuDz89g== X-Google-Smtp-Source: ABdhPJwyRWhaHXrSlzMouoPAaSNr0GfNI812WG0SvmmhwKiaDIAU0EytCDfhauMfrKXIX0ua8TaE63d004NNF46yfdM= X-Received: by 2002:a37:4bcd:: with SMTP id y196mr2649186qka.495.1594339619279; Thu, 09 Jul 2020 17:06:59 -0700 (PDT) MIME-Version: 1.0 References: <202007092238.069McbU4014226@repo.freebsd.org> In-Reply-To: From: Warner Losh Date: Thu, 9 Jul 2020 18:06:48 -0600 Message-ID: Subject: Re: svn commit: r363060 - in head: stand/defaults sys/amd64/amd64 sys/powerpc/aim sys/vm To: Oliver Pinter Cc: Scott Long , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" X-Rspamd-Queue-Id: 4B2tdJ3QVLz3ZRR X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=cnPTxuPo; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::736) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-2.23 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_MEDIUM(-0.88)[-0.876]; NEURAL_HAM_LONG(-0.88)[-0.876]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-head@freebsd.org]; RCPT_COUNT_FIVE(0.00)[5]; DMARC_NA(0.00)[bsdimp.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; NEURAL_HAM_SHORT(-0.48)[-0.479]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::736:from]; R_SPF_NA(0.00)[no SPF record]; FREEMAIL_TO(0.00)[gmail.com]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2020 00:07:01 -0000 On Thu, Jul 9, 2020 at 4:54 PM Oliver Pinter wrote: > > > On Friday, July 10, 2020, Scott Long wrote: > >> Author: scottl >> Date: Thu Jul 9 22:38:36 2020 >> New Revision: 363060 >> URL: https://svnweb.freebsd.org/changeset/base/363060 >> >> Log: >> Revert r362998, r326999 while a better compatibility strategy is >> devised. >> >> Modified: >> head/stand/defaults/loader.conf >> head/sys/amd64/amd64/pmap.c >> head/sys/powerpc/aim/mmu_radix.c >> head/sys/vm/vm_page.c >> head/sys/vm/vm_page.h >> >> Modified: head/stand/defaults/loader.conf >> >> ============================================================================== >> --- head/stand/defaults/loader.conf Thu Jul 9 20:55:18 2020 >> (r363059) >> +++ head/stand/defaults/loader.conf Thu Jul 9 22:38:36 2020 >> (r363060) >> @@ -53,7 +53,7 @@ entropy_cache_type="boot_entropy_cache" # >> Required for >> ram_excludelist_load="NO" # Set this to YES to load a file >> # containing a list of addresses >> to >> # exclude from the running system. >> -ram_excludelist_name="/boot/excludelist.txt" # Set this to the name of >> the file >> +ram_excludeist_name="/boot/excludelist.txt" # Set this to the name of >> the file > > > Hi! > > This part of the revert seems still broken. > I think youre correct. Can you look at https://reviews.freebsd.org/D25606 please and let me know if you think that's right? Warner > > >> ram_excludelist_type="ram_excludelist" # Required for the kernel to find >> # the blacklist module >> >> >> Modified: head/sys/amd64/amd64/pmap.c >> >> ============================================================================== >> --- head/sys/amd64/amd64/pmap.c Thu Jul 9 20:55:18 2020 (r363059) >> +++ head/sys/amd64/amd64/pmap.c Thu Jul 9 22:38:36 2020 (r363060) >> @@ -2060,7 +2060,7 @@ pmap_init(void) >> int error, i, ret, skz63; >> >> /* L1TF, reserve page @0 unconditionally */ >> - vm_page_excludelist_add(0, bootverbose); >> + vm_page_blacklist_add(0, bootverbose); >> >> /* Detect bare-metal Skylake Server and Skylake-X. */ >> if (vm_guest == VM_GUEST_NO && cpu_vendor_id == CPU_VENDOR_INTEL >> && >> @@ -2081,7 +2081,7 @@ pmap_init(void) >> printf("SKZ63: skipping 4M RAM starting " >> "at physical 1G\n"); >> for (i = 0; i < atop(0x400000); i++) { >> - ret = vm_page_excludelist_add(0x40000000 + >> + ret = vm_page_blacklist_add(0x40000000 + >> ptoa(i), FALSE); >> if (!ret && bootverbose) >> printf("page at %#lx already >> used\n", >> >> Modified: head/sys/powerpc/aim/mmu_radix.c >> >> ============================================================================== >> --- head/sys/powerpc/aim/mmu_radix.c Thu Jul 9 20:55:18 2020 >> (r363059) >> +++ head/sys/powerpc/aim/mmu_radix.c Thu Jul 9 22:38:36 2020 >> (r363060) >> @@ -3557,7 +3557,7 @@ mmu_radix_init() >> int error, i, pv_npg; >> >> /* L1TF, reserve page @0 unconditionally */ >> - vm_page_excludelist_add(0, bootverbose); >> + vm_page_blacklist_add(0, bootverbose); >> >> zone_radix_pgd = uma_zcache_create("radix_pgd_cache", >> RADIX_PGD_SIZE, NULL, NULL, >> >> Modified: head/sys/vm/vm_page.c >> >> ============================================================================== >> --- head/sys/vm/vm_page.c Thu Jul 9 20:55:18 2020 (r363059) >> +++ head/sys/vm/vm_page.c Thu Jul 9 22:38:36 2020 (r363060) >> @@ -155,11 +155,10 @@ vm_page_t vm_page_array; >> long vm_page_array_size; >> long first_page; >> >> -static TAILQ_HEAD(, vm_page) excludelist_head; >> -static int sysctl_vm_page_excludelist(SYSCTL_HANDLER_ARGS); >> -SYSCTL_PROC(_vm, OID_AUTO, page_excludelist, CTLTYPE_STRING | CTLFLAG_RD >> | >> - CTLFLAG_MPSAFE, NULL, 0, sysctl_vm_page_excludelist, "A", >> - "Blacklist pages"); >> +static TAILQ_HEAD(, vm_page) blacklist_head; >> +static int sysctl_vm_page_blacklist(SYSCTL_HANDLER_ARGS); >> +SYSCTL_PROC(_vm, OID_AUTO, page_blacklist, CTLTYPE_STRING | CTLFLAG_RD | >> + CTLFLAG_MPSAFE, NULL, 0, sysctl_vm_page_blacklist, "A", "Blacklist >> pages"); >> >> static uma_zone_t fakepg_zone; >> >> @@ -259,16 +258,16 @@ vm_set_page_size(void) >> } >> >> /* >> - * vm_page_excludelist_next: >> + * vm_page_blacklist_next: >> * >> - * Find the next entry in the provided string of excludelist >> + * Find the next entry in the provided string of blacklist >> * addresses. Entries are separated by space, comma, or newline. >> * If an invalid integer is encountered then the rest of the >> * string is skipped. Updates the list pointer to the next >> * character, or NULL if the string is exhausted or invalid. >> */ >> static vm_paddr_t >> -vm_page_excludelist_next(char **list, char *end) >> +vm_page_blacklist_next(char **list, char *end) >> { >> vm_paddr_t bad; >> char *cp, *pos; >> @@ -315,13 +314,13 @@ vm_page_excludelist_next(char **list, char *end) >> *list = cp; >> return (trunc_page(bad)); >> } >> - printf("Garbage in RAM excludelist, skipping\n"); >> + printf("Garbage in RAM blacklist, skipping\n"); >> *list = NULL; >> return (0); >> } >> >> bool >> -vm_page_excludelist_add(vm_paddr_t pa, bool verbose) >> +vm_page_blacklist_add(vm_paddr_t pa, bool verbose) >> { >> struct vm_domain *vmd; >> vm_page_t m; >> @@ -337,7 +336,7 @@ vm_page_excludelist_add(vm_paddr_t pa, bool verbose) >> vm_domain_free_unlock(vmd); >> if (ret != 0) { >> vm_domain_freecnt_inc(vmd, -1); >> - TAILQ_INSERT_TAIL(&excludelist_head, m, listq); >> + TAILQ_INSERT_TAIL(&blacklist_head, m, listq); >> if (verbose) >> printf("Skipping page with pa 0x%jx\n", >> (uintmax_t)pa); >> } >> @@ -345,35 +344,35 @@ vm_page_excludelist_add(vm_paddr_t pa, bool verbose) >> } >> >> /* >> - * vm_page_excludelist_check: >> + * vm_page_blacklist_check: >> * >> - * Iterate through the provided string of excludelist addresses, >> pulling >> + * Iterate through the provided string of blacklist addresses, >> pulling >> * each entry out of the physical allocator free list and putting it >> - * onto a list for reporting via the vm.page_excludelist sysctl. >> + * onto a list for reporting via the vm.page_blacklist sysctl. >> */ >> static void >> -vm_page_excludelist_check(char *list, char *end) >> +vm_page_blacklist_check(char *list, char *end) >> { >> vm_paddr_t pa; >> char *next; >> >> next = list; >> while (next != NULL) { >> - if ((pa = vm_page_excludelist_next(&next, end)) == 0) >> + if ((pa = vm_page_blacklist_next(&next, end)) == 0) >> continue; >> - vm_page_excludelist_add(pa, bootverbose); >> + vm_page_blacklist_add(pa, bootverbose); >> } >> } >> >> /* >> - * vm_page_excludelist_load: >> + * vm_page_blacklist_load: >> * >> - * Search for a special module named "ram_excludelist". It'll be a >> + * Search for a special module named "ram_blacklist". It'll be a >> * plain text file provided by the user via the loader directive >> * of the same name. >> */ >> static void >> -vm_page_excludelist_load(char **list, char **end) >> +vm_page_blacklist_load(char **list, char **end) >> { >> void *mod; >> u_char *ptr; >> @@ -382,7 +381,7 @@ vm_page_excludelist_load(char **list, char **end) >> mod = NULL; >> ptr = NULL; >> >> - mod = preload_search_by_type("ram_excludelist"); >> + mod = preload_search_by_type("ram_blacklist"); >> if (mod != NULL) { >> ptr = preload_fetch_addr(mod); >> len = preload_fetch_size(mod); >> @@ -396,7 +395,7 @@ vm_page_excludelist_load(char **list, char **end) >> } >> >> static int >> -sysctl_vm_page_excludelist(SYSCTL_HANDLER_ARGS) >> +sysctl_vm_page_blacklist(SYSCTL_HANDLER_ARGS) >> { >> vm_page_t m; >> struct sbuf sbuf; >> @@ -407,7 +406,7 @@ sysctl_vm_page_excludelist(SYSCTL_HANDLER_ARGS) >> if (error != 0) >> return (error); >> sbuf_new_for_sysctl(&sbuf, NULL, 128, req); >> - TAILQ_FOREACH(m, &excludelist_head, listq) { >> + TAILQ_FOREACH(m, &blacklist_head, listq) { >> sbuf_printf(&sbuf, "%s%#jx", first ? "" : ",", >> (uintmax_t)m->phys_addr); >> first = 0; >> @@ -794,14 +793,14 @@ vm_page_startup(vm_offset_t vaddr) >> } >> >> /* >> - * Remove excludelisted pages from the physical memory allocator. >> + * Remove blacklisted pages from the physical memory allocator. >> */ >> - TAILQ_INIT(&excludelist_head); >> - vm_page_excludelist_load(&list, &listend); >> - vm_page_excludelist_check(list, listend); >> + TAILQ_INIT(&blacklist_head); >> + vm_page_blacklist_load(&list, &listend); >> + vm_page_blacklist_check(list, listend); >> >> - list = kern_getenv("vm.excludelist"); >> - vm_page_excludelist_check(list, NULL); >> + list = kern_getenv("vm.blacklist"); >> + vm_page_blacklist_check(list, NULL); >> >> freeenv(list); >> #if VM_NRESERVLEVEL > 0 >> >> Modified: head/sys/vm/vm_page.h >> >> ============================================================================== >> --- head/sys/vm/vm_page.h Thu Jul 9 20:55:18 2020 (r363059) >> +++ head/sys/vm/vm_page.h Thu Jul 9 22:38:36 2020 (r363060) >> @@ -613,7 +613,7 @@ vm_page_t vm_page_alloc_contig_domain(vm_object_t obje >> vm_page_t vm_page_alloc_freelist(int, int); >> vm_page_t vm_page_alloc_freelist_domain(int, int, int); >> void vm_page_bits_set(vm_page_t m, vm_page_bits_t *bits, vm_page_bits_t >> set); >> -bool vm_page_excludelist_add(vm_paddr_t pa, bool verbose); >> +bool vm_page_blacklist_add(vm_paddr_t pa, bool verbose); >> vm_page_t vm_page_grab(vm_object_t, vm_pindex_t, int); >> vm_page_t vm_page_grab_unlocked(vm_object_t, vm_pindex_t, int); >> int vm_page_grab_pages(vm_object_t object, vm_pindex_t pindex, int >> allocflags, >> _______________________________________________ >> svn-src-head@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/svn-src-head >> To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" >> >