public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Aleksei Vetrov <vvvvvv@google.com>
To: Mark Wielaard <mark@klomp.org>
Cc: elfutils-devel@sourceware.org, kernel-team@android.com,
	 maennich@google.com
Subject: Re: [PATCH] libdw: check memory access in get_(u|s)leb128
Date: Tue, 7 Feb 2023 16:17:12 +0000	[thread overview]
Message-ID: <CAH2MdgrbaGBYuWf+-FAN4odx2n_1rndoKm8-wBVUeQN84RcTYA@mail.gmail.com> (raw)
In-Reply-To: <20230126210539.GC2781@gnu.wildebeest.org>

[-- Attachment #1: Type: text/plain, Size: 473 bytes --]

Hi Mark,

> Did you actually find situations where these functions were called with
addrp
> >= endp?

Yes, for example libdw/libdw_form.c:91:7.

> It turns out that get_[su]leb128 dominates some operations and really does
> have to be as fast as possible. So I do like to know what the impact is of
> this change.

This patch just moves __libdw_max_len_uleb128 to the beginning of the
function
and adds only one new if. So hopefully it shouldn't affect performance at
all.

  reply	other threads:[~2023-02-07 16:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-25 16:05 vvvvvv
2023-01-26 21:05 ` Mark Wielaard
2023-02-07 16:17   ` Aleksei Vetrov [this message]
2023-02-07 17:17     ` Mark Wielaard
2023-02-11 23:42 ` Mark Wielaard
2023-02-13 20:03   ` Aleksei Vetrov
2023-02-13 20:10     ` [PATCH v2] " vvvvvv
2023-02-14 15:44       ` Mark Wielaard

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=CAH2MdgrbaGBYuWf+-FAN4odx2n_1rndoKm8-wBVUeQN84RcTYA@mail.gmail.com \
    --to=vvvvvv@google.com \
    --cc=elfutils-devel@sourceware.org \
    --cc=kernel-team@android.com \
    --cc=maennich@google.com \
    --cc=mark@klomp.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).