public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Olaf Hering <olh@suse.de>
To: linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>
Subject: Re: /bin/ls: cannot read symbolic link /proc/$$/exe: Permission denied
Date: Tue, 17 Aug 2004 00:19:20 +0200	[thread overview]
Message-ID: <20040816221920.GA9059@suse.de> (raw)
In-Reply-To: <20040816133730.GA6463@suse.de>

 On Mon, Aug 16, Olaf Hering wrote:

> 
> For some reasons ls -l /proc/$$/exe doesnt work all time for me,
> with 2.6.8.1 on ppc64. Sometimes it does, sometimes not. No pattern.
> A few printks show that this check in proc_pid_readlink() triggers
> an -EACCES:
> 
>         current->fsuid != inode->i_uid
> 
> proc_pid_readlink(755) error -13 ntptrace(11408) fsuid 100 i_uid 0 0
> sys_readlink(281) ntptrace(11408) error -13 readlink

bprm.interp_flags contains garbage like 0xc0000001,
that triggers task->mm->dumpable =0;

please apply.

Signed-off-by: Olaf Hering <olh@suse.de>

diff -p -purN linux-2.6.8.1.omfg/fs/compat.c linux-2.6.8.1/fs/compat.c
--- linux-2.6.8.1.omfg/fs/compat.c	2004-08-14 12:55:31.000000000 +0200
+++ linux-2.6.8.1/fs/compat.c	2004-08-17 00:14:56.000000000 +0200
@@ -1390,6 +1390,7 @@ int compat_do_execve(char * filename,
 	bprm.sh_bang = 0;
 	bprm.loader = 0;
 	bprm.exec = 0;
+	bprm.interp_flags = 0;
 	bprm.security = NULL;
 	bprm.mm = mm_alloc();
 	retval = -ENOMEM;

-- 
USB is for mice, FireWire is for men!

sUse lINUX ag, nÜRNBERG

  reply	other threads:[~2004-08-16 22:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-16 13:37 /bin/ls: cannot read symbolic link /proc/$$/exe: Permission denied Olaf Hering
2004-08-16 22:19 ` Olaf Hering [this message]
2004-08-16 22:39 ` Olaf Hering
2004-08-16 23:34   ` Andreas Schwab
2004-08-17  5:23     ` Olaf Hering
2004-08-17  8:50       ` Andreas Schwab

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=20040816221920.GA9059@suse.de \
    --to=olh@suse.de \
    --cc=akpm@osdl.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox