mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Alexey Dobriyan" <adobriyan@gmail.com>
To: "Olaf Hering" <olaf@aepfle.de>
Cc: linux-kernel@vger.kernel.org,
	"Andrew Morton" <akpm@linux-foundation.org>
Subject: Re: [PATCH] remove binfmts.h from header exports
Date: Wed, 8 Aug 2007 11:12:22 +0400	[thread overview]
Message-ID: <b6fcc0a0708080012w1794ad84ma2a3b5a84eb5b8b@mail.gmail.com> (raw)
In-Reply-To: <20070808061439.GB1126@aepfle.de>

On 8/8/07, Olaf Hering <olaf@aepfle.de> wrote:
> On Wed, Aug 08, Alexey Dobriyan wrote:
>
> > On Tue, Aug 07, 2007 at 10:16:03PM +0200, Olaf Hering wrote:
> > > remove linux/binfmts.h from make headers_install
> > >
> > > A recent patch added PAGE_SIZE to the part outside of __KERNEL__.
> > > qemu and ia32el have their own define of MAX_ARG_PAGES.
> >
> > Should they use kernel header instead?
>
> No, because the header will disappear. And from my understanding, the
> args limit is now gone.

OK.

> > > No package uses linux/binfmts.h, so it is safe to not provide it.
> >
> > And? Does it contain stuff which is userspace visible?
> > binfmts.h has at least CORENAME_MAX_SIZE and SUID_DUMP_*
>
> Yes, its inside __KERNEL__.

Can't you accept for a second that some stuff under __KERNEL__
was put there by mistake?

> We are talking about the part below.

No, we are talking about whole header since you're going
to unexport whole header.

> What part is useable for an application?

>From part you quoted nothing. Otherwise:

fd = open("/proc/sys/fs/suid_dumpable", 1);
snprintf(buf, sizeof(buf), "%d", SUID_DUMP_ROOT);
write(fd, buf, strlen(buf));

> #include <linux/capability.h>
>
> struct pt_regs;
>
> /*
>  * These are the maximum length and maximum number of strings passed to the
>  * execve() system call.  MAX_ARG_STRLEN is essentially random but serves to
>  * prevent the kernel from being unduly impacted by misaddressed pointers.
>  * MAX_ARG_STRINGS is chosen to fit in a signed 32-bit integer.
>  */
> #define MAX_ARG_STRLEN (PAGE_SIZE * 32)
> #define MAX_ARG_STRINGS 0x7FFFFFFF
>
> /* sizeof(linux_binprm->buf) */
> #define BINPRM_BUF_SIZE 128

  reply	other threads:[~2007-08-08  7:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-07 20:16 Olaf Hering
2007-08-07 20:37 ` Alexey Dobriyan
2007-08-08  6:14   ` Olaf Hering
2007-08-08  7:12     ` Alexey Dobriyan [this message]
2007-08-08 17:28       ` Olaf Hering
2007-08-07 23:35 ` Rene Herman
2007-08-08  6:10   ` Olaf Hering

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=b6fcc0a0708080012w1794ad84ma2a3b5a84eb5b8b@mail.gmail.com \
    --to=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=olaf@aepfle.de \
    /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

all inboxes | Powered by JetHome®