public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
From: Heiko Carstens <hca@linux.ibm.com>
To: Philipp Rudo <prudo@redhat.com>
Cc: linux-s390@vger.kernel.org, egorenar@linux.ibm.com, ltao@redhat.com
Subject: Re: [PATCH v2 1/2] s390/kexec_file: print some more error messages
Date: Tue, 7 Dec 2021 16:29:55 +0100	[thread overview]
Message-ID: <Ya9988i7o788He/z@osiris> (raw)
In-Reply-To: <20211207125749.6998-2-prudo@redhat.com>

Hi Philipp,

On Tue, Dec 07, 2021 at 01:57:48PM +0100, Philipp Rudo wrote:
> Be kind and give some more information on what went wrong.
> 
> Signed-off-by: Philipp Rudo <prudo@redhat.com>
...
> @@ -304,15 +306,22 @@ int arch_kexec_apply_relocations_add(struct purgatory_info *pi,
>  		sym = (void *)pi->ehdr + symtab->sh_offset;
>  		sym += ELF64_R_SYM(relas[i].r_info);
>  
> -		if (sym->st_shndx == SHN_UNDEF)
> +		if (sym->st_shndx == SHN_UNDEF) {
> +			pr_err("Undefined symbol\n");
>  			return -ENOEXEC;
> +		}
>  
> -		if (sym->st_shndx == SHN_COMMON)
> +		if (sym->st_shndx == SHN_COMMON) {
> +			pr_err("symbol in common section\n");
>  			return -ENOEXEC;
> +		}
>  
>  		if (sym->st_shndx >= pi->ehdr->e_shnum &&
> -		    sym->st_shndx != SHN_ABS)
> +		    sym->st_shndx != SHN_ABS) {
> +			pr_err("Invalid section %d for symbol\n",
> +			       sym->st_shndx);
>  			return -ENOEXEC;

So, if you add the additional error messages here, then I'd really
like to see also the name of the symbol which is causing
problems. Just like it is done on x86.
Sorry for nitpicking :)

  reply	other threads:[~2021-12-07 15:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-07 12:57 [PATCH v2 0/2] s390/kexec_file: improve error handling and messages Philipp Rudo
2021-12-07 12:57 ` [PATCH v2 1/2] s390/kexec_file: print some more error messages Philipp Rudo
2021-12-07 15:29   ` Heiko Carstens [this message]
2021-12-07 17:18     ` Philipp Rudo
2021-12-07 17:40       ` Heiko Carstens
2021-12-07 12:57 ` [PATCH v2 2/2] s390/kexec_file: fix error handling when applying relocations Philipp Rudo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Ya9988i7o788He/z@osiris \
    --to=hca@linux.ibm.com \
    --cc=egorenar@linux.ibm.com \
    --cc=linux-s390@vger.kernel.org \
    --cc=ltao@redhat.com \
    --cc=prudo@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox