Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quelle  mem_encrypt.c   Sprache: C

 
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Implementation of the memory encryption/decryption API.
 *
 * Since the low-level details of the operation depend on the
 * Confidential Computing environment (e.g. pKVM, CCA, ...), this just
 * acts as a top-level dispatcher to whatever hooks may have been
 * registered.
 *
 * Author: Will Deacon <will@kernel.org>
 * Copyright (C) 2024 Google LLC
 *
 * "Hello, boils and ghouls!"
 */


#include <linux/bug.h>
#include <linux/compiler.h>
#include <linux/err.h>
#include <linux/mm.h>

#include <asm/mem_encrypt.h>

static const struct arm64_mem_crypt_ops *crypt_ops;

int arm64_mem_crypt_ops_register(const struct arm64_mem_crypt_ops *ops)
{
 if (WARN_ON(crypt_ops))
  return -EBUSY;

 crypt_ops = ops;
 return 0;
}

int set_memory_encrypted(unsigned long addr, int numpages)
{
 if (likely(!crypt_ops) || WARN_ON(!PAGE_ALIGNED(addr)))
  return 0;

 return crypt_ops->encrypt(addr, numpages);
}
EXPORT_SYMBOL_GPL(set_memory_encrypted);

int set_memory_decrypted(unsigned long addr, int numpages)
{
 if (likely(!crypt_ops) || WARN_ON(!PAGE_ALIGNED(addr)))
  return 0;

 return crypt_ops->decrypt(addr, numpages);
}
EXPORT_SYMBOL_GPL(set_memory_decrypted);

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

¤ Dauer der Verarbeitung: 0.1 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.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge