···24#include <asm/i387.h>25#include "padlock.h"2600000027struct padlock_sha_desc {28 struct shash_desc fallback;29};···70 /* We can't store directly to *out as it may be unaligned. */71 /* BTW Don't reduce the buffer size below 128 Bytes!72 * PadLock microcode needs it that big. */73- char result[128] __attribute__ ((aligned(PADLOCK_ALIGNMENT)));0074 struct padlock_sha_desc *dctx = shash_desc_ctx(desc);75 struct sha1_state state;76 unsigned int space;···136 /* We can't store directly to *out as it may be unaligned. */137 /* BTW Don't reduce the buffer size below 128 Bytes!138 * PadLock microcode needs it that big. */139- char result[128] __attribute__ ((aligned(PADLOCK_ALIGNMENT)));00140 struct padlock_sha_desc *dctx = shash_desc_ctx(desc);141 struct sha256_state state;142 unsigned int space;
···24#include <asm/i387.h>25#include "padlock.h"2627+#ifdef CONFIG_64BIT28+#define STACK_ALIGN 1629+#else30+#define STACK_ALIGN 431+#endif32+33struct padlock_sha_desc {34 struct shash_desc fallback;35};···64 /* We can't store directly to *out as it may be unaligned. */65 /* BTW Don't reduce the buffer size below 128 Bytes!66 * PadLock microcode needs it that big. */67+ char buf[128 + PADLOCK_ALIGNMENT - STACK_ALIGN] __attribute__68+ ((aligned(STACK_ALIGN)));69+ char *result = PTR_ALIGN(&buf[0], PADLOCK_ALIGNMENT);70 struct padlock_sha_desc *dctx = shash_desc_ctx(desc);71 struct sha1_state state;72 unsigned int space;···128 /* We can't store directly to *out as it may be unaligned. */129 /* BTW Don't reduce the buffer size below 128 Bytes!130 * PadLock microcode needs it that big. */131+ char buf[128 + PADLOCK_ALIGNMENT - STACK_ALIGN] __attribute__132+ ((aligned(STACK_ALIGN)));133+ char *result = PTR_ALIGN(&buf[0], PADLOCK_ALIGNMENT);134 struct padlock_sha_desc *dctx = shash_desc_ctx(desc);135 struct sha256_state state;136 unsigned int space;