From: Greg KH <greg@kroah.com>
To: Reiner Sailer <sailer@watson.ibm.com>
Cc: linux-kernel@vger.kernel.org,
linux-security-module@mail.wirex.com, kylene@us.ibm.com,
emilyr@us.ibm.com, toml@us.ibm.com
Subject: Re: [PATCH 3 of 4] ima: Linux Security Module implementation
Date: Fri, 20 May 2005 23:28:17 -0700 [thread overview]
Message-ID: <20050521062817.GD24597@kroah.com> (raw)
In-Reply-To: <1116596614.8156.11.camel@secureip.watson.ibm.com>
On Fri, May 20, 2005 at 09:43:34AM -0400, Reiner Sailer wrote:
> +/* security structure appended to inodes */
> +#define IMA_MAGIC 0x9999
> +struct ima_inode {
> + unsigned short magic;
> + atomic_t measure_count; /* # processes currently using this file in measure-mode */
> + ima_entry_flags dirty;
> + char *file_name; /* points to measure entry->fileName */
> +};
> +
> +/* security structure appended to measured files*/
> +struct ima_file {
> + unsigned short magic; /* identify our struct format */
> + char is_measuring; /* identify fds that are "measuring" */
> +};
magic values for structures protect you from nothing. Do not use them.
> +static u32 decode_u32(u8 * buf)
> +{
> + u32 val = buf[0];
> + val = (val << 8) | (u8) buf[1];
> + val = (val << 8) | (u8) buf[2];
> + val = (val << 8) | (u8) buf[3];
> + return val;
> +}
> +
> +static void encode_u32(u8 * buf, u32 val)
> +{
> + buf[0] = (u8) val >> 24;
> + buf[1] = (u8) val >> 16;
> + buf[2] = (u8) val >> 8;
> + buf[3] = (u8) val >> 0;
> +}
Hm, what's wrong with the standard kernel functions to do this kind of
thing?
> diff -uprN linux-2.6.12-rc4/security/ima/INSTALL linux-2.6.12-rc4-ima/security/ima/INSTALL
> --- linux-2.6.12-rc4/security/ima/INSTALL 1969-12-31 19:00:00.000000000 -0500
> +++ linux-2.6.12-rc4-ima/security/ima/INSTALL 2005-05-19 17:59:20.000000000 -0400
Kernel directories do not get a INSTALL file. Stuff like that goes into
the Documentation/ directory.
greg k-h
next prev parent reply other threads:[~2005-05-21 6:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-20 13:43 [PATCH 3 of 4] ima: Linux Security Module implementation Reiner Sailer
2005-05-21 6:22 ` Greg KH
2005-05-21 8:07 ` aq
2005-05-21 6:28 ` Greg KH [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-05-20 13:48 Reiner Sailer
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=20050521062817.GD24597@kroah.com \
--to=greg@kroah.com \
--cc=emilyr@us.ibm.com \
--cc=kylene@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@mail.wirex.com \
--cc=sailer@watson.ibm.com \
--cc=toml@us.ibm.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.