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] [day] [month] [year] [list]
Date:	Fri, 11 Dec 2009 10:11:11 -0600
From:	"Serge E. Hallyn" <serue@...ibm.com>
To:	Américo Wang <xiyou.wangcong@...il.com>
Cc:	Amerigo Wang <amwang@...hat.com>, linux-kernel@...r.kernel.org,
	akpm@...ux-foundation.org, Cedric Le Goater <clg@...ibm.com>
Subject: Re: [Patch] ipc: HARD_MSGMAX should be higher not lower on 64bit

Quoting Américo Wang (xiyou.wangcong@...il.com):
> 
> (Hi, I am the same person.)
> 
> On Fri, Dec 11, 2009 at 08:44:33AM -0600, Serge E. Hallyn wrote:
> >Quoting Amerigo Wang (amwang@...hat.com):
> >> It looks weird that we have HARD_MSGMAX lower on 64bit than on 32bit,
> >> since usually 64bit machines have more memory than 32bit machines.
> >
> >It does look like this may have been an accident.
> >
> 
> OK.
> 
> >> Making it higher on 64bit seems reasonable, and keep the original
> >> number on 32bit.
> >> 
> >> Cc: Serge E. Hallyn <serue@...ibm.com>
> >> Cc: Cedric Le Goater <clg@...ibm.com>
> >> Signed-off-by: WANG Cong <amwang@...hat.com>
> >> 
> >> ---
> >> diff --git a/include/linux/ipc_namespace.h b/include/linux/ipc_namespace.h
> >> index e408722..07baa38 100644
> >> --- a/include/linux/ipc_namespace.h
> >> +++ b/include/linux/ipc_namespace.h
> >> @@ -87,7 +87,7 @@ extern int mq_init_ns(struct ipc_namespace *ns);
> >>  /* default values */
> >>  #define DFLT_QUEUESMAX 256     /* max number of message queues */
> >>  #define DFLT_MSGMAX    10      /* max number of messages in each queue */
> >> -#define HARD_MSGMAX    (131072/sizeof(void *))
> >> +#define HARD_MSGMAX    (32768*sizeof(void *)/4)
> >
> >why /4 ?  You're now making it much smaller for 32-bit than it
> >used to be?
> >
> 
> Yes?
> 
> Before this patch, it is 131072/sizeof(void*) = 32768;
> after this patch, it is 32768*sizeof(void*)/4 = 32768 too.
> Both on 32bit, of course.
> 
> Am I missing something?

Haha, nope.

Acked-by: Serge Hallyn <serue@...ibm.com>

thanks,
-serge
--
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