All of lore.kernel.org
 help / color / mirror / Atom feed
From: Solar Designer <solar@openwall.com>
To: kernel-hardening@lists.openwall.com
Cc: Brad Spengler <spender@grsecurity.net>
Subject: Re: [kernel-hardening] procfs: infoleaks and DAC permissions
Date: Tue, 21 Feb 2012 21:42:45 +0400	[thread overview]
Message-ID: <20120221174245.GA23759@openwall.com> (raw)
In-Reply-To: <20120221162558.GA12919@dztty>

On Tue, Feb 21, 2012 at 05:25:58PM +0100, Djalal Harouni wrote:
> On Tue, Feb 21, 2012 at 06:56:53PM +0400, Solar Designer wrote:
> > On Fri, Feb 10, 2012 at 06:36:17PM +0400, Vasiliy Kulikov wrote:
> > > [1] http://grsecurity.net/~spender/dev_patches/distros_should_sponsor_me_for_doing_their_jobs.patch
> > 
> > In order to provide its security, this relies on atomic64_t actually
> > being 64-bit and on atomic64_inc_return() returning a 64-bit value - but
> > one or both of these requirements appear to be violated for some archs.
> > 
> > In fact, per a quick grep it appears that atomic64_inc_return() exists
> > for a subset of the archs only.
> There is the GENERIC_ATOMIC64 config option that can be used to support
> atomic64_t.

Oh, I thought I could have missed something like this.  I now see that
this option is actually being forced for proper archs, such as 32-bit
PowerPC.  That's good news.

	select GENERIC_ATOMIC64 if PPC32

> I want to add that atomic64_t is already used in other places:
> xfs log functions, perf counters, netfilter conntrack modules...
> 
> That generic solution is already using raw spinlocks, but with a static
> hashed array, which is perhaps not perfect for a machine with a lot of
> CPUs ?

This is what the comment in lib/atomic64.c says, but perhaps machines
with a large number of CPUs actually have native 64-bit atomics.  For
example, if we consider PowerPC, the large machines are surely 64-bit.

OK, it looks like Brad's approach may be used as-is.

Alexander

  reply	other threads:[~2012-02-21 17:42 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-10  2:06 [kernel-hardening] procfs: infoleaks and DAC permissions Djalal Harouni
2012-02-10 14:36 ` Vasiliy Kulikov
2012-02-11  9:20   ` Solar Designer
2012-02-11 10:21     ` Vasiliy Kulikov
2012-02-11 13:31       ` Solar Designer
2012-02-12  0:19   ` Djalal Harouni
2012-02-21 14:56   ` Solar Designer
2012-02-21 16:25     ` Djalal Harouni
2012-02-21 17:42       ` Solar Designer [this message]
2012-02-24  0:56     ` Solar Designer
2012-02-25  3:56       ` Solar Designer
2012-03-03  0:35         ` Djalal Harouni
2012-02-21 16:34   ` Djalal Harouni
2012-02-11 10:07 ` Solar Designer
2012-02-12 15:36   ` Djalal Harouni
2012-02-13 15:50     ` Djalal Harouni

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=20120221174245.GA23759@openwall.com \
    --to=solar@openwall.com \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=spender@grsecurity.net \
    /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.