unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer via Libc-alpha <libc-alpha@sourceware.org>
To: Siddhesh Poyarekar <siddhesh@sourceware.org>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH v2] ld.so: Handle read-only dynamic section gracefully [BZ #28340]
Date: Wed, 15 Sep 2021 12:40:53 +0200	[thread overview]
Message-ID: <87ee9qt93e.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <20210915013653.1802776-1-siddhesh@sourceware.org> (Siddhesh Poyarekar's message of "Wed, 15 Sep 2021 07:06:53 +0530")

* Siddhesh Poyarekar:

> @@ -1149,6 +1152,9 @@ _dl_map_object_from_fd (const char *name, const char *origname, int fd,
>  		 such a segment to avoid a crash later.  */
>  	      l->l_ld = (void *) ph->p_vaddr;
>  	      l->l_ldnum = ph->p_memsz / sizeof (ElfW(Dyn));
> +#ifndef DL_RO_DYN_SECTION
> +	      readonly_dynamic = (ph->p_flags & PF_W) == 0;
> +#endif
>  	    }
>  	  break;

As far as I can tell, this does not check whether the DYNAMIC segment is
actually covered by a read-write LOAD segment.  I wonder how much value
this imperfect check has.

Would it make more sense to fix the kernel linker script that generates
those bogus vDSO reference files?

Thanks,
Florian


  reply	other threads:[~2021-09-15 10:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-15  1:36 [PATCH v2] ld.so: Handle read-only dynamic section gracefully [BZ #28340] Siddhesh Poyarekar via Libc-alpha
2021-09-15 10:40 ` Florian Weimer via Libc-alpha [this message]
2021-09-15 12:10   ` Siddhesh Poyarekar via Libc-alpha
2021-09-15 12:18     ` Florian Weimer via Libc-alpha
2021-09-15 13:04       ` Siddhesh Poyarekar via Libc-alpha

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

  List information: https://www.gnu.org/software/libc/involved.html

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

  git send-email \
    --in-reply-to=87ee9qt93e.fsf@oldenburg.str.redhat.com \
    --to=libc-alpha@sourceware.org \
    --cc=fweimer@redhat.com \
    --cc=siddhesh@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).