netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: herbert@gondor.apana.org.au
Cc: adobriyan@gmail.com, netdev@vger.kernel.org
Subject: Re: [PATCH] Fix ESP SA loading (by default)
Date: Wed, 05 Nov 2008 01:31:48 -0800 (PST)	[thread overview]
Message-ID: <20081105.013148.156667310.davem@davemloft.net> (raw)
In-Reply-To: <20081103010431.GA29905@gondor.apana.org.au>

From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Mon, 3 Nov 2008 09:04:31 +0800

> On Mon, Nov 03, 2008 at 03:16:43AM +0300, Alexey Dobriyan wrote:
> >
> > Keep in mind that the only error message is "line N: returned (null)"
> > from setkey(8) or something like that and no SA created.
> > 
> > It took me full printk session to realize what's going on.
> 
> As our error passing really sucks, I'm happy to accept a patch
> to crypto_alloc_tfm which prints out a message if it fails.

As we've discussed several times it's not "passing" errors
that sucks, it's the fact that we use the same traditional
UNIX error codes for a thousand different errors. :-)

I really think we should explore the idea where the current
process can get tagged with a string when an error is going
to be returned.  Something like:

	const char *error_desc;

in the task_struct.

So when you return an error, you also can mark the task with
some descriptive text that describes what is wrong.

A task is guarenteed that when an error returns from a system
call and the very next system call they make is "sys_get_error"
or whatever we'll call it, they will the correct value of
current->error_desc

This way you don't just get "-EINVAL" returned from a
complicated IPSEC configuration operation request.

  reply	other threads:[~2008-11-05  9:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-01  4:37 [PATCH] Fix ESP SA loading (by default) Alexey Dobriyan
2008-11-01  5:04 ` Herbert Xu
2008-11-01 11:38   ` Alexey Dobriyan
2008-11-01 11:50     ` Herbert Xu
2008-11-02  4:33       ` David Miller
2008-11-03  0:16         ` Alexey Dobriyan
2008-11-03  1:04           ` Herbert Xu
2008-11-05  9:31             ` David Miller [this message]
2008-11-05  9:38               ` Herbert Xu
2008-11-05  9:54               ` Alexey Dobriyan
2008-11-05  9:55                 ` David Miller
2008-11-05 10:03                   ` Patrick McHardy
2008-11-05 10:26                     ` David Miller
2008-11-05 10:30                       ` Patrick McHardy

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=20081105.013148.156667310.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=adobriyan@gmail.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=netdev@vger.kernel.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 NNTP newsgroup(s).