Revision 16e604a437c89751dc626c9e90cf88ba93c5be64 authored by Alexandru Elisei on 07 August 2019, 09:53:20 UTC, committed by Marc Zyngier on 09 August 2019, 07:07:26 UTC
A HW mapped level sensitive interrupt asserted by a device will not be put
into the ap_list if it is disabled at the VGIC level. When it is enabled
again, it will be inserted into the ap_list and written to a list register
on guest entry regardless of the state of the device.

We could argue that this can also happen on real hardware, when the command
to enable the interrupt reached the GIC before the device had the chance to
de-assert the interrupt signal; however, we emulate the distributor and
redistributors in software and we can do better than that.

Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
1 parent c69509c
Raw File
aes_ccm.h
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright 2003-2004, Instant802 Networks, Inc.
 * Copyright 2006, Devicescape Software, Inc.
 */

#ifndef AES_CCM_H
#define AES_CCM_H

#include "aead_api.h"

#define CCM_AAD_LEN	32

static inline struct crypto_aead *
ieee80211_aes_key_setup_encrypt(const u8 key[], size_t key_len, size_t mic_len)
{
	return aead_key_setup_encrypt("ccm(aes)", key, key_len, mic_len);
}

static inline int
ieee80211_aes_ccm_encrypt(struct crypto_aead *tfm,
			  u8 *b_0, u8 *aad, u8 *data,
			  size_t data_len, u8 *mic)
{
	return aead_encrypt(tfm, b_0, aad + 2,
			    be16_to_cpup((__be16 *)aad),
			    data, data_len, mic);
}

static inline int
ieee80211_aes_ccm_decrypt(struct crypto_aead *tfm,
			  u8 *b_0, u8 *aad, u8 *data,
			  size_t data_len, u8 *mic)
{
	return aead_decrypt(tfm, b_0, aad + 2,
			    be16_to_cpup((__be16 *)aad),
			    data, data_len, mic);
}

static inline void ieee80211_aes_key_free(struct crypto_aead *tfm)
{
	return aead_key_free(tfm);
}

#endif /* AES_CCM_H */
back to top