linux.kernel - 26 new messages in 12 topics - digest
linux.kernel
http://groups.google.com/group/linux.kernel?hl=en
linux.kernel@googlegroups.com
Today's topics:
* i2c: Fallback to of_node of parent - 2 messages, 1 author
http://groups.google.com/group/linux.kernel/t/d93b3f894c3e5685?hl=en
* xen drivers fail to link on ARM with v3.12-9888-gf63c482 - 1 messages, 1
author
http://groups.google.com/group/linux.kernel/t/2b72ccf2ec8c82da?hl=en
* ASoC: omap: mcbsp, mcpdm, dmic: raw read and write endian fix - 2 messages,
2 authors
http://groups.google.com/group/linux.kernel/t/61c361b93c246cfd?hl=en
* sound fixes for 3.13-rc1 - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/55ae5a33d87f1caf?hl=en
* Command line related cleanups - 6 messages, 1 author
http://groups.google.com/group/linux.kernel/t/f284ec730d289d67?hl=en
* panic: setup panic_timeout early - 2 messages, 2 authors
http://groups.google.com/group/linux.kernel/t/b9ad085825bd3729?hl=en
* of/selftest: Add self tests for manipulation of properties - 2 messages, 2
authors
http://groups.google.com/group/linux.kernel/t/b615f15949c4ee2e?hl=en
* A minor amd64_edac fix for 3.13 - 2 messages, 2 authors
http://groups.google.com/group/linux.kernel/t/966a3374765f3154?hl=en
* set_dumpable: fix the theoretical race with itself - 4 messages, 1 author
http://groups.google.com/group/linux.kernel/t/60f0240f00deb328?hl=en
* 3.12.0-rt2 - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/122282eab30eec0a?hl=en
* staging/lustre: validate open handle cookies - 2 messages, 1 author
http://groups.google.com/group/linux.kernel/t/b9af2ffb60231fd2?hl=en
* aio: fix D-cache aliasing issues - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/e2884c60a25d22cc?hl=en
==============================================================================
TOPIC: i2c: Fallback to of_node of parent
http://groups.google.com/group/linux.kernel/t/d93b3f894c3e5685?hl=en
==============================================================================
== 1 of 2 ==
Date: Sat, Nov 16 2013 8:20 am
From: Florian Meier
Ok, I will try to find all relevant lines.
Where is the best place to document this?
Greetings,
Florian
2013/11/16 Wolfram Sang <wsa@the-dreams.de>:
>
>> + if (!dev->of_node && dev->parent)
>> + dev->of_node = dev->parent->of_node;
>> +
>
> That is not enough. Current drivers could then have the assignment
> removed and even more important, this behaviour should be documented.
>
> Regards,
>
> Wolfram
>
--
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: Sat, Nov 16 2013 9:00 am
From: Florian Meier
I have looked through all bus drivers and in most
cases they have a corresponding line that could be removed.
Although, this patch would break i2c-powermac, because it
relies on the fact that of_node stays NULL.
Any idea how to handle that?
Greetings,
Florian
On 16.11.2013 17:11, Florian Meier wrote:
> Ok, I will try to find all relevant lines.
> Where is the best place to document this?
>
> Greetings,
> Florian
>
> 2013/11/16 Wolfram Sang <wsa@the-dreams.de>:
>>
>>> + if (!dev->of_node && dev->parent)
>>> + dev->of_node = dev->parent->of_node;
>>> +
>>
>> That is not enough. Current drivers could then have the assignment
>> removed and even more important, this behaviour should be documented.
>>
>> Regards,
>>
>> Wolfram
>>
--
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: xen drivers fail to link on ARM with v3.12-9888-gf63c482
http://groups.google.com/group/linux.kernel/t/2b72ccf2ec8c82da?hl=en
==============================================================================
== 1 of 1 ==
Date: Sat, Nov 16 2013 8:40 am
From: Josh Boyer
On Sat, Nov 16, 2013 at 9:56 AM, Josh Boyer <jwboyer@fedoraproject.org> wrote:
> Hi All,
>
> The xen-gntalloc, xen-netfront, xen-blkfront, and xen-netback drivers
> fail to link on ARM today with the following error:
>
> ERROR: "phys_to_mach" [drivers/xen/xen-gntalloc.ko] undefined!
> ERROR: "phys_to_mach" [drivers/net/xen-netfront.ko] undefined!
> ERROR: "phys_to_mach" [drivers/net/xen-netback/xen-netback.ko] undefined!
> ERROR: "phys_to_mach" [drivers/block/xen-blkfront.ko] undefined!
>
> This is with Linus' tree as of this morning.
>
> I'm guessing this is because the mfn_to_pfn and pfn_to_mfn functions
> are inlined and reference phys_to_mach directly, and that isn't
> exported to modules. Thoughts?
The patch below seems to fix this, but I'm not sure it's the desired
approach. I added the export for mach_to_phys just in case.
josh
diff --git a/arch/arm/xen/p2m.c b/arch/arm/xen/p2m.c
index 23732cd..7772fa8 100644
--- a/arch/arm/xen/p2m.c
+++ b/arch/arm/xen/p2m.c
@@ -27,7 +27,9 @@ struct xen_p2m_entry {
rwlock_t p2m_lock;
struct rb_root phys_to_mach = RB_ROOT;
+EXPORT_SYMBOL_GPL(phys_to_mach);
static struct rb_root mach_to_phys = RB_ROOT;
+EXPORT_SYMBOL_GPL(mach_to_phys);
static int xen_add_phys_to_mach_entry(struct xen_p2m_entry *new)
{
--
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: ASoC: omap: mcbsp, mcpdm, dmic: raw read and write endian fix
http://groups.google.com/group/linux.kernel/t/61c361b93c246cfd?hl=en
==============================================================================
== 1 of 2 ==
Date: Sat, Nov 16 2013 8:50 am
From: Jarkko Nikula
On 11/16/2013 02:01 AM, Taras Kondratiuk wrote:
> From: Victor Kamensky <victor.kamensky@linaro.org>
>
> All OMAP IP blocks expect LE data, but CPU may operate in BE mode.
> Need to use endian neutral functions to read/write h/w registers.
> I.e instead of __raw_read[lw] and __raw_write[lw] functions code
> need to use read[lw]_relaxed and write[lw]_relaxed functions.
> If the first simply reads/writes register, the second will byteswap
> it if host operates in BE mode.
>
> Changes are trivial sed like replacement of __raw_xxx functions
> with xxx_relaxed variant.
>
> Signed-off-by: Victor Kamensky <victor.kamensky@linaro.org>
> Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>
> ---
> sound/soc/omap/mcbsp.c | 12 ++++++------
> sound/soc/omap/omap-dmic.c | 4 ++--
> sound/soc/omap/omap-mcpdm.c | 4 ++--
> 3 files changed, 10 insertions(+), 10 deletions(-)
>
Looks ok to me by looking at the _relaxed definitions in
arch/arm/include/asm/io.h.
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
--
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: Sat, Nov 16 2013 9:30 am
From: Takashi Iwai
At Sat, 16 Nov 2013 18:09:51 +0200,
Jarkko Nikula wrote:
>
> On 11/16/2013 02:01 AM, Taras Kondratiuk wrote:
> > From: Victor Kamensky <victor.kamensky@linaro.org>
> >
> > All OMAP IP blocks expect LE data, but CPU may operate in BE mode.
> > Need to use endian neutral functions to read/write h/w registers.
> > I.e instead of __raw_read[lw] and __raw_write[lw] functions code
> > need to use read[lw]_relaxed and write[lw]_relaxed functions.
> > If the first simply reads/writes register, the second will byteswap
> > it if host operates in BE mode.
> >
> > Changes are trivial sed like replacement of __raw_xxx functions
> > with xxx_relaxed variant.
> >
> > Signed-off-by: Victor Kamensky <victor.kamensky@linaro.org>
> > Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>
> > ---
> > sound/soc/omap/mcbsp.c | 12 ++++++------
> > sound/soc/omap/omap-dmic.c | 4 ++--
> > sound/soc/omap/omap-mcpdm.c | 4 ++--
> > 3 files changed, 10 insertions(+), 10 deletions(-)
> >
> Looks ok to me by looking at the _relaxed definitions in
> arch/arm/include/asm/io.h.
>
> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
>
What's the reason to use _relaxed version in all places?
I understand this patch is to fix the endianess, so this can be
applied as is, as long as the original code works. But, still in
general, I wonder how the concurrency is guaranteed by this driver
code...
thanks,
Takashi
--
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: sound fixes for 3.13-rc1
http://groups.google.com/group/linux.kernel/t/55ae5a33d87f1caf?hl=en
==============================================================================
== 1 of 1 ==
Date: Sat, Nov 16 2013 9:30 am
From: Takashi Iwai
Linus,
please pull sound fixes for v3.13-rc1 from:
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git tags/sound-fix-3.13-rc1
The topmost commit is abfe69dd2e313d0c8226ca4a12329e3d829cfd7c
----------------------------------------------------------------
sound fixes for 3.13-rc1
Two peaks in diffstat are for the audio EQ init of IDT codecs and the
EMU2004 usb mixer addition, both of which are pretty device-specific,
so safe to apply. The rest are a bunch of small fixes, most of them
are regression fixes.
----------------------------------------------------------------
Anssi Hannula (5):
ALSA: hda - hdmi: Use TFx channel positions instead of FxH
ALSA: usb: Fix wrong mapping of RLC and RRC channels
ALSA: hda - hdmi: Add error-checking to some codec reads
ALSA: hda - hdmi: Skip out-of-range latency values in AMD ELD generator
ALSA: hda - hdmi: Fix wrong baseline length in ATI/AMD generated ELD
Brian Austin (1):
ASoC: cs42l52: Correct MIC CTL mask
Charles Keepax (1):
ASoC: wm8997: Correct typo in ISRC mux routes
Dan Carpenter (2):
ALSA: snd-aoa: two copy and paste bugs
ALSA: isa: not allocating enough space
David Henningsson (1):
ALSA: hda - Fix Line Out automute on Realtek multifunction jacks
Nicolin Chen (1):
ASoC: wm8962: Turn on regcache_cache_only before disabling regulator
Oskar Schirmer (1):
ASoC: fsl: imx-pcm-fiq: omit fiq counter to avoid harm in unbalanced situations
Richard Fitzgerald (2):
ALSA: compress_core: don't return -EBADFD from poll if paused
ASoC: arizona: Fix typo in name of EQ coefficient controls
Takashi Iwai (9):
ALSA: hda - Control SPDIF out pin on MacBookPro 11,2
ALSA: msnd: Avoid duplicated driver name
ALSA: hda - Check keep_eapd_on before inv_eapd
ALSA: hda - Don't turn off EAPD for headphone on Lenovo N100
ALSA: hda - Control EAPD for Master volume on Lenovo N100
ALSA: hda - Don't clear the power state at snd_hda_codec_reset()
ASoC: blackfin: Fix missing break
ALSA: pcsp: Fix the order of input device unregistration
ALSA: jack: Unregister input device at disconnection
Vasily Khoruzhick (1):
ALSA: usb-audio: add front jack channel selector for EMU0204
Vitaliy Kulikov (1):
ALSA: hda - load EQ params into IDT codec on HP bNB13 systems
Wei Yongjun (1):
ALSA: sparc: fix missing unlock on error in snd_cs4231_playback_prepare()
---
sound/aoa/fabrics/layout.c | 4 +-
sound/core/compress_offload.c | 3 +-
sound/core/jack.c | 19 +-
sound/drivers/pcsp/pcsp.c | 2 +-
sound/isa/msnd/msnd_pinnacle.c | 4 +-
sound/isa/wavefront/wavefront_synth.c | 2 +-
sound/pci/hda/hda_codec.c | 3 -
sound/pci/hda/hda_eld.c | 37 ++-
sound/pci/hda/hda_generic.c | 4 +-
sound/pci/hda/patch_analog.c | 33 ++-
sound/pci/hda/patch_cirrus.c | 56 +++-
sound/pci/hda/patch_hdmi.c | 11 +-
sound/pci/hda/patch_realtek.c | 4 +-
sound/pci/hda/patch_sigmatel.c | 532 +++++++++++++++++++++++++++++++++-
sound/soc/blackfin/bf5xx-i2s.c | 1 +
sound/soc/codecs/cs42l52.h | 2 +-
sound/soc/codecs/wm5102.c | 8 +-
sound/soc/codecs/wm5110.c | 8 +-
sound/soc/codecs/wm8962.c | 2 +
sound/soc/codecs/wm8997.c | 10 +-
sound/soc/fsl/imx-pcm-fiq.c | 29 +-
sound/sparc/cs4231.c | 11 +-
sound/usb/mixer_quirks.c | 90 ++++++
sound/usb/stream.c | 4 +-
24 files changed, 803 insertions(+), 76 deletions(-)
--
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: Command line related cleanups
http://groups.google.com/group/linux.kernel/t/f284ec730d289d67?hl=en
==============================================================================
== 1 of 6 ==
Date: Sat, Nov 16 2013 9:40 am
From: Felipe Contreras
Hi,
These became apparent in the review process of a new command line parameter.
Felipe Contreras (5):
kstrtox: remove redundant cleanup
cmdline: fix style issues
cmdline: declare exported symbols immediately
kstrtox: remove redundant casts
params: improve standard definitions
kernel/params.c | 25 +++++++++----------------
lib/cmdline.c | 14 ++++++--------
lib/kstrtox.c | 17 ++++++++---------
3 files changed, 23 insertions(+), 33 deletions(-)
--
1.8.4.2+fc1
--
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 6 ==
Date: Sat, Nov 16 2013 9:50 am
From: Felipe Contreras
We can't reach the cleanup code unless the flag KSTRTOX_OVERFLOW is not
set, so there's not no point in clearing a bit that we know is not set.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
lib/kstrtox.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/lib/kstrtox.c b/lib/kstrtox.c
index f78ae0c..ec8da78 100644
--- a/lib/kstrtox.c
+++ b/lib/kstrtox.c
@@ -92,7 +92,6 @@ static int _kstrtoull(const char *s, unsigned int base, unsigned long long *res)
rv = _parse_integer(s, base, &_res);
if (rv & KSTRTOX_OVERFLOW)
return -ERANGE;
- rv &= ~KSTRTOX_OVERFLOW;
if (rv == 0)
return -EINVAL;
s += rv;
--
1.8.4.2+fc1
--
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/
== 3 of 6 ==
Date: Sat, Nov 16 2013 9:50 am
From: Felipe Contreras
We are repeating the functionality of kstrtol in param_set_long, and the
same for kstrtoint. We can get rid of the extra code by using the right
functions.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
kernel/params.c | 25 +++++++++----------------
1 file changed, 9 insertions(+), 16 deletions(-)
diff --git a/kernel/params.c b/kernel/params.c
index c00d5b5..48e1a81 100644
--- a/kernel/params.c
+++ b/kernel/params.c
@@ -227,17 +227,10 @@ int parse_args(const char *doing,
}
/* Lazy bastard, eh? */
-#define STANDARD_PARAM_DEF(name, type, format, tmptype, strtolfn) \
+#define STANDARD_PARAM_DEF(name, type, format, strtolfn) \
int param_set_##name(const char *val, const struct kernel_param *kp) \
{ \
- tmptype l; \
- int ret; \
- \
- ret = strtolfn(val, 0, &l); \
- if (ret < 0 || ((type)l != l)) \
- return ret < 0 ? ret : -EINVAL; \
- *((type *)kp->arg) = l; \
- return 0; \
+ return strtolfn(val, 0, (type *)kp->arg); \
} \
int param_get_##name(char *buffer, const struct kernel_param *kp) \
{ \
@@ -253,13 +246,13 @@ int parse_args(const char *doing,
EXPORT_SYMBOL(param_ops_##name)
-STANDARD_PARAM_DEF(byte, unsigned char, "%hhu", unsigned long, kstrtoul);
-STANDARD_PARAM_DEF(short, short, "%hi", long, kstrtol);
-STANDARD_PARAM_DEF(ushort, unsigned short, "%hu", unsigned long, kstrtoul);
-STANDARD_PARAM_DEF(int, int, "%i", long, kstrtol);
-STANDARD_PARAM_DEF(uint, unsigned int, "%u", unsigned long, kstrtoul);
-STANDARD_PARAM_DEF(long, long, "%li", long, kstrtol);
-STANDARD_PARAM_DEF(ulong, unsigned long, "%lu", unsigned long, kstrtoul);
+STANDARD_PARAM_DEF(byte, unsigned char, "%hhu", kstrtou8);
+STANDARD_PARAM_DEF(short, short, "%hi", kstrtos16);
+STANDARD_PARAM_DEF(ushort, unsigned short, "%hu", kstrtou16);
+STANDARD_PARAM_DEF(int, int, "%i", kstrtoint);
+STANDARD_PARAM_DEF(uint, unsigned int, "%u", kstrtouint);
+STANDARD_PARAM_DEF(long, long, "%li", kstrtol);
+STANDARD_PARAM_DEF(ulong, unsigned long, "%lu", kstrtoul);
int param_set_charp(const char *val, const struct kernel_param *kp)
{
--
1.8.4.2+fc1
--
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/
== 4 of 6 ==
Date: Sat, Nov 16 2013 9:50 am
From: Felipe Contreras
WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
+EXPORT_SYMBOL(memparse);
WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
+EXPORT_SYMBOL(get_option);
WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
+EXPORT_SYMBOL(get_options);
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
lib/cmdline.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/lib/cmdline.c b/lib/cmdline.c
index 5466333..d4932f7 100644
--- a/lib/cmdline.c
+++ b/lib/cmdline.c
@@ -67,6 +67,7 @@ int get_option(char **str, int *pint)
return 1;
}
+EXPORT_SYMBOL(get_option);
/**
* get_options - Parse a string into a list of integers
@@ -112,6 +113,7 @@ char *get_options(const char *str, int nints, int *ints)
ints[0] = i - 1;
return (char *)str;
}
+EXPORT_SYMBOL(get_options);
/**
* memparse - parse a string with mem suffixes into a number
@@ -152,7 +154,4 @@ unsigned long long memparse(const char *ptr, char **retptr)
return ret;
}
-
EXPORT_SYMBOL(memparse);
-EXPORT_SYMBOL(get_option);
-EXPORT_SYMBOL(get_options);
--
1.8.4.2+fc1
--
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/
== 5 of 6 ==
Date: Sat, Nov 16 2013 9:50 am
From: Felipe Contreras
The temporary variable is of the same type as the cast, so it's
redundant.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
lib/kstrtox.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/lib/kstrtox.c b/lib/kstrtox.c
index ec8da78..649b74b 100644
--- a/lib/kstrtox.c
+++ b/lib/kstrtox.c
@@ -176,7 +176,7 @@ int _kstrtoul(const char *s, unsigned int base, unsigned long *res)
rv = kstrtoull(s, base, &tmp);
if (rv < 0)
return rv;
- if (tmp != (unsigned long long)(unsigned long)tmp)
+ if (tmp != (unsigned long)tmp)
return -ERANGE;
*res = tmp;
return 0;
@@ -192,7 +192,7 @@ int _kstrtol(const char *s, unsigned int base, long *res)
rv = kstrtoll(s, base, &tmp);
if (rv < 0)
return rv;
- if (tmp != (long long)(long)tmp)
+ if (tmp != (long)tmp)
return -ERANGE;
*res = tmp;
return 0;
@@ -223,7 +223,7 @@ int kstrtouint(const char *s, unsigned int base, unsigned int *res)
rv = kstrtoull(s, base, &tmp);
if (rv < 0)
return rv;
- if (tmp != (unsigned long long)(unsigned int)tmp)
+ if (tmp != (unsigned int)tmp)
return -ERANGE;
*res = tmp;
return 0;
@@ -254,7 +254,7 @@ int kstrtoint(const char *s, unsigned int base, int *res)
rv = kstrtoll(s, base, &tmp);
if (rv < 0)
return rv;
- if (tmp != (long long)(int)tmp)
+ if (tmp != (int)tmp)
return -ERANGE;
*res = tmp;
return 0;
@@ -269,7 +269,7 @@ int kstrtou16(const char *s, unsigned int base, u16 *res)
rv = kstrtoull(s, base, &tmp);
if (rv < 0)
return rv;
- if (tmp != (unsigned long long)(u16)tmp)
+ if (tmp != (u16)tmp)
return -ERANGE;
*res = tmp;
return 0;
@@ -284,7 +284,7 @@ int kstrtos16(const char *s, unsigned int base, s16 *res)
rv = kstrtoll(s, base, &tmp);
if (rv < 0)
return rv;
- if (tmp != (long long)(s16)tmp)
+ if (tmp != (s16)tmp)
return -ERANGE;
*res = tmp;
return 0;
@@ -299,7 +299,7 @@ int kstrtou8(const char *s, unsigned int base, u8 *res)
rv = kstrtoull(s, base, &tmp);
if (rv < 0)
return rv;
- if (tmp != (unsigned long long)(u8)tmp)
+ if (tmp != (u8)tmp)
return -ERANGE;
*res = tmp;
return 0;
@@ -314,7 +314,7 @@ int kstrtos8(const char *s, unsigned int base, s8 *res)
rv = kstrtoll(s, base, &tmp);
if (rv < 0)
return rv;
- if (tmp != (long long)(s8)tmp)
+ if (tmp != (s8)tmp)
return -ERANGE;
*res = tmp;
return 0;
--
1.8.4.2+fc1
--
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/
== 6 of 6 ==
Date: Sat, Nov 16 2013 9:50 am
From: Felipe Contreras
WARNING: space prohibited between function name and open parenthesis '('
+int get_option (char **str, int *pint)
WARNING: space prohibited between function name and open parenthesis '('
+ *pint = simple_strtol (cur, str, 0);
ERROR: trailing whitespace
+ $
WARNING: please, no spaces at the start of a line
+ $
WARNING: space prohibited between function name and open parenthesis '('
+ res = get_option ((char **)&str, ints + i);
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
lib/cmdline.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/lib/cmdline.c b/lib/cmdline.c
index eb67911..5466333 100644
--- a/lib/cmdline.c
+++ b/lib/cmdline.c
@@ -49,13 +49,13 @@ static int get_range(char **str, int *pint)
* 3 - hyphen found to denote a range
*/
-int get_option (char **str, int *pint)
+int get_option(char **str, int *pint)
{
char *cur = *str;
if (!cur || !(*cur))
return 0;
- *pint = simple_strtol (cur, str, 0);
+ *pint = simple_strtol(cur, str, 0);
if (cur == *str)
return 0;
if (**str == ',') {
@@ -84,13 +84,13 @@ int get_option (char **str, int *pint)
* the parse to end (typically a null terminator, if @str is
* completely parseable).
*/
-
+
char *get_options(const char *str, int nints, int *ints)
{
int res, i = 1;
while (i < nints) {
- res = get_option ((char **)&str, ints + i);
+ res = get_option((char **)&str, ints + i);
if (res == 0)
break;
if (res == 3) {
@@ -153,7 +153,6 @@ unsigned long long memparse(const char *ptr, char **retptr)
return ret;
}
-
EXPORT_SYMBOL(memparse);
EXPORT_SYMBOL(get_option);
EXPORT_SYMBOL(get_options);
--
1.8.4.2+fc1
--
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: panic: setup panic_timeout early
http://groups.google.com/group/linux.kernel/t/b9ad085825bd3729?hl=en
==============================================================================
== 1 of 2 ==
Date: Sat, Nov 16 2013 9:50 am
From: Ingo Molnar
* Felipe Contreras <felipe.contreras@gmail.com> wrote:
> On Fri, Nov 15, 2013 at 2:15 PM, Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
> > On Fri, Nov 15, 2013 at 12:10 PM, Felipe Contreras
> > <felipe.contreras@gmail.com> wrote:
> >>
> >> I haven't seen a single complaint about this commit message, so I
> >> don't see what is your point.
> >
> > My point is that I have sixteen pointless messages in my mbox,
> > half of which are due to just your argumentative nature.
>
> This is clearly not the point you were making, but I won't argue
> why.
That was exactly the point Linus was making.
Anyway, the fact that you are argumentative even with Linus gives me
little hope that you will improve your communication patterns with
_me_, so I'm personally done arguing with you.
> You don't want to argue? Then don't argue. Apply the patch. [...]
*Plonk*.
Ingo
--
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: Sat, Nov 16 2013 10:50 am
From: Felipe Contreras
On Sat, Nov 16, 2013 at 11:45 AM, Ingo Molnar <mingo@kernel.org> wrote:
> * Felipe Contreras <felipe.contreras@gmail.com> wrote:
> Anyway, the fact that you are argumentative even with Linus gives me
> little hope that you will improve your communication patterns with
> _me_, so I'm personally done arguing with you.
How am I being argumentative? I avoided all arguments.
>> You don't want to argue? Then don't argue. Apply the patch. [...]
>
> *Plonk*.
This is exactly the opposite of what is conducive to less argumentation.
If you are not going to comment on the patch, then don't say anything.
The patch is good, and the fact that both you and Linus are avoiding
any comments in the patch itself doesn't speak well for your
intentions to avoid argumentation.
So I ask you again. Do you see something wrong with the patch?
--
Felipe Contreras
--
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: of/selftest: Add self tests for manipulation of properties
http://groups.google.com/group/linux.kernel/t/b615f15949c4ee2e?hl=en
==============================================================================
== 1 of 2 ==
Date: Sat, Nov 16 2013 10:00 am
From: Pantelis Antoniou
Hi Grant,
On Nov 15, 2013, at 7:46 PM, Grant Likely wrote:
> Adds a few simple test cases to ensure that addition, update and removal
> of device tree node properties works correctly.
>
> Signed-off-by: Grant Likely <grant.likely@linaro.org>
> Cc: Rob Herring <rob.herring@calxeda.com>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: David S. Miller <davem@davemloft.net>
> Cc: Nathan Fontenot <nfont@linux.vnet.ibm.com>
> Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
> ---
> drivers/of/selftest.c | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 62 insertions(+)
>
> diff --git a/drivers/of/selftest.c b/drivers/of/selftest.c
> index e21012bde639..cb8d3e722f76 100644
> --- a/drivers/of/selftest.c
> +++ b/drivers/of/selftest.c
> @@ -30,6 +30,67 @@ static struct selftest_results {
> } \
> }
>
> +static void __init of_selftest_dynamic(void)
> +{
> + struct device_node *np;
> + struct property *prop;
> +
> + np = of_find_node_by_path("/testcase-data");
> + if (!np) {
> + pr_err("missing testcase data\n");
> + return;
> + }
> +
> + /* Array of 4 properties for the purpose of testing */
> + prop = kzalloc(sizeof(*prop) * 4, GFP_KERNEL);
> + if (!prop) {
> + selftest(0, "kzalloc() failed\n");
> + return;
> + }
> +
> + /* Add a new property - should pass*/
> + prop->name = "new-property";
> + prop->value = "new-property-data";
> + prop->length = strlen(prop->value);
> + selftest(of_add_property(np, prop) == 0, "Adding a new property failed\n");
> +
> + /* Try to add an existing property - should fail */
> + prop++;
> + prop->name = "new-property";
> + prop->value = "new-property-data-should-fail";
> + prop->length = strlen(prop->value);
> + selftest(of_add_property(np, prop) != 0,
> + "Adding an existing property should have failed\n");
> +
> + /* Try to modify an existing property - should pass */
> + prop->value = "modify-property-data-should-pass";
> + prop->length = strlen(prop->value);
> + selftest(of_update_property(np, prop) == 0,
> + "Updating an existing property should have passed\n");
> +
> + /* Try to modify non-existent property - should pass*/
> + prop++;
> + prop->name = "modify-property";
> + prop->value = "modify-missing-property-data-should-pass";
> + prop->length = strlen(prop->value);
> + selftest(of_update_property(np, prop) == 0,
> + "Updating a missing property should have passed\n");
> +
> + /* Remove property - should pass */
> + selftest(of_remove_property(np, prop) == 0,
> + "Removing a property should have passed\n");
> +
> + /* Adding very large property - should pass */
> + prop++;
> + prop->name = "large-property-PAGE_SIZEx8";
> + prop->length = PAGE_SIZE * 8;
> + prop->value = kzalloc(prop->length, GFP_KERNEL);
> + selftest(prop->value != NULL, "Unable to allocate large buffer\n");
> + if (prop->value)
> + selftest(of_add_property(np, prop) == 0,
> + "Adding a large property should have passed\n");
> +}
> +
> static void __init of_selftest_parse_phandle_with_args(void)
> {
> struct device_node *np;
> @@ -312,6 +373,7 @@ static int __init of_selftest(void)
> of_node_put(np);
>
> pr_info("start of selftest - you will see error messages\n");
> + of_selftest_dynamic();
> of_selftest_parse_phandle_with_args();
> of_selftest_property_match_string();
> of_selftest_parse_interrupts();
> --
> 1.8.3.2
>
I like this. I'll add my overlay test cases somewhere around here.
I might need to introduce some new helper functions in order to generate
the overlay completely programmatically.
Regards
-- Pantelis
--
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: Sat, Nov 16 2013 11:10 am
From: Rob Herring
On Fri, Nov 15, 2013 at 11:46 AM, Grant Likely <grant.likely@linaro.org> wrote:
> Adds a few simple test cases to ensure that addition, update and removal
> of device tree node properties works correctly.
>
> Signed-off-by: Grant Likely <grant.likely@linaro.org>
> Cc: Rob Herring <rob.herring@calxeda.com>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: David S. Miller <davem@davemloft.net>
> Cc: Nathan Fontenot <nfont@linux.vnet.ibm.com>
> Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
> ---
> drivers/of/selftest.c | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 62 insertions(+)
Does this need to depend on or select OF_DYNAMIC?
Rob
--
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: A minor amd64_edac fix for 3.13
http://groups.google.com/group/linux.kernel/t/966a3374765f3154?hl=en
==============================================================================
== 1 of 2 ==
Date: Sat, Nov 16 2013 10:20 am
From: Linus Torvalds
On Sat, Nov 16, 2013 at 3:12 AM, Borislav Petkov <bp@alien8.de> wrote:
> On Sat, Nov 16, 2013 at 02:50:49AM -0800, Linus Torvalds wrote:
>
>> The most common reason seems to be that your email provide is
>> associated with spam, sometimes just because of a shared ISP.
>
> Sure, it is one: https://www.hetzner.de/
Ahh. Yes. Googling for "hetzner online spam", and there's a *lot* of
complaints. See for example
http://www.spamrankings.net/rankv2/2013/09/01/monthly/world/volume/cbl/all/regular/
which puts it #2 _worldwide_ in September. I have no idea how accurate
that is, but..
I would suggest everybody who uses hetzner actively drop them, and
talk publicly about *why* they drop them. Your business may not be all
that lucrative to them (compared to the spam), but still..
Linus
--
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: Sat, Nov 16 2013 10:30 am
From: Borislav Petkov
On Sat, Nov 16, 2013 at 10:10:05AM -0800, Linus Torvalds wrote:
> Ahh. Yes. Googling for "hetzner online spam", and there's a *lot* of
> complaints. See for example
>
> http://www.spamrankings.net/rankv2/2013/09/01/monthly/world/volume/cbl/all/regular/
Yowza, this is just great! :-(
> which puts it #2 _worldwide_ in September. I have no idea how accurate
> that is, but..
And they were #3 in August. So a steady rise ...
> I would suggest everybody who uses hetzner actively drop them, and
> talk publicly about *why* they drop them. Your business may not be all
> that lucrative to them (compared to the spam), but still..
Yeah, I hear they're not that great otherwise either, regardless of how
they handle (or not) spam.
@Frank, we need to have a serious talk, you and I :-)
--
Regards/Gruss,
Boris.
Sent from a fat crate under my desk. Formatting is fine.
--
--
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: set_dumpable: fix the theoretical race with itself
http://groups.google.com/group/linux.kernel/t/60f0240f00deb328?hl=en
==============================================================================
== 1 of 4 ==
Date: Sat, Nov 16 2013 11:10 am
From: Oleg Nesterov
set_dumpable() updates MMF_DUMPABLE_MASK in a non-trivial way to
ensure that get_dumpable() can't observe the intermediate state,
but this all can't help if multiple threads call set_dumpable()
at the same time.
And in theory commit_creds()->set_dumpable(SUID_DUMP_ROOT) racing
with sys_prctl()->set_dumpable(SUID_DUMP_DISABLE) can result in
SUID_DUMP_USER.
Change this code to update both bits atomically via cmpxchg().
Note: this assumes that it is safe to mix bitops and cmpxchg. IOW,
if, say, an architecture implements cmpxchg() using the locking
(like arch/parisc/lib/bitops.c does), then it should use the same
locks for set_bit/etc.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
---
fs/exec.c | 49 +++++++++++++++----------------------------------
1 files changed, 15 insertions(+), 34 deletions(-)
diff --git a/fs/exec.c b/fs/exec.c
index bb8afc1..613c9dc 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1621,43 +1621,24 @@ EXPORT_SYMBOL(set_binfmt);
/*
* set_dumpable converts traditional three-value dumpable to two flags and
- * stores them into mm->flags. It modifies lower two bits of mm->flags, but
- * these bits are not changed atomically. So get_dumpable can observe the
- * intermediate state. To avoid doing unexpected behavior, get get_dumpable
- * return either old dumpable or new one by paying attention to the order of
- * modifying the bits.
- *
- * dumpable | mm->flags (binary)
- * old new | initial interim final
- * ---------+-----------------------
- * 0 1 | 00 01 01
- * 0 2 | 00 10(*) 11
- * 1 0 | 01 00 00
- * 1 2 | 01 11 11
- * 2 0 | 11 10(*) 00
- * 2 1 | 11 11 01
- *
- * (*) get_dumpable regards interim value of 10 as 11.
+ * stores them into mm->flags.
*/
void set_dumpable(struct mm_struct *mm, int value)
{
- switch (value) {
- case SUID_DUMP_DISABLE:
- clear_bit(MMF_DUMPABLE, &mm->flags);
- smp_wmb();
- clear_bit(MMF_DUMP_SECURELY, &mm->flags);
- break;
- case SUID_DUMP_USER:
- set_bit(MMF_DUMPABLE, &mm->flags);
- smp_wmb();
- clear_bit(MMF_DUMP_SECURELY, &mm->flags);
- break;
- case SUID_DUMP_ROOT:
- set_bit(MMF_DUMP_SECURELY, &mm->flags);
- smp_wmb();
- set_bit(MMF_DUMPABLE, &mm->flags);
- break;
- }
+ unsigned long old, new;
+
+ do {
+ old = ACCESS_ONCE(mm->flags);
+ new = old & ~MMF_DUMPABLE_MASK;
+
+ switch (value) {
+ case SUID_DUMP_ROOT:
+ new |= (1 << MMF_DUMP_SECURELY);
+ case SUID_DUMP_USER:
+ new |= (1<< MMF_DUMPABLE);
+ }
+
+ } while (cmpxchg(&mm->flags, old, new) != old);
}
int __get_dumpable(unsigned long mm_flags)
--
1.5.5.1
--
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 4 ==
Date: Sat, Nov 16 2013 11:10 am
From: Oleg Nesterov
On 11/15, Kees Cook wrote:
>
> On Fri, Nov 15, 2013 at 12:36 PM, Oleg Nesterov <oleg@redhat.com> wrote:
> >
> > unless I missed something, this is the fix, not cleanup ?
> >
> > If commit_creds()->set_dumpable(SUID_DUMP_ROOT) races with
> > sys_prctl()->set_dumpable(SUID_DUMP_DISABLE), we can get
> > SUID_DUMP_USER afaics.
> >
> > Yes, yes, even if I am right this race is very unlikely.
>
> Hm, yes, that is a fix then. I struggle to imagine it being
> exploitable (i.e. control over both threads, one at least already with
> a different cred, etc), but it certainly does look like a bug.
Yes, yes, sure, this is only theoretical.
OK, I am sending the patches to lkml. I didn't dare to keep your ack,
please review v2 (v1 confused bit-mask with bit-number, and in theory
we need ACCESS_ONCE).
It would be really nice if someone can ack the "it is safe to mix
bitops and cmpxchg" assumption mentioned in the changelog.
Alex, Josh, this also partly reverts 179899fd5dc780fe "coredump:
update coredump-related headers", I think fs/coredump.h buys nothing.
Oleg.
fs/coredump.c | 1 -
fs/coredump.h | 6 -----
fs/exec.c | 61 +++++--------------------------------------------
include/linux/sched.h | 25 ++++++++++++++-----
4 files changed, 24 insertions(+), 69 deletions(-)
--
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/
== 3 of 4 ==
Date: Sat, Nov 16 2013 11:10 am
From: Oleg Nesterov
Nobody actually needs MMF_DUMPABLE/MMF_DUMP_SECURELY, there
are only used to enforce the encoding of SUID_DUMP_* enum in
mm->flags & MMF_DUMPABLE_MASK.
Now that set_dumpable() updates both bits atomically we can
kill them and simply store the value "as is" in 2 lower bits.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
---
fs/exec.c | 18 +++---------------
include/linux/sched.h | 4 +---
2 files changed, 4 insertions(+), 18 deletions(-)
diff --git a/fs/exec.c b/fs/exec.c
index 613c9dc..5303005 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1620,8 +1620,7 @@ void set_binfmt(struct linux_binfmt *new)
EXPORT_SYMBOL(set_binfmt);
/*
- * set_dumpable converts traditional three-value dumpable to two flags and
- * stores them into mm->flags.
+ * set_dumpable stores three-value SUID_DUMP_* into mm->flags.
*/
void set_dumpable(struct mm_struct *mm, int value)
{
@@ -1629,24 +1628,13 @@ void set_dumpable(struct mm_struct *mm, int value)
do {
old = ACCESS_ONCE(mm->flags);
- new = old & ~MMF_DUMPABLE_MASK;
-
- switch (value) {
- case SUID_DUMP_ROOT:
- new |= (1 << MMF_DUMP_SECURELY);
- case SUID_DUMP_USER:
- new |= (1<< MMF_DUMPABLE);
- }
-
+ new = (old & ~MMF_DUMPABLE_MASK) | value;
} while (cmpxchg(&mm->flags, old, new) != old);
}
int __get_dumpable(unsigned long mm_flags)
{
- int ret;
-
- ret = mm_flags & MMF_DUMPABLE_MASK;
- return (ret > SUID_DUMP_USER) ? SUID_DUMP_ROOT : ret;
+ return mm_flags & MMF_DUMPABLE_MASK;
}
/*
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 838a3d9..828c00d 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -326,10 +326,8 @@ extern int get_dumpable(struct mm_struct *mm);
#define SUID_DUMP_ROOT 2 /* Dump as root */
/* mm flags */
-/* dumpable bits */
-#define MMF_DUMPABLE 0 /* core dump is permitted */
-#define MMF_DUMP_SECURELY 1 /* core file is readable only by root */
+/* for SUID_DUMP_* above */
#define MMF_DUMPABLE_BITS 2
#define MMF_DUMPABLE_MASK ((1 << MMF_DUMPABLE_BITS) - 1)
--
1.5.5.1
--
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/
== 4 of 4 ==
Date: Sat, Nov 16 2013 11:10 am
From: Oleg Nesterov
1. Remove fs/coredump.h. It is not clear why do we need it,
it only declares __get_dumpable(), signal.c includes it
for no reason.
2. Now that get_dumpable() and __get_dumpable() are really
trivial make them inline in linux/sched.h.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
---
fs/coredump.c | 1 -
fs/coredump.h | 6 ------
fs/exec.c | 18 ------------------
include/linux/sched.h | 21 +++++++++++++++++----
4 files changed, 17 insertions(+), 29 deletions(-)
delete mode 100644 fs/coredump.h
diff --git a/fs/coredump.c b/fs/coredump.c
index 9bdeca1..4bc92c7 100644
--- a/fs/coredump.c
+++ b/fs/coredump.c
@@ -40,7 +40,6 @@
#include <trace/events/task.h>
#include "internal.h"
-#include "coredump.h"
#include <trace/events/sched.h>
diff --git a/fs/coredump.h b/fs/coredump.h
deleted file mode 100644
index e39ff07..0000000
--- a/fs/coredump.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef _FS_COREDUMP_H
-#define _FS_COREDUMP_H
-
-extern int __get_dumpable(unsigned long mm_flags);
-
-
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home