lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdUg6xCWFDkN0ApBhPE2Yw4gCcU2Aew60k8J-7oB518FAQ@mail.gmail.com>
Date:	Thu, 21 Jul 2011 11:38:11 +0200
From:	Geert Uytterhoeven <geert@...ux-m68k.org>
To:	Richard Weinberger <richard@....at>
Cc:	akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
	user-mode-linux-devel@...ts.sourceforge.net
Subject: Re: [uml-devel] [PATCH 09/10] um: Ajdust size of pid_buf

On Thu, Jul 21, 2011 at 11:18, Richard Weinberger <richard@....at> wrote:
> Linux can have pids up to 4*1024*1024.
> To handle such huge numbers pid_buf needs to be larger.
>
> Reported-by: Geert Uytterhoeven <geert@...ux-m68k.org>
> Signed-off-by: Richard Weinberger <richard@....at>
> ---
>  arch/um/drivers/harddog_user.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/um/drivers/harddog_user.c b/arch/um/drivers/harddog_user.c
> index b56f8e0..84dce3f 100644
> --- a/arch/um/drivers/harddog_user.c
> +++ b/arch/um/drivers/harddog_user.c
> @@ -32,7 +32,7 @@ int start_watchdog(int *in_fd_ret, int *out_fd_ret, char *sock)
>  {
>        struct dog_data data;
>        int in_fds[2], out_fds[2], pid, n, err;
> -       char pid_buf[sizeof("nnnnn\0")], c;
> +       char pid_buf[sizeof("nnnnnnn\0")], c;

Why not make it handle the full 32-bit? That's just a few bytes extra
on the stack...

>        char *pid_args[] = { "/usr/bin/uml_watchdog", "-pid", pid_buf, NULL };
>        char *mconsole_args[] = { "/usr/bin/uml_watchdog", "-mconsole", NULL,
>                                  NULL };
> --
> 1.7.6

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ