Date: Mon, 22 Jul 2019 01:21:25 +0000 (UTC) From: Laurie Jennings <laurie_jennings_1977@yahoo.com> To: FreeBSD Net <freebsd-net@freebsd.org> Cc: John Baldwin <jhb@freebsd.org>, Konstantin Belousov <kostikbel@gmail.com> Subject: mmap kernel chunk into user space Message-ID: <2146491394.4652133.1563758485195@mail.yahoo.com> References: <2146491394.4652133.1563758485195.ref@mail.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Im wondering if there have been changes to the api since FreeBSD 9 as I can't get some code I'm porting to work. I have a block of kernel memory wired down and I want to map it to user space. Its just a big structure that has stats and other volatile info. In 9.x I was able to simply do: // kptr has the kernel address obtained from an ioctl call fd=open("/dev/kmem",O_RDWR);memp=mmap(0,size,PROT_READ|PROT_WRITE,MAP_SHARED,fd,(off_t)kptr); And it just worked. In 11.3 it fails, and I havent been able to get ANYTHING to work with this method. I'm open to another method; I read something about mmap no longer supportinjgkmem. In which case, what can I do? LJ From owner-freebsd-net@freebsd.org Mon Jul 22 13:25:48 2019 Return-Path: <owner-freebsd-net@freebsd.org> Delivered-To: freebsd-net@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 EDBADB1D2F for <freebsd-net@mailman.nyi.freebsd.org>; Mon, 22 Jul 2019 13:25:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id CF3A76F210 for <freebsd-net@freebsd.org>; Mon, 22 Jul 2019 13:25:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id CCDDCB1D2E; Mon, 22 Jul 2019 13:25:48 +0000 (UTC) Delivered-To: net@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 CC900B1D2D for <net@mailman.nyi.freebsd.org>; Mon, 22 Jul 2019 13:25:48 +0000 (UTC) (envelope-from bugzilla-noreply@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AF9F26F20E for <net@FreeBSD.org>; Mon, 22 Jul 2019 13:25:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 88398DA72 for <net@FreeBSD.org>; Mon, 22 Jul 2019 13:25:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id x6MDPmC7001464 for <net@FreeBSD.org>; Mon, 22 Jul 2019 13:25:48 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id x6MDPmXE001463 for net@FreeBSD.org; Mon, 22 Jul 2019 13:25:48 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: net@FreeBSD.org Subject: [Bug 184141] [ppp] [patch] Kernel PPPoE sends bad echo-req magic number on big endian machines Date: Mon, 22 Jul 2019 13:25:48 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: sparc64 X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: emaste@freebsd.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: emaste@freebsd.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: assigned_to Message-ID: <bug-184141-7501-lsJMSCHwS5@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-184141-7501@https.bugs.freebsd.org/bugzilla/> References: <bug-184141-7501@https.bugs.freebsd.org/bugzilla/> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-Rspamd-Queue-Id: CF3A76F210 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.99 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.988,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD <freebsd-net.freebsd.org> List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-net>, <mailto:freebsd-net-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-net/> List-Post: <mailto:freebsd-net@freebsd.org> List-Help: <mailto:freebsd-net-request@freebsd.org?subject=help> List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-net>, <mailto:freebsd-net-request@freebsd.org?subject=subscribe> X-List-Received-Date: Mon, 22 Jul 2019 13:25:49 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D184141 Ed Maste <emaste@freebsd.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|net@FreeBSD.org |emaste@freebsd.org --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2146491394.4652133.1563758485195>