From: Felipe W Damasio <felipewd@terra.com.br>
To: linux-kernel@vger.kernel.org
Cc: sisopiii-l@cscience.org
Subject: [PATCH] 32-bit process accounting
Date: Fri, 23 Apr 2004 11:04:44 -0300 [thread overview]
Message-ID: <4089227C.9060101@terra.com.br> (raw)
[-- Attachment #1: Type: text/plain, Size: 893 bytes --]
Hi,
According to Andrew's must-fix list:
"32bit uid support is *still* broken for process accounting."
Ok, so I went and tried to see why we can't just use uid_t/gid_t for
the uid, gid fields on struct acct.
I saw the GNU acct source, and it uses unsigned int fields on the hash
tabels and doesn't assume any 16-bit only fields on the acct structure.
So, it seems to me that the only reason we still have broken 32-bit
process accounting is so that old tools can behave nicely. Please tell
me other reasons as I couldn't find them.
There are 2 patches attached.
The first, does the obvious uid_t/gid_t replacement..since it defines
16/32-bits for UIDs on a per-architecture basis.
The second, uses CONFIG_UID16 as a basis for forcing 16-bit UIDs.
I'd like to request review of these patches and pointers on what I'm
missing to get this problem fixed.
Thanks,
Felipe
[-- Attachment #2: acct-32bit-config.patch --]
[-- Type: text/plain, Size: 646 bytes --]
--- linux-2.6.6-rc2/include/linux/acct.h.orig Fri Apr 23 09:30:16 2004
+++ linux-2.6.6-rc2/include/linux/acct.h Fri Apr 23 10:53:29 2004
@@ -41,8 +41,13 @@
* No binary format break with 2.0 - but when we hit 32bit uid we'll
* have to bite one
*/
+#ifdef CONFIG_UID16
__u16 ac_uid; /* Accounting Real User ID */
__u16 ac_gid; /* Accounting Real Group ID */
+#else
+ uid_t ac_uid; /* Accounting Real User ID */
+ gid_t ac_gid; /* Accounting Real Group ID */
+#endif
__u16 ac_tty; /* Accounting Control Terminal */
__u32 ac_btime; /* Accounting Process Creation Time */
comp_t ac_utime; /* Accounting User Time */
[-- Attachment #3: acct-32bit.patch --]
[-- Type: text/plain, Size: 609 bytes --]
--- linux-2.6.6-rc2/include/linux/acct.h.orig Fri Apr 23 09:30:16 2004
+++ linux-2.6.6-rc2/include/linux/acct.h Fri Apr 23 09:31:16 2004
@@ -41,8 +41,8 @@
* No binary format break with 2.0 - but when we hit 32bit uid we'll
* have to bite one
*/
- __u16 ac_uid; /* Accounting Real User ID */
- __u16 ac_gid; /* Accounting Real Group ID */
+ uid_t ac_uid; /* Accounting Real User ID */
+ gid_t ac_gid; /* Accounting Real Group ID */
__u16 ac_tty; /* Accounting Control Terminal */
__u32 ac_btime; /* Accounting Process Creation Time */
comp_t ac_utime; /* Accounting User Time */
next reply other threads:[~2004-04-23 14:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-23 14:04 Felipe W Damasio [this message]
2004-04-23 16:57 ` [PATCH] 32-bit process accounting Tim Schmielau
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=4089227C.9060101@terra.com.br \
--to=felipewd@terra.com.br \
--cc=linux-kernel@vger.kernel.org \
--cc=sisopiii-l@cscience.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