LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Joe Lawrence <joe.lawrence@redhat.com>
To: x86@kernel.org, Josh Poimboeuf <jpoimboe@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org, Miroslav Benes <mbenes@suse.cz>,
	Andy Lavr <andy.lavr@gmail.com>
Subject: Re: [PATCH v2 2/2] objtool: remove redundant len value from struct section
Date: Sat, 21 Aug 2021 21:17:11 -0400	[thread overview]
Message-ID: <7ca86dcb-65f8-006b-0628-a79fb4defe40@redhat.com> (raw)
In-Reply-To: <20210820194453.395548-3-joe.lawrence@redhat.com>

On 8/20/21 3:44 PM, Joe Lawrence wrote:
> [ ... snip ... ]
> diff --git a/tools/objtool/check.c b/tools/objtool/check.c
> [ ... snip ... ]
> @@ -307,8 +307,9 @@ static int decode_instructions(struct objtool_file *file)
>  			insn->offset = offset;
>  
>  			ret = arch_decode_instruction(file->elf, sec, offset,
> -						      sec->len - offset,
> -						      &insn->len, &insn->type,
> +						      sec->sh.sh_size - offset,
> +						      &insn->sec->sh.sh_size,
> +						      &insn->type,
>  						      &insn->immediate,
>  						      &insn->stack_ops);
>  			if (ret)

Nack!  Not sure what I was thinking here.  It was Friday afternoon, so I
probably wans't.

Changing insn->len to insn->sec->sh.sh_size is obviously bogus.  I'll
correct this part of the patch, do better testing and post v3 on Monday.

Thanks to Andy for reporting.
-- 
Joe


      reply	other threads:[~2021-08-22  1:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-20 19:44 [PATCH v2 0/2] objtool: altinstructions fix and cleanup Joe Lawrence
2021-08-20 19:44 ` [PATCH v2 1/2] objtool: make .altinstructions section entry size consistent Joe Lawrence
2021-08-20 19:44 ` [PATCH v2 2/2] objtool: remove redundant len value from struct section Joe Lawrence
2021-08-22  1:17   ` Joe Lawrence [this message]

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=7ca86dcb-65f8-006b-0628-a79fb4defe40@redhat.com \
    --to=joe.lawrence@redhat.com \
    --cc=andy.lavr@gmail.com \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbenes@suse.cz \
    --cc=peterz@infradead.org \
    --cc=x86@kernel.org \
    --subject='Re: [PATCH v2 2/2] objtool: remove redundant len value from struct section' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).