Merge 3cb9871f81 ("Merge tag 'urgent-rcu.2024.01.24a' of https://github.com/neeraju/linux") into android-mainline
Steps on the way to v6.8-rc1 Signed-off-by: Lee Jones <joneslee@google.com> Change-Id: I2b95d8ef56b0a11e730c1cb3bff593c689b32d10
This commit is contained in:
+25
-11
@@ -62,8 +62,7 @@ static unsigned int nr_unresolved;
|
||||
|
||||
#define MODULE_NAME_LEN (64 - sizeof(Elf_Addr))
|
||||
|
||||
void __attribute__((format(printf, 2, 3)))
|
||||
modpost_log(enum loglevel loglevel, const char *fmt, ...)
|
||||
void modpost_log(enum loglevel loglevel, const char *fmt, ...)
|
||||
{
|
||||
va_list arglist;
|
||||
|
||||
@@ -93,6 +92,9 @@ modpost_log(enum loglevel loglevel, const char *fmt, ...)
|
||||
error_occurred = true;
|
||||
}
|
||||
|
||||
void __attribute__((alias("modpost_log")))
|
||||
modpost_log_noret(enum loglevel loglevel, const char *fmt, ...);
|
||||
|
||||
static inline bool strends(const char *str, const char *postfix)
|
||||
{
|
||||
if (strlen(str) < strlen(postfix))
|
||||
@@ -476,11 +478,9 @@ static int parse_elf(struct elf_info *info, const char *filename)
|
||||
fatal("%s: not relocatable object.", filename);
|
||||
|
||||
/* Check if file offset is correct */
|
||||
if (hdr->e_shoff > info->size) {
|
||||
if (hdr->e_shoff > info->size)
|
||||
fatal("section header offset=%lu in file '%s' is bigger than filesize=%zu\n",
|
||||
(unsigned long)hdr->e_shoff, filename, info->size);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (hdr->e_shnum == SHN_UNDEF) {
|
||||
/*
|
||||
@@ -518,12 +518,11 @@ static int parse_elf(struct elf_info *info, const char *filename)
|
||||
const char *secname;
|
||||
int nobits = sechdrs[i].sh_type == SHT_NOBITS;
|
||||
|
||||
if (!nobits && sechdrs[i].sh_offset > info->size) {
|
||||
if (!nobits && sechdrs[i].sh_offset > info->size)
|
||||
fatal("%s is truncated. sechdrs[i].sh_offset=%lu > sizeof(*hrd)=%zu\n",
|
||||
filename, (unsigned long)sechdrs[i].sh_offset,
|
||||
sizeof(*hdr));
|
||||
return 0;
|
||||
}
|
||||
|
||||
secname = secstrings + sechdrs[i].sh_name;
|
||||
if (strcmp(secname, ".modinfo") == 0) {
|
||||
if (nobits)
|
||||
@@ -1348,6 +1347,14 @@ static Elf_Addr addend_mips_rel(uint32_t *location, unsigned int r_type)
|
||||
#define R_LARCH_SUB32 55
|
||||
#endif
|
||||
|
||||
#ifndef R_LARCH_RELAX
|
||||
#define R_LARCH_RELAX 100
|
||||
#endif
|
||||
|
||||
#ifndef R_LARCH_ALIGN
|
||||
#define R_LARCH_ALIGN 102
|
||||
#endif
|
||||
|
||||
static void get_rel_type_and_sym(struct elf_info *elf, uint64_t r_info,
|
||||
unsigned int *r_type, unsigned int *r_sym)
|
||||
{
|
||||
@@ -1402,9 +1409,16 @@ static void section_rela(struct module *mod, struct elf_info *elf,
|
||||
continue;
|
||||
break;
|
||||
case EM_LOONGARCH:
|
||||
if (!strcmp("__ex_table", fromsec) &&
|
||||
r_type == R_LARCH_SUB32)
|
||||
switch (r_type) {
|
||||
case R_LARCH_SUB32:
|
||||
if (!strcmp("__ex_table", fromsec))
|
||||
continue;
|
||||
break;
|
||||
case R_LARCH_RELAX:
|
||||
case R_LARCH_ALIGN:
|
||||
/* These relocs do not refer to symbols */
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1421,7 +1435,7 @@ static void section_rel(struct module *mod, struct elf_info *elf,
|
||||
|
||||
for (rel = start; rel < stop; rel++) {
|
||||
Elf_Sym *tsym;
|
||||
Elf_Addr taddr = 0, r_offset;
|
||||
Elf_Addr taddr, r_offset;
|
||||
unsigned int r_type, r_sym;
|
||||
void *loc;
|
||||
|
||||
|
||||
@@ -197,7 +197,11 @@ enum loglevel {
|
||||
LOG_FATAL
|
||||
};
|
||||
|
||||
void modpost_log(enum loglevel loglevel, const char *fmt, ...);
|
||||
void __attribute__((format(printf, 2, 3)))
|
||||
modpost_log(enum loglevel loglevel, const char *fmt, ...);
|
||||
|
||||
void __attribute__((format(printf, 2, 3), noreturn))
|
||||
modpost_log_noret(enum loglevel loglevel, const char *fmt, ...);
|
||||
|
||||
/*
|
||||
* warn - show the given message, then let modpost continue running, still
|
||||
@@ -214,4 +218,4 @@ void modpost_log(enum loglevel loglevel, const char *fmt, ...);
|
||||
*/
|
||||
#define warn(fmt, args...) modpost_log(LOG_WARN, fmt, ##args)
|
||||
#define error(fmt, args...) modpost_log(LOG_ERROR, fmt, ##args)
|
||||
#define fatal(fmt, args...) modpost_log(LOG_FATAL, fmt, ##args)
|
||||
#define fatal(fmt, args...) modpost_log_noret(LOG_FATAL, fmt, ##args)
|
||||
|
||||
Reference in New Issue
Block a user