NetBSD Problem Report #52896
From www@NetBSD.org Wed Jan 3 22:25:35 2018
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 9096A7A1B6
for <gnats-bugs@gnats.NetBSD.org>; Wed, 3 Jan 2018 22:25:35 +0000 (UTC)
Message-Id: <20180103222534.CAE9A7A1E9@mollari.NetBSD.org>
Date: Wed, 3 Jan 2018 22:25:34 +0000 (UTC)
From: coypu@sdf.org
Reply-To: coypu@sdf.org
To: gnats-bugs@NetBSD.org
Subject: amd64 kernel seems to have RWX mappings
X-Send-Pr-Version: www-1.0
>Number: 52896
>Category: port-amd64
>Synopsis: amd64 kernel seems to have RWX mappings
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: port-amd64-maintainer
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Jan 03 22:30:00 +0000 2018
>Closed-Date: Fri Feb 09 09:17:44 +0000 2018
>Last-Modified: Fri Feb 09 09:17:44 +0000 2018
>Originator: coypu
>Release: NetBSD 8.99.9
>Organization:
>Environment:
NetBSD localhost 8.99.9 NetBSD 8.99.9 (GENERIC) #9: Sat Dec 9 18:35:18 IST 2017 fly@localhost:/home/fly/obj/sys/arch/amd64/compile/GENERIC amd64
>Description:
# pmap 0
(omitting non RWX mappings)
FFFF800000000000 471856K read/write/exec [ anon ]
FFFF80001CCCC000 4150224K read/write/exec [ anon ]
FFFF80011A1C0000 524288K read/write/exec [ pager_map ]
FFFF80013A1DA000 1200K read/write/exec [ phys_map ]
FFFF80013EEA9000 8192K read/write/exec [ ubc_pager ]
FFFF80013F6AD000 4096K read/write/exec [ exec_map ]
it's possible pmap (the program) is wrong, but it seems like any executable mapping is also writable.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: maxv@NetBSD.org
State-Changed-When: Fri, 09 Feb 2018 09:17:44 +0000
State-Changed-Why:
There is no RWX mapping on amd64. What "pmap 0" displays is the maximum permission
of a map, and by default, the maximum permission used in UVM is RWX. But the pages
are later kentered manually, and they are actually never RWX.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.