#ifndef __ENCRYPTED_KEY_H #define __ENCRYPTED_KEY_H #define ENCRYPTED_DEBUG 0 #if defined(CONFIG_TRUSTED_KEYS) || \ (defined(CONFIG_TRUSTED_KEYS_MODULE) && defined(CONFIG_ENCRYPTED_KEYS_MODULE)) extern struct key *request_trusted_key(const char *trusted_desc, const u8 **master_key, size_t *master_keylen); #else static inline struct key *request_trusted_key(const char *trusted_desc, const u8 **master_key, size_t *master_keylen) { return ERR_PTR(-EOPNOTSUPP); } #endif #if ENCRYPTED_DEBUG static inline void dump_master_key(const u8 *master_key, size_t master_keylen) { print_hex_dump(KERN_ERR, "master key: ", DUMP_PREFIX_NONE, 32, 1, master_key, master_keylen, 0); } static inline void dump_decrypted_data(struct encrypted_key_payload *epayload) { print_hex_dump(KERN_ERR, "decrypted data: ", DUMP_PREFIX_NONE, 32, 1, epayload->decrypted_data, epayload->decrypted_datalen, 0); } static inline void dump_encrypted_data(struct encrypted_key_payload *epayload, unsigned int encrypted_datalen) { print_hex_dump(KERN_ERR, "encrypted data: ", DUMP_PREFIX_NONE, 32, 1, epayload->encrypted_data, encrypted_datalen, 0); } static inline void dump_hmac(const char *str, const u8 *digest, unsigned int hmac_size) { if (str) pr_info("encrypted_key: %s", str); print_hex_dump(KERN_ERR, "hmac: ", DUMP_PREFIX_NONE, 32, 1, digest, hmac_size, 0); } #else static inline void dump_master_key(const u8 *master_key, size_t master_keylen) { } static inline void dump_decrypted_data(struct encrypted_key_payload *epayload) { } static inline void dump_encrypted_data(struct encrypted_key_payload *epayload, unsigned int encrypted_datalen) { } static inline void dump_hmac(const char *str, const u8 *digest, unsigned int hmac_size) { } #endif #endif ive' href='/cgit.cgi/linux/net-next.git/commit/include/acpi/button.h?id=433e19cf33d34bb6751c874a9c00980552fe508c'>commitdiff
path: root/include/acpi/button.h
diff options
context:
space:
mode:
authorDexuan Cui <decui@microsoft.com>2017-01-28 11:46:02 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-01-31 10:59:48 +0100
commit433e19cf33d34bb6751c874a9c00980552fe508c (patch)
treece6547ef2987fbb289fa28f03536328a42781651 /include/acpi/button.h
parent191e885a2e130e639bb0c8ee350d7047294f2ce6 (diff)
Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()
Commit a389fcfd2cb5 ("Drivers: hv: vmbus: Fix signaling logic in hv_need_to_signal_on_read()") added the proper mb(), but removed the test "prev_write_sz < pending_sz" when making the signal decision. As a result, the guest can signal the host unnecessarily, and then the host can throttle the guest because the host thinks the guest is buggy or malicious; finally the user running stress test can perceive intermittent freeze of the guest. This patch brings back the test, and properly handles the in-place consumption APIs used by NetVSC (see get_next_pkt_raw(), put_pkt_raw() and commit_rd_index()). Fixes: a389fcfd2cb5 ("Drivers: hv: vmbus: Fix signaling logic in hv_need_to_signal_on_read()") Signed-off-by: Dexuan Cui <decui@microsoft.com> Reported-by: Rolf Neugebauer <rolf.neugebauer@docker.com> Tested-by: Rolf Neugebauer <rolf.neugebauer@docker.com> Cc: "K. Y. Srinivasan" <kys@microsoft.com> Cc: Haiyang Zhang <haiyangz@microsoft.com> Cc: Stephen Hemminger <sthemmin@microsoft.com> Cc: <stable@vger.kernel.org> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/acpi/button.h')