unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: DJ Delorie <dj@redhat.com>
To: Florian Weimer <fweimer@redhat.com>
Cc: codonell@redhat.com, libc-alpha@sourceware.org
Subject: Re: [V2 patch] Enhance comments in nsswitch.h
Date: Wed, 15 May 2019 02:07:02 -0400	[thread overview]
Message-ID: <xn8sv8cku1.fsf@greed.delorie.com> (raw)
In-Reply-To: <878sv8z26w.fsf@oldenburg2.str.redhat.com> (message from Florian Weimer on Wed, 15 May 2019 08:01:11 +0200)

Florian Weimer <fweimer@redhat.com> writes:
>> +   We define several types of pointers to try help identify the data:
>> +   - ptr-to-malloc'd: Pointer to data which needs freeing.
>> +   - ptr-to-persistent: Pointer to persistent object.
>> +   - ptr-to-unloadable: Pointer to unloadlable object.  */
>
> What is a pointer to an unloadable object?  A DSO handle?  Or is it a
> heap pointer that is never freed?

The intention is, if/when we allow for nsswitch.conf to be reloaded, we
need to understand which internal data *is* reloaded, and which *isn't*.

So ptr-to-unloadable means those malloc'd objects that can be free'd
when we reload nsswitch.conf.

> Is ptr-to-persistent to a static object?

Just to something that doesn't change once created.  The problem is, if
we load a DSO and some thread is using it via nss, and we reload
nsswitch.conf, we can't unload the DSO, because it might be in use.  So
ptr-to-persistent means it points to something that, once created, won't
go away.  Since the DSO doesn't change, any data mapping names to DSO
functions also won't need to change, etc.


  reply	other threads:[~2019-05-15  6:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-08 19:59 [patch-ish, WIP] Enhance comments in nsswitch.h DJ Delorie
2019-05-08 20:36 ` Carlos O'Donell
2019-05-08 21:39   ` DJ Delorie
2019-05-08 22:07     ` Carlos O'Donell
2019-05-14 21:29       ` [V2 patch] " DJ Delorie
2019-05-15  6:01         ` Florian Weimer
2019-05-15  6:07           ` DJ Delorie [this message]
2019-05-15  8:11             ` Florian Weimer
2019-05-15 18:36               ` DJ Delorie
2019-05-16 14:53                 ` Florian Weimer
2019-05-16 21:27                   ` DJ Delorie
2019-05-24 17:46                     ` Carlos O'Donell

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=xn8sv8cku1.fsf@greed.delorie.com \
    --to=dj@redhat.com \
    --cc=codonell@redhat.com \
    --cc=fweimer@redhat.com \
    --cc=libc-alpha@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).