From: Matthew Wilcox <matthew@wil.cx>
To: Arjan van de Ven <arjan@infradead.org>
Cc: Pavel Machek <pavel@ucw.cz>, Emese Revfy <re.emese@gmail.com>,
Paul Mundt <lethal@linux-sh.org>,
linux-kernel@vger.kernel.org, torvalds@linux-foundation.org,
viro@zeniv.linux.org.uk, akpm@linux-foundation.org
Subject: Re: [PATCH 0/1] Constify struct address_space_operations for 2.6.32-git-053fe57ac v2
Date: Mon, 14 Dec 2009 09:30:19 -0700 [thread overview]
Message-ID: <20091214163019.GG7812@parisc-linux.org> (raw)
In-Reply-To: <20091214080049.19930729@infradead.org>
On Mon, Dec 14, 2009 at 08:00:49AM -0800, Arjan van de Ven wrote:
> I for one am not opposed to using const where we could be using const.
> It's a fundamental language feature, that helps the compiler and
> developer. Yes there is sparse, and no, almost nobody uses that.
>
> If it's const, it won't be and can't be changed, allowing
> more aggressive optimization. It also means all these structures get
> put in the rodata section, which means by definition they can no longer
> have false sharing with data structures that are written to,.. and that
> section is often even really read only (cpu protection bits), which is
> also a nice, but secundary; _ops are one of those targets for rootkits
> and accidental overwrites.
Yes, but that's accomplished by tagging each of the arrays of function
pointers in question as const. Not by tagging the individual members
within the structure definition as const, which is what this patch
series does.
I don't think anyone objects to what you're trying to accomplish, but
this series of patches, as Al says, feel like pure cargo-culting.
--
Matthew Wilcox Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."
next prev parent reply other threads:[~2009-12-14 16:30 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-13 23:58 [PATCH 00/22] Constify struct backlight_ops for 2.6.32-git-053fe57ac v2 re.emese
2009-12-13 23:58 ` [PATCH 01/22] " re.emese
2009-12-13 23:58 ` [PATCH 02/22] " re.emese
2009-12-13 23:58 ` [PATCH 03/22] " re.emese
2009-12-13 23:58 ` [PATCH 04/22] " re.emese
2009-12-13 23:58 ` [PATCH 05/22] " re.emese
2009-12-15 22:47 ` Richard Purdie
2009-12-16 22:39 ` Emese Revfy
2009-12-13 23:58 ` [PATCH 06/22] " re.emese
2009-12-13 23:58 ` [PATCH 07/22] " re.emese
2009-12-13 23:58 ` [PATCH 1/3] Constify struct acpi_dock_ops " re.emese
2009-12-13 23:59 ` [PATCH 08/22] Constify struct backlight_ops " re.emese
2009-12-13 23:59 ` [PATCH 2/3] Constify struct acpi_dock_ops " re.emese
2009-12-13 23:59 ` [PATCH 3/3] " re.emese
2009-12-13 23:59 ` [PATCH 09/22] Constify struct backlight_ops " re.emese
2009-12-13 23:59 ` [PATCH 10/22] " re.emese
2009-12-14 0:27 ` Jonathan Woithe
2009-12-13 23:59 ` [PATCH 11/22] " re.emese
2009-12-13 23:59 ` [PATCH 12/22] " re.emese
2009-12-13 23:59 ` [PATCH 13/22] " re.emese
2009-12-13 23:59 ` [PATCH 14/22] " re.emese
2009-12-13 23:59 ` [PATCH 15/22] " re.emese
2009-12-13 23:59 ` [PATCH 16/22] " re.emese
2009-12-13 23:59 ` [PATCH 17/22] " re.emese
2009-12-13 23:59 ` [PATCH 1/1] Constify struct address_space_operations " re.emese
2009-12-13 23:59 ` [PATCH 18/22] Constify struct backlight_ops " re.emese
2009-12-13 23:59 ` [PATCH 19/22] " re.emese
2009-12-13 23:59 ` [PATCH 20/22] " re.emese
2009-12-13 23:59 ` [PATCH 21/22] " re.emese
2009-12-13 23:59 ` [PATCH 22/22] " re.emese
2009-12-14 0:38 ` [PATCH 0/1] Constify struct address_space_operations " Matthew Wilcox
2009-12-14 1:33 ` Emese Revfy
2009-12-14 2:19 ` Paul Mundt
2009-12-14 7:08 ` Emese Revfy
2009-12-14 11:26 ` Pavel Machek
2009-12-14 16:00 ` Arjan van de Ven
2009-12-14 16:30 ` Matthew Wilcox [this message]
2009-12-14 21:25 ` Pavel Machek
2009-12-14 22:17 ` Arjan van de Ven
2009-12-14 22:21 ` Pavel Machek
2009-12-14 22:41 ` Emese Revfy
2009-12-15 18:14 ` Pavel Machek
2009-12-15 23:28 ` Emese Revfy
2009-12-16 0:04 ` Al Viro
2009-12-16 8:06 ` Pavel Machek
2009-12-16 22:24 ` Emese Revfy
2009-12-14 23:13 ` Emese Revfy
2009-12-15 10:47 ` Pavel Machek
2009-12-15 19:12 ` Al Viro
2009-12-14 12:36 ` Paul Mundt
2009-12-14 22:20 ` Emese Revfy
2009-12-15 0:01 ` Arjan van de Ven
2009-12-15 23:53 ` Emese Revfy
2009-12-14 11:18 ` Pavel Machek
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=20091214163019.GG7812@parisc-linux.org \
--to=matthew@wil.cx \
--cc=akpm@linux-foundation.org \
--cc=arjan@infradead.org \
--cc=lethal@linux-sh.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=re.emese@gmail.com \
--cc=torvalds@linux-foundation.org \
--cc=viro@zeniv.linux.org.uk \
/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