Quellcodebibliothek Statistik Leitseite products/sources/formale Sprachen/C/Linux/arch/x86/um/   (Open Source Betriebssystem Version 6.17.9©)  Datei vom 24.10.2025 mit Größe 1007 B image not shown  

Quelle  mem_32.c   Sprache: C

 
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (C) 2011 Richard Weinberger <richrd@nod.at>
 */


#include <linux/mm.h>
#include <asm/elf.h>

static struct vm_area_struct gate_vma;

static int __init gate_vma_init(void)
{
 if (!FIXADDR_USER_START)
  return 0;

 vma_init(&gate_vma, NULL);
 gate_vma.vm_start = FIXADDR_USER_START;
 gate_vma.vm_end = FIXADDR_USER_END;
 vm_flags_init(&gate_vma, VM_READ | VM_MAYREAD | VM_EXEC | VM_MAYEXEC);
 gate_vma.vm_page_prot = PAGE_READONLY;

 return 0;
}
__initcall(gate_vma_init);

struct vm_area_struct *get_gate_vma(struct mm_struct *mm)
{
 return FIXADDR_USER_START ? &gate_vma : NULL;
}

int in_gate_area_no_mm(unsigned long addr)
{
 if (!FIXADDR_USER_START)
  return 0;

 if ((addr >= FIXADDR_USER_START) && (addr < FIXADDR_USER_END))
  return 1;

 return 0;
}

int in_gate_area(struct mm_struct *mm, unsigned long addr)
{
 struct vm_area_struct *vma = get_gate_vma(mm);

 if (!vma)
  return 0;

 return (addr >= vma->vm_start) && (addr < vma->vm_end);
}

Messung V0.5
C=97 H=93 G=94

¤ Dauer der Verarbeitung: 0.10 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.