public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: "Frank Ch. Eigler" <fche@redhat.com>
To: Mark Wielaard <mark@klomp.org>
Cc: elfutils-devel@sourceware.org, amerey@redhat.com
Subject: Re: patch 2/2 debuginfod server etc.
Date: Thu, 21 Nov 2019 17:18:00 -0000	[thread overview]
Message-ID: <20191121171805.GA21658@redhat.com> (raw)
In-Reply-To: <b5acfa02e5e7293b3e15d5c456a7fa409714a26d.camel@klomp.org>

Hi -

> > If the perceived problem is that build tree scans (-F) may contain
> > binaries that refer to source files that are not appropriate for
> > later sharing, then IMO this is too much change, and unnecessarily
> > complicates other valid usage.
> 
> Yes, that (and references to any other source files, whether those
> scanned by -F or -R or simply because they are reachable on the file
> system) is the problem that is being solved.

Files "simply reachable on the file system" are not indexed or sought
by debuginfod, unless (a) they are scanned due to being listed with an
explicit PATH, OR (b) being referred to from within an -F DWARF file
as a source.  That is all.  There is nothing else "reachable".


> > If you are certain that source file censorship needs to be in the
> > code, I'd do it instead by adding just one option -S PATH to the code,
> > which would act like a whitelist for -F source file retrievals.
> > (There is no point to filtering -R rpm source files; those are only
> > serviced from other indexed RPMs.)
> 
> By default all -F directories are already whitelisted. -S is just for
> extra places where source could be found.

We are speaking about hypothetical work, so "are already" is incorrect.
There is no whitelist of source files from -F type searches "already".

Contemplating a whitelist: it may easily be the case that the sources
are relatively far from the build tree being scanned - indeed separate
sources is how we recommend gnu tools be built.  Constructing the
whitelist from the -F paths only is bound to be incomplete in this
common usage scenario.


> > So:
> >     debuginfod -S /usr/src/debug -S /usr/include -F PATH1 PATH2 ... PATHn
> > would restrict -F source service to the given paths, and
> >     debuginfod -F PATH1 PATH2 
> > would not, because normal people have trustworthy build systems etc.
> 
> I guess we differ on how trustworthy generated debug files are.

All this work depends on debug files being trustworthy!  The man pages
spell this out already.  Imagine a doctored debug file deliberately
conflicting with a well-known buildid.  Or deliberately containing
masses of garbage or harmful data.


> What I would like is:
> 
> - By default only restrict the files served to those under the
>   directory that the file-scanner uses (that is why I split the
>   -R and -F cases).

Why?  This is a tighter constraint than the problem statement at the
top.  The only additional risk here would be from an
file-scanner-found dwarf file that makes a source reference to a file
in a directory that was already explicitly identified for RPM
scanning, i.e., not a sensitive location.

> - Have a more restrictive mode that simply doesn't add anything
>   to the sources white list (that is -N in my patch).
> - Have an anything goes mode (that is -A in my patch).
> - Be able to whitelist more selectively (that is -S).

IMHO, this is unnecessary complication.  Maybe you'll see this if you
write out documentation and sample usage for all these cases.

> If I understand you correctly (given your other email in reply to
> why adding globbing support isn't enough), you also want a mode
> where all extra arguments on the command line are interpreted as
> "scannable" (either file based or rpm based).

This is the normal behaviour for unix tools.

> So I think the real issue is the splitting of -R and -F argument
> parsing. If that is the case, maybe just picking a default for how to
> interpret the extra arguments, as dirs for the file scanner or dirs for
> the rpm scanner or both, might make us both happy?

The branch code does "both", because it is simple.


- FChE

  reply	other threads:[~2019-11-21 17:18 UTC|newest]

Thread overview: 78+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-28 19:04 patch 0/2 debuginfod submission Frank Ch. Eigler
2019-10-28 19:06 ` patch 1/2 debuginfod client Frank Ch. Eigler
2019-10-28 19:09   ` patch 2/2 debuginfod server etc Frank Ch. Eigler
2019-11-04 21:48     ` patch 3/3 debuginfod client interruptability Frank Ch. Eigler
2019-11-07  9:07       ` patch 4 debuginfod: symlink following mode Frank Ch. Eigler
2019-11-07  9:08         ` patch 5 debuginfod: prometheus metrics Frank Ch. Eigler
2019-11-15 17:26           ` Mark Wielaard
2019-11-15 17:58             ` Frank Ch. Eigler
2019-11-18 16:20               ` Mark Wielaard
2019-11-18 16:48                 ` Frank Ch. Eigler
2019-11-19 16:13                   ` Mark Wielaard
2019-11-15 16:49         ` patch 4 debuginfod: symlink following mode Mark Wielaard
2019-11-15 18:31           ` Frank Ch. Eigler
2019-11-18 16:27             ` Mark Wielaard
2019-11-15 16:16       ` patch 3/3 debuginfod client interruptability Mark Wielaard
2019-11-15 17:03         ` Aaron Merey
2019-11-15 17:35           ` Mark Wielaard
2019-11-15 18:14             ` Pedro Alves
2019-11-17 23:44               ` Mark Wielaard
2019-11-18  2:50                 ` Frank Ch. Eigler
2019-11-18  9:24                   ` Pedro Alves
2019-11-19 12:58                   ` Mark Wielaard
2019-11-13 17:22     ` patch 2/2 debuginfod server etc Mark Wielaard
2019-11-14 11:54       ` Frank Ch. Eigler
2019-11-16  1:31         ` Mark Wielaard
2019-11-13 23:19     ` Mark Wielaard
2019-11-14 12:30       ` Frank Ch. Eigler
2019-11-18 14:17         ` Mark Wielaard
2019-11-18 18:41           ` Frank Ch. Eigler
2019-11-19 15:41             ` Mark Wielaard
2019-11-19 16:13               ` Frank Ch. Eigler
2019-11-19 20:11                 ` Mark Wielaard
2019-11-19 21:15                   ` Frank Ch. Eigler
2019-11-20 11:53                     ` Mark Wielaard
2019-11-20 12:29                       ` Frank Ch. Eigler
2019-11-21 14:16                       ` Mark Wielaard
2019-11-21 15:40                         ` Mark Wielaard
2019-11-21 16:01                           ` Frank Ch. Eigler
2019-11-21 15:58                         ` Frank Ch. Eigler
2019-11-21 16:37                           ` Mark Wielaard
2019-11-21 17:18                             ` Frank Ch. Eigler [this message]
2019-11-21 20:42                               ` Mark Wielaard
2019-11-22 12:08                                 ` Mark Wielaard
2019-11-14 20:45     ` Mark Wielaard
2019-11-15 11:03       ` Mark Wielaard
2019-11-15 21:00       ` Frank Ch. Eigler
2019-11-18 15:01         ` Mark Wielaard
2019-11-15 14:40     ` Mark Wielaard
2019-11-15 19:54       ` Frank Ch. Eigler
2019-11-18 15:31         ` Mark Wielaard
2019-11-18 15:49           ` Frank Ch. Eigler
2019-11-12 11:12   ` patch 1/2 debuginfod client Mark Wielaard
2019-11-12 15:14     ` Frank Ch. Eigler
2019-11-12 21:59       ` Mark Wielaard
2019-11-14  0:33         ` Frank Ch. Eigler
2019-11-15 21:33       ` Mark Wielaard
2019-11-12 21:25   ` Mark Wielaard
2019-11-13 23:25     ` Frank Ch. Eigler
2019-11-16  0:46       ` Mark Wielaard
2019-11-16 18:53         ` Frank Ch. Eigler
2019-11-18 17:17           ` Mark Wielaard
2019-11-18 20:33             ` Frank Ch. Eigler
2019-11-19 15:57               ` Mark Wielaard
2019-11-19 16:20                 ` Frank Ch. Eigler
2019-11-19 20:16                   ` Mark Wielaard
2019-11-19 21:22                     ` Frank Ch. Eigler
2019-11-20 12:50                       ` Mark Wielaard
2019-11-20 13:30                         ` Frank Ch. Eigler
2019-11-21 14:02                           ` Mark Wielaard
2019-11-13 13:57   ` Mark Wielaard
2019-11-14 11:24     ` Frank Ch. Eigler
2019-11-16  0:52       ` Mark Wielaard
2019-11-16  2:28         ` Frank Ch. Eigler
2019-10-30 11:04 ` patch 0/2 debuginfod submission Mark Wielaard
2019-10-30 13:40   ` Frank Ch. Eigler
2019-10-30 14:12     ` Mark Wielaard
2019-10-30 18:11       ` Frank Ch. Eigler
2019-10-31 11:18         ` 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=20191121171805.GA21658@redhat.com \
    --to=fche@redhat.com \
    --cc=amerey@redhat.com \
    --cc=elfutils-devel@sourceware.org \
    --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).