2015-12-31 12:09:15 +00:00
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
#include <grub/types.h>
|
|
|
|
|
|
|
|
#define GRUB_MODULE_VERIFY_SUPPORTS_REL 1
|
|
|
|
#define GRUB_MODULE_VERIFY_SUPPORTS_RELA 2
|
|
|
|
|
|
|
|
struct grub_module_verifier_arch {
|
|
|
|
const char *name;
|
|
|
|
int voidp_sizeof;
|
|
|
|
int bigendian;
|
|
|
|
int machine;
|
|
|
|
int flags;
|
|
|
|
const int *supported_relocations;
|
2015-12-31 14:29:28 +00:00
|
|
|
const int *short_relocations;
|
2015-12-31 12:09:15 +00:00
|
|
|
};
|
|
|
|
|
2018-08-01 16:23:03 +00:00
|
|
|
void grub_module_verify64(const char * const filename, void *module_img, size_t module_size, const struct grub_module_verifier_arch *arch, const char **whitelist_empty);
|
|
|
|
void grub_module_verify32(const char * const filename, void *module_img, size_t module_size, const struct grub_module_verifier_arch *arch, const char **whitelist_empty);
|