From: Joshua Brindle <jbrindle@tresys.com>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: Ivan Gyurdiev <ivg2@cornell.edu>, SELinux List <SELinux@tycho.nsa.gov>
Subject: Re: [ SEPOL ] Move more things to newer debug system
Date: Wed, 14 Sep 2005 11:33:40 -0400 [thread overview]
Message-ID: <432842D4.3070905@tresys.com> (raw)
In-Reply-To: <1126710276.12299.85.camel@moss-spartans.epoch.ncsc.mil>
Stephen Smalley wrote:
>On Wed, 2005-09-14 at 10:45 -0400, Joshua Brindle wrote:
>
>
>>What I mean is, if there are multiple calls to DEBUG prior to returning
>>to the originating function then there are multiple error messages of
>>varying specificity sitting around somewhere, assuming we even store
>>them all and not just the last one. This isn't ideal for error
>>reporting, but it is for debugging.
>>
>>
>
>Even in the error reporting case, allowing for multiple messages (e.g.
>for multiple assertion failures, hierarchy failures, etc) is useful.
>Those would be of comparable specificity rather than varying degrees.
>
>
>
yes, in those two special cases reporting multiple messages is useful,
we may need to handle them seperately. There is nothing preventing
multiple error messages with write_error, we could even add append_error
and have multiple errors in the same buffer. Granted that, at least with
assertion failures, the buffer wouldn't be large enough to hold all the
errors.
>If omitting the traceback data is your primary concern, possibly it
>could be explicitly identified in some manner in the DEBUG() interface
>so that the callback can easily drop it for error reporting purposes.
>
>
>
Omitting it isn't my concern if it is really for debugging, I do not
think that we should try to use the debug system for error reporting to
the originating function if it is going to be a debug system.
>> Personally, again, I feel that gdb
>>is far superior to any kind of debug system you can put in a library so
>>I'd rather focus on proper error reporting, which DEBUG doesn't do in a
>>reasonable way.
>>
>>
>
>Requiring people to re-run the offending code through a debugger
>significantly reduces your ability to get useful bug reports...
>
>
>
Fair enough, I had only thought about the developer case, not the user
case. It seems like the debug system is useful, especially in this case,
for debugging, but not particularly for error reporting. If Ivan wants
to put DEBUG in libsemanage we are ok with that, assuming that it is
used for debugging and corresponding error reporting is also added for
errors. Since the policy server will be a primary user of libsemanage,
and is threaded we really need the error reporting in the connection
handle to report to the user on the other end, but debugging can't hurt.
As for libsepol, I don't think we should go down this road of using
DEBUG for error reporting. Since parts of libsepol aren't threadsafe
already (eg., reading, writing) we can use a global error buffer for
error reporting. If the need for thread safety ever comes up we could
fix up the API at that point but, as you said before, libsepol is static
with few users, so API changes aren't a dramatic thing.
In short, it is apparent that we need both debug and write_error, for
different reasons, and I see no reason why we can't use both. DEBUG,
then, could be used more liberally for general library information since
it would presumably default to off.
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
next prev parent reply other threads:[~2005-09-14 15:33 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-12 12:06 [ SEMANAGE ] Stub out user/port functionality Ivan Gyurdiev
2005-09-12 14:14 ` [ SEMANAGE ] Introduce record table Ivan Gyurdiev
2005-09-13 3:55 ` [ SEPOL ] Move more things to newer debug system Ivan Gyurdiev
2005-09-13 19:59 ` Stephen Smalley
2005-09-13 22:26 ` Ivan Gyurdiev
2005-09-13 23:03 ` Joshua Brindle
2005-09-14 3:33 ` Ivan Gyurdiev
2005-09-14 3:37 ` Ivan Gyurdiev
2005-09-14 13:16 ` Stephen Smalley
2005-09-14 14:05 ` Dale Amon
2005-09-14 18:07 ` Stephen Smalley
2005-09-14 23:44 ` Dale Amon
2005-09-14 7:00 ` Luke Kenneth Casson Leighton
2005-09-14 12:11 ` Stephen Smalley
2005-09-14 7:01 ` Luke Kenneth Casson Leighton
2005-09-14 13:00 ` Stephen Smalley
2005-09-14 13:21 ` Joshua Brindle
2005-09-14 13:51 ` Stephen Smalley
2005-09-14 14:45 ` Joshua Brindle
2005-09-14 15:04 ` Stephen Smalley
2005-09-14 15:26 ` info on SELinux support for IPSEC Prakash Saivasan
2005-09-14 18:20 ` Stephen Smalley
2005-09-14 15:33 ` Joshua Brindle [this message]
2005-09-14 15:38 ` [ SEPOL ] Move more things to newer debug system Stephen Smalley
2005-09-14 16:06 ` Joshua Brindle
2005-09-14 16:24 ` Stephen Smalley
2005-09-14 17:16 ` Ivan Gyurdiev
2005-09-14 17:21 ` Ivan Gyurdiev
2005-09-14 18:53 ` Stephen Smalley
2005-09-16 13:48 ` Luke Kenneth Casson Leighton
2005-09-14 19:37 ` Ivan Gyurdiev
2005-09-14 19:50 ` Stephen Smalley
2005-09-14 20:01 ` Stephen Smalley
2005-09-14 20:32 ` Ivan Gyurdiev
2005-09-15 7:31 ` Ivan Gyurdiev
2005-09-15 12:22 ` Stephen Smalley
2005-09-15 13:01 ` Stephen Smalley
2005-09-15 15:17 ` Stephen Smalley
2005-09-15 16:03 ` Ivan Gyurdiev
2005-09-16 12:19 ` Stephen Smalley
2005-09-18 3:14 ` Ivan Gyurdiev
2005-09-16 13:45 ` Luke Kenneth Casson Leighton
2005-09-16 13:55 ` Luke Kenneth Casson Leighton
2005-09-18 3:16 ` Ivan Gyurdiev
2005-09-18 3:52 ` Ivan Gyurdiev
2005-09-18 15:45 ` Ivan Gyurdiev
2005-09-19 12:49 ` Stephen Smalley
2005-09-19 14:05 ` Ivan Gyurdiev
2005-09-19 14:45 ` Stephen Smalley
2005-09-19 16:24 ` Ivan Gyurdiev
2005-09-19 16:49 ` Stephen Smalley
2005-09-19 17:16 ` Ivan Gyurdiev
2005-09-19 18:26 ` Stephen Smalley
2005-09-14 19:57 ` Ivan Gyurdiev
2005-09-14 12:35 ` Stephen Smalley
2005-09-14 15:51 ` Stephen Smalley
2005-09-13 19:43 ` [ SEMANAGE ] Introduce record table Stephen Smalley
2005-09-13 22:15 ` Ivan Gyurdiev
2005-09-13 22:46 ` Ivan Gyurdiev
2005-09-14 15:46 ` Stephen Smalley
2005-09-14 15:45 ` [ SEMANAGE ] Stub out user/port functionality Stephen Smalley
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=432842D4.3070905@tresys.com \
--to=jbrindle@tresys.com \
--cc=SELinux@tycho.nsa.gov \
--cc=ivg2@cornell.edu \
--cc=sds@tycho.nsa.gov \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.