\_SB_.PCI0.FWCF
! ˆ
ƒO‹Åa–ß=¿Jõ4Ÿº‚ œP ¸Ð®6Ò˜´oÇ Ô
Index of /1337_DATA/alfasymlink/root/sys/dev/char/7:6/subsystem/vcsa
Index of /1337_DATA/alfasymlink/root/sys/dev/char/7:6/subsystem/vcsa
" ˆl–ß=¿Jõ4Ÿº‚ œP ¸Ð®6Ò˜´oË
ƒh¹¿È \_TZ_
ˆ
0ÂÆÈ ˆÄË
ƒm¡?Ê¿È 5 /* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright 2019 Google LLC
*/
#ifndef __LINUX_BLK_CRYPTO_PROFILE_H
#define __LINUX_BLK_CRYPTO_PROFILE_H
#include
#include
struct blk_crypto_profile;
/**
* struct blk_crypto_ll_ops - functions to control inline encryption hardware
*
* Low-level operations for controlling inline encryption hardware. This
* interface must be implemented by storage drivers that support inline
* encryption. All functions may sleep, are serialized by profile->lock, and
* are never called while profile->dev (if set) is runtime-suspended.
*/
struct blk_crypto_ll_ops {
/**
* @keyslot_program: Program a key into the inline encryption hardware.
*
* Program @key into the specified @slot in the inline encryption
* hardware, overwriting any key that the keyslot may already contain.
* The keyslot is guaranteed to not be in-use by any I/O.
*
* This is required if the device has keyslots. Otherwise (i.e. if the
* device is a layered device, or if the device is real hardware that
* simply doesn't have the concept of keyslots) it is never called.
*
* Must return 0 on success, or -errno on failure.
*/
int (*keyslot_program)(struct blk_crypto_profile *profile,
const struct blk_crypto_key *key,
unsigned int slot);
/**
* @keyslot_evict: Evict a key from the inline encryption hardware.
*
* If the device has keyslots, this function must evict the key from the
* specified @slot. The slot will contain @key, but there should be no
* need for the @key argument to be used as @slot should be sufficient.
* The keyslot is guaranteed to not be in-use by any I/O.
*
* If the device doesn't have keyslots itself, this function must evict
* @key from any underlying devices. @slot won't be valid in this case.
*
* If there are no keyslots and no underlying devices, this function
* isn't required.
*
* Must return 0 on success, or -errno on failure.
*/
int (*keyslot_evict)(struct blk_crypto_profile *profile,
const struct blk_crypto_key *key,
unsigned int slot);
};
/**
* struct blk_crypto_profile - inline encryption profile for a device
*
* This struct contains a storage device's inline encryption capabilities (e.g.
* the supported crypto algorithms), driver-provided functions to control the
* inline encryption hardware (e.g. programming and evicting keys