---
name: "remap_pfn_range"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/remap_pfn_range"
---

# remap\_pfn\_range(9)

remap kernel memory to userspace

## NAME

remap\_pfn\_range - remap kernel memory to userspace

## SYNOPSIS

**int remap\_pfn\_range(struct vm\_area\_struct \*** *vma***, unsigned long** *addr***, unsigned long** *pfn***, unsigned long** *size***, pgprot\_t** *prot***);**

## ARGUMENTS

*vma*

user vma to map to

*addr*

target user address to start at

*pfn*

physical address of kernel memory

*size*

size of map area

*prot*

page protection flags for this mapping

## NOTE

this is only safe if the mm semaphore is held when called.

## COPYRIGHT
