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: <20070208130300.e819bd7f.akpm@linux-foundation.org>
Date:	Thu, 8 Feb 2007 13:03:00 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	David Miller <davem@...emloft.net>
Cc:	wcohen@...hat.com, linux-kernel@...r.kernel.org
Subject: Re: Size of 2.6.20 task_struct on x86_64 machines

On Thu, 08 Feb 2007 12:19:45 -0800 (PST)
David Miller <davem@...emloft.net> wrote:

> From: William Cohen <wcohen@...hat.com>
> Date: Thu, 08 Feb 2007 11:14:13 -0500
> 
> > This past week I was playing around with that pahole tool
> > (http://oops.ghostprotocols.net:81/acme/dwarves/) and looking at the
> > size of various struct in the kernel. I was surprised by the size of
> > the task_struct on x86_64, approaching 4K.  I looked through the
> > fields in task_struct and found that a number of them were declared as
> > "unsigned long" rather than "unsigned int" despite them appearing okay
> > as 32-bit sized fields. On x86_64 "unsigned long" ends up being 8
> > bytes in size and forces 8 byte alignment. Is there a reason there
> > a reason they are "unsigned long"?
> 
> I think at one point we used the atomic bit operations to operate on
> things like tsk->flags, and those interfaces require unsigned long as
> the type.
> 
> That doesn't appear to be the case any longer, so at a minimum
> your tsk->flags conversion to unsigned int should be ok.

Yeah, afacit everything in there is OK and happily all the
converted-to-32-bit quantities happen to be contiguous with other 32-bit
quantities.

Most architectures' bitops functions take unsigned long * so if anyone is
using bitops on these things we should get to hear about it.

-
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