public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Andrew Burgess <aburgess@redhat.com>
Cc: binutils@sourceware.org, Alan Modra <amodra@gmail.com>
Subject: Re: [PATCH] bfd: make _bfd_section_size_insane part of the public API
Date: Thu, 11 Jan 2024 09:23:29 +0100	[thread overview]
Message-ID: <a1602ed4-8328-4c4a-a5db-2121d29e6683@suse.com> (raw)
In-Reply-To: <874jfl88jg.fsf@redhat.com>

On 10.01.2024 17:20, Andrew Burgess wrote:
> We're talking about the same _bfd_section_size_insane in bfd/section.c,
> right?
> 
> I don't see any arbitrary limit in there.  If there is such a limit then
> it's buried within all the very non-arbitrary sanity checks.
> 
> This function isn't answering: "is this section larger than X", it is
> instead answering: "can this section possibly be read from this file".

Hmm, first of all I have to apologize for having gone from memory, having
looked at the function only when I first saw your patch. Yet then what
you're talking about is merely the final check of the function, which I'd
view as fine to externalize. The whole rest of the function still seems
pretty (but not exclusively) heuristic to me.

Anyway, Alan has indicated approval of making the function external, even
as-is. If I was to make a suggestion beyond the possible renaming /
inverting of sense, that would be to split the function into an "is valid"
part and an "is sane" one, with the latter kept internal.

Jan

  parent reply	other threads:[~2024-01-11  8:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-06 16:15 Andrew Burgess
2024-01-02 11:21 ` Ping: " Andrew Burgess
2024-01-05 12:03 ` Jan Beulich
2024-01-10 11:03   ` Andrew Burgess
2024-01-10 12:47     ` Jan Beulich
2024-01-10 13:48       ` Andrew Burgess
2024-01-10 14:26         ` Jan Beulich
2024-01-10 16:20           ` Andrew Burgess
2024-01-10 21:22             ` Alan Modra
2024-01-11  8:23             ` Jan Beulich [this message]
2024-03-06 11:17               ` Andrew Burgess
2024-03-06 11:30                 ` Jan Beulich
2024-03-25 18:33                   ` Andrew Burgess
2024-01-10 17:54   ` Tom Tromey

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=a1602ed4-8328-4c4a-a5db-2121d29e6683@suse.com \
    --to=jbeulich@suse.com \
    --cc=aburgess@redhat.com \
    --cc=amodra@gmail.com \
    --cc=binutils@sourceware.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).