Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Korsgaard <jacmet@uclibc.org>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] busybox: Add upstream patch to avoid occasional mdev SIGSEGV.
Date: Wed, 12 Jun 2013 22:54:42 +0200	[thread overview]
Message-ID: <877ghz2god.fsf@dell.be.48ers.dk> (raw)
In-Reply-To: <201306120825.03217.rasasi78@gmail.com> ("Raúl Sánchez Siles"'s message of "Wed, 12 Jun 2013 08:24:58 +0200")

>>>>> "Ra?l" == Ra?l S?nchez Siles <rasasi78@gmail.com> writes:

Hi,

 >> I would prefer to not rename the existing patch, as it makes it less
 >> clear where it comes from (http://busybox.net/downloads/fixes-1.21.0/).
 >> 
 >> It shouldn't be necessary either as '.' comes before '_' (but not before
 >> '-').

 Ra?l>   That's not what I got here. I've done a more comprehensive test:
 Ra?l> $ ls -1 |sort 
 Ra?l> busybox-1.21.0-mdev_2_check_ACTION.patch
 Ra?l> busybox-1.21.0-mdev_check_ACTION.patch
 Ra?l> busybox-1.21.0-mdev-check_ACTION.patch
 Ra?l> busybox-1.21.0-mdev.patch

 Ra?l>   As you can see the one we want to apply first comes last
 Ra?l> compared with other possibilities :/

That's because localization is odd.

touch busybox-1.21.0-mdev_2_check_ACTION.patch busybox-1.21.0-mdev.patch

ls -1
busybox-1.21.0-mdev_2_check_ACTION.patch
busybox-1.21.0-mdev.patch

LANG=C ls -1
busybox-1.21.0-mdev.patch
busybox-1.21.0-mdev_2_check_ACTION.patch

We should arguably force LANG=C (or atleast LC_COLLATE, E.G. the sort
order) in apply-patches.sh so we always use the same sort order, I'll
fix that now.

 >> Talking of which, why is this patch not in the fixes directory? Does
 >> Denys not consider it important enough?

 Ra?l>   That's probably something to ask him. I found this bug by
 Ra?l> chance and I don't consider it critical in any way, altough I
 Ra?l> haven't explored further implications. This can be reproduced
 Ra?l> when you invoke mdev without parameters. It will SIGSEGV since,
 Ra?l> as per current 1.21.0 code, you'll check for ACTION environment
 Ra?l> variable, which doesn't exist. This means a null pointer which is
 Ra?l> passed to index_in_strings which, in turn, passes it to the
 Ra?l> uclibc strcmp function that is unable to handle this case
 Ra?l> gracefully.

Could you bring it up on the busybox list and suggest it gets added to 1.21-fixes, please?

-- 
Bye, Peter Korsgaard

      reply	other threads:[~2013-06-12 20:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-11 16:24 [Buildroot] [PATCH 1/1] busybox: Add upstream patch to avoid occasional mdev SIGSEGV Raúl Sánchez Siles
2013-06-11 20:59 ` Peter Korsgaard
2013-06-12  6:24   ` Raúl Sánchez Siles
2013-06-12 20:54     ` Peter Korsgaard [this message]

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=877ghz2god.fsf@dell.be.48ers.dk \
    --to=jacmet@uclibc.org \
    --cc=buildroot@busybox.net \
    /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