All of lore.kernel.org
 help / color / mirror / Atom feed
* Microsoft Forefront Server Security forwarded attachment
@ 2011-02-17 23:16 ForefrontServerSecurity
  0 siblings, 0 replies; 6+ messages in thread
From: ForefrontServerSecurity @ 2011-02-17 23:16 UTC (permalink / raw)
  To: broonie; +Cc: hch, linux-kernel, linux-fsdevel, ryan, akpm

[-- Attachment #1: Type: text/plain, Size: 474 bytes --]


The body from the message "Re: [PATCH 0/10] Add yaffs2 file system:  Fifth patchset", originally sent to you by linux-kernel-owner@vger.kernel.org (linux-kernel-owner@vger.kernel.org), has been forwarded to you from the Microsoft Forefront Server Security Quarantine area.
This message body may have been re-scanned by Microsoft Forefront Server Security and handled according to the appropriate scan job's settings.




<<Body of Message>>

[-- Attachment #2: Body of Message --]
[-- Type: application/octet-stream, Size: 3456 bytes --]

On Thursday 17 February 2011 14:48:08 Mark Brown wrote:
> On Thu, Feb 17, 2011 at 11:12:06AM +1300, Charles Manning wrote:
> > On Wednesday 16 February 2011 21:04:20 Christoph Hellwig wrote:
> > > The procfs interfaces should be replaced by something saner,
> > > the insane amount of ad-hoc tracing crap should be replaced by much
> > > less strategically placed trace events, and all those stupid compile
> > > time options have absolutely no business at all beeing there for a
> > > filesystem -
> >
> > Why not?
> >
> > > remember you can get media from all over the place.
> >
> > No you can't. This is a flash file system for soldered down flash. I
> > think that is a fundamental place where your understanding of what yaffs
> > is falls down.

I'm not sure I really understand what Christoph means by "get media from all 
over the place". I took that to mean he thinks people will pug in random 
flash cards and would need to fiddle with options to make them work. That 
would of course suck badly.

That is obviously not the case for a flash file system used on hard-wired 
flash where the system integrator is in control. Users don't get to fiddle.

>
> Even for embedded systems people do end up wanting to do things like
> using the same kernel on multiple systems which may have different
> hardware configurations (distros and reference boards are the obvious
> examples, but I've worked on systems where multiple generations and
> builds of the product were in active use and similar enough to be
> maintained from the same kernel).  Even with single system kernels
> there's still an issue with things like reference boards where users are
> doing things like picking up a new upstream kernel rather than the
> vendor BSP.

Every one of the "stupid compile time options" is there because someone that 
actually **uses** yaffs wanted it. None are there just for fun. The 
compile-time switches are very limited - mostly just there to set up default 
runtime flags that can be overridden at runtime. Some of them are there to 
work around bugs and limitations in the mtd.

Even with BSPs, there will often be some board tuning to, do things like set 
up the mtd partitions.

Picking up an new kernel is easy, so long as the mtd code has not been broken 
in the interum. 

Last week I dropped the yaffs code into an omap3 build of 2.6.37 with no 
fiddling and with default settings and it "just worked".

>
> > > If you can't encode these difference in your on-disk format it has
> > > absolutely no business going into mainline with this format.
> >
> > Yaffs does not really have an on-disk format like most other fs do.
>
> I'm not sure exactly how you'd do this for a filesystem but this is
> starting to sound a lot like platform data...  Though presumably if the
> data isn't stored on the device currently it'd be a simple matter of
> programming (if wasteful) to add it.

NB flash file system - not file system! Working via mtd is different to 
working via blocks.

Most of the required data is passed through mtd and you don't need any special 
platform data beyond the nand setup in the board tuning file.




--
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] 6+ messages in thread

* Microsoft Forefront Server Security forwarded attachment
@ 2012-02-03 20:12 messaging.hpitsecurity
  0 siblings, 0 replies; 6+ messages in thread
From: messaging.hpitsecurity @ 2012-02-03 20:12 UTC (permalink / raw)
  To: travis; +Cc: akpm, steiner, x86, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 456 bytes --]


The body from the message "Re: [PATCH 3/3] UV Update NMI handlers", originally sent to you by linux-kernel-owner@vger.kernel.org (linux-kernel-owner@vger.kernel.org), has been forwarded to you from the Microsoft Forefront Server Security Quarantine area.
This message body may have been re-scanned by Microsoft Forefront Server Security and handled according to the appropriate scan job's settings.




<<Body of Message>>

[-- Attachment #2: Body of Message --]
[-- Type: application/octet-stream, Size: 612 bytes --]


* Mike Travis <travis@sgi.com> wrote:

> ---
>  arch/x86/kernel/apic/x2apic_uv_x.c |  132 +++++++++++++++++++++++++++++--------
>  1 file changed, 105 insertions(+), 27 deletions(-)

This patch is stock full of basic code cleanliness violations - 
it's a highly educational collection of various uglies so I'm 
going to ignore it.

Thanks,

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Microsoft Forefront Server Security forwarded attachment
@ 2012-02-03 19:58 messaging.hpitsecurity
  0 siblings, 0 replies; 6+ messages in thread
From: messaging.hpitsecurity @ 2012-02-03 19:58 UTC (permalink / raw)
  To: linux-kernel; +Cc: akpm, kyle, deller, jejb, xiyou.wangcong, linux-parisc

[-- Attachment #1: Type: text/plain, Size: 500 bytes --]


The body from the message "[Patch] parisc: include <linux/prefetch.h> in drivers/parisc/iommu-helpers.h", originally sent to you by linux-kernel-owner@vger.kernel.org (linux-kernel-owner@vger.kernel.org), has been forwarded to you from the Microsoft Forefront Server Security Quarantine area.
This message body may have been re-scanned by Microsoft Forefront Server Security and handled according to the appropriate scan job's settings.




<<Body of Message>>

[-- Attachment #2: Body of Message --]
[-- Type: application/octet-stream, Size: 1029 bytes --]

drivers/parisc/iommu-helpers.h:62: error: implicit declaration of function 'prefetchw'
make[3]: *** [drivers/parisc/sba_iommu.o] Error 1

drivers/parisc/iommu-helpers.h needs to #include <linux/prefetch.h>
where prefetchw is declared.

Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Helge Deller <deller@gmx.de>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>

---
diff --git a/drivers/parisc/iommu-helpers.h b/drivers/parisc/iommu-helpers.h
index a9c46cc..460aed9 100644
--- a/drivers/parisc/iommu-helpers.h
+++ b/drivers/parisc/iommu-helpers.h
@@ -1,3 +1,5 @@
+#include <linux/prefetch.h>
+
 /**
  * iommu_fill_pdir - Insert coalesced scatter/gather chunks into the I/O Pdir.
  * @ioc: The I/O Controller.
--
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 related	[flat|nested] 6+ messages in thread

* Microsoft Forefront Server Security forwarded attachment
@ 2012-02-03 19:42 messaging.hpitsecurity
  0 siblings, 0 replies; 6+ messages in thread
From: messaging.hpitsecurity @ 2012-02-03 19:42 UTC (permalink / raw)
  To: josh
  Cc: linux-kernel, mingo, laijs, dipankar, akpm, mathieu.desnoyers,
	niv, tglx, peterz, rostedt, Valdis.Kletnieks, dhowells

[-- Attachment #1: Type: text/plain, Size: 486 bytes --]


The body from the message "Re: [PATCH RFC tip/core/rcu 14/41] rcu: Limit lazy-callback duration", originally sent to you by linux-kernel-owner@vger.kernel.org (linux-kernel-owner@vger.kernel.org), has been forwarded to you from the Microsoft Forefront Server Security Quarantine area.
This message body may have been re-scanned by Microsoft Forefront Server Security and handled according to the appropriate scan job's settings.




<<Body of Message>>

[-- Attachment #2: Body of Message --]
[-- Type: application/octet-stream, Size: 3064 bytes --]

On Thu, Feb 02, 2012 at 08:07:51PM -0800, Josh Triplett wrote:
> On Thu, Feb 02, 2012 at 09:13:42AM -0800, Paul E. McKenney wrote:
> > On Wed, Feb 01, 2012 at 06:03:56PM -0800, Josh Triplett wrote:
> > > On Wed, Feb 01, 2012 at 11:41:32AM -0800, Paul E. McKenney wrote:
> > > > Currently, a given CPU is permitted to remain in dyntick-idle mode
> > > > indefinitely if it has only lazy RCU callbacks queued.  This is vulnerable
> > > > to corner cases in NUMA systems, so limit the time to six seconds by
> > > > default.  (Currently controlled by a cpp macro.)
> > > 
> > > I wonder: should this scale with the number of callbacks, or do we not
> > > want to make estimates about memory usage based on that?
> > 
> > Interesting.  Which way would you scale it?  ;-)
> 
> Heh, I'd figured "don't wait too long if you have a giant pile of
> callbacks", but I can see how the other direction could make sense as
> well. :)

;-)

> > > Interestingly, with kfree_rcu, we actually know at callback queuing time
> > > *exactly* how much memory we'll get back by calling the callback, and we
> > > could sum up those numbers.
> > 
> > We can indeed calculate for kfree_rcu(), but we won't be able to for
> > call_rcu_lazy(), which is my current approach for cases where you cannot
> > use kfree_rcu() due to (for example) freeing up a linked structure.
> > A very large fraction of the call_rcu()s in the kernel could become
> > call_rcu_lazy().
> 
> So, doing anything other than freeing memory makes a callback non-lazy?
> Based on that, I'd find it at least somewhat surprising if any of the
> current callers of call_rcu (other than synchronize_rcu() and similar)
> had non-lazy callbacks.

Yep!  But the caller has to tell me.

Something like 90% of the call_rcu()s could be call_rcu_lazy(), but there
are a significant number that wake someone up, manipulate a reference
counter that someone else is paying attention to, etc.

> > At some point in the future, it might make sense to tie into the
> > low-memory notifier, which could potentially allow the longer timeout
> > to be omitted.
> 
> Exactly the kind of thing that made me wonder about tracking the actual
> amount of memory to free.  Still seems like a potentially useful
> statistic to track on its own.

There is the qlen statistic in the debugfs tracing, tracked on a per-CPU
basis.  But unless it is kfree_rcu(), I have no way to tell how much
memory a given callback frees.

> > My current guess is that the recent change allowing idle CPUs to
> > exhaust their callback lists will make this kind of fine-tuning
> > unnecessary, but we will see!
> 
> Good point; given that fix, idle CPUs should never need to wake up for
> callbacks at all.

Here is hoping!  ;-)

							Thanx, Paul

--
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] 6+ messages in thread

* Microsoft Forefront Server Security forwarded attachment
@ 2012-02-03 19:06 messaging.hpitsecurity
  0 siblings, 0 replies; 6+ messages in thread
From: messaging.hpitsecurity @ 2012-02-03 19:06 UTC (permalink / raw)
  To: xiyou.wangcong; +Cc: linux-kernel, akpm, hskinnemoen

[-- Attachment #1: Type: text/plain, Size: 464 bytes --]


The body from the message "Re: [Patch] avr32: select GENERIC_ATOMIC64", originally sent to you by linux-kernel-owner@vger.kernel.org (linux-kernel-owner@vger.kernel.org), has been forwarded to you from the Microsoft Forefront Server Security Quarantine area.
This message body may have been re-scanned by Microsoft Forefront Server Security and handled according to the appropriate scan job's settings.




<<Body of Message>>

[-- Attachment #2: Body of Message --]
[-- Type: application/octet-stream, Size: 1403 bytes --]

Around Fri 03 Feb 2012 15:03:00 +0800 or thereabout, Cong Wang wrote:
> avr32 doesn't implement atomic64_ operations, if not select this,
> we would get:
> 
> kernel/trace/trace_clock.c:117: error: syntax error before 'trace_counter'
> kernel/trace/trace_clock.c:126: error: implicit declaration of function 'atomic64_add_return'
> 
> Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
> Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
> Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>

Thanks Cong, but Fabio beat you to it; https://lkml.org/lkml/2012/2/2/406

The above patch (similar to yours), was just pulled into Andrews tree.

> ---
> diff --git a/arch/avr32/Kconfig b/arch/avr32/Kconfig
> index 197e96f..6ecb8f4 100644
> --- a/arch/avr32/Kconfig
> +++ b/arch/avr32/Kconfig
> @@ -11,6 +11,7 @@ config AVR32
>  	select HARDIRQS_SW_RESEND
>  	select GENERIC_IRQ_SHOW
>  	select ARCH_HAVE_NMI_SAFE_CMPXCHG
> +	select GENERIC_ATOMIC64
>  	help
>  	  AVR32 is a high-performance 32-bit RISC microprocessor core,
>  	  designed for cost-sensitive embedded applications, with particular

-- 
mvh
Hans-Christian Egtvedt
--
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] 6+ messages in thread

* Microsoft Forefront Server Security forwarded attachment
@ 2012-02-03 16:43 messaging.hpitsecurity
  0 siblings, 0 replies; 6+ messages in thread
From: messaging.hpitsecurity @ 2012-02-03 16:43 UTC (permalink / raw)
  To: rusty; +Cc: eric.dumazet, linux-kernel, linaro-dev, patches, dmitry.antipov

[-- Attachment #1: Type: text/plain, Size: 468 bytes --]


The body from the message "[PATCH] module: debugging check for runaway kthreads", originally sent to you by linux-kernel-owner@vger.kernel.org (linux-kernel-owner@vger.kernel.org), has been forwarded to you from the Microsoft Forefront Server Security Quarantine area.
This message body may have been re-scanned by Microsoft Forefront Server Security and handled according to the appropriate scan job's settings.




<<Body of Message>>

[-- Attachment #2: Body of Message --]
[-- Type: application/octet-stream, Size: 5658 bytes --]

Debugging option CONFIG_MODULE_KTHREAD_CHECK provides a way to check
whether all kernel threads created by the module and have used module
code as a thread worker function are really exited when the module is
unloaded.

See http://marc.info/?l=linux-kernel&m=132811276131767&w=2 to check
why it might be useful.

Signed-off-by: Dmitry Antipov <dmitry.antipov@linaro.org>
---
 include/linux/kthread.h |    5 +++++
 init/Kconfig            |    9 +++++++++
 kernel/kthread.c        |   24 ++++++++++++++++++++++++
 kernel/module.c         |   45 +++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 83 insertions(+), 0 deletions(-)

diff --git a/include/linux/kthread.h b/include/linux/kthread.h
index 0714b24..33897c3 100644
--- a/include/linux/kthread.h
+++ b/include/linux/kthread.h
@@ -13,6 +13,11 @@ struct task_struct *kthread_create_on_node(int (*threadfn)(void *data),
 #define kthread_create(threadfn, data, namefmt, arg...) \
 	kthread_create_on_node(threadfn, data, -1, namefmt, ##arg)
 
+#ifdef CONFIG_MODULE_KTHREAD_CHECK
+unsigned long get_kthread_func(struct task_struct *tsk);
+#else
+#define get_kthread_func(tsk, addr, mod) (0)
+#endif
 
 /**
  * kthread_run - create and wake a thread.
diff --git a/init/Kconfig b/init/Kconfig
index 3f42cd6..fa7c6e0 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1397,6 +1397,15 @@ config MODULE_FORCE_UNLOAD
 	  rmmod).  This is mainly for kernel developers and desperate users.
 	  If unsure, say N.
 
+config MODULE_KTHREAD_CHECK
+	bool "Check for runaway kernel threads at module unload"
+	depends on MODULE_UNLOAD && EXPERIMENTAL && DEBUG_KERNEL
+	help
+	  This option allows you to check whether all kernel threads created
+	  by the module and have used module code as a thread worker function
+	  are really exited when the module is unloaded. This is mainly for
+	  module developers. If insure, say N.
+
 config MODVERSIONS
 	bool "Module versioning support"
 	help
diff --git a/kernel/kthread.c b/kernel/kthread.c
index 3d3de63..5c53817 100644
--- a/kernel/kthread.c
+++ b/kernel/kthread.c
@@ -38,6 +38,9 @@ struct kthread_create_info
 
 struct kthread {
 	int should_stop;
+#ifdef CONFIG_MODULE_KTHREAD_CHECK
+	void *fn;
+#endif
 	void *data;
 	struct completion exited;
 };
@@ -45,6 +48,24 @@ struct kthread {
 #define to_kthread(tsk)	\
 	container_of((tsk)->vfork_done, struct kthread, exited)
 
+#ifdef CONFIG_MODULE_KTHREAD_CHECK
+
+unsigned long get_kthread_func(struct task_struct *tsk)
+{
+	struct kthread *kt;
+	unsigned long addr;
+
+	get_task_struct(tsk);
+	BUG_ON(!(tsk->flags & PF_KTHREAD));
+	kt = to_kthread(tsk);
+	barrier();
+	addr = tsk->vfork_done ? (unsigned long)kt->fn : 0UL;
+	put_task_struct(tsk);
+	return addr;
+}
+
+#endif /* CONFIG_MODULE_KTHREAD_CHECK */
+
 /**
  * kthread_should_stop - should this kthread return now?
  *
@@ -106,6 +127,9 @@ static int kthread(void *_create)
 	int ret;
 
 	self.should_stop = 0;
+#ifdef CONFIG_MODULE_KTHREAD_CHECK
+	self.fn = threadfn;
+#endif
 	self.data = data;
 	init_completion(&self.exited);
 	current->vfork_done = &self.exited;
diff --git a/kernel/module.c b/kernel/module.c
index 2c93276..fe6637b 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -45,6 +45,7 @@
 #include <linux/string.h>
 #include <linux/mutex.h>
 #include <linux/rculist.h>
+#include <linux/kthread.h>
 #include <asm/uaccess.h>
 #include <asm/cacheflush.h>
 #include <asm/mmu_context.h>
@@ -764,6 +765,49 @@ static void wait_for_zero_refcount(struct module *mod)
 	mutex_lock(&module_mutex);
 }
 
+#ifdef CONFIG_KALLSYMS
+static const char *get_ksymbol(struct module *mod, unsigned long addr,
+			       unsigned long *size, unsigned long *offset);
+#else
+#define get_ksymbol(mod, addr, size, offset) NULL
+#endif
+
+#ifdef CONFIG_MODULE_KTHREAD_CHECK
+
+static void check_kthreads(struct module *mod)
+{
+	unsigned long flags;
+	struct task_struct *g, *p;
+
+	read_lock_irqsave(&tasklist_lock, flags);
+	do_each_thread(g, p) {
+		const char *name;
+		unsigned long addr, offset, size;
+
+		/* Note kthreadd is special. Other kthreads should
+		   have their 'struct kthread' on the stack until
+		   do_exit() calls schedule() for the last time. */
+		if (p->mm || p == kthreadd_task)
+			continue;
+
+		addr = get_kthread_func(p);
+		if (__module_text_address(addr) == mod) {
+			name = get_ksymbol(mod, addr, &size, &offset);
+			printk(KERN_WARNING "khread %p[%s:%d] running "
+			       "0x%lx(%s) is still alive, fix module %s, "
+			       "crash possible\n", p, p->comm, p->pid, addr,
+			       (name ? name : "<unknown>"), mod->name);
+		}
+	} while_each_thread(g, p);
+	read_unlock_irqrestore(&tasklist_lock, flags);
+}
+
+#else
+
+#define check_kthreads(mod) do { } while (0)
+
+#endif /* CONFIG_MODULE_KTHREAD_CHECK */
+
 SYSCALL_DEFINE2(delete_module, const char __user *, name_user,
 		unsigned int, flags)
 {
@@ -831,6 +875,7 @@ SYSCALL_DEFINE2(delete_module, const char __user *, name_user,
 	blocking_notifier_call_chain(&module_notify_list,
 				     MODULE_STATE_GOING, mod);
 	async_synchronize_full();
+	check_kthreads(mod);
 
 	/* Store the name of the last unloaded module for diagnostic purposes */
 	strlcpy(last_unloaded_module, mod->name, sizeof(last_unloaded_module));
-- 
1.7.7.6

--
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 related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-02-03 20:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-17 23:16 Microsoft Forefront Server Security forwarded attachment ForefrontServerSecurity
2012-02-03 16:43 messaging.hpitsecurity
2012-02-03 19:06 messaging.hpitsecurity
2012-02-03 19:42 messaging.hpitsecurity
2012-02-03 19:58 messaging.hpitsecurity
2012-02-03 20:12 messaging.hpitsecurity

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.