All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <dan@debian.org>
To: Bernhard Kaindl <bernhard.kaindl@gmx.de>
Cc: Chuck Ebbert <76306.1226@compuserve.com>,
	Carl-Daniel Hailfinger <c-d.hailfinger.kernel.2003@gmx.net>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Ingo Oeser <ingo.oeser@informatik.tu-chemnitz.de>
Subject: Re: Problem: strace -ff fails on 2.4.21-rc1
Date: Sun, 11 May 2003 20:33:16 -0400	[thread overview]
Message-ID: <20030512003316.GA2167@nevyn.them.org> (raw)
In-Reply-To: <Pine.LNX.4.53.0305120119540.1572@hase.a11.local>

On Mon, May 12, 2003 at 01:50:01AM +0200, Bernhard Kaindl wrote:
> On Sun, 11 May 2003, Chuck Ebbert wrote:
> > Carl-Daniel Hailfinger wrote:
> > > Chuck Ebbert wrote:
> > > >   I just found out minicom is spawing /sbin/lockdev which is setgrp
> > > > 'lock'.  Would that cause ptrace failure??
> > >
> > > AFAIK that could have caused the failure. Please test 2.4.21-rc2 whcih
> > > has fixes for many ptrace problems.
> >
> >   I can now strace minicom and its children with 2.4.21-rc2-ac1 but it
> > hangs on exit.  Both child processes exit successfully:
> 
> Very strange, does this work with 2.4.20? What's your version of strace?
> 
> > However strace and minicom are hung up somehow and the screen is
> > black with a blinking cursor at row 1 column 1.  The other ttys all
> > work OK and killing minicom cleans everything up.
> 
> Hm, this sounds like there could be some error/loop opening the device,
> which could be the effect of another side effect of the original ptrace
> fix, which my fixes which are included in 2.4.21-rc2 don't fix.
> 
> This side effect causes that if a system call needs a module loaded,
> it is not loaded and only an error from request_module() is sent to
> the kernel log. The attached patch on top of 2.4.21-rc2, fixes this
> remaining problem.
> 
> I'm not writing much info about it now, except that I think that it does
> not open any securiy hole, but I would like to give it a little more
> testing on SMP machines. On single CPU it fixed the "modprobe rejected"
> problem fine for me, without sacrifying ptrace securitey.
> 
> I'm uncertain if it would help in your case.
> 
> In your first message, you wrote:
> 
> >   (BTW does minicom work for you on 2.5?  It fails with the "No child
> > processes" message on 2.5.6x here but works on 2.4 when it's not being
> > traced.  Just the very act of running it under strace on 2.4 makes it
> > fail the same way it does on 2.5 here.  And stracing it on 2.5.66 made
> > it start working again!  Something very strange is going on...)
> 
> Very strange, maybe a "tail minicom.trc.*" at the time when it's hanging
> helps to get some idea.
> 
> Another note: suid is ignored when you are tracing the task which runs
> exec() for a setuid program.
> 
> So if minicom relies on having the setgid gid of /sbin/lockdev honored
> has in your case, the only ways I can find to get it working inder strace are:
> 
> - Change the locking config (temporary, for the debug) so that /sbin/lockdev
>   does not need to be setgid.
> 
> - Don't have ptrace follow fork mode activated when forking the child
>   which exec()'s /sbin/lockdev.

Run strace as root, and use strace -u?  Then it should not remove the
setuid-ness, I think.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

  reply	other threads:[~2003-05-12  0:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-11 15:37 Problem: strace -ff fails on 2.4.21-rc1 Chuck Ebbert
2003-05-11 23:50 ` Bernhard Kaindl
2003-05-12  0:33   ` Daniel Jacobowitz [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-05-12 11:28 Chuck Ebbert
2003-05-12  1:03 Chuck Ebbert
2003-05-12  8:20 ` Russell King
2003-05-09  9:11 Chuck Ebbert
2003-05-09 12:15 ` Carl-Daniel Hailfinger
2003-05-09  7:50 Chuck Ebbert
2003-05-07 14:08 Chuck Ebbert

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=20030512003316.GA2167@nevyn.them.org \
    --to=dan@debian.org \
    --cc=76306.1226@compuserve.com \
    --cc=bernhard.kaindl@gmx.de \
    --cc=c-d.hailfinger.kernel.2003@gmx.net \
    --cc=ingo.oeser@informatik.tu-chemnitz.de \
    --cc=linux-kernel@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 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.