Received: by mail.netbsd.org (Postfix, from userid 605) id 3214584E28; Fri, 3 Jul 2020 16:17:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 9A3B784E24 for ; Fri, 3 Jul 2020 16:17:25 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id 46FjpxcY_f4C for ; Fri, 3 Jul 2020 16:17:25 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id 2ABFA84DC1 for ; Fri, 3 Jul 2020 16:17:25 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 21EC7FB28; Fri, 3 Jul 2020 16:17:25 +0000 (UTC) Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" MIME-Version: 1.0 Date: Fri, 3 Jul 2020 16:17:25 +0000 From: "Maxime Villard" Subject: CVS commit: src/sys/arch/x86/x86 To: source-changes@NetBSD.org X-Mailer: log_accum Message-Id: <20200703161725.21EC7FB28@cvs.NetBSD.org> Sender: source-changes-owner@NetBSD.org List-Id: source-changes.NetBSD.org Precedence: bulk Reply-To: source-changes-d@NetBSD.org Mail-Reply-To: "Maxime Villard" Mail-Followup-To: source-changes-d@NetBSD.org List-Unsubscribe: Module Name: src Committed By: maxv Date: Fri Jul 3 16:17:25 UTC 2020 Modified Files: src/sys/arch/x86/x86: vm_machdep.c Log Message: In cpu_uarea_{alloc,free}: - My previous change in this file was not correct, kremove does not free the underlying PA, which caused a very slow leak under memory pressure. Rework to correctly free the PA. - Add a second redzone, this time after the stack, to catch several stack overflows. The main concern is read overflows which leak the heap that follows the stack. - UVM_KMF_WAITVA doesn't fail, so remove error check. - Add KASSERTs. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/sys/arch/x86/x86/vm_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.