LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [patch 6/6] rtc suspend()/resume() restores system clock
[not found] <200702211929.17203.david-b@pacbell.net>
@ 2007-02-22 3:50 ` David Brownell
2007-02-22 22:58 ` several messages Guennadi Liakhovetski
0 siblings, 1 reply; 35+ messages in thread
From: David Brownell @ 2007-02-22 3:50 UTC (permalink / raw)
To: rtc-linux
Cc: Linux Kernel list, linux-pm, Greg KH, Andrew Morton,
Alessandro Zummo, john stultz
RTC class suspend/resume support, re-initializing the system clock on resume
from the clock used to initialize it at boot time.
- Inlining the same code used by ARM, which saves and restores the
delta between a selected RTC and the current system wall-clock time.
- Removes calls to that ARM code from AT91, OMAP, and S3C RTCs.
This goes on top of the patch series removing "struct class_device" usage
from the RTC framework. That makes class suspend()/resume() work.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
---
drivers/rtc/Kconfig | 24 +++++++++----
drivers/rtc/class.c | 74 +++++++++++++++++++++++++++++++++++++++++++
drivers/rtc/rtc-at91rm9200.c | 30 -----------------
drivers/rtc/rtc-omap.c | 17 ---------
drivers/rtc/rtc-s3c.c | 22 ------------
5 files changed, 91 insertions(+), 76 deletions(-)
Index: at91/drivers/rtc/Kconfig
===================================================================
--- at91.orig/drivers/rtc/Kconfig 2007-02-21 18:47:38.000000000 -0800
+++ at91/drivers/rtc/Kconfig 2007-02-21 18:47:41.000000000 -0800
@@ -21,21 +21,31 @@ config RTC_CLASS
will be called rtc-class.
config RTC_HCTOSYS
- bool "Set system time from RTC on startup"
+ bool "Set system time from RTC on startup and resume"
depends on RTC_CLASS = y
default y
help
- If you say yes here, the system time will be set using
- the value read from the specified RTC device. This is useful
- in order to avoid unnecessary fsck runs.
+ If you say yes here, the system time (wall clock) will be set using
+ the value read from a specified RTC device. This is useful to avoid
+ unnecessary fsck runs at boot time, and to network better.
config RTC_HCTOSYS_DEVICE
- string "The RTC to read the time from"
+ string "RTC used to set the system time"
depends on RTC_HCTOSYS = y
default "rtc0"
help
- The RTC device that will be used as the source for
- the system time, usually rtc0.
+ The RTC device that will be used to (re)initialize the system
+ clock, usually rtc0. Initialization is done when the system
+ starts up, and when it resumes from a low power state.
+
+ This clock should be battery-backed, so that it reads the correct
+ time when the system boots from a power-off state. Otherwise, your
+ system will need an external clock source (like an NTP server).
+
+ If the clock you specify here is not battery backed, it may still
+ be useful to reinitialize system time when resuming from system
+ sleep states. Do not specify an RTC here unless it stays powered
+ during all this system's supported sleep states.
config RTC_DEBUG
bool "RTC debug support"
Index: at91/drivers/rtc/class.c
===================================================================
--- at91.orig/drivers/rtc/class.c 2007-02-21 18:47:39.000000000 -0800
+++ at91/drivers/rtc/class.c 2007-02-21 18:47:41.000000000 -0800
@@ -32,6 +32,78 @@ static void rtc_device_release(struct de
kfree(rtc);
}
+#if defined(CONFIG_PM) && defined(CONFIG_RTC_HCTOSYS_DEVICE)
+
+/*
+ * On suspend(), measure the delta between one RTC and the
+ * system's wall clock; restore it on resume().
+ */
+
+static struct timespec delta;
+static time_t oldtime;
+
+static int rtc_suspend(struct device *dev, pm_message_t mesg)
+{
+ struct rtc_device *rtc = to_rtc_device(dev);
+ struct rtc_time tm;
+
+ if (strncmp(rtc->dev.bus_id,
+ CONFIG_RTC_HCTOSYS_DEVICE,
+ BUS_ID_SIZE) != 0)
+ return 0;
+
+ rtc_read_time(rtc, &tm);
+ rtc_tm_to_time(&tm, &oldtime);
+
+ /* RTC precision is 1 second; adjust delta for avg 1/2 sec err */
+ set_normalized_timespec(&delta,
+ xtime.tv_sec - oldtime,
+ xtime.tv_nsec - (NSEC_PER_SEC >> 1));
+
+ return 0;
+}
+
+static int rtc_resume(struct device *dev)
+{
+ struct rtc_device *rtc = to_rtc_device(dev);
+ struct rtc_time tm;
+ time_t newtime;
+ struct timespec time;
+
+ if (strncmp(rtc->dev.bus_id,
+ CONFIG_RTC_HCTOSYS_DEVICE,
+ BUS_ID_SIZE) != 0)
+ return 0;
+
+ rtc_read_time(rtc, &tm);
+ if (rtc_valid_tm(&tm) != 0) {
+ pr_debug("%s: bogus resume time\n", rtc->dev.bus_id);
+ return 0;
+ }
+ rtc_tm_to_time(&tm, &newtime);
+ if (newtime <= oldtime) {
+ if (newtime < oldtime)
+ pr_debug("%s: time travel!\n", rtc->dev.bus_id);
+ return 0;
+ }
+
+ /* restore wall clock using delta against this RTC;
+ * adjust again for avg 1/2 second RTC sampling error
+ */
+ set_normalized_timespec(&time,
+ newtime + delta.tv_sec,
+ (NSEC_PER_SEC >> 1) + delta.tv_nsec);
+ do_settimeofday(&time);
+
+ return 0;
+}
+
+#else
+#define rtc_suspend NULL
+#define rtc_resume NULL
+#endif
+
+
/**
* rtc_device_register - register w/ RTC class
* @dev: the device to register
@@ -138,6 +210,8 @@ static int __init rtc_init(void)
printk(KERN_ERR "%s: couldn't create class\n", __FILE__);
return PTR_ERR(rtc_class);
}
+ rtc_class->suspend = rtc_suspend;
+ rtc_class->resume = rtc_resume;
rtc_dev_init();
rtc_sysfs_init(rtc_class);
return 0;
Index: at91/drivers/rtc/rtc-at91rm9200.c
===================================================================
--- at91.orig/drivers/rtc/rtc-at91rm9200.c 2007-02-21 18:47:26.000000000 -0800
+++ at91/drivers/rtc/rtc-at91rm9200.c 2007-02-21 18:47:41.000000000 -0800
@@ -348,21 +348,10 @@ static int __exit at91_rtc_remove(struct
/* AT91RM9200 RTC Power management control */
-static struct timespec at91_rtc_delta;
static u32 at91_rtc_imr;
static int at91_rtc_suspend(struct platform_device *pdev, pm_message_t state)
{
- struct rtc_time tm;
- struct timespec time;
-
- time.tv_nsec = 0;
-
- /* calculate time delta for suspend */
- at91_rtc_readtime(&pdev->dev, &tm);
- rtc_tm_to_time(&tm, &time.tv_sec);
- save_time_delta(&at91_rtc_delta, &time);
-
/* this IRQ is shared with DBGU and other hardware which isn't
* necessarily doing PM like we are...
*/
@@ -374,36 +363,17 @@ static int at91_rtc_suspend(struct platf
else
at91_sys_write(AT91_RTC_IDR, at91_rtc_imr);
}
-
- pr_debug("%s(): %4d-%02d-%02d %02d:%02d:%02d\n", __FUNCTION__,
- 1900 + tm.tm_year, tm.tm_mon, tm.tm_mday,
- tm.tm_hour, tm.tm_min, tm.tm_sec);
-
return 0;
}
static int at91_rtc_resume(struct platform_device *pdev)
{
- struct rtc_time tm;
- struct timespec time;
-
- time.tv_nsec = 0;
-
- at91_rtc_readtime(&pdev->dev, &tm);
- rtc_tm_to_time(&tm, &time.tv_sec);
- restore_time_delta(&at91_rtc_delta, &time);
-
if (at91_rtc_imr) {
if (device_may_wakeup(&pdev->dev))
disable_irq_wake(AT91_ID_SYS);
else
at91_sys_write(AT91_RTC_IER, at91_rtc_imr);
}
-
- pr_debug("%s(): %4d-%02d-%02d %02d:%02d:%02d\n", __FUNCTION__,
- 1900 + tm.tm_year, tm.tm_mon, tm.tm_mday,
- tm.tm_hour, tm.tm_min, tm.tm_sec);
-
return 0;
}
#else
Index: at91/drivers/rtc/rtc-omap.c
===================================================================
--- at91.orig/drivers/rtc/rtc-omap.c 2007-02-21 18:47:39.000000000 -0800
+++ at91/drivers/rtc/rtc-omap.c 2007-02-21 18:47:41.000000000 -0800
@@ -488,19 +488,10 @@ static int __devexit omap_rtc_remove(str
#ifdef CONFIG_PM
-static struct timespec rtc_delta;
static u8 irqstat;
static int omap_rtc_suspend(struct platform_device *pdev, pm_message_t state)
{
- struct rtc_time rtc_tm;
- struct timespec time;
-
- time.tv_nsec = 0;
- omap_rtc_read_time(NULL, &rtc_tm);
- rtc_tm_to_time(&rtc_tm, &time.tv_sec);
-
- save_time_delta(&rtc_delta, &time);
irqstat = rtc_read(OMAP_RTC_INTERRUPTS_REG);
/* FIXME the RTC alarm is not currently acting as a wakeup event
@@ -517,14 +508,6 @@ static int omap_rtc_suspend(struct platf
static int omap_rtc_resume(struct platform_device *pdev)
{
- struct rtc_time rtc_tm;
- struct timespec time;
-
- time.tv_nsec = 0;
- omap_rtc_read_time(NULL, &rtc_tm);
- rtc_tm_to_time(&rtc_tm, &time.tv_sec);
-
- restore_time_delta(&rtc_delta, &time);
if (device_may_wakeup(&pdev->dev))
disable_irq_wake(omap_rtc_alarm);
else
Index: at91/drivers/rtc/rtc-s3c.c
===================================================================
--- at91.orig/drivers/rtc/rtc-s3c.c 2007-02-21 18:47:26.000000000 -0800
+++ at91/drivers/rtc/rtc-s3c.c 2007-02-21 18:47:41.000000000 -0800
@@ -548,37 +548,15 @@ static int ticnt_save;
static int s3c_rtc_suspend(struct platform_device *pdev, pm_message_t state)
{
- struct rtc_time tm;
- struct timespec time;
-
- time.tv_nsec = 0;
-
/* save TICNT for anyone using periodic interrupts */
-
ticnt_save = readb(s3c_rtc_base + S3C2410_TICNT);
-
- /* calculate time delta for suspend */
-
- s3c_rtc_gettime(&pdev->dev, &tm);
- rtc_tm_to_time(&tm, &time.tv_sec);
- save_time_delta(&s3c_rtc_delta, &time);
s3c_rtc_enable(pdev, 0);
-
return 0;
}
static int s3c_rtc_resume(struct platform_device *pdev)
{
- struct rtc_time tm;
- struct timespec time;
-
- time.tv_nsec = 0;
-
s3c_rtc_enable(pdev, 1);
- s3c_rtc_gettime(&pdev->dev, &tm);
- rtc_tm_to_time(&tm, &time.tv_sec);
- restore_time_delta(&s3c_rtc_delta, &time);
-
writeb(ticnt_save, s3c_rtc_base + S3C2410_TICNT);
return 0;
}
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: several messages
2007-02-22 3:50 ` [patch 6/6] rtc suspend()/resume() restores system clock David Brownell
@ 2007-02-22 22:58 ` Guennadi Liakhovetski
2007-02-23 1:15 ` David Brownell
2007-02-23 11:17 ` Johannes Berg
0 siblings, 2 replies; 35+ messages in thread
From: Guennadi Liakhovetski @ 2007-02-22 22:58 UTC (permalink / raw)
To: Johannes Berg, David Brownell
Cc: linuxppc-dev, rtc-linux, linux-pm, Torrance, Alessandro Zummo,
john stultz, Andrew Morton, Linux Kernel list
of the following 2 patches:
On Mon, 5 Feb 2007, Johannes Berg wrote:
> This patch removes the time suspend/restore code that was done through
> a PMU notifier in arch/platforms/powermac/time.c.
>
> Instead, we introduce arch/powerpc/sysdev/timer.c which creates a sys
> device and handles time of day suspend/resume through that.
>
> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
> Cc: Andrew Morton <akpm@osdl.org>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
[patch trimmed]
On Wed, 21 Feb 2007, David Brownell wrote:
> RTC class suspend/resume support, re-initializing the system clock on resume
> >from the clock used to initialize it at boot time.
>
> - Inlining the same code used by ARM, which saves and restores the
> delta between a selected RTC and the current system wall-clock time.
>
> - Removes calls to that ARM code from AT91, OMAP, and S3C RTCs.
>
> This goes on top of the patch series removing "struct class_device" usage
> >from the RTC framework. That makes class suspend()/resume() work.
>
> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
>
> ---
> drivers/rtc/Kconfig | 24 +++++++++----
> drivers/rtc/class.c | 74 +++++++++++++++++++++++++++++++++++++++++++
> drivers/rtc/rtc-at91rm9200.c | 30 -----------------
> drivers/rtc/rtc-omap.c | 17 ---------
> drivers/rtc/rtc-s3c.c | 22 ------------
> 5 files changed, 91 insertions(+), 76 deletions(-)
[patch trimmed]
I think, we only want 1, right? And the latter seems to be more generic /
platform independent? And as a side-effect, powermac would have to migrate
to generic rtc:-)
Thanks
Guennadi
---
Guennadi Liakhovetski
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: several messages
2007-02-22 22:58 ` several messages Guennadi Liakhovetski
@ 2007-02-23 1:15 ` David Brownell
2007-02-23 11:17 ` Johannes Berg
1 sibling, 0 replies; 35+ messages in thread
From: David Brownell @ 2007-02-23 1:15 UTC (permalink / raw)
To: Guennadi Liakhovetski
Cc: Alessandro Zummo, Andrew Morton, Johannes Berg, john stultz,
Linux Kernel list, linux-pm, linuxppc-dev, rtc-linux, Torrance
On Thursday 22 February 2007 2:58 pm, Guennadi Liakhovetski wrote:
>
> I think, we only want 1, right? And the latter seems to be more generic /
> platform independent? And as a side-effect, powermac would have to migrate
> to generic rtc:-)
I'd certainly think that restoring the system clock should be, as much
as possible, in platform-agnostic code. Like the generic RTC framework.
And hmm, that powermac/time.c file replicates other RTC code...
Minor obstacle: removing the EXPERIMENTAL label from that code.
- Dave
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: several messages
2007-02-22 22:58 ` several messages Guennadi Liakhovetski
2007-02-23 1:15 ` David Brownell
@ 2007-02-23 11:17 ` Johannes Berg
2007-02-23 18:31 ` rtc suspend()/resume() restores system clock Guennadi Liakhovetski
1 sibling, 1 reply; 35+ messages in thread
From: Johannes Berg @ 2007-02-23 11:17 UTC (permalink / raw)
To: Guennadi Liakhovetski
Cc: David Brownell, linuxppc-dev, rtc-linux, linux-pm, Torrance,
Alessandro Zummo, john stultz, Andrew Morton, Linux Kernel list
[-- Attachment #1: Type: text/plain, Size: 378 bytes --]
On Thu, 2007-02-22 at 23:58 +0100, Guennadi Liakhovetski wrote:
> I think, we only want 1, right? And the latter seems to be more generic /
> platform independent? And as a side-effect, powermac would have to migrate
> to generic rtc:-)
Can we migrate all of powerpc to genrtc? But yes, I agree. Had enough to
do though already to get suspend working :)
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: rtc suspend()/resume() restores system clock
2007-02-23 11:17 ` Johannes Berg
@ 2007-02-23 18:31 ` Guennadi Liakhovetski
2007-02-23 20:24 ` Johannes Berg
0 siblings, 1 reply; 35+ messages in thread
From: Guennadi Liakhovetski @ 2007-02-23 18:31 UTC (permalink / raw)
To: Johannes Berg
Cc: David Brownell, linuxppc-dev, rtc-linux, linux-pm, Torrance,
Alessandro Zummo, john stultz, Andrew Morton, Linux Kernel list
First, sorry for messing up the subject line.
On Fri, 23 Feb 2007, Johannes Berg wrote:
> On Thu, 2007-02-22 at 23:58 +0100, Guennadi Liakhovetski wrote:
>
> > I think, we only want 1, right? And the latter seems to be more generic /
> > platform independent? And as a side-effect, powermac would have to migrate
> > to generic rtc:-)
>
> Can we migrate all of powerpc to genrtc? But yes, I agree. Had enough to
> do though already to get suspend working :)
Johannes, is there any special meaning in "migrate all of powerpc to
genrtc"? Or is it just porting every single rtc driver to the generic rtc
API, moving it under drivers/rtc and adjusting its users or are there any
global changes required to arch/powerpc? Linkstation is now happily using
a driver under drivers/rtc, whereas originally it also had a "all special"
driver, and the migration for me wasn't that difficult... Or is there more
to do for other platforms?
Thanks
Guennadi
---
Guennadi Liakhovetski
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: rtc suspend()/resume() restores system clock
2007-02-23 18:31 ` rtc suspend()/resume() restores system clock Guennadi Liakhovetski
@ 2007-02-23 20:24 ` Johannes Berg
0 siblings, 0 replies; 35+ messages in thread
From: Johannes Berg @ 2007-02-23 20:24 UTC (permalink / raw)
To: Guennadi Liakhovetski
Cc: David Brownell, linuxppc-dev, rtc-linux, linux-pm, Torrance,
Alessandro Zummo, john stultz, Andrew Morton, Linux Kernel list
[-- Attachment #1: Type: text/plain, Size: 466 bytes --]
On Fri, 2007-02-23 at 19:31 +0100, Guennadi Liakhovetski wrote:
> Johannes, is there any special meaning in "migrate all of powerpc to
> genrtc"? Or is it just porting every single rtc driver to the generic rtc
> API, moving it under drivers/rtc and adjusting its users or are there any
> global changes required to arch/powerpc?
I don't know. powerpc has some platform-specific rtc hooks that will
want conversion (or deletion?), I think.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
^ permalink raw reply [flat|nested] 35+ messages in thread
* [PATCH v2 0/3] x86/mm: INVPCID support
@ 2016-01-25 18:37 Andy Lutomirski
2016-01-25 18:57 ` Ingo Molnar
0 siblings, 1 reply; 35+ messages in thread
From: Andy Lutomirski @ 2016-01-25 18:37 UTC (permalink / raw)
To: x86, linux-kernel
Cc: Borislav Petkov, Brian Gerst, Dave Hansen, Linus Torvalds,
Oleg Nesterov, linux-mm, Andrey Ryabinin, Andy Lutomirski
Ingo, before applying this, please apply these two KASAN fixes:
http://lkml.kernel.org/g/1452516679-32040-2-git-send-email-aryabinin@virtuozzo.com
http://lkml.kernel.org/g/1452516679-32040-3-git-send-email-aryabinin@virtuozzo.com
Without those fixes, this series will trigger a KASAN bug.
This is a straightforward speedup on Ivy Bridge and newer, IIRC.
(I tested on Skylake. INVPCID is not available on Sandy Bridge.
I don't have Ivy Bridge, Haswell or Broadwell to test on, so I
could be wrong as to when the feature was introduced.)
I think we should consider these patches separately from the rest
of the PCID stuff -- they barely interact, and this part is much
simpler and is useful on its own.
This is exactly identical to patches 2-4 of the PCID RFC series.
Andy Lutomirski (3):
x86/mm: Add INVPCID helpers
x86/mm: Add a noinvpcid option to turn off INVPCID
x86/mm: If INVPCID is available, use it to flush global mappings
Documentation/kernel-parameters.txt | 2 ++
arch/x86/include/asm/tlbflush.h | 50 +++++++++++++++++++++++++++++++++++++
arch/x86/kernel/cpu/common.c | 16 ++++++++++++
3 files changed, 68 insertions(+)
--
2.5.0
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH v2 0/3] x86/mm: INVPCID support
2016-01-25 18:37 [PATCH v2 0/3] x86/mm: INVPCID support Andy Lutomirski
@ 2016-01-25 18:57 ` Ingo Molnar
2016-01-27 10:09 ` several messages Thomas Gleixner
0 siblings, 1 reply; 35+ messages in thread
From: Ingo Molnar @ 2016-01-25 18:57 UTC (permalink / raw)
To: Andy Lutomirski
Cc: x86, linux-kernel, Borislav Petkov, Brian Gerst, Dave Hansen,
Linus Torvalds, Oleg Nesterov, linux-mm, Andrey Ryabinin
* Andy Lutomirski <luto@kernel.org> wrote:
> Ingo, before applying this, please apply these two KASAN fixes:
>
> http://lkml.kernel.org/g/1452516679-32040-2-git-send-email-aryabinin@virtuozzo.com
> http://lkml.kernel.org/g/1452516679-32040-3-git-send-email-aryabinin@virtuozzo.com
>
> Without those fixes, this series will trigger a KASAN bug.
>
> This is a straightforward speedup on Ivy Bridge and newer, IIRC.
> (I tested on Skylake. INVPCID is not available on Sandy Bridge.
> I don't have Ivy Bridge, Haswell or Broadwell to test on, so I
> could be wrong as to when the feature was introduced.)
>
> I think we should consider these patches separately from the rest
> of the PCID stuff -- they barely interact, and this part is much
> simpler and is useful on its own.
>
> This is exactly identical to patches 2-4 of the PCID RFC series.
>
> Andy Lutomirski (3):
> x86/mm: Add INVPCID helpers
> x86/mm: Add a noinvpcid option to turn off INVPCID
> x86/mm: If INVPCID is available, use it to flush global mappings
>
> Documentation/kernel-parameters.txt | 2 ++
> arch/x86/include/asm/tlbflush.h | 50 +++++++++++++++++++++++++++++++++++++
> arch/x86/kernel/cpu/common.c | 16 ++++++++++++
> 3 files changed, 68 insertions(+)
Ok, I'll pick these up tomorrow unless there are objections.
Thanks,
Ingo
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: several messages
2016-01-25 18:57 ` Ingo Molnar
@ 2016-01-27 10:09 ` Thomas Gleixner
2016-01-29 13:21 ` Borislav Petkov
0 siblings, 1 reply; 35+ messages in thread
From: Thomas Gleixner @ 2016-01-27 10:09 UTC (permalink / raw)
To: Andy Lutomirski, Ingo Molnar
Cc: x86, linux-kernel, Borislav Petkov, Brian Gerst, Dave Hansen,
Linus Torvalds, Oleg Nesterov, linux-mm, Andrey Ryabinin
On Mon, 25 Jan 2016, Andy Lutomirski wrote:
> This is a straightforward speedup on Ivy Bridge and newer, IIRC.
> (I tested on Skylake. INVPCID is not available on Sandy Bridge.
> I don't have Ivy Bridge, Haswell or Broadwell to test on, so I
> could be wrong as to when the feature was introduced.)
Haswell and Broadwell have it. No idea about ivy bridge.
Thanks,
tglx
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: several messages
2016-01-27 10:09 ` several messages Thomas Gleixner
@ 2016-01-29 13:21 ` Borislav Petkov
0 siblings, 0 replies; 35+ messages in thread
From: Borislav Petkov @ 2016-01-29 13:21 UTC (permalink / raw)
To: Thomas Gleixner
Cc: Andy Lutomirski, Ingo Molnar, x86, linux-kernel, Brian Gerst,
Dave Hansen, Linus Torvalds, Oleg Nesterov, linux-mm,
Andrey Ryabinin
On Wed, Jan 27, 2016 at 11:09:04AM +0100, Thomas Gleixner wrote:
> On Mon, 25 Jan 2016, Andy Lutomirski wrote:
> > This is a straightforward speedup on Ivy Bridge and newer, IIRC.
> > (I tested on Skylake. INVPCID is not available on Sandy Bridge.
> > I don't have Ivy Bridge, Haswell or Broadwell to test on, so I
> > could be wrong as to when the feature was introduced.)
>
> Haswell and Broadwell have it. No idea about ivy bridge.
I have an IVB model 58. It doesn't have it:
CPUID_0x00000007: EAX=0x00000000, EBX=0x00000281, ECX=0x00000000, EDX=0x00000000
INVPCID should be EBX[10].
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
^ permalink raw reply [flat|nested] 35+ messages in thread
* [PATCH 00/13] Add VT-d Posted-Interrupts support for KVM
@ 2014-11-10 6:26 Feng Wu
2014-11-10 6:26 ` [PATCH 13/13] iommu/vt-d: Add a command line parameter for VT-d posted-interrupts Feng Wu
0 siblings, 1 reply; 35+ messages in thread
From: Feng Wu @ 2014-11-10 6:26 UTC (permalink / raw)
To: gleb, pbonzini, dwmw2, joro, tglx, mingo, hpa, x86
Cc: kvm, iommu, linux-kernel, Feng Wu
VT-d Posted-Interrupts is an enhancement to CPU side Posted-Interrupt.
With VT-d Posted-Interrupts enabled, external interrupts from
direct-assigned devices can be delivered to guests without VMM
intervention when guest is running in non-root mode.
You can find the VT-d Posted-Interrtups Spec. in the following URL:
http://www.intel.com/content/www/us/en/intelligent-systems/intel-technology/vt-directed-io-spec.html
Feng Wu (13):
iommu/vt-d: VT-d Posted-Interrupts feature detection
KVM: Initialize VT-d Posted-Interrtups Descriptor
KVM: Add KVM_CAP_PI to detect VT-d Posted-Interrtups
iommu/vt-d: Adjust 'struct irte' to better suit for VT-d
Posted-Interrupts
KVM: Update IRTE according to guest interrupt configuration changes
KVM: Add some helper functions for Posted-Interrupts
x86, irq: Define a global vector for VT-d Posted-Interrupts
KVM: Update Posted-Interrupts descriptor during VCPU scheduling
KVM: Change NDST field after VCPU scheduling
KVM: Add the handler for Wake-up Vector
KVM: Suppress posted-interrupt when 'SN' is set
iommu/vt-d: No need to migrating irq for VT-d Posted-Interrtups
iommu/vt-d: Add a command line parameter for VT-d posted-interrupts
arch/x86/include/asm/entry_arch.h | 2 +
arch/x86/include/asm/hardirq.h | 1 +
arch/x86/include/asm/hw_irq.h | 2 +
arch/x86/include/asm/irq_remapping.h | 7 +
arch/x86/include/asm/irq_vectors.h | 1 +
arch/x86/include/asm/kvm_host.h | 9 ++
arch/x86/kernel/apic/apic.c | 1 +
arch/x86/kernel/entry_64.S | 2 +
arch/x86/kernel/irq.c | 27 ++++
arch/x86/kernel/irqinit.c | 2 +
arch/x86/kvm/vmx.c | 257 +++++++++++++++++++++++++++++++++-
arch/x86/kvm/x86.c | 53 ++++++-
drivers/iommu/amd_iommu.c | 6 +
drivers/iommu/intel_irq_remapping.c | 83 +++++++++--
drivers/iommu/irq_remapping.c | 20 +++
drivers/iommu/irq_remapping.h | 8 +
include/linux/dmar.h | 30 ++++-
include/linux/intel-iommu.h | 1 +
include/linux/kvm_host.h | 25 ++++
include/uapi/linux/kvm.h | 2 +
virt/kvm/assigned-dev.c | 141 +++++++++++++++++++
virt/kvm/irq_comm.c | 4 +-
virt/kvm/irqchip.c | 11 --
virt/kvm/kvm_main.c | 14 ++
24 files changed, 667 insertions(+), 42 deletions(-)
^ permalink raw reply [flat|nested] 35+ messages in thread
* [PATCH 13/13] iommu/vt-d: Add a command line parameter for VT-d posted-interrupts
2014-11-10 6:26 [PATCH 00/13] Add VT-d Posted-Interrupts support for KVM Feng Wu
@ 2014-11-10 6:26 ` Feng Wu
2014-11-10 18:15 ` several messages Thomas Gleixner
0 siblings, 1 reply; 35+ messages in thread
From: Feng Wu @ 2014-11-10 6:26 UTC (permalink / raw)
To: gleb, pbonzini, dwmw2, joro, tglx, mingo, hpa, x86
Cc: kvm, iommu, linux-kernel, Feng Wu
Enable VT-d Posted-Interrtups and add a command line
parameter for it.
Signed-off-by: Feng Wu <feng.wu@intel.com>
---
drivers/iommu/irq_remapping.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/drivers/iommu/irq_remapping.c b/drivers/iommu/irq_remapping.c
index 0e36860..3cb9429 100644
--- a/drivers/iommu/irq_remapping.c
+++ b/drivers/iommu/irq_remapping.c
@@ -23,7 +23,7 @@ int irq_remap_broken;
int disable_sourceid_checking;
int no_x2apic_optout;
-int disable_irq_post = 1;
+int disable_irq_post = 0;
int irq_post_enabled = 0;
EXPORT_SYMBOL_GPL(irq_post_enabled);
@@ -206,6 +206,13 @@ static __init int setup_irqremap(char *str)
}
early_param("intremap", setup_irqremap);
+static __init int setup_nointpost(char *str)
+{
+ disable_irq_post = 1;
+ return 0;
+}
+early_param("nointpost", setup_nointpost);
+
void __init setup_irq_remapping_ops(void)
{
remap_ops = &intel_irq_remap_ops;
--
1.7.1
^ permalink raw reply related [flat|nested] 35+ messages in thread
* Re: several messages
2014-11-10 6:26 ` [PATCH 13/13] iommu/vt-d: Add a command line parameter for VT-d posted-interrupts Feng Wu
@ 2014-11-10 18:15 ` Thomas Gleixner
2014-11-11 2:28 ` Jiang Liu
0 siblings, 1 reply; 35+ messages in thread
From: Thomas Gleixner @ 2014-11-10 18:15 UTC (permalink / raw)
To: Feng Wu
Cc: gleb, pbonzini, David Woodhouse, joro, mingo, H. Peter Anvin,
x86, kvm, iommu, LKML, Jiang Liu
On Mon, 10 Nov 2014, Feng Wu wrote:
> VT-d Posted-Interrupts is an enhancement to CPU side Posted-Interrupt.
> With VT-d Posted-Interrupts enabled, external interrupts from
> direct-assigned devices can be delivered to guests without VMM
> intervention when guest is running in non-root mode.
Can you please talk to Jiang and synchronize your work with his
refactoring of the x86 interrupt handling subsystem.
I want this stuff cleaned up first before we add new stuff to it.
Thanks,
tglx
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: several messages
2014-11-10 18:15 ` several messages Thomas Gleixner
@ 2014-11-11 2:28 ` Jiang Liu
2014-11-11 6:37 ` Wu, Feng
0 siblings, 1 reply; 35+ messages in thread
From: Jiang Liu @ 2014-11-11 2:28 UTC (permalink / raw)
To: Thomas Gleixner, Feng Wu
Cc: gleb, pbonzini, David Woodhouse, joro, mingo, H. Peter Anvin,
x86, kvm, iommu, LKML
On 2014/11/11 2:15, Thomas Gleixner wrote:
> On Mon, 10 Nov 2014, Feng Wu wrote:
>
>> VT-d Posted-Interrupts is an enhancement to CPU side Posted-Interrupt.
>> With VT-d Posted-Interrupts enabled, external interrupts from
>> direct-assigned devices can be delivered to guests without VMM
>> intervention when guest is running in non-root mode.
>
> Can you please talk to Jiang and synchronize your work with his
> refactoring of the x86 interrupt handling subsystem.
>
> I want this stuff cleaned up first before we add new stuff to it.
Hi Thomas,
Just talked with Feng, we will focused on refactor first and
then add posted interrupt support.
Regards!
Gerry
>
> Thanks,
>
> tglx
>
^ permalink raw reply [flat|nested] 35+ messages in thread
* RE: several messages
2014-11-11 2:28 ` Jiang Liu
@ 2014-11-11 6:37 ` Wu, Feng
0 siblings, 0 replies; 35+ messages in thread
From: Wu, Feng @ 2014-11-11 6:37 UTC (permalink / raw)
To: Jiang Liu, Thomas Gleixner
Cc: gleb, pbonzini, David Woodhouse, joro, mingo, H. Peter Anvin,
x86, kvm, iommu, LKML
> -----Original Message-----
> From: Jiang Liu [mailto:jiang.liu@linux.intel.com]
> Sent: Tuesday, November 11, 2014 10:29 AM
> To: Thomas Gleixner; Wu, Feng
> Cc: gleb@kernel.org; pbonzini@redhat.com; David Woodhouse;
> joro@8bytes.org; mingo@redhat.com; H. Peter Anvin; x86@kernel.org;
> kvm@vger.kernel.org; iommu@lists.linux-foundation.org; LKML
> Subject: Re: several messages
>
> On 2014/11/11 2:15, Thomas Gleixner wrote:
> > On Mon, 10 Nov 2014, Feng Wu wrote:
> >
> >> VT-d Posted-Interrupts is an enhancement to CPU side Posted-Interrupt.
> >> With VT-d Posted-Interrupts enabled, external interrupts from
> >> direct-assigned devices can be delivered to guests without VMM
> >> intervention when guest is running in non-root mode.
> >
> > Can you please talk to Jiang and synchronize your work with his
> > refactoring of the x86 interrupt handling subsystem.
> >
> > I want this stuff cleaned up first before we add new stuff to it.
> Hi Thomas,
> Just talked with Feng, we will focused on refactor first and
> then add posted interrupt support.
> Regards!
> Gerry
No problem!
Thanks,
Feng
>
> >
> > Thanks,
> >
> > tglx
> >
^ permalink raw reply [flat|nested] 35+ messages in thread
* [PATCHv2] netfilter: add CHECKSUM target
@ 2010-07-11 15:06 Michael S. Tsirkin
2010-07-11 15:14 ` [PATCHv3] extensions: libxt_CHECKSUM extension Michael S. Tsirkin
0 siblings, 1 reply; 35+ messages in thread
From: Michael S. Tsirkin @ 2010-07-11 15:06 UTC (permalink / raw)
To: Patrick McHardy, Michael S. Tsirkin, David S. Miller,
Jan Engelhardt, Randy Dunlap, netfilter-devel, netfilter,
coreteam, linux-kernel, netdev, kvm, herbert
This adds a `CHECKSUM' target, which can be used in the iptables mangle
table.
You can use this target to compute and fill in the checksum in
a packet that lacks a checksum. This is particularly useful,
if you need to work around old applications such as dhcp clients,
that do not work well with checksum offloads, but don't want to
disable checksum offload in your device.
The problem happens in the field with virtualized applications.
For reference, see Red Hat bz 605555, as well as
http://www.spinics.net/lists/kvm/msg37660.html
Typical expected use (helps old dhclient binary running in a VM):
iptables -A POSTROUTING -t mangle -p udp --dport bootpc \
-j CHECKSUM --checksum-fill
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
Changes from v1:
moved from ipt to xt
get rid of any ipv4 dependencies
coding style tweaks
include/linux/netfilter/xt_CHECKSUM.h | 18 ++++++++
net/netfilter/Kconfig | 17 +++++++-
net/netfilter/Makefile | 1 +
net/netfilter/xt_CHECKSUM.c | 72 +++++++++++++++++++++++++++++++++
4 files changed, 107 insertions(+), 1 deletions(-)
create mode 100644 include/linux/netfilter/xt_CHECKSUM.h
create mode 100644 net/netfilter/xt_CHECKSUM.c
diff --git a/include/linux/netfilter/xt_CHECKSUM.h b/include/linux/netfilter/xt_CHECKSUM.h
new file mode 100644
index 0000000..56afe57
--- /dev/null
+++ b/include/linux/netfilter/xt_CHECKSUM.h
@@ -0,0 +1,18 @@
+/* Header file for iptables ipt_CHECKSUM target
+ *
+ * (C) 2002 by Harald Welte <laforge@gnumonks.org>
+ * (C) 2010 Red Hat Inc
+ * Author: Michael S. Tsirkin <mst@redhat.com>
+ *
+ * This software is distributed under GNU GPL v2, 1991
+*/
+#ifndef _IPT_CHECKSUM_TARGET_H
+#define _IPT_CHECKSUM_TARGET_H
+
+#define XT_CHECKSUM_OP_FILL 0x01 /* fill in checksum in IP header */
+
+struct xt_CHECKSUM_info {
+ u_int8_t operation; /* bitset of operations */
+};
+
+#endif /* _IPT_CHECKSUM_TARGET_H */
diff --git a/net/netfilter/Kconfig b/net/netfilter/Kconfig
index 8593a77..1cf4852 100644
--- a/net/netfilter/Kconfig
+++ b/net/netfilter/Kconfig
@@ -294,7 +294,7 @@ endif # NF_CONNTRACK
config NETFILTER_TPROXY
tristate "Transparent proxying support (EXPERIMENTAL)"
depends on EXPERIMENTAL
- depends on IP_NF_MANGLE
+ depends on IP_NF_MANGLE || IP6_NF_MANGLE
depends on NETFILTER_ADVANCED
help
This option enables transparent proxying support, that is,
@@ -347,6 +347,21 @@ config NETFILTER_XT_CONNMARK
comment "Xtables targets"
+config NETFILTER_XT_TARGET_CHECKSUM
+ tristate "CHECKSUM target support"
+ depends on NETFILTER_ADVANCED
+ ---help---
+ This option adds a `CHECKSUM' target, which can be used in the iptables mangle
+ table.
+
+ You can use this target to compute and fill in the checksum in
+ a packet that lacks a checksum. This is particularly useful,
+ if you need to work around old applications such as dhcp clients,
+ that do not work well with checksum offloads, but don't want to disable
+ checksum offload in your device.
+
+ To compile it as a module, choose M here. If unsure, say N.
+
config NETFILTER_XT_TARGET_CLASSIFY
tristate '"CLASSIFY" target support'
depends on NETFILTER_ADVANCED
diff --git a/net/netfilter/Makefile b/net/netfilter/Makefile
index 14e3a8f..8eb541d 100644
--- a/net/netfilter/Makefile
+++ b/net/netfilter/Makefile
@@ -45,6 +45,7 @@ obj-$(CONFIG_NETFILTER_XT_MARK) += xt_mark.o
obj-$(CONFIG_NETFILTER_XT_CONNMARK) += xt_connmark.o
# targets
+obj-$(CONFIG_NETFILTER_XT_TARGET_CHECKSUM) += xt_CHECKSUM.o
obj-$(CONFIG_NETFILTER_XT_TARGET_CLASSIFY) += xt_CLASSIFY.o
obj-$(CONFIG_NETFILTER_XT_TARGET_CONNSECMARK) += xt_CONNSECMARK.o
obj-$(CONFIG_NETFILTER_XT_TARGET_CT) += xt_CT.o
diff --git a/net/netfilter/xt_CHECKSUM.c b/net/netfilter/xt_CHECKSUM.c
new file mode 100644
index 0000000..0fee1a7
--- /dev/null
+++ b/net/netfilter/xt_CHECKSUM.c
@@ -0,0 +1,72 @@
+/* iptables module for the packet checksum mangling
+ *
+ * (C) 2002 by Harald Welte <laforge@netfilter.org>
+ * (C) 2010 Red Hat, Inc.
+ *
+ * Author: Michael S. Tsirkin <mst@redhat.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+#include <linux/in.h>
+#include <linux/module.h>
+#include <linux/skbuff.h>
+#include <linux/netdevice.h>
+
+#include <linux/netfilter/x_tables.h>
+#include <linux/netfilter/xt_CHECKSUM.h>
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Michael S. Tsirkin <mst@redhat.com>");
+MODULE_DESCRIPTION("Xtables: checksum modification");
+MODULE_ALIAS("ipt_CHECKSUM");
+MODULE_ALIAS("ip6t_CHECKSUM");
+
+static unsigned int
+checksum_tg(struct sk_buff *skb, const struct xt_action_param *par)
+{
+ if (skb->ip_summed == CHECKSUM_PARTIAL)
+ skb_checksum_help(skb);
+
+ return XT_CONTINUE;
+}
+
+static int checksum_tg_check(const struct xt_tgchk_param *par)
+{
+ const struct xt_CHECKSUM_info *einfo = par->targinfo;
+
+ if (einfo->operation & ~XT_CHECKSUM_OP_FILL) {
+ pr_info("unsupported CHECKSUM operation %x\n", einfo->operation);
+ return -EINVAL;
+ }
+ if (!einfo->operation) {
+ pr_info("no CHECKSUM operation enabled\n");
+ return -EINVAL;
+ }
+ return 0;
+}
+
+static struct xt_target checksum_tg_reg __read_mostly = {
+ .name = "CHECKSUM",
+ .family = NFPROTO_UNSPEC,
+ .target = checksum_tg,
+ .targetsize = sizeof(struct xt_CHECKSUM_info),
+ .table = "mangle",
+ .checkentry = checksum_tg_check,
+ .me = THIS_MODULE,
+};
+
+static int __init checksum_tg_init(void)
+{
+ return xt_register_target(&checksum_tg_reg);
+}
+
+static void __exit checksum_tg_exit(void)
+{
+ xt_unregister_target(&checksum_tg_reg);
+}
+
+module_init(checksum_tg_init);
+module_exit(checksum_tg_exit);
--
1.7.2.rc0.14.g41c1c
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [PATCHv3] extensions: libxt_CHECKSUM extension
2010-07-11 15:06 [PATCHv2] netfilter: add CHECKSUM target Michael S. Tsirkin
@ 2010-07-11 15:14 ` Michael S. Tsirkin
2010-07-15 9:39 ` Patrick McHardy
0 siblings, 1 reply; 35+ messages in thread
From: Michael S. Tsirkin @ 2010-07-11 15:14 UTC (permalink / raw)
To: Patrick McHardy, David S. Miller, Jan Engelhardt, Randy Dunlap,
netfilter-devel, netfilter, coreteam, linux-kernel, netdev, kvm,
herbert
This adds a `CHECKSUM' target, which can be used in the iptables mangle
table.
You can use this target to compute and fill in the checksum in
a packet that lacks a checksum. This is particularly useful,
if you need to work around old applications such as dhcp clients,
that do not work well with checksum offloads, but don't want to disable
checksum offload in your device.
The problem happens in the field with virtualized applications.
For reference, see Red Hat bz 605555, as well as
http://www.spinics.net/lists/kvm/msg37660.html
Typical expected use (helps old dhclient binary running in a VM):
iptables -A POSTROUTING -t mangle -p udp --dport bootpc \
-j CHECKSUM --checksum-fill
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
Correction in the documentation. Sorry about the noise.
Changes from v2:
updated man file
Changes from v1:
switched from ipt to xt
extensions/libxt_CHECKSUM.c | 99 +++++++++++++++++++++++++++++++++++++++++
extensions/libxt_CHECKSUM.man | 8 +++
2 files changed, 107 insertions(+), 0 deletions(-)
create mode 100644 extensions/libxt_CHECKSUM.c
create mode 100644 extensions/libxt_CHECKSUM.man
diff --git a/extensions/libxt_CHECKSUM.c b/extensions/libxt_CHECKSUM.c
new file mode 100644
index 0000000..00fbd8f
--- /dev/null
+++ b/extensions/libxt_CHECKSUM.c
@@ -0,0 +1,99 @@
+/* Shared library add-on to xtables for CHECKSUM
+ *
+ * (C) 2002 by Harald Welte <laforge@gnumonks.org>
+ * (C) 2010 by Red Hat, Inc
+ * Author: Michael S. Tsirkin <mst@redhat.com>
+ *
+ * This program is distributed under the terms of GNU GPL v2, 1991
+ *
+ * libxt_CHECKSUM.c borrowed some bits from libipt_ECN.c
+ *
+ * $Id$
+ */
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <getopt.h>
+
+#include <xtables.h>
+#include <linux/netfilter/xt_CHECKSUM.h>
+
+static void CHECKSUM_help(void)
+{
+ printf(
+"CHECKSUM target options\n"
+" --checksum-fill Fill in packet checksum.\n");
+}
+
+static const struct option CHECKSUM_opts[] = {
+ { "checksum-fill", 0, NULL, 'F' },
+ { .name = NULL }
+};
+
+static int CHECKSUM_parse(int c, char **argv, int invert, unsigned int *flags,
+ const void *entry, struct xt_entry_target **target)
+{
+ struct xt_CHECKSUM_info *einfo
+ = (struct xt_CHECKSUM_info *)(*target)->data;
+
+ switch (c) {
+ case 'F':
+ if (*flags)
+ xtables_error(PARAMETER_PROBLEM,
+ "CHECKSUM target: Only use --checksum-fill ONCE!");
+ einfo->operation = XT_CHECKSUM_OP_FILL;
+ *flags |= XT_CHECKSUM_OP_FILL;
+ break;
+ default:
+ return 0;
+ }
+
+ return 1;
+}
+
+static void CHECKSUM_check(unsigned int flags)
+{
+ if (!flags)
+ xtables_error(PARAMETER_PROBLEM,
+ "CHECKSUM target: Parameter --checksum-fill is required");
+}
+
+static void CHECKSUM_print(const void *ip, const struct xt_entry_target *target,
+ int numeric)
+{
+ const struct xt_CHECKSUM_info *einfo =
+ (const struct xt_CHECKSUM_info *)target->data;
+
+ printf("CHECKSUM ");
+
+ if (einfo->operation & XT_CHECKSUM_OP_FILL)
+ printf("fill ");
+}
+
+static void CHECKSUM_save(const void *ip, const struct xt_entry_target *target)
+{
+ const struct xt_CHECKSUM_info *einfo =
+ (const struct xt_CHECKSUM_info *)target->data;
+
+ if (einfo->operation & XT_CHECKSUM_OP_FILL)
+ printf("--checksum-fill ");
+}
+
+static struct xtables_target checksum_tg_reg = {
+ .name = "CHECKSUM",
+ .version = XTABLES_VERSION,
+ .family = NFPROTO_UNSPEC,
+ .size = XT_ALIGN(sizeof(struct xt_CHECKSUM_info)),
+ .userspacesize = XT_ALIGN(sizeof(struct xt_CHECKSUM_info)),
+ .help = CHECKSUM_help,
+ .parse = CHECKSUM_parse,
+ .final_check = CHECKSUM_check,
+ .print = CHECKSUM_print,
+ .save = CHECKSUM_save,
+ .extra_opts = CHECKSUM_opts,
+};
+
+void _init(void)
+{
+ xtables_register_target(&checksum_tg_reg);
+}
diff --git a/extensions/libxt_CHECKSUM.man b/extensions/libxt_CHECKSUM.man
new file mode 100644
index 0000000..92ae700
--- /dev/null
+++ b/extensions/libxt_CHECKSUM.man
@@ -0,0 +1,8 @@
+This target allows to selectively work around broken/old applications.
+It can only be used in the mangle table.
+.TP
+\fB\-\-checksum\-fill\fP
+Compute and fill in the checksum in a packet that lacks a checksum.
+This is particularly useful, if you need to work around old applications
+such as dhcp clients, that do not work well with checksum offloads,
+but don't want to disable checksum offload in your device.
--
1.7.2.rc0.14.g41c1c
^ permalink raw reply related [flat|nested] 35+ messages in thread
* Re: [PATCHv3] extensions: libxt_CHECKSUM extension
2010-07-11 15:14 ` [PATCHv3] extensions: libxt_CHECKSUM extension Michael S. Tsirkin
@ 2010-07-15 9:39 ` Patrick McHardy
2010-07-15 10:17 ` several messages Jan Engelhardt
0 siblings, 1 reply; 35+ messages in thread
From: Patrick McHardy @ 2010-07-15 9:39 UTC (permalink / raw)
To: Michael S. Tsirkin
Cc: David S. Miller, Jan Engelhardt, Randy Dunlap, netfilter-devel,
netfilter, coreteam, linux-kernel, netdev, kvm, herbert
Am 11.07.2010 17:14, schrieb Michael S. Tsirkin:
> diff --git a/extensions/libxt_CHECKSUM.c b/extensions/libxt_CHECKSUM.c
> new file mode 100644
> index 0000000..00fbd8f
> --- /dev/null
> +++ b/extensions/libxt_CHECKSUM.c
> @@ -0,0 +1,99 @@
> +/* Shared library add-on to xtables for CHECKSUM
> + *
> + * (C) 2002 by Harald Welte <laforge@gnumonks.org>
> + * (C) 2010 by Red Hat, Inc
> + * Author: Michael S. Tsirkin <mst@redhat.com>
> + *
> + * This program is distributed under the terms of GNU GPL v2, 1991
> + *
> + * libxt_CHECKSUM.c borrowed some bits from libipt_ECN.c
> + *
> + * $Id$
Please no CVS IDs.
> + */
> +#include <stdio.h>
> +#include <string.h>
> +#include <stdlib.h>
> +#include <getopt.h>
> +
> +#include <xtables.h>
> +#include <linux/netfilter/xt_CHECKSUM.h>
> +
> +static void CHECKSUM_help(void)
> +{
> + printf(
> +"CHECKSUM target options\n"
> +" --checksum-fill Fill in packet checksum.\n");
> +}
> +
> +static const struct option CHECKSUM_opts[] = {
> + { "checksum-fill", 0, NULL, 'F' },
> + { .name = NULL }
> +};
> +
> +static int CHECKSUM_parse(int c, char **argv, int invert, unsigned int *flags,
> + const void *entry, struct xt_entry_target **target)
> +{
> + struct xt_CHECKSUM_info *einfo
> + = (struct xt_CHECKSUM_info *)(*target)->data;
> +
> + switch (c) {
> + case 'F':
> + if (*flags)
> + xtables_error(PARAMETER_PROBLEM,
> + "CHECKSUM target: Only use --checksum-fill ONCE!");
There is a helper function called xtables_param_act for checking double
arguments and printing a standarized error message.
> + einfo->operation = XT_CHECKSUM_OP_FILL;
> + *flags |= XT_CHECKSUM_OP_FILL;
> + break;
> + default:
> + return 0;
> + }
> +
> + return 1;
> +}
> +
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: several messages
2010-07-15 9:39 ` Patrick McHardy
@ 2010-07-15 10:17 ` Jan Engelhardt
0 siblings, 0 replies; 35+ messages in thread
From: Jan Engelhardt @ 2010-07-15 10:17 UTC (permalink / raw)
To: Patrick McHardy
Cc: Michael S. Tsirkin, David S. Miller, Randy Dunlap,
netfilter-devel, netfilter, coreteam, linux-kernel, netdev, kvm,
herbert
On Thursday 2010-07-15 11:36, Patrick McHardy wrote:
>> +struct xt_CHECKSUM_info {
>> + u_int8_t operation; /* bitset of operations */
>
>Please use __u8 in public header files.
>
>> +#include <linux/in.h>
>
>Do you really need in.h?
>
>> + * $Id$
>
>Please no CVS IDs.
>
>> + switch (c) {
>> + case 'F':
>> + if (*flags)
>> + xtables_error(PARAMETER_PROBLEM,
>> + "CHECKSUM target: Only use --checksum-fill ONCE!");
>
>There is a helper function called xtables_param_act for checking double
>arguments and printing a standarized error message.
I took care of these for Xt-a.
^ permalink raw reply [flat|nested] 35+ messages in thread
* [PATCH 0/1] HID: hid_apple is not used for apple alu wireless keyboards
@ 2008-11-26 14:33 Jan Scholz
2008-11-26 14:33 ` [PATCH 1/1] HID: Apple alu wireless keyboards are bluetooth devices Jan Scholz
0 siblings, 1 reply; 35+ messages in thread
From: Jan Scholz @ 2008-11-26 14:33 UTC (permalink / raw)
To: jkosina; +Cc: jirislaby, linux-kernel, Jan Scholz
Hi Jiri,
While parsing 'hid_blacklist' in hid-core.c my apple alu wireless
keyboard is not found. This happens because in the blacklist it
is declared with HID_USB_DEVICE although the keyboards are really
bluetooth devices. The same holds for 'apple_devices' list in
hid-apple.c
This patch fixes it by changing HID_USB_DEVICE to
HID_BLUETOOTH_DEVICE in those two lists.
Jan Scholz (1):
HID: Apple alu wireless keyboards are bluetooth devices
drivers/hid/hid-apple.c | 6 +++---
drivers/hid/hid-core.c | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
^ permalink raw reply [flat|nested] 35+ messages in thread
* [PATCH 1/1] HID: Apple alu wireless keyboards are bluetooth devices
2008-11-26 14:33 [PATCH 0/1] HID: hid_apple is not used for apple alu wireless keyboards Jan Scholz
@ 2008-11-26 14:33 ` Jan Scholz
2008-11-26 14:54 ` Jiri Kosina
0 siblings, 1 reply; 35+ messages in thread
From: Jan Scholz @ 2008-11-26 14:33 UTC (permalink / raw)
To: jkosina; +Cc: jirislaby, linux-kernel, Jan Scholz
Changed HID_USB_DEVICE to HID_BLUETOOTH_DEVICE for the apple alu
wireless keyboards
Signed-off-by: Jan Scholz <Scholz@fias.uni-frankfurt.de>
---
drivers/hid/hid-apple.c | 6 +++---
drivers/hid/hid-core.c | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
index 9b97795..aa28aed 100644
--- a/drivers/hid/hid-apple.c
+++ b/drivers/hid/hid-apple.c
@@ -400,12 +400,12 @@ static const struct hid_device_id apple_devices[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_JIS),
.driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN |
APPLE_RDESC_JIS },
- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI),
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI),
.driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO),
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO),
.driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN |
APPLE_ISO_KEYBOARD },
- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS),
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS),
.driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_ANSI),
.driver_data = APPLE_HAS_FN },
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 147ec59..98c7e2d 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1241,9 +1241,9 @@ static const struct hid_device_id hid_blacklist[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_ANSI) },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_ISO) },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_JIS) },
- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI) },
- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO) },
- { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS) },
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI) },
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO) },
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS) },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_ANSI) },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_ISO) },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_JIS) },
--
1.6.0.4
^ permalink raw reply related [flat|nested] 35+ messages in thread
* Re: [PATCH 1/1] HID: Apple alu wireless keyboards are bluetooth devices
2008-11-26 14:33 ` [PATCH 1/1] HID: Apple alu wireless keyboards are bluetooth devices Jan Scholz
@ 2008-11-26 14:54 ` Jiri Kosina
2008-11-26 15:17 ` Jan Scholz
0 siblings, 1 reply; 35+ messages in thread
From: Jiri Kosina @ 2008-11-26 14:54 UTC (permalink / raw)
To: Jan Scholz; +Cc: jirislaby, linux-kernel
On Wed, 26 Nov 2008, Jan Scholz wrote:
> Changed HID_USB_DEVICE to HID_BLUETOOTH_DEVICE for the apple alu
> wireless keyboards
> Signed-off-by: Jan Scholz <Scholz@fias.uni-frankfurt.de>
> ---
> drivers/hid/hid-apple.c | 6 +++---
> drivers/hid/hid-core.c | 6 +++---
> 2 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
> index 9b97795..aa28aed 100644
> --- a/drivers/hid/hid-apple.c
> +++ b/drivers/hid/hid-apple.c
> @@ -400,12 +400,12 @@ static const struct hid_device_id apple_devices[] = {
> { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_JIS),
> .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN |
> APPLE_RDESC_JIS },
> - { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI),
> + { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI),
> .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
> - { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO),
> + { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO),
> .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN |
> APPLE_ISO_KEYBOARD },
> - { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS),
> + { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS),
> .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
> { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_ANSI),
> .driver_data = APPLE_HAS_FN },
Hi Jan,
shouldn't we rather have both USB and Bluetooth variants?
Thanks,
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 1/1] HID: Apple alu wireless keyboards are bluetooth devices
2008-11-26 14:54 ` Jiri Kosina
@ 2008-11-26 15:17 ` Jan Scholz
2008-11-26 15:33 ` Jiri Kosina
0 siblings, 1 reply; 35+ messages in thread
From: Jan Scholz @ 2008-11-26 15:17 UTC (permalink / raw)
To: Jiri Kosina; +Cc: Jan Scholz, jirislaby, linux-kernel
Jiri Kosina <jkosina@suse.cz> writes:
> On Wed, 26 Nov 2008, Jan Scholz wrote:
>
>> Changed HID_USB_DEVICE to HID_BLUETOOTH_DEVICE for the apple alu
>> wireless keyboards
>> Signed-off-by: Jan Scholz <Scholz@fias.uni-frankfurt.de>
>> ---
>> drivers/hid/hid-apple.c | 6 +++---
>> drivers/hid/hid-core.c | 6 +++---
>> 2 files changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
>> index 9b97795..aa28aed 100644
>> --- a/drivers/hid/hid-apple.c
>> +++ b/drivers/hid/hid-apple.c
>> @@ -400,12 +400,12 @@ static const struct hid_device_id apple_devices[] = {
>> { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_JIS),
>> .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN |
>> APPLE_RDESC_JIS },
>> - { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI),
>> + { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI),
>> .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
>> - { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO),
>> + { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO),
>> .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN |
>> APPLE_ISO_KEYBOARD },
>> - { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS),
>> + { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS),
>> .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
>> { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_ANSI),
>> .driver_data = APPLE_HAS_FN },
>
> Hi Jan,
>
> shouldn't we rather have both USB and Bluetooth variants?
>
> Thanks,
Hi Jiri,
Hm, I thought the USB_DEVICE_ID_APPLE_ALU_{ANSI,ISO,JIS} were apples usb
aluminum keyboards (standard desktop size), while the
USB_DEVICE_ID_APPLE_ALU_WIRELESS_{ANSI,ISO,JIS} ones were the aluminum
bluetooth keyboards (notebook sized, no numeric keypad, etc).
The one I own is a USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO, german layout,
with bluetooth, unfortunately I don't have access to a usb variant.
Jan
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 1/1] HID: Apple alu wireless keyboards are bluetooth devices
2008-11-26 15:17 ` Jan Scholz
@ 2008-11-26 15:33 ` Jiri Kosina
2008-11-26 21:06 ` Tobias Müller
0 siblings, 1 reply; 35+ messages in thread
From: Jiri Kosina @ 2008-11-26 15:33 UTC (permalink / raw)
To: Jan Scholz, Tobias Mueller; +Cc: jirislaby, linux-kernel
On Wed, 26 Nov 2008, Jan Scholz wrote:
> Jiri Kosina <jkosina@suse.cz> writes:
>
> > On Wed, 26 Nov 2008, Jan Scholz wrote:
> >
> >> Changed HID_USB_DEVICE to HID_BLUETOOTH_DEVICE for the apple alu
> >> wireless keyboards
> >> Signed-off-by: Jan Scholz <Scholz@fias.uni-frankfurt.de>
> >> ---
> >> drivers/hid/hid-apple.c | 6 +++---
> >> drivers/hid/hid-core.c | 6 +++---
> >> 2 files changed, 6 insertions(+), 6 deletions(-)
> >>
> >> diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
> >> index 9b97795..aa28aed 100644
> >> --- a/drivers/hid/hid-apple.c
> >> +++ b/drivers/hid/hid-apple.c
> >> @@ -400,12 +400,12 @@ static const struct hid_device_id apple_devices[] = {
> >> { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_JIS),
> >> .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN |
> >> APPLE_RDESC_JIS },
> >> - { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI),
> >> + { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI),
> >> .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
> >> - { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO),
> >> + { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO),
> >> .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN |
> >> APPLE_ISO_KEYBOARD },
> >> - { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS),
> >> + { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS),
> >> .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
> >> { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_ANSI),
> >> .driver_data = APPLE_HAS_FN },
> >
> > Hi Jan,
> >
> > shouldn't we rather have both USB and Bluetooth variants?
> >
> > Thanks,
>
> Hi Jiri,
>
> Hm, I thought the USB_DEVICE_ID_APPLE_ALU_{ANSI,ISO,JIS} were apples usb
> aluminum keyboards (standard desktop size), while the
> USB_DEVICE_ID_APPLE_ALU_WIRELESS_{ANSI,ISO,JIS} ones were the aluminum
> bluetooth keyboards (notebook sized, no numeric keypad, etc).
>
> The one I own is a USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO, german layout,
> with bluetooth, unfortunately I don't have access to a usb variant.
Tobias Mueller added these device IDs, so persumably he has tested it and
could provide some insight. I don't have the hardware myself, so I have no
idea whether there are only Bluetooht variants, or even USB are available.
Tobias?
Thanks,
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [PATCH 1/1] HID: Apple alu wireless keyboards are bluetooth devices
2008-11-26 15:33 ` Jiri Kosina
@ 2008-11-26 21:06 ` Tobias Müller
2008-11-27 0:57 ` several messages Jiri Kosina
0 siblings, 1 reply; 35+ messages in thread
From: Tobias Müller @ 2008-11-26 21:06 UTC (permalink / raw)
To: Jiri Kosina; +Cc: Jan Scholz, Tobias Mueller, jirislaby, linux-kernel
>> The one I own is a USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO, german layout,
>> with bluetooth, unfortunately I don't have access to a usb variant.
>
> Tobias Mueller added these device IDs, so persumably he has tested it and
> could provide some insight. I don't have the hardware myself, so I have no
> idea whether there are only Bluetooht variants, or even USB are available.
>
> Tobias?
I own the USB variant and these are the right id for that. The wireless
IDs were from another patch I merged together with mine. I don't have a
wireless version.
Regards
Tobias
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: several messages
2008-11-26 21:06 ` Tobias Müller
@ 2008-11-27 0:57 ` Jiri Kosina
0 siblings, 0 replies; 35+ messages in thread
From: Jiri Kosina @ 2008-11-27 0:57 UTC (permalink / raw)
To: J.R. Mauro, Tobias Müller; +Cc: Jan Scholz, jirislaby, linux-kernel
[-- Attachment #1: Type: TEXT/PLAIN, Size: 406 bytes --]
On Wed, 26 Nov 2008, J.R. Mauro wrote:
> There is one bluetooth model and one USB model.
On Wed, 26 Nov 2008, Tobias Müller wrote:
> I own the USB variant and these are the right id for that. The wireless
> IDs were from another patch I merged together with mine. I don't have a
> wireless version.
OK, so therefore you confirm that Jan's patch is OK, right?
Thanks a lot,
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 35+ messages in thread
* [PATCH 1/2] HID: add hid_type
@ 2008-10-19 14:15 Jiri Slaby
2008-10-19 14:15 ` [PATCH 2/2] HID: fix appletouch regression Jiri Slaby
0 siblings, 1 reply; 35+ messages in thread
From: Jiri Slaby @ 2008-10-19 14:15 UTC (permalink / raw)
To: jkosina
Cc: linux-input, linux-kernel, Steven Noonan, Justin Mattock,
Sven Anders, Marcel Holtmann, linux-bluetooth, Jiri Slaby
Add type to the hid structure to distinguish to which device type
(mouse/kbd) we are talking to. Needed for per device type ignore
list support.
Note: this patch leaves the type as unknown for bluetooth devices,
there is not support for this in the hidp code.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
drivers/hid/usbhid/hid-core.c | 8 ++++++++
include/linux/hid.h | 7 +++++++
2 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c
index 1d3b8a3..20617d8 100644
--- a/drivers/hid/usbhid/hid-core.c
+++ b/drivers/hid/usbhid/hid-core.c
@@ -972,6 +972,14 @@ static int hid_probe(struct usb_interface *intf, const struct usb_device_id *id)
hid->vendor = le16_to_cpu(dev->descriptor.idVendor);
hid->product = le16_to_cpu(dev->descriptor.idProduct);
hid->name[0] = 0;
+ switch (intf->cur_altsetting->desc.bInterfaceProtocol) {
+ case USB_INTERFACE_PROTOCOL_KEYBOARD:
+ hid->type = HID_TYPE_KEYBOARD;
+ break;
+ case USB_INTERFACE_PROTOCOL_MOUSE:
+ hid->type = HID_TYPE_MOUSE;
+ break;
+ }
if (dev->manufacturer)
strlcpy(hid->name, dev->manufacturer, sizeof(hid->name));
diff --git a/include/linux/hid.h b/include/linux/hid.h
index f13bca2..36a3953 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -417,6 +417,12 @@ struct hid_input {
struct input_dev *input;
};
+enum hid_type {
+ HID_TYPE_UNKNOWN = 0,
+ HID_TYPE_MOUSE,
+ HID_TYPE_KEYBOARD
+};
+
struct hid_driver;
struct hid_ll_driver;
@@ -431,6 +437,7 @@ struct hid_device { /* device report descriptor */
__u32 vendor; /* Vendor ID */
__u32 product; /* Product ID */
__u32 version; /* HID version */
+ enum hid_type type; /* device type (mouse, kbd, ...) */
unsigned country; /* HID country */
struct hid_report_enum report_enum[HID_REPORT_TYPES];
--
1.6.0.2
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [PATCH 2/2] HID: fix appletouch regression
2008-10-19 14:15 [PATCH 1/2] HID: add hid_type Jiri Slaby
@ 2008-10-19 14:15 ` Jiri Slaby
2008-10-19 19:40 ` several messages Jiri Kosina
0 siblings, 1 reply; 35+ messages in thread
From: Jiri Slaby @ 2008-10-19 14:15 UTC (permalink / raw)
To: jkosina
Cc: linux-input, linux-kernel, Steven Noonan, Justin Mattock,
Sven Anders, Marcel Holtmann, linux-bluetooth, Jiri Slaby
The appletouch mouse devices are grabbed by the hid bus and not
released even if apple driver says ENODEV (as expected).
Move the ignoration one level upper to deny the hid layer to grab
the device and return error to the usb hid which, as a result,
releases the device.
Otherwise input/mouse/appletouch and others needn't be attached.
Reported-by: Justin Mattock <justinmattock@gmail.com>
Reported-by: Steven Noonan <steven@uplinklabs.net>
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
drivers/hid/hid-apple.c | 63 ++++++++++++++++------------------------------
drivers/hid/hid-core.c | 33 ++++++++++++++++++++++++
2 files changed, 55 insertions(+), 41 deletions(-)
diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
index fd7f896..c6ab4ba 100644
--- a/drivers/hid/hid-apple.c
+++ b/drivers/hid/hid-apple.c
@@ -312,13 +312,6 @@ static int apple_probe(struct hid_device *hdev,
unsigned int connect_mask = HID_CONNECT_DEFAULT;
int ret;
- /* return something else or move to hid layer? device will reside
- allocated */
- if (id->bus == BUS_USB && (quirks & APPLE_IGNORE_MOUSE) &&
- to_usb_interface(hdev->dev.parent)->cur_altsetting->
- desc.bInterfaceProtocol == USB_INTERFACE_PROTOCOL_MOUSE)
- return -ENODEV;
-
asc = kzalloc(sizeof(*asc), GFP_KERNEL);
if (asc == NULL) {
dev_err(&hdev->dev, "can't alloc apple descriptor\n");
@@ -367,38 +360,32 @@ static const struct hid_device_id apple_devices[] = {
.driver_data = APPLE_MIGHTYMOUSE | APPLE_INVERT_HWHEEL },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ANSI),
- .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN |
- APPLE_IGNORE_MOUSE },
+ .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ISO),
- .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN |
- APPLE_IGNORE_MOUSE },
+ .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ANSI),
- .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN |
- APPLE_IGNORE_MOUSE },
+ .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ISO),
.driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN |
- APPLE_IGNORE_MOUSE | APPLE_ISO_KEYBOARD },
+ APPLE_ISO_KEYBOARD },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_JIS),
- .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN |
- APPLE_IGNORE_MOUSE },
+ .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ANSI),
- .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN |
- APPLE_IGNORE_MOUSE },
+ .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ISO),
.driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN |
- APPLE_IGNORE_MOUSE | APPLE_ISO_KEYBOARD },
+ APPLE_ISO_KEYBOARD },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_JIS),
.driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN |
- APPLE_IGNORE_MOUSE | APPLE_RDESC_JIS },
+ APPLE_RDESC_JIS },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ANSI),
- .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN |
- APPLE_IGNORE_MOUSE },
+ .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ISO),
.driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN |
- APPLE_IGNORE_MOUSE | APPLE_ISO_KEYBOARD },
+ APPLE_ISO_KEYBOARD },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_JIS),
.driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN |
- APPLE_IGNORE_MOUSE | APPLE_RDESC_JIS},
+ APPLE_RDESC_JIS },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_ANSI),
.driver_data = APPLE_HAS_FN },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_ISO),
@@ -406,14 +393,12 @@ static const struct hid_device_id apple_devices[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_JIS),
.driver_data = APPLE_HAS_FN },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_ANSI),
- .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN |
- APPLE_IGNORE_MOUSE },
+ .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_ISO),
- .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN |
- APPLE_IGNORE_MOUSE },
+ .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_JIS),
.driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN |
- APPLE_IGNORE_MOUSE | APPLE_RDESC_JIS },
+ APPLE_RDESC_JIS },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI),
.driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO),
@@ -422,25 +407,21 @@ static const struct hid_device_id apple_devices[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS),
.driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_ANSI),
- .driver_data = APPLE_HAS_FN | APPLE_IGNORE_MOUSE },
+ .driver_data = APPLE_HAS_FN },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_ISO),
- .driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD |
- APPLE_IGNORE_MOUSE },
+ .driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_JIS),
- .driver_data = APPLE_HAS_FN | APPLE_IGNORE_MOUSE | APPLE_RDESC_JIS },
+ .driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_ANSI),
- .driver_data = APPLE_HAS_FN | APPLE_IGNORE_MOUSE },
+ .driver_data = APPLE_HAS_FN },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_ISO),
- .driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD |
- APPLE_IGNORE_MOUSE },
+ .driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_JIS),
- .driver_data = APPLE_HAS_FN | APPLE_IGNORE_MOUSE | APPLE_RDESC_JIS },
+ .driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY),
- .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN |
- APPLE_IGNORE_MOUSE },
+ .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY),
- .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN |
- APPLE_IGNORE_MOUSE },
+ .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
/* Apple wireless Mighty Mouse */
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, 0x030c),
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 8a7d9db..90bdc6f 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1539,6 +1539,35 @@ static const struct hid_device_id hid_ignore_list[] = {
{ }
};
+/**
+ * hid_mouse_ignore_list - mouse devices which must not be held by the hid layer
+ */
+static const struct hid_device_id hid_mouse_ignore_list[] = {
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ANSI) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ISO) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ANSI) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ISO) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_JIS) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ANSI) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ISO) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_JIS) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ANSI) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ISO) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_JIS) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_ANSI) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_ISO) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_HF_JIS) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_ANSI) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_ISO) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_JIS) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_ANSI) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_ISO) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_JIS) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) },
+ { }
+};
+
static bool hid_ignore(struct hid_device *hdev)
{
switch (hdev->vendor) {
@@ -1555,6 +1584,10 @@ static bool hid_ignore(struct hid_device *hdev)
break;
}
+ if (hdev->type == HID_TYPE_MOUSE &&
+ hid_match_id(hdev, hid_mouse_ignore_list))
+ return true;
+
return !!hid_match_id(hdev, hid_ignore_list);
}
--
1.6.0.2
^ permalink raw reply related [flat|nested] 35+ messages in thread
* Re: several messages
2008-10-19 14:15 ` [PATCH 2/2] HID: fix appletouch regression Jiri Slaby
@ 2008-10-19 19:40 ` Jiri Kosina
2008-10-19 20:06 ` Justin Mattock
2008-10-19 22:09 ` Jiri Slaby
0 siblings, 2 replies; 35+ messages in thread
From: Jiri Kosina @ 2008-10-19 19:40 UTC (permalink / raw)
To: Jiri Slaby
Cc: linux-input, linux-kernel, Steven Noonan, Justin Mattock,
Sven Anders, Marcel Holtmann, linux-bluetooth
On Sun, 19 Oct 2008, Jiri Slaby wrote:
> +enum hid_type {
> + HID_TYPE_UNKNOWN = 0,
> + HID_TYPE_MOUSE,
> + HID_TYPE_KEYBOARD
> +};
> +
Do we really need the HID_TYPE_KEYBOARD at all? It's not used anywhere in
the code. I'd propose to add it when it is actually needed. I.e. have the
enum contain something like HID_TYPE_MOUSE HID_TYPE_OTHER for now, and add
whatever will become necessary in the future, what do you think?
On Sun, 19 Oct 2008, Jiri Slaby wrote:
> +/**
> + * hid_mouse_ignore_list - mouse devices which must not be held by the hid layer
> + */
I think a more descriptive comment would be appropriate here. It might not
be obvious on the first sight why this needs to be done separately from
the generic hid_blacklist. I.e. something like
/**
* There are composite devices for which we want to ignore only a certain
* interface. This is a list of devices for which only the mouse interface
* will be ignored.
*/
maybe?
Thanks,
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: several messages
2008-10-19 19:40 ` several messages Jiri Kosina
@ 2008-10-19 20:06 ` Justin Mattock
2008-10-19 22:09 ` Jiri Slaby
1 sibling, 0 replies; 35+ messages in thread
From: Justin Mattock @ 2008-10-19 20:06 UTC (permalink / raw)
To: Jiri Kosina
Cc: Jiri Slaby, linux-input, linux-kernel, Steven Noonan,
Sven Anders, Marcel Holtmann, linux-bluetooth
On Sun, Oct 19, 2008 at 12:40 PM, Jiri Kosina <jkosina@suse.cz> wrote:
> On Sun, 19 Oct 2008, Jiri Slaby wrote:
>
>> +enum hid_type {
>> + HID_TYPE_UNKNOWN = 0,
>> + HID_TYPE_MOUSE,
>> + HID_TYPE_KEYBOARD
>> +};
>> +
>
> Do we really need the HID_TYPE_KEYBOARD at all? It's not used anywhere in
> the code. I'd propose to add it when it is actually needed. I.e. have the
> enum contain something like HID_TYPE_MOUSE HID_TYPE_OTHER for now, and add
> whatever will become necessary in the future, what do you think?
>
>
> On Sun, 19 Oct 2008, Jiri Slaby wrote:
>
>> +/**
>> + * hid_mouse_ignore_list - mouse devices which must not be held by the hid layer
>> + */
>
> I think a more descriptive comment would be appropriate here. It might not
> be obvious on the first sight why this needs to be done separately from
> the generic hid_blacklist. I.e. something like
>
> /**
> * There are composite devices for which we want to ignore only a certain
> * interface. This is a list of devices for which only the mouse interface
> * will be ignored.
> */
>
> maybe?
>
> Thanks,
>
> --
> Jiri Kosina
> SUSE Labs
>
I can agree with that, whats the point having something
there if it not being used,(just eating up precious space);
--
Justin P. Mattock
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: several messages
2008-10-19 19:40 ` several messages Jiri Kosina
2008-10-19 20:06 ` Justin Mattock
@ 2008-10-19 22:09 ` Jiri Slaby
1 sibling, 0 replies; 35+ messages in thread
From: Jiri Slaby @ 2008-10-19 22:09 UTC (permalink / raw)
To: Jiri Kosina
Cc: linux-input, linux-kernel, Steven Noonan, Justin Mattock,
Sven Anders, Marcel Holtmann, linux-bluetooth
Jiri Kosina napsal(a):
> On Sun, 19 Oct 2008, Jiri Slaby wrote:
>
>> +enum hid_type {
>> + HID_TYPE_UNKNOWN = 0,
>> + HID_TYPE_MOUSE,
>> + HID_TYPE_KEYBOARD
>> +};
>> +
>
> Do we really need the HID_TYPE_KEYBOARD at all? It's not used anywhere in
> the code. I'd propose to add it when it is actually needed. I.e. have the
> enum contain something like HID_TYPE_MOUSE HID_TYPE_OTHER for now, and add
> whatever will become necessary in the future, what do you think?
I would use unknown rather than other, since on bluetooth mouse is unknown
not other, if you don't mind?
Or did you mean tristate unknown, mouse and other?
Thanks for review.
^ permalink raw reply [flat|nested] 35+ messages in thread
* Linux 2.6.16.4
@ 2006-04-11 17:33 Greg KH
2006-04-11 19:04 ` several messages Jan Engelhardt
0 siblings, 1 reply; 35+ messages in thread
From: Greg KH @ 2006-04-11 17:33 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: torvalds
We (the -stable team) are announcing the release of the 2.6.16.4 kernel.
The diffstat and short summary of the fixes are below.
I'll also be replying to this message with a copy of the patch between
2.6.16.3 and 2.6.16.4, as it is small enough to do so.
The updated 2.6.16.y git tree can be found at:
rsync://rsync.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.16.y.git
and can be browsed at the normal kernel.org git web browser:
www.kernel.org/git/
thanks,
greg k-h
--------
Makefile | 2 +-
kernel/signal.c | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)
Summary of changes from v2.6.16.3 to v2.6.16.4
==============================================
Greg Kroah-Hartman:
Linux 2.6.16.4
Oleg Nesterov:
RCU signal handling [CVE-2006-1523]
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: several messages
2006-04-11 17:33 Linux 2.6.16.4 Greg KH
@ 2006-04-11 19:04 ` Jan Engelhardt
2006-04-11 19:20 ` Boris B. Zhmurov
2006-04-11 20:30 ` Greg KH
0 siblings, 2 replies; 35+ messages in thread
From: Jan Engelhardt @ 2006-04-11 19:04 UTC (permalink / raw)
To: Greg KH; +Cc: linux-kernel, stable, torvalds
>Date: Tue, 11 Apr 2006 09:26:20 -0700
>Subject: Linux 2.6.16.3
>David Howells:
> Keys: Fix oops when adding key to non-keyring [CVE-2006-1522]
>Date: Tue, 11 Apr 2006 10:33:23 -0700
>Subject: Linux 2.6.16.4
>Oleg Nesterov:
> RCU signal handling [CVE-2006-1523]
Now admins spend another hour this day just to upgrade.
These two patches could have been queued until the end of the day. Maybe
another one turns up soon.
Jan Engelhardt
--
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: several messages
2006-04-11 19:04 ` several messages Jan Engelhardt
@ 2006-04-11 19:20 ` Boris B. Zhmurov
2006-04-11 20:30 ` Greg KH
1 sibling, 0 replies; 35+ messages in thread
From: Boris B. Zhmurov @ 2006-04-11 19:20 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: Greg KH, linux-kernel, stable, torvalds
Hello, Jan Engelhardt.
On 11.04.2006 23:04 you said the following:
> Now admins spend another hour this day just to upgrade.
It's admin's job, isn't it?
> These two patches could have been queued until the end of the day. Maybe
> another one turns up soon.
> Jan Engelhardt
Hmm... Interesting. Are you blaming security officers for doing their
job? Please, don't! And many many thanks to Greg for giving us security
patches as soon as possible.
--
Boris B. Zhmurov
mailto: bb@kernelpanic.ru
"wget http://kernelpanic.ru/bb_public_key.pgp -O - | gpg --import"
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: several messages
2006-04-11 19:04 ` several messages Jan Engelhardt
2006-04-11 19:20 ` Boris B. Zhmurov
@ 2006-04-11 20:30 ` Greg KH
2006-04-11 23:46 ` Jan Engelhardt
2006-04-12 0:36 ` Nix
1 sibling, 2 replies; 35+ messages in thread
From: Greg KH @ 2006-04-11 20:30 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: linux-kernel, stable, torvalds
On Tue, Apr 11, 2006 at 09:04:42PM +0200, Jan Engelhardt wrote:
>
> >Date: Tue, 11 Apr 2006 09:26:20 -0700
> >Subject: Linux 2.6.16.3
> >David Howells:
> > Keys: Fix oops when adding key to non-keyring [CVE-2006-1522]
>
> >Date: Tue, 11 Apr 2006 10:33:23 -0700
> >Subject: Linux 2.6.16.4
> >Oleg Nesterov:
> > RCU signal handling [CVE-2006-1523]
>
> Now admins spend another hour this day just to upgrade.
> These two patches could have been queued until the end of the day. Maybe
> another one turns up soon.
The first one went out last night, as it was a real issue that affected
people and I had already waited longer than I felt comfortable with, due
to travel issues I had (two different talks in two different cities in
two different days.)
The second one went out today, because it was reported today. Should I
have waited until tomorrow to see if something else came up?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: several messages
2006-04-11 20:30 ` Greg KH
@ 2006-04-11 23:46 ` Jan Engelhardt
2006-04-12 0:36 ` Nix
1 sibling, 0 replies; 35+ messages in thread
From: Jan Engelhardt @ 2006-04-11 23:46 UTC (permalink / raw)
To: Greg KH; +Cc: linux-kernel, stable, torvalds
>
>The first one went out last night, as it was a real issue that affected
>people and I had already waited longer than I felt comfortable with, due
>to travel issues I had (two different talks in two different cities in
>two different days.)
>
>The second one went out today, because it was reported today. Should I
>have waited until tomorrow to see if something else came up?
>
No of course not, I did not know the first one was already due long time.
[Sigh, pine changed the subject header and I did not notice.]
Jan Engelhardt
--
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: several messages
2006-04-11 20:30 ` Greg KH
2006-04-11 23:46 ` Jan Engelhardt
@ 2006-04-12 0:36 ` Nix
1 sibling, 0 replies; 35+ messages in thread
From: Nix @ 2006-04-12 0:36 UTC (permalink / raw)
To: Greg KH; +Cc: Jan Engelhardt, linux-kernel, stable, torvalds
On 11 Apr 2006, Greg KH whispered secretively:
> The first one went out last night, as it was a real issue that affected
> people and I had already waited longer than I felt comfortable with, due
> to travel issues I had (two different talks in two different cities in
> two different days.)
>
> The second one went out today, because it was reported today. Should I
> have waited until tomorrow to see if something else came up?
Indeed.
On top of that, they're `only' local DoSes, so many admins (i.e. those
without untrusted local users) will probably not have installed .3 yet:
and anyone with untrusted local users probably has someone whose entire
job is handling security anyway.
There's nothing wrong with rapid-fire -stables; either the issue is (in
the judgement of the ones doing the installation) critical, in which
case it should get out as fast as possible, or it isn't, in which case
the local installing admins can put it off for a day or so themselves to
see if another release comes out immediately afterwards.
--
`On a scale of 1-10, X's "brokenness rating" is 1.1, but that's only
because bringing Windows into the picture rescaled "brokenness" by
a factor of 10.' --- Peter da Silva
^ permalink raw reply [flat|nested] 35+ messages in thread
* ata over ethernet question
@ 2005-05-04 17:31 Maciej Soltysiak
2005-05-04 19:48 ` David Hollis
0 siblings, 1 reply; 35+ messages in thread
From: Maciej Soltysiak @ 2005-05-04 17:31 UTC (permalink / raw)
To: linux-kernel
Hi,
AOE is a bit new for me.
Would it be possible to use tha AOE driver to
attach one ATA drive in a host over ethernet to another
host ? Or is it support for specific hardware devices only?
You know, something like:
# fdisk <device_on_another_host>
# mkfs.ext2 <device_on_another_host/partition1>
# mount <device_on_another_host/partition1> /mnt/part1
--
Maciej
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: ata over ethernet question
2005-05-04 17:31 ata over ethernet question Maciej Soltysiak
@ 2005-05-04 19:48 ` David Hollis
2005-05-04 21:17 ` Re[2]: " Maciej Soltysiak
0 siblings, 1 reply; 35+ messages in thread
From: David Hollis @ 2005-05-04 19:48 UTC (permalink / raw)
To: Maciej Soltysiak; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1121 bytes --]
On Wed, 2005-05-04 at 19:31 +0200, Maciej Soltysiak wrote:
> Hi,
>
> AOE is a bit new for me.
>
> Would it be possible to use tha AOE driver to
> attach one ATA drive in a host over ethernet to another
> host ? Or is it support for specific hardware devices only?
>
> You know, something like:
> # fdisk <device_on_another_host>
> # mkfs.ext2 <device_on_another_host/partition1>
> # mount <device_on_another_host/partition1> /mnt/part1
>
That seems to be the basic idea but there doesn't seem to be a provider
stack just yet, just a 'client' (though I could be wrong). AOE is
similar in concept to iSCSI with the biggest difference being that AOE
runs over Ethernet and is thus non-routeable. iSCSI operates over IP so
you can do all kinds of fun IP games with it.
> --
> Maciej
>
>
> -
> 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/
--
David Hollis <dhollis@davehollis.com>
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re[2]: ata over ethernet question
2005-05-04 19:48 ` David Hollis
@ 2005-05-04 21:17 ` Maciej Soltysiak
2005-05-05 15:09 ` David Hollis
0 siblings, 1 reply; 35+ messages in thread
From: Maciej Soltysiak @ 2005-05-04 21:17 UTC (permalink / raw)
To: linux-kernel
Hello David,
Wednesday, May 4, 2005, 9:48:36 PM, you wrote:
> That seems to be the basic idea but there doesn't seem to be a provider
> stack just yet, just a 'client' (though I could be wrong). AOE is
> similar in concept to iSCSI with the biggest difference being that AOE
> runs over Ethernet and is thus non-routeable. iSCSI operates over IP so
> you can do all kinds of fun IP games with it.
Thanks, this is interesting. Does the iSCSI implementation out there have
this provider stack ?
Regards,
Maciej
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: Re[2]: ata over ethernet question
2005-05-04 21:17 ` Re[2]: " Maciej Soltysiak
@ 2005-05-05 15:09 ` David Hollis
2005-05-07 15:05 ` Sander
0 siblings, 1 reply; 35+ messages in thread
From: David Hollis @ 2005-05-05 15:09 UTC (permalink / raw)
To: Maciej Soltysiak; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1018 bytes --]
On Wed, 2005-05-04 at 23:17 +0200, Maciej Soltysiak wrote:
> Hello David,
>
> Wednesday, May 4, 2005, 9:48:36 PM, you wrote:
> > That seems to be the basic idea but there doesn't seem to be a provider
> > stack just yet, just a 'client' (though I could be wrong). AOE is
> > similar in concept to iSCSI with the biggest difference being that AOE
> > runs over Ethernet and is thus non-routeable. iSCSI operates over IP so
> > you can do all kinds of fun IP games with it.
> Thanks, this is interesting. Does the iSCSI implementation out there have
> this provider stack ?
>
> Regards,
> Maciej
There seem to be a few iSCSI implementations floating around for Linux,
hopefully one will be added to mainline soon. Most of those
implementations are for the client side though there is at least one
target implementation that allows you to provide local storage to iSCSI
clients. I don't remember the name of it or if it's still maintained or
not.
--
David Hollis <dhollis@davehollis.com>
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: Re[2]: ata over ethernet question
2005-05-05 15:09 ` David Hollis
@ 2005-05-07 15:05 ` Sander
2005-05-10 22:00 ` Guennadi Liakhovetski
0 siblings, 1 reply; 35+ messages in thread
From: Sander @ 2005-05-07 15:05 UTC (permalink / raw)
To: David Hollis; +Cc: Maciej Soltysiak, linux-kernel
David Hollis wrote (ao):
> There seem to be a few iSCSI implementations floating around for
> Linux, hopefully one will be added to mainline soon. Most of those
> implementations are for the client side though there is at least one
> target implementation that allows you to provide local storage to
> iSCSI clients. I don't remember the name of it or if it's still
> maintained or not.
Quite active even:
http://sourceforge.net/projects/iscsitarget/
The "Quick Guide to iSCSI on Linux" is a good starting point btw.
Also check out http://www.open-iscsi.org/ (the client, aka 'initiator').
--
Humilis IT Services and Solutions
http://www.humilis.net
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: Re[2]: ata over ethernet question
2005-05-07 15:05 ` Sander
@ 2005-05-10 22:00 ` Guennadi Liakhovetski
2005-05-11 8:56 ` Vladislav Bolkhovitin
0 siblings, 1 reply; 35+ messages in thread
From: Guennadi Liakhovetski @ 2005-05-10 22:00 UTC (permalink / raw)
To: Sander; +Cc: David Hollis, Maciej Soltysiak, linux-kernel, linux-scsi
Hi
On Sat, 7 May 2005, Sander wrote:
> David Hollis wrote (ao):
> > There seem to be a few iSCSI implementations floating around for
> > Linux, hopefully one will be added to mainline soon. Most of those
> > implementations are for the client side though there is at least one
> > target implementation that allows you to provide local storage to
> > iSCSI clients. I don't remember the name of it or if it's still
> > maintained or not.
>
> Quite active even:
>
> http://sourceforge.net/projects/iscsitarget/
>
> The "Quick Guide to iSCSI on Linux" is a good starting point btw.
>
> Also check out http://www.open-iscsi.org/ (the client, aka 'initiator').
A follow up question - I recently used nbd to access a CD-ROM. It worked
nice, but, I had to read in 7 CDs, so, each time I had to replace a CD, I
had to stop the client, the server, then replace the CD, re-start the
server, re-start the client... I thought about extending NBD to (better)
support removable media, but then you start thinking about all those
features that your local block device has that don't get exported over
NBD...
Now, my understanding (sorry, without looking at any docs - yet) is, that
iSCSI is (or at least should be) free from these limitations. So, does it
make any sense at all extending NBD or just switch to iSCSI? Should NBD be
just kept simple as it is or would it be completely superseeded by iSCSI,
or is there still something that NBD does that iSCSI wouldn't (easily) do?
Or am I completely misunderstanding what iSCSI target does?
Thanks
Guennadi
---
Guennadi Liakhovetski
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: ata over ethernet question
2005-05-10 22:00 ` Guennadi Liakhovetski
@ 2005-05-11 8:56 ` Vladislav Bolkhovitin
2005-05-11 21:26 ` several messages Guennadi Liakhovetski
0 siblings, 1 reply; 35+ messages in thread
From: Vladislav Bolkhovitin @ 2005-05-11 8:56 UTC (permalink / raw)
To: Guennadi Liakhovetski
Cc: Sander, David Hollis, Maciej Soltysiak, FUJITA Tomonori,
linux-scsi, linux-kernel
Guennadi Liakhovetski wrote:
> Hi
>
> On Sat, 7 May 2005, Sander wrote:
>
>
>>David Hollis wrote (ao):
>>
>>>There seem to be a few iSCSI implementations floating around for
>>>Linux, hopefully one will be added to mainline soon. Most of those
>>>implementations are for the client side though there is at least one
>>>target implementation that allows you to provide local storage to
>>>iSCSI clients. I don't remember the name of it or if it's still
>>>maintained or not.
>>
>>Quite active even:
>>
>>http://sourceforge.net/projects/iscsitarget/
>>
>>The "Quick Guide to iSCSI on Linux" is a good starting point btw.
>>
>>Also check out http://www.open-iscsi.org/ (the client, aka 'initiator').
>
>
> A follow up question - I recently used nbd to access a CD-ROM. It worked
> nice, but, I had to read in 7 CDs, so, each time I had to replace a CD, I
> had to stop the client, the server, then replace the CD, re-start the
> server, re-start the client... I thought about extending NBD to (better)
> support removable media, but then you start thinking about all those
> features that your local block device has that don't get exported over
> NBD...
>
> Now, my understanding (sorry, without looking at any docs - yet) is, that
> iSCSI is (or at least should be) free from these limitations. So, does it
> make any sense at all extending NBD or just switch to iSCSI? Should NBD be
> just kept simple as it is or would it be completely superseeded by iSCSI,
> or is there still something that NBD does that iSCSI wouldn't (easily) do?
>
> Or am I completely misunderstanding what iSCSI target does?
Actually, this is property not of iSCSI target itself, but of any SCSI
target. So, we implemented it as part of our SCSI target mid-level
(SCST, http://scst.sourceforge.net), therefore any target driver working
over it will automatically benefit from this feature. Unfortunately,
currently available only target drivers for Qlogic 2x00 cards and for
poor UNH iSCSI target (that works not too reliable and only with very
specific initiators). The published version supports only real SCSI
CDROMs. CDROM FILEIO module, which allows exporting ISO images as SCSI
CDROM devices, going to be available not later end of May.
Vlad
> Thanks
> Guennadi
> ---
> Guennadi Liakhovetski
>
> -
> 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/
>
>
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: several messages
2005-05-11 8:56 ` Vladislav Bolkhovitin
@ 2005-05-11 21:26 ` Guennadi Liakhovetski
2005-05-12 2:16 ` Ming Zhang
2005-05-12 10:17 ` Vladislav Bolkhovitin
0 siblings, 2 replies; 35+ messages in thread
From: Guennadi Liakhovetski @ 2005-05-11 21:26 UTC (permalink / raw)
To: FUJITA Tomonori, Vladislav Bolkhovitin
Cc: iscsitarget-devel, linux-scsi, dmitry_yus, Sander, David Hollis,
Maciej Soltysiak, linux-kernel
Hello and thanks for the replies
On Wed, 11 May 2005, FUJITA Tomonori wrote:
> The iSCSI protocol simply encapsulates the SCSI protocol into the
> TCP/IP protocol, and carries packets over IP networks. You can handle
...
On Wed, 11 May 2005, Vladislav Bolkhovitin wrote:
> Actually, this is property not of iSCSI target itself, but of any SCSI target.
> So, we implemented it as part of our SCSI target mid-level (SCST,
> http://scst.sourceforge.net), therefore any target driver working over it will
> automatically benefit from this feature. Unfortunately, currently available
> only target drivers for Qlogic 2x00 cards and for poor UNH iSCSI target (that
> works not too reliable and only with very specific initiators). The published
...
The above confirms basically my understanding apart from one "minor"
confusion - I thought, that parallel to hardware solutions pure software
implementations were possible / being developed, like a driver, that
implements a SCSI LDD API on one side, and forwards packets to an IP
stack, say, over an ethernet card - on the initiator side. And a counter
part on the target side. Similarly to the USB mass-storage and storage
gadget drivers?
Thanks
Guennadi
---
Guennadi Liakhovetski
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: several messages
2005-05-11 21:26 ` several messages Guennadi Liakhovetski
@ 2005-05-12 2:16 ` Ming Zhang
2005-05-12 18:32 ` Dmitry Yusupov
2005-05-12 10:17 ` Vladislav Bolkhovitin
1 sibling, 1 reply; 35+ messages in thread
From: Ming Zhang @ 2005-05-12 2:16 UTC (permalink / raw)
To: Guennadi Liakhovetski
Cc: FUJITA Tomonori, Vladislav Bolkhovitin, iet-dev, linux-scsi,
Dmitry Yusupov, Sander, David Hollis, Maciej Soltysiak,
linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1703 bytes --]
iscsi is scsi over ip.
usb disk is scsi over usb.
so just a different transport.
u are rite. ;)
ming
On Wed, 2005-05-11 at 23:26 +0200, Guennadi Liakhovetski wrote:
> Hello and thanks for the replies
>
> On Wed, 11 May 2005, FUJITA Tomonori wrote:
> > The iSCSI protocol simply encapsulates the SCSI protocol into the
> > TCP/IP protocol, and carries packets over IP networks. You can handle
> ...
>
> On Wed, 11 May 2005, Vladislav Bolkhovitin wrote:
> > Actually, this is property not of iSCSI target itself, but of any SCSI target.
> > So, we implemented it as part of our SCSI target mid-level (SCST,
> > http://scst.sourceforge.net), therefore any target driver working over it will
> > automatically benefit from this feature. Unfortunately, currently available
> > only target drivers for Qlogic 2x00 cards and for poor UNH iSCSI target (that
> > works not too reliable and only with very specific initiators). The published
> ...
>
> The above confirms basically my understanding apart from one "minor"
> confusion - I thought, that parallel to hardware solutions pure software
> implementations were possible / being developed, like a driver, that
> implements a SCSI LDD API on one side, and forwards packets to an IP
> stack, say, over an ethernet card - on the initiator side. And a counter
> part on the target side. Similarly to the USB mass-storage and storage
> gadget drivers?
>
> Thanks
> Guennadi
> ---
> Guennadi Liakhovetski
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: several messages
2005-05-12 2:16 ` Ming Zhang
@ 2005-05-12 18:32 ` Dmitry Yusupov
2005-05-13 8:12 ` Christoph Hellwig
0 siblings, 1 reply; 35+ messages in thread
From: Dmitry Yusupov @ 2005-05-12 18:32 UTC (permalink / raw)
To: mingz
Cc: Guennadi Liakhovetski, FUJITA Tomonori, Vladislav Bolkhovitin,
iet-dev, linux-scsi, Sander, David Hollis, Maciej Soltysiak,
linux-kernel
On Wed, 2005-05-11 at 22:16 -0400, Ming Zhang wrote:
> iscsi is scsi over ip.
correction. iSCSI today has RFC at least for two transports - TCP/IP and
iSER/RDMA(in finalized progress) with RDMA over Infiniband or RNIC. And
I think people start writing initial draft for SCTP/IP transport...
>From this perspective, iSCSI certainly more advanced and matured
comparing to NBD variations.
> usb disk is scsi over usb.
> so just a different transport.
> u are rite. ;)
>
> ming
>
> On Wed, 2005-05-11 at 23:26 +0200, Guennadi Liakhovetski wrote:
> > Hello and thanks for the replies
> >
> > On Wed, 11 May 2005, FUJITA Tomonori wrote:
> > > The iSCSI protocol simply encapsulates the SCSI protocol into the
> > > TCP/IP protocol, and carries packets over IP networks. You can handle
> > ...
> >
> > On Wed, 11 May 2005, Vladislav Bolkhovitin wrote:
> > > Actually, this is property not of iSCSI target itself, but of any SCSI target.
> > > So, we implemented it as part of our SCSI target mid-level (SCST,
> > > http://scst.sourceforge.net), therefore any target driver working over it will
> > > automatically benefit from this feature. Unfortunately, currently available
> > > only target drivers for Qlogic 2x00 cards and for poor UNH iSCSI target (that
> > > works not too reliable and only with very specific initiators). The published
> > ...
> >
> > The above confirms basically my understanding apart from one "minor"
> > confusion - I thought, that parallel to hardware solutions pure software
> > implementations were possible / being developed, like a driver, that
> > implements a SCSI LDD API on one side, and forwards packets to an IP
> > stack, say, over an ethernet card - on the initiator side. And a counter
> > part on the target side. Similarly to the USB mass-storage and storage
> > gadget drivers?
> >
> > Thanks
> > Guennadi
> > ---
> > Guennadi Liakhovetski
> >
> > -
> > To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: several messages
2005-05-12 18:32 ` Dmitry Yusupov
@ 2005-05-13 8:12 ` Christoph Hellwig
2005-05-13 15:04 ` Dmitry Yusupov
0 siblings, 1 reply; 35+ messages in thread
From: Christoph Hellwig @ 2005-05-13 8:12 UTC (permalink / raw)
To: Dmitry Yusupov
Cc: mingz, Guennadi Liakhovetski, FUJITA Tomonori,
Vladislav Bolkhovitin, iet-dev, linux-scsi, Sander, David Hollis,
Maciej Soltysiak, linux-kernel
On Thu, May 12, 2005 at 11:32:12AM -0700, Dmitry Yusupov wrote:
> On Wed, 2005-05-11 at 22:16 -0400, Ming Zhang wrote:
> > iscsi is scsi over ip.
>
> correction. iSCSI today has RFC at least for two transports - TCP/IP and
> iSER/RDMA(in finalized progress) with RDMA over Infiniband or RNIC. And
> I think people start writing initial draft for SCTP/IP transport...
>
> >From this perspective, iSCSI certainly more advanced and matured
> comparing to NBD variations.
It's for certainly much more complicated (in marketing speak that's usually
called advanced) but far less mature.
If you want network storage to just work use nbd.
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: several messages
2005-05-13 8:12 ` Christoph Hellwig
@ 2005-05-13 15:04 ` Dmitry Yusupov
2005-05-13 15:07 ` Christoph Hellwig
0 siblings, 1 reply; 35+ messages in thread
From: Dmitry Yusupov @ 2005-05-13 15:04 UTC (permalink / raw)
To: Christoph Hellwig
Cc: mingz, Guennadi Liakhovetski, FUJITA Tomonori,
Vladislav Bolkhovitin, iet-dev, linux-scsi, Sander, David Hollis,
Maciej Soltysiak, linux-kernel
On Fri, 2005-05-13 at 09:12 +0100, Christoph Hellwig wrote:
> On Thu, May 12, 2005 at 11:32:12AM -0700, Dmitry Yusupov wrote:
> > On Wed, 2005-05-11 at 22:16 -0400, Ming Zhang wrote:
> > > iscsi is scsi over ip.
> >
> > correction. iSCSI today has RFC at least for two transports - TCP/IP and
> > iSER/RDMA(in finalized progress) with RDMA over Infiniband or RNIC. And
> > I think people start writing initial draft for SCTP/IP transport...
> >
> > >From this perspective, iSCSI certainly more advanced and matured
> > comparing to NBD variations.
>
> It's for certainly much more complicated (in marketing speak that's usually
> called advanced) but far less mature.
>
> If you want network storage to just work use nbd.
You could tell this to school's computer class teacher... Serious SAN
deployment will always be based either on FC or iSCSI for the reasons I
explained before.
I do not disagree, nbd is nice and simple and for sure has its own
deployment space.
Dmitry
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: several messages
2005-05-13 15:04 ` Dmitry Yusupov
@ 2005-05-13 15:07 ` Christoph Hellwig
2005-05-13 15:38 ` Dmitry Yusupov
0 siblings, 1 reply; 35+ messages in thread
From: Christoph Hellwig @ 2005-05-13 15:07 UTC (permalink / raw)
To: Dmitry Yusupov
Cc: Christoph Hellwig, mingz, Guennadi Liakhovetski, FUJITA Tomonori,
Vladislav Bolkhovitin, iet-dev, linux-scsi, Sander, David Hollis,
Maciej Soltysiak, linux-kernel
On Fri, May 13, 2005 at 08:04:16AM -0700, Dmitry Yusupov wrote:
> You could tell this to school's computer class teacher... Serious SAN
> deployment will always be based either on FC or iSCSI for the reasons I
> explained before.
Just FYI Steeleye ships a very successful clustering product that builds
on nbd.
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: several messages
2005-05-13 15:07 ` Christoph Hellwig
@ 2005-05-13 15:38 ` Dmitry Yusupov
0 siblings, 0 replies; 35+ messages in thread
From: Dmitry Yusupov @ 2005-05-13 15:38 UTC (permalink / raw)
To: Christoph Hellwig
Cc: mingz, Guennadi Liakhovetski, FUJITA Tomonori,
Vladislav Bolkhovitin, iet-dev, linux-scsi, Sander, David Hollis,
Maciej Soltysiak, linux-kernel
On Fri, 2005-05-13 at 16:07 +0100, Christoph Hellwig wrote:
> On Fri, May 13, 2005 at 08:04:16AM -0700, Dmitry Yusupov wrote:
> > You could tell this to school's computer class teacher... Serious SAN
> > deployment will always be based either on FC or iSCSI for the reasons I
> > explained before.
>
> Just FYI Steeleye ships a very successful clustering product that builds
> on nbd.
AFAIK, it is used for Data Replication purposes only. Correct me if I'm
wrong...
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: several messages
2005-05-11 21:26 ` several messages Guennadi Liakhovetski
2005-05-12 2:16 ` Ming Zhang
@ 2005-05-12 10:17 ` Vladislav Bolkhovitin
1 sibling, 0 replies; 35+ messages in thread
From: Vladislav Bolkhovitin @ 2005-05-12 10:17 UTC (permalink / raw)
To: Guennadi Liakhovetski
Cc: FUJITA Tomonori, iscsitarget-devel, linux-scsi, dmitry_yus,
Sander, David Hollis, Maciej Soltysiak, linux-kernel
Guennadi Liakhovetski wrote:
> Hello and thanks for the replies
>
> On Wed, 11 May 2005, FUJITA Tomonori wrote:
>
>>The iSCSI protocol simply encapsulates the SCSI protocol into the
>>TCP/IP protocol, and carries packets over IP networks. You can handle
>
> ...
>
> On Wed, 11 May 2005, Vladislav Bolkhovitin wrote:
>
>>Actually, this is property not of iSCSI target itself, but of any SCSI target.
>>So, we implemented it as part of our SCSI target mid-level (SCST,
>>http://scst.sourceforge.net), therefore any target driver working over it will
>>automatically benefit from this feature. Unfortunately, currently available
>>only target drivers for Qlogic 2x00 cards and for poor UNH iSCSI target (that
>>works not too reliable and only with very specific initiators). The published
>
> ...
>
> The above confirms basically my understanding apart from one "minor"
> confusion - I thought, that parallel to hardware solutions pure software
> implementations were possible / being developed, like a driver, that
> implements a SCSI LDD API on one side, and forwards packets to an IP
> stack, say, over an ethernet card - on the initiator side. And a counter
> part on the target side. Similarly to the USB mass-storage and storage
> gadget drivers?
There is some confusion in the SCSI world between SCSI as a transport
and SCSI as a commands set and software communication protocol, which
works above the transport. So, you can implement SCSI transport at any
software (eg iSCSI) or hardware (parallel SCSI, Fibre Channel, SATA,
etc.) way, but if the SCSI message passing protocol is used overall
system remains SCSI with all protocol obligations like task management.
So, pure software SCSI solution is possible. BTW, there are pure
hardware iSCSI implementations as well.
Vlad
> Thanks
> Guennadi
> ---
> Guennadi Liakhovetski
>
> -
> 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/
>
>
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: 2.6.6-rc3-mm2 (4KSTACK)
@ 2004-05-11 8:45 Helge Hafting
2004-05-11 17:59 ` several messages Bill Davidsen
0 siblings, 1 reply; 35+ messages in thread
From: Helge Hafting @ 2004-05-11 8:45 UTC (permalink / raw)
To: Bill Davidsen; +Cc: linux-kernel
Bill Davidsen wrote:
> Arjan van de Ven wrote:
>
>>> It's probably a Bad Idea to push this to Linus before the vendors
>>> that have
>>> significant market-impact issues (again - anybody other than NVidia
>>> here?)
>>> have gotten their stuff cleaned up...
>>
>>
>>
>> Ok I don't want to start a flamewar but... Do we want to hold linux back
>> until all binary only module vendors have caught up ??
>
>
> My questions is, hold it back from what? Having the 4k option is fine,
> it's just eliminating the current default which I think is
> undesirable. I tried 4k stack, I couldn't measure any improvement in
> anything (as in no visible speedup or saving in memory).
The memory saving is usually modest: 4k per thread. It might make a
difference for
those with many thousands of threads. I believe this is unswappable
memory,
which is much more valuable than ordinary process memory.
More interesting is that it removes one way for fork() to fail. With 8k
stacks,
the new process needs to allocate two consecutive pages for those 8k. That
might be impossible due to fragmentation, even if there are megabytes of
free
memory. Such a problem usually only shows up after a long time. Now we
only need to
allocate a single page, which always works as long as there is any free
memory at all.
> For an embedded system, where space is tight and the code paths well
> known, sure, but I haven't been able to find or generate any objective
> improvement, other than some posts saying smaller is always better.
> Nothing slows a system down like a crash, even if it isn't followed by
> a restore from backup.
Consider the case when your server (web/mail/other) fails to fork, and then
you can't login because that requires fork() too. 4k stacks remove this
scenario,
and is a stability improvement.
Helge Hafting
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: several messages
2004-05-11 8:45 2.6.6-rc3-mm2 (4KSTACK) Helge Hafting
@ 2004-05-11 17:59 ` Bill Davidsen
0 siblings, 0 replies; 35+ messages in thread
From: Bill Davidsen @ 2004-05-11 17:59 UTC (permalink / raw)
To: Horst von Brand, Andrew Morton, Helge Hafting; +Cc: Linux Kernel Mailing List
Thank all of you for this information. This is an interesting way to
overcome the kernel memory fragmentation issue. I would have thought it
was more important to address having the memory so fragmented that there
is no 8k chunk left "even with many megabytes free" as someone wrote.
On Mon, 10 May 2004, Horst von Brand wrote:
> Bill Davidsen <davidsen@tmr.com> said:
>
> [...]
>
> > I tried 4k stack, I couldn't measure any improvement in anything (as in
> > no visible speedup or saving in memory).
>
> 4K stacks lets the kernel create new threads/processes as long as there is
> free memory; with 8K stacks it needs two consecutive free page frames in
> physical memory, when memory is fragmented (and large) they are hard to
> come by...
> --
> Dr. Horst H. von Brand User #22616 counter.li.org
> Departamento de Informatica Fono: +56 32 654431
> Universidad Tecnica Federico Santa Maria +56 32 654239
> Casilla 110-V, Valparaiso, Chile Fax: +56 32 797513
>
On Mon, 10 May 2004, Andrew Morton wrote:
> Horst von Brand <vonbrand@inf.utfsm.cl> wrote:
> >
> > Bill Davidsen <davidsen@tmr.com> said:
> >
> > [...]
> >
> > > I tried 4k stack, I couldn't measure any improvement in anything (as in
> > > no visible speedup or saving in memory).
> >
> > 4K stacks lets the kernel create new threads/processes as long as there is
> > free memory; with 8K stacks it needs two consecutive free page frames in
> > physical memory, when memory is fragmented (and large) they are hard to
> > come by...
>
> This is true to a surprising extent. A couple of weeks ago I observed my
> 256MB box freeing over 20MB of pages before it could successfully acquire a
> single 1-order page.
>
> That was during an updatedb run.
>
> And a 1-order GFP_NOFS allocation was actually livelocking, because
> !__GFP_FS allocations aren't allowed to enter dentry reclaim. Which is why
> VFS caches are now forced to use 0-order allocations.
>
>
On Tue, 11 May 2004, Helge Hafting wrote:
> Bill Davidsen wrote:
>
> > Arjan van de Ven wrote:
> >
> >>> It's probably a Bad Idea to push this to Linus before the vendors
> >>> that have
> >>> significant market-impact issues (again - anybody other than NVidia
> >>> here?)
> >>> have gotten their stuff cleaned up...
> >>
> >>
> >>
> >> Ok I don't want to start a flamewar but... Do we want to hold linux back
> >> until all binary only module vendors have caught up ??
> >
> >
> > My questions is, hold it back from what? Having the 4k option is fine,
> > it's just eliminating the current default which I think is
> > undesirable. I tried 4k stack, I couldn't measure any improvement in
> > anything (as in no visible speedup or saving in memory).
>
> The memory saving is usually modest: 4k per thread. It might make a
> difference for
> those with many thousands of threads. I believe this is unswappable
> memory,
> which is much more valuable than ordinary process memory.
>
> More interesting is that it removes one way for fork() to fail. With 8k
> stacks,
> the new process needs to allocate two consecutive pages for those 8k. That
> might be impossible due to fragmentation, even if there are megabytes of
> free
> memory. Such a problem usually only shows up after a long time. Now we
> only need to
> allocate a single page, which always works as long as there is any free
> memory at all.
>
> > For an embedded system, where space is tight and the code paths well
> > known, sure, but I haven't been able to find or generate any objective
> > improvement, other than some posts saying smaller is always better.
> > Nothing slows a system down like a crash, even if it isn't followed by
> > a restore from backup.
>
> Consider the case when your server (web/mail/other) fails to fork, and then
> you can't login because that requires fork() too. 4k stacks remove this
> scenario,
> and is a stability improvement.
>
> Helge Hafting
>
--
bill davidsen <davidsen@tmr.com>
CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: [patch] HT scheduler, sched-2.5.68-A9
@ 2003-04-22 10:34 Ingo Molnar
2003-04-22 22:16 ` several messages Bill Davidsen
0 siblings, 1 reply; 35+ messages in thread
From: Ingo Molnar @ 2003-04-22 10:34 UTC (permalink / raw)
To: Rick Lindsley; +Cc: linux-kernel
On Tue, 22 Apr 2003, Rick Lindsley wrote:
> Ingo, several questions.
>
> What makes this statement:
>
> * At this point it's sure that we have a SMT
> * imbalance: this (physical) CPU is idle but
> * another CPU has two (or more) tasks running.
>
> true? Do you mean "this cpu/sibling set are all idle but another
> cpu/sibling set are all non-idle"? [...]
yes, precisely.
> [...] Are we assuming that because both a physical processor and its
> sibling are not idle, that it is better to move a task from the sibling
> to a physical processor? In other words, we are presuming that the case
> where the task on the physical processor and the task(s) on the
> sibling(s) are actually benefitting from the relationship is rare?
yes. This 'un-sharing' of contexts happens unconditionally, whenever we
notice the situation. (ie. whenever a CPU goes completely idle and notices
an overloaded physical CPU.) On the HT system i have i have measure this
to be a beneficial move even for the most trivial things like infinite
loop-counting.
the more per-logical-CPU cache a given SMT implementation has, the less
beneficial this move becomes - in that case the system should rather be
set up as a NUMA topology and scheduled via the NUMA scheduler.
> * We wake up one of the migration threads (it
> * doesnt matter which one) and let it fix things up:
>
> So although a migration thread normally pulls tasks to it, we've altered
> migration_thread now so that when cpu_active_balance() is set for its
> cpu, it will go find a cpu/sibling set in which all siblings are busy
> (knowing it has a good chance of finding one), decrement nr_running in
> the runqueue it has found, call load_balance() on the queue which is
> idle, and hope that load_balance will again find the busy queue (the
> same queue as the migration thread's) and decide to move a task over?
yes.
> whew. So why are we perverting the migration thread to push rather than
> pull? If active_load_balance() finds a imbalance, why must we use such
> indirection? Why decrement nr_running? Couldn't we put together a
> migration_req_t for the target queue's migration thread?
i'm not sure what you mean by perverting the migration thread to push
rather to pull, as migration threads always push - it's not different in
this case either. Since the task in question is running in an
un-cooperative way at the moment of active-balancing, that CPU needs to
run the high-prio migration thread, which pushes the task to the proper
CPU after that point. [if the push is still necessary.]
we could use a migration_req_t for this, in theory, but active balancing
is independent of ->cpus_allowed, so some special code would still be
needed. Also, active balancing is non-queued by nature. Is there a big
difference?
> Making the migration thread TASK_UNINTERRUPTIBLE has the nasty side
> effect of artificially raising the load average. Why is this changed?
agreed, this is an oversight, i fixed it in my tree.
Ingo
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: several messages
2003-04-22 10:34 [patch] HT scheduler, sched-2.5.68-A9 Ingo Molnar
@ 2003-04-22 22:16 ` Bill Davidsen
2003-04-22 23:38 ` Rick Lindsley
0 siblings, 1 reply; 35+ messages in thread
From: Bill Davidsen @ 2003-04-22 22:16 UTC (permalink / raw)
To: Dave Jones, Ingo Molnar; +Cc: Rick Lindsley, linux-kernel
On Tue, 22 Apr 2003, Dave Jones wrote:
> On Mon, Apr 21, 2003 at 03:13:31PM -0400, Ingo Molnar wrote:
>
> > +/*
> > + * Is there a way to do this via Kconfig?
> > + */
> > +#if CONFIG_NR_SIBLINGS_2
> > +# define CONFIG_NR_SIBLINGS 2
> > +#elif CONFIG_NR_SIBLINGS_4
> > +# define CONFIG_NR_SIBLINGS 4
> > +#else
> > +# define CONFIG_NR_SIBLINGS 0
> > +#endif
> > +
>
> Maybe this would be better resolved at runtime ?
> With the above patch, you'd need three seperate kernel images
> to run optimally on a system in each of the cases.
> The 'vendor kernel' scenario here looks ugly to me.
>
> > +#if CONFIG_NR_SIBLINGS
> > +# define CONFIG_SHARE_RUNQUEUE 1
> > +#else
> > +# define CONFIG_SHARE_RUNQUEUE 0
> > +#endif
>
> And why can't this just be a
>
> if (ht_enabled)
> shared_runqueue = 1;
>
> Dumping all this into the config system seems to be the
> wrong direction IMHO. The myriad of runtime knobs in the
> scheduler already is bad enough, without introducing
> compile time ones as well.
May I add my "I don't understand this, either" at this point? It seems
desirable to have this particular value determined at runtime.
On Tue, 22 Apr 2003, Ingo Molnar wrote:
>
> On Tue, 22 Apr 2003, Rick Lindsley wrote:
> > [...] Are we assuming that because both a physical processor and its
> > sibling are not idle, that it is better to move a task from the sibling
> > to a physical processor? In other words, we are presuming that the case
> > where the task on the physical processor and the task(s) on the
> > sibling(s) are actually benefitting from the relationship is rare?
>
> yes. This 'un-sharing' of contexts happens unconditionally, whenever we
> notice the situation. (ie. whenever a CPU goes completely idle and notices
> an overloaded physical CPU.) On the HT system i have i have measure this
> to be a beneficial move even for the most trivial things like infinite
> loop-counting.
>
> the more per-logical-CPU cache a given SMT implementation has, the less
> beneficial this move becomes - in that case the system should rather be
> set up as a NUMA topology and scheduled via the NUMA scheduler.
Have you done any tests with a threaded process running on a single CPU in
the siblings? If they are sharing data and locks in the same cache it's
not obvious (to me at least) that it would be faster in two CPUs having to
do updates. That's a question, not an implication that it is significantly
better in just one, a threaded program with only two threads is not as
likely to be doing the same thing in both, perhaps.
--
bill davidsen <davidsen@tmr.com>
CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: several messages
2003-04-22 22:16 ` several messages Bill Davidsen
@ 2003-04-22 23:38 ` Rick Lindsley
2003-04-23 9:17 ` Ingo Molnar
0 siblings, 1 reply; 35+ messages in thread
From: Rick Lindsley @ 2003-04-22 23:38 UTC (permalink / raw)
To: Bill Davidsen; +Cc: Dave Jones, Ingo Molnar, linux-kernel
Have you done any tests with a threaded process running on a single CPU in
the siblings? If they are sharing data and locks in the same cache it's
not obvious (to me at least) that it would be faster in two CPUs having to
do updates. That's a question, not an implication that it is significantly
better in just one, a threaded program with only two threads is not as
likely to be doing the same thing in both, perhaps.
True. I have a hunch (and it's only a hunch -- no hard data!) that
two threads that are sharing the same data will do better if they can
be located on a physical/sibling processor group. For workloads where
you really do have two distinct processes, or even threads but which are
operating on wholly different portions of data or code, moving them to
separate physical processors may be warranted. The key is whether the
work of one sibling is destroying the cache of another.
Rick
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: several messages
2003-04-22 23:38 ` Rick Lindsley
@ 2003-04-23 9:17 ` Ingo Molnar
0 siblings, 0 replies; 35+ messages in thread
From: Ingo Molnar @ 2003-04-23 9:17 UTC (permalink / raw)
To: Rick Lindsley; +Cc: Bill Davidsen, Dave Jones, linux-kernel
On Tue, 22 Apr 2003, Rick Lindsley wrote:
> True. I have a hunch (and it's only a hunch -- no hard data!) that two
> threads that are sharing the same data will do better if they can be
> located on a physical/sibling processor group. For workloads where you
> really do have two distinct processes, or even threads but which are
> operating on wholly different portions of data or code, moving them to
> separate physical processors may be warranted. The key is whether the
> work of one sibling is destroying the cache of another.
If two threads have a workload that wants to be co-scheduled then the SMP
scheduler will do damage to them anyway - independently of any HT
scheduling decisions. One solution for such specific cases is to use the
CPU-binding API to move those threads to the same physical CPU. If there's
some common class of applications where this is the common case, then we
could start thinking about automatic support for them.
Ingo
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: ANN: LKMB (Linux Kernel Module Builder) version 0.1.16
@ 2003-01-23 0:20 Hal Duston
2003-01-27 16:46 ` several messages Bill Davidsen
0 siblings, 1 reply; 35+ messages in thread
From: Hal Duston @ 2003-01-23 0:20 UTC (permalink / raw)
To: linux-kernel
I use "INSTALL_MOD_PATH=put/the/modules/here/instead/of/lib/modules" in my
.profile or whatever in order to drop the modules into another directory
at "make modules_install" time. Is this one of the things folks are
talking about?
Hal Duston
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: several messages
2003-01-23 0:20 ANN: LKMB (Linux Kernel Module Builder) version 0.1.16 Hal Duston
@ 2003-01-27 16:46 ` Bill Davidsen
2003-01-27 16:59 ` David Woodhouse
0 siblings, 1 reply; 35+ messages in thread
From: Bill Davidsen @ 2003-01-27 16:46 UTC (permalink / raw)
To: David Woodhouse, Hal Duston; +Cc: linux-kernel, Olaf Titz
On Wed, 22 Jan 2003, David Woodhouse wrote:
>
> davidsen@tmr.com said:
> > `uname -r` is the kernel version of the running kernel. It is NOT by
> > magic the kernel version of the kernel you are building...
>
> Er, yes. And what's your point?
>
> There is _no_ magic that will find the kernel you want to build against
> today without any input from you. Using the build tree for the
> currently-running kernel, if installed in the standard place, is as good a
> default as any. Of course you should be permitted to override that default.
You make my point for me, there is no magic, and when building a module it
should require that the directory be specified by either a command line
option (as noted below) or by being built as part of a source tree. There
*is* no good default in that particular case.
On Wed, 22 Jan 2003, Hal Duston wrote:
> I use "INSTALL_MOD_PATH=put/the/modules/here/instead/of/lib/modules" in my
> .profile or whatever in order to drop the modules into another directory
> at "make modules_install" time. Is this one of the things folks are
> talking about?
Related for sure, the point I was making was that there is no good default
place to put modules built outside a kernel source tree (and probably also
when built for multiple kernels). I was suggesting that the module tree of
the running kernel might be a really poor choice. I don't think I was
clear in my first post, I was not suggesting a better default, I was
suggesting that any default is likely to bite.
I'm not unhappy that Mr. Woodhouse disagrees, I just think he missed my
point the first time and I'm trying to clarify.
--
bill davidsen <davidsen@tmr.com>
CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.
^ permalink raw reply [flat|nested] 35+ messages in thread
* Re: several messages
2003-01-27 16:46 ` several messages Bill Davidsen
@ 2003-01-27 16:59 ` David Woodhouse
0 siblings, 0 replies; 35+ messages in thread
From: David Woodhouse @ 2003-01-27 16:59 UTC (permalink / raw)
To: Bill Davidsen; +Cc: Hal Duston, linux-kernel, Olaf Titz
davidsen@tmr.com said:
> You make my point for me, there is no magic, and when building a
> module it should require that the directory be specified by either a
> command line option (as noted below) or by being built as part of a
> source tree. There *is* no good default in that particular case.
/lib/modules/`uname -r`/build _is_ a good default for a module to build
again. It is correct in more cases than a simple failure to do anything.
For _installing_, the correct place to install the built objects is surely
/lib/modules/$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) where the
variables are obtained from the top-level Makefile in the kernel sources
you built against.
You _default_ to building and installing for the current kernel, if it's
installed properly. But of course you should be permitted to override that
on the command line.
> Related for sure, the point I was making was that there is no good
> default place to put modules built outside a kernel source tree (and
> probably also when built for multiple kernels).
I disagree. Modutils will look in only one place -- the /lib/modules/...
directory corresponding to the kernel version for which you built each
module. Each module, therefore, should go into the directory corresponding
to the version of the kernel against which it was built.
Finding the appropriate _installation_ directory is trivial, surely? You
can even find it from the 'kernel_version' stamp _inside_ the object file,
without any other information?
--
dwmw2
^ permalink raw reply [flat|nested] 35+ messages in thread
end of thread, other threads:[~2016-01-29 13:21 UTC | newest]
Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <200702211929.17203.david-b@pacbell.net>
2007-02-22 3:50 ` [patch 6/6] rtc suspend()/resume() restores system clock David Brownell
2007-02-22 22:58 ` several messages Guennadi Liakhovetski
2007-02-23 1:15 ` David Brownell
2007-02-23 11:17 ` Johannes Berg
2007-02-23 18:31 ` rtc suspend()/resume() restores system clock Guennadi Liakhovetski
2007-02-23 20:24 ` Johannes Berg
2016-01-25 18:37 [PATCH v2 0/3] x86/mm: INVPCID support Andy Lutomirski
2016-01-25 18:57 ` Ingo Molnar
2016-01-27 10:09 ` several messages Thomas Gleixner
2016-01-29 13:21 ` Borislav Petkov
-- strict thread matches above, loose matches on Subject: below --
2014-11-10 6:26 [PATCH 00/13] Add VT-d Posted-Interrupts support for KVM Feng Wu
2014-11-10 6:26 ` [PATCH 13/13] iommu/vt-d: Add a command line parameter for VT-d posted-interrupts Feng Wu
2014-11-10 18:15 ` several messages Thomas Gleixner
2014-11-11 2:28 ` Jiang Liu
2014-11-11 6:37 ` Wu, Feng
2010-07-11 15:06 [PATCHv2] netfilter: add CHECKSUM target Michael S. Tsirkin
2010-07-11 15:14 ` [PATCHv3] extensions: libxt_CHECKSUM extension Michael S. Tsirkin
2010-07-15 9:39 ` Patrick McHardy
2010-07-15 10:17 ` several messages Jan Engelhardt
2008-11-26 14:33 [PATCH 0/1] HID: hid_apple is not used for apple alu wireless keyboards Jan Scholz
2008-11-26 14:33 ` [PATCH 1/1] HID: Apple alu wireless keyboards are bluetooth devices Jan Scholz
2008-11-26 14:54 ` Jiri Kosina
2008-11-26 15:17 ` Jan Scholz
2008-11-26 15:33 ` Jiri Kosina
2008-11-26 21:06 ` Tobias Müller
2008-11-27 0:57 ` several messages Jiri Kosina
2008-10-19 14:15 [PATCH 1/2] HID: add hid_type Jiri Slaby
2008-10-19 14:15 ` [PATCH 2/2] HID: fix appletouch regression Jiri Slaby
2008-10-19 19:40 ` several messages Jiri Kosina
2008-10-19 20:06 ` Justin Mattock
2008-10-19 22:09 ` Jiri Slaby
2006-04-11 17:33 Linux 2.6.16.4 Greg KH
2006-04-11 19:04 ` several messages Jan Engelhardt
2006-04-11 19:20 ` Boris B. Zhmurov
2006-04-11 20:30 ` Greg KH
2006-04-11 23:46 ` Jan Engelhardt
2006-04-12 0:36 ` Nix
2005-05-04 17:31 ata over ethernet question Maciej Soltysiak
2005-05-04 19:48 ` David Hollis
2005-05-04 21:17 ` Re[2]: " Maciej Soltysiak
2005-05-05 15:09 ` David Hollis
2005-05-07 15:05 ` Sander
2005-05-10 22:00 ` Guennadi Liakhovetski
2005-05-11 8:56 ` Vladislav Bolkhovitin
2005-05-11 21:26 ` several messages Guennadi Liakhovetski
2005-05-12 2:16 ` Ming Zhang
2005-05-12 18:32 ` Dmitry Yusupov
2005-05-13 8:12 ` Christoph Hellwig
2005-05-13 15:04 ` Dmitry Yusupov
2005-05-13 15:07 ` Christoph Hellwig
2005-05-13 15:38 ` Dmitry Yusupov
2005-05-12 10:17 ` Vladislav Bolkhovitin
2004-05-11 8:45 2.6.6-rc3-mm2 (4KSTACK) Helge Hafting
2004-05-11 17:59 ` several messages Bill Davidsen
2003-04-22 10:34 [patch] HT scheduler, sched-2.5.68-A9 Ingo Molnar
2003-04-22 22:16 ` several messages Bill Davidsen
2003-04-22 23:38 ` Rick Lindsley
2003-04-23 9:17 ` Ingo Molnar
2003-01-23 0:20 ANN: LKMB (Linux Kernel Module Builder) version 0.1.16 Hal Duston
2003-01-27 16:46 ` several messages Bill Davidsen
2003-01-27 16:59 ` David Woodhouse
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).