Wednesday, February 3, 2010

linux.kernel - 26 new messages in 19 topics - digest

linux.kernel
http://groups.google.com/group/linux.kernel?hl=en

linux.kernel@googlegroups.com

Today's topics:

* [PATCH] PM: disable nonboot cpus before suspending devices - 2 messages, 1
author
http://groups.google.com/group/linux.kernel/t/e1dc3aa81b42a297?hl=en
* syslog: use defined constants instead of raw numbers - 2 messages, 1 author
http://groups.google.com/group/linux.kernel/t/e1594790606b7db6?hl=en
* radio-si470x-common: -EINVAL overwritten in si470x_vidioc_s_tuner() - 1
messages, 1 author
http://groups.google.com/group/linux.kernel/t/b9df83e9a4867ffc?hl=en
* API to consolidate PWM devices behind a common user and kernel interface - 1
messages, 1 author
http://groups.google.com/group/linux.kernel/t/ca42f3c42b1135b8?hl=en
* hwmon: driver for TI tmp102 temperature sensor - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/5d513c07242a785e?hl=en
* hw-breakpoint fix - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/be924265fdd318f4?hl=en
* drivers/ata: Fix continuation line formats - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/d822eba66af5e806?hl=en
* core: workqueue: BUG_ON on workqueue recursion - 2 messages, 2 authors
http://groups.google.com/group/linux.kernel/t/a975d634243c5123?hl=en
* networking tcp: Writing tcp socket be atomic - 2 messages, 2 authors
http://groups.google.com/group/linux.kernel/t/7ae4e30c83ee8a1e?hl=en
* x86: ptrace and core-dump extensions for xstate - 4 messages, 2 authors
http://groups.google.com/group/linux.kernel/t/78d570b1c5c8bad5?hl=en
* net: Micrel KSZ8841/2 PCI Ethernet driver - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/7bd99e11fe4ae7dc?hl=en
* af_key: fix netns ops ordering on module load/unload - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/4655dcda148f7427?hl=en
* LZO: update email address - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/e0c251913c757bdd?hl=en
* cxgb3: add memory barriers - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/fc855f7c680f0747?hl=en
* perf tools: using O_LARGEFILE to open perf data file - fix - 1 messages, 1
author
http://groups.google.com/group/linux.kernel/t/5e0297b0b8d16155?hl=en
* port multiplier problem - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/197c002ae240db6c?hl=en
* drivers/net/amd8111e.c: Fix continuation line formats - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/a860914d72ac3302?hl=en
* [PATCH] devmem: check vmalloc address on kmem read/write - 1 messages, 1
author
http://groups.google.com/group/linux.kernel/t/875c093874f6d0ad?hl=en
* drivers/ide: Fix continuation line formats - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/f7008b136135527c?hl=en

==============================================================================
TOPIC: [PATCH] PM: disable nonboot cpus before suspending devices
http://groups.google.com/group/linux.kernel/t/e1dc3aa81b42a297?hl=en
==============================================================================

== 1 of 2 ==
Date: Wed, Feb 3 2010 5:30 pm
From: Andrew Morton


On Thu, 4 Feb 2010 01:50:26 +0100 "Rafael J. Wysocki" <rjw@sisk.pl> wrote:

> --- linux-2.6.orig/mm/page_alloc.c
> +++ linux-2.6/mm/page_alloc.c
> @@ -76,6 +76,30 @@ unsigned long totalreserve_pages __read_
> int percpu_pagelist_fraction;
> gfp_t gfp_allowed_mask __read_mostly = GFP_BOOT_MASK;
>
> +/*
> + * The following functions are used by the suspend/hibernate code to temporarily
> + * change gfp_allowed_mask in order to avoid using I/O during memory allocations
> + * while devices are suspended. To avoid races with the suspend/hibernate code,
> + * they should always be called with pm_mutex held (gfp_allowed_mask also should
> + * only be modified with pm_mutex held, unless the suspend/hibernate code is
> + * guaranteed not to run in parallel with that modification).
> + */
> +
> +void set_gfp_allowed_mask(gfp_t mask)
> +{
> + WARN_ON(!mutex_is_locked(&pm_mutex));
> + gfp_allowed_mask = mask;
> +}
> +
> +gfp_t clear_gfp_allowed_mask(gfp_t mask)
> +{
> + gfp_t ret = gfp_allowed_mask;
> +
> + WARN_ON(!mutex_is_locked(&pm_mutex));
> + gfp_allowed_mask &= ~mask;
> + return ret;
> +}

Maybe put an ifdef CONFIG_foo around these so they don't get included
when they're unneeded?

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


== 2 of 2 ==
Date: Wed, Feb 3 2010 5:50 pm
From: Andrew Morton


On Wed, 3 Feb 2010 17:21:47 -0800 Andrew Morton <akpm@linux-foundation.org> wrote:

> On Thu, 4 Feb 2010 01:50:26 +0100 "Rafael J. Wysocki" <rjw@sisk.pl> wrote:
>
> > --- linux-2.6.orig/mm/page_alloc.c
> > +++ linux-2.6/mm/page_alloc.c
> > @@ -76,6 +76,30 @@ unsigned long totalreserve_pages __read_
> > int percpu_pagelist_fraction;
> > gfp_t gfp_allowed_mask __read_mostly = GFP_BOOT_MASK;
> >
> > +/*
> > + * The following functions are used by the suspend/hibernate code to temporarily
> > + * change gfp_allowed_mask in order to avoid using I/O during memory allocations
> > + * while devices are suspended. To avoid races with the suspend/hibernate code,
> > + * they should always be called with pm_mutex held (gfp_allowed_mask also should
> > + * only be modified with pm_mutex held, unless the suspend/hibernate code is
> > + * guaranteed not to run in parallel with that modification).
> > + */
> > +
> > +void set_gfp_allowed_mask(gfp_t mask)
> > +{
> > + WARN_ON(!mutex_is_locked(&pm_mutex));
> > + gfp_allowed_mask = mask;
> > +}
> > +
> > +gfp_t clear_gfp_allowed_mask(gfp_t mask)
> > +{
> > + gfp_t ret = gfp_allowed_mask;
> > +
> > + WARN_ON(!mutex_is_locked(&pm_mutex));
> > + gfp_allowed_mask &= ~mask;
> > + return ret;
> > +}
>
> Maybe put an ifdef CONFIG_foo around these so they don't get included
> when they're unneeded?
>

I guess this:

mm/built-in.o: In function `clear_gfp_allowed_mask':
: undefined reference to `pm_mutex'
mm/built-in.o: In function `set_gfp_allowed_mask':
: undefined reference to `pm_mutex'

kinda answers my question.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

==============================================================================
TOPIC: syslog: use defined constants instead of raw numbers
http://groups.google.com/group/linux.kernel/t/e1594790606b7db6?hl=en
==============================================================================

== 1 of 2 ==
Date: Wed, Feb 3 2010 5:40 pm
From: John Johansen


Kees Cook wrote:
> Right now the syslog "type" action are just raw numbers which makes
> the source difficult to follow. This patch replaces the raw numbers
> with defined constants for some level of sanity.
>
> Signed-off-by: Kees Cook <kees.cook@canonical.com>

Acked-by: John Johansen <john.johansen@canonical.com>

> ---
> fs/proc/kmsg.c | 10 +++++-----
> include/linux/syslog.h | 23 +++++++++++++++++++++++
> kernel/printk.c | 45 +++++++++++++++++++--------------------------
> security/commoncap.c | 5 +++--
> security/selinux/hooks.c | 21 +++++++++++----------
> 5 files changed, 61 insertions(+), 43 deletions(-)
>
> diff --git a/fs/proc/kmsg.c b/fs/proc/kmsg.c
> index 6a3d843..cfe90a4 100644
> --- a/fs/proc/kmsg.c
> +++ b/fs/proc/kmsg.c
> @@ -21,12 +21,12 @@ extern wait_queue_head_t log_wait;
>
> static int kmsg_open(struct inode * inode, struct file * file)
> {
> - return do_syslog(1, NULL, 0, SYSLOG_FROM_FILE);
> + return do_syslog(SYSLOG_ACTION_OPEN, NULL, 0, SYSLOG_FROM_FILE);
> }
>
> static int kmsg_release(struct inode * inode, struct file * file)
> {
> - (void) do_syslog(0, NULL, 0, SYSLOG_FROM_FILE);
> + (void) do_syslog(SYSLOG_ACTION_CLOSE, NULL, 0, SYSLOG_FROM_FILE);
> return 0;
> }
>
> @@ -34,15 +34,15 @@ static ssize_t kmsg_read(struct file *file, char __user *buf,
> size_t count, loff_t *ppos)
> {
> if ((file->f_flags & O_NONBLOCK) &&
> - !do_syslog(9, NULL, 0, SYSLOG_FROM_FILE))
> + !do_syslog(SYSLOG_ACTION_SIZE_UNREAD, NULL, 0, SYSLOG_FROM_FILE))
> return -EAGAIN;
> - return do_syslog(2, buf, count, SYSLOG_FROM_FILE);
> + return do_syslog(SYSLOG_ACTION_READ, buf, count, SYSLOG_FROM_FILE);
> }
>
> static unsigned int kmsg_poll(struct file *file, poll_table *wait)
> {
> poll_wait(file, &log_wait, wait);
> - if (do_syslog(9, NULL, 0, SYSLOG_FROM_FILE))
> + if (do_syslog(SYSLOG_ACTION_SIZE_UNREAD, NULL, 0, SYSLOG_FROM_FILE))
> return POLLIN | POLLRDNORM;
> return 0;
> }
> diff --git a/include/linux/syslog.h b/include/linux/syslog.h
> index 5f02b18..3891139 100644
> --- a/include/linux/syslog.h
> +++ b/include/linux/syslog.h
> @@ -21,6 +21,29 @@
> #ifndef _LINUX_SYSLOG_H
> #define _LINUX_SYSLOG_H
>
> +/* Close the log. Currently a NOP. */
> +#define SYSLOG_ACTION_CLOSE 0
> +/* Open the log. Currently a NOP. */
> +#define SYSLOG_ACTION_OPEN 1
> +/* Read from the log. */
> +#define SYSLOG_ACTION_READ 2
> +/* Read all messages remaining in the ring buffer. */
> +#define SYSLOG_ACTION_READ_ALL 3
> +/* Read and clear all messages remaining in the ring buffer */
> +#define SYSLOG_ACTION_READ_CLEAR 4
> +/* Clear ring buffer. */
> +#define SYSLOG_ACTION_CLEAR 5
> +/* Disable printk's to console */
> +#define SYSLOG_ACTION_CONSOLE_OFF 6
> +/* Enable printk's to console */
> +#define SYSLOG_ACTION_CONSOLE_ON 7
> +/* Set level of messages printed to console */
> +#define SYSLOG_ACTION_CONSOLE_LEVEL 8
> +/* Return number of unread characters in the log buffer */
> +#define SYSLOG_ACTION_SIZE_UNREAD 9
> +/* Return size of the log buffer */
> +#define SYSLOG_ACTION_SIZE_BUFFER 10
> +
> #define SYSLOG_FROM_CALL 0
> #define SYSLOG_FROM_FILE 1
>
> diff --git a/kernel/printk.c b/kernel/printk.c
> index 1771b34..4067412 100644
> --- a/kernel/printk.c
> +++ b/kernel/printk.c
> @@ -259,21 +259,6 @@ static inline void boot_delay_msec(void)
> }
>

No comments:

Post a Comment