From: Mark Wielaard <mark@klomp.org>
To: vvvvvv@google.com
Cc: elfutils-devel@sourceware.org, kernel-team@android.com,
maennich@google.com
Subject: Re: [PATCH v2] libdw: check memory access in get_(u|s)leb128
Date: Tue, 14 Feb 2023 16:44:29 +0100 [thread overview]
Message-ID: <483ee8b69013951e9668a1c7b3bee708aebaa560.camel@klomp.org> (raw)
In-Reply-To: <20230213201005.2498216-1-vvvvvv@google.com>
Hi Aleksei,
On Mon, 2023-02-13 at 20:10 +0000, Aleksei Vetrov via Elfutils-devel
wrote:
> __libdw_get_uleb128 and __libdw_get_sleb128 should check if addrp has
> already reached the end before unrolling the first step. It is done by
> moving __libdw_max_len to the beginning of the function, which can
> notice, that addrp is beyond the end. Then we just check the result of
> this function.
This looks good. And I couldn't measure any meaningful performance
difference. Pushed.
Even though this now catches all calls that have start >= end, I'll
also push my other patch to add extra guards in the callers of
get_(u|s)leb128, because that does provide us with better error
messages.
Thanks,
Mark
prev parent reply other threads:[~2023-02-14 15:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-25 16:05 [PATCH] " vvvvvv
2023-01-26 21:05 ` Mark Wielaard
2023-02-07 16:17 ` Aleksei Vetrov
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 [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=483ee8b69013951e9668a1c7b3bee708aebaa560.camel@klomp.org \
--to=mark@klomp.org \
--cc=elfutils-devel@sourceware.org \
--cc=kernel-team@android.com \
--cc=maennich@google.com \
--cc=vvvvvv@google.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).