Reid Lindsay | 11 Jun 07:54 2016

Issues with vmalloc and ebtables on ColdFire V4e

Hi,

We are having some stability issues on our ColdFire V4e based board and hope
this forum can provide some advice on how to track the issue down.

The CPU is the 54415 running a 2.6.38 kernel with BSP patches and bug fixes
provided by Freescale. 64MiB SRAM and 64MiB NAND Flash. The compiler is GCC
4.4.1-cs4.4-54.

The problem is that when modifying the ebtables structures by
adding/flushing the rules, sooner or later a segfault occurs in a (seemingly
random) userspace process, with the faulting address within a region of
memory vmalloc'ed by ebtables (for our BSP, the vmalloc region is
0xc0000000-0xcfffffff). The fault does not occur right after modifying the
rules, it occurs some time (sometimes up to hours) later.

I was able to avoid the segfaults by replacing all vmalloc/vfree calls with
kmalloc/kfree in net/bridge/netfilter/ebtables.c.

Although other kernel subsystems make use of vmalloc, these regions seem to
be allocated once and never free'd during runtime.

For example:

cat /proc/vmallocinfo

0xc0026000-0xc0048000  139264 ubi_attach_mtd_dev+0x436/0x9d0 pages=16
pfn=41891 vmalloc
0xc004a000-0xc006c000  139264 ubi_attach_mtd_dev+0x44a/0x9d0 pages=16
pfn=4188e vmalloc
(Continue reading)

Krzysztof Kozlowski | 10 Jun 12:11 2016

[PATCH v4 00/44] dma-mapping: Use unsigned long for dma_attrs

Hi,

This is fourth approach for replacing struct dma_attrs with unsigned
long.

The main patch (1/44) doing the change is split into many subpatches
for easier review (2-42).  They should be squashed together when
applying.

*Important:* Patchset is tested on my ARM platforms and *only* build
tested on allyesconfigs: ARM, ARM64, i386, x86_64 and powerpc.
Please kindly provide reviewes and tests for other platforms.

Rebased on next-20160607.

For easier testing the patchset is available here:
repo:   https://github.com/krzk/linux
branch: for-next/dma-attrs-const-v4

Changes since v3
================
1. Collect some acks.
2. Drop wrong patch 1/45 ("powerpc: dma-mapping: Don't hard-code
   the value of DMA_ATTR_WEAK_ORDERING").
3. Minor fix pointed out by Michael Ellerman.

Changes since v2
================
1. Follow Christoph Hellwig's comments (don't use BIT add
   documentation, remove dma_get_attr).
(Continue reading)

Geert Uytterhoeven | 6 Jun 09:45 2016
Gravatar

[PATCH] m68k/defconfig: Update defconfigs for v4.7-rc2

Signed-off-by: Geert Uytterhoeven <geert <at> linux-m68k.org>
---
To be folded into m68k/defconfig: Update defconfigs for v4.7-rc1
---
 arch/m68k/configs/amiga_defconfig    | 1 +
 arch/m68k/configs/apollo_defconfig   | 1 +
 arch/m68k/configs/atari_defconfig    | 1 +
 arch/m68k/configs/bvme6000_defconfig | 1 +
 arch/m68k/configs/hp300_defconfig    | 1 +
 arch/m68k/configs/mac_defconfig      | 1 +
 arch/m68k/configs/multi_defconfig    | 1 +
 arch/m68k/configs/mvme147_defconfig  | 1 +
 arch/m68k/configs/mvme16x_defconfig  | 1 +
 arch/m68k/configs/q40_defconfig      | 1 +
 arch/m68k/configs/sun3_defconfig     | 1 +
 arch/m68k/configs/sun3x_defconfig    | 1 +
 12 files changed, 12 insertions(+)

diff --git a/arch/m68k/configs/amiga_defconfig b/arch/m68k/configs/amiga_defconfig
index 2a8f5ee65f763ba5..8f5b6f7dd1366024 100644
--- a/arch/m68k/configs/amiga_defconfig
+++ b/arch/m68k/configs/amiga_defconfig
 <at>  <at>  -555,6 +555,7  <at>  <at>  CONFIG_TEST_STRING_HELPERS=m
 CONFIG_TEST_KSTRTOX=m
 CONFIG_TEST_PRINTF=m
 CONFIG_TEST_BITMAP=m
+CONFIG_TEST_UUID=m
 CONFIG_TEST_RHASHTABLE=m
 CONFIG_TEST_HASH=m
 CONFIG_TEST_LKM=m
(Continue reading)

Mel Gorman | 2 Jun 14:21 2016
Picon

[PATCH] mm, page_alloc: Recalculate the preferred zoneref if the context can ignore memory policies

The optimistic fast path may use cpuset_current_mems_allowed instead of
of a NULL nodemask supplied by the caller for cpuset allocations. The
preferred zone is calculated on this basis for statistic purposes and
as a starting point in the zonelist iterator.

However, if the context can ignore memory policies due to being atomic or
being able to ignore watermarks then the starting point in the zonelist
iterator is no longer correct. This patch resets the zonelist iterator in
the allocator slowpath if the context can ignore memory policies. This will
alter the zone used for statistics but only after it is known that it makes
sense for that context. Resetting it before entering the slowpath would
potentially allow an ALLOC_CPUSET allocation to be accounted for against
the wrong zone. Note that while nodemask is not explicitly set to the
original nodemask, it would only have been overwritten if cpuset_enabled()
and it was reset before the slowpath was entered.

Signed-off-by: Mel Gorman <mgorman <at> techsingularity.net>
Acked-by: Vlastimil Babka <vbabka <at> suse.cz>
---
 mm/page_alloc.c | 23 ++++++++++++++++-------
 1 file changed, 16 insertions(+), 7 deletions(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 557549c81083..b17358617a1b 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
 <at>  <at>  -3598,6 +3598,17  <at>  <at>  __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order,
 	 */
 	alloc_flags = gfp_to_alloc_flags(gfp_mask);

(Continue reading)

Mel Gorman | 31 May 12:08 2016
Picon

[PATCH] mm, page_alloc: Reset zonelist iterator after resetting fair zone allocation policy

Geert Uytterhoeven reported the following problem that bisected to commit
c33d6c06f60f ("mm, page_alloc: avoid looking up the first zone in a
zonelist twice") on m68k/ARAnyM

    BUG: scheduling while atomic: cron/668/0x10c9a0c0
    Modules linked in:
    CPU: 0 PID: 668 Comm: cron Not tainted 4.6.0-atari-05133-gc33d6c06f60f710f #364
    Stack from 10c9a074:
            10c9a074 003763ca 0003d7d0 00361a58 00bcf834 0000029c 10c9a0c0 10c9a0c0
            002f0f42 00bcf5e0 00000000 00000082 0048e018 00000000 00000000 002f0c30
            000410de 00000000 00000000 10c9a0e0 002f112c 00000000 7fffffff 10c9a180
            003b1490 00bcf60c 10c9a1f0 10c9a118 002f2d30 00000000 10c9a174 10c9a180
            0003ef56 003b1490 00bcf60c 003b1490 00bcf60c 0003eff6 003b1490 00bcf60c
            003b1490 10c9a128 002f118e 7fffffff 00000082 002f1612 002f1624 7fffffff
    Call Trace: [<0003d7d0>] __schedule_bug+0x40/0x54
     [<002f0f42>] __schedule+0x312/0x388
     [<002f0c30>] __schedule+0x0/0x388
     [<000410de>] prepare_to_wait+0x0/0x52
     [<002f112c>] schedule+0x64/0x82
     [<002f2d30>] schedule_timeout+0xda/0x104
     [<0003ef56>] set_next_entity+0x18/0x40
     [<0003eff6>] pick_next_task_fair+0x78/0xda
     [<002f118e>] io_schedule_timeout+0x36/0x4a
     [<002f1612>] bit_wait_io+0x0/0x40
     [<002f1624>] bit_wait_io+0x12/0x40
     [<002f12c4>] __wait_on_bit+0x46/0x76
     [<0006a06a>] wait_on_page_bit_killable+0x64/0x6c
     [<002f1612>] bit_wait_io+0x0/0x40
     [<000411fe>] wake_bit_function+0x0/0x4e
     [<0006a1b8>] __lock_page_or_retry+0xde/0x124
(Continue reading)

Arnd Bergmann | 30 May 20:57 2016
Picon
Gravatar

[PATCH v4 00/16] genrtc removal

This is the promised resend of the removal of the genrtc driver and some
related code, now that we are at a good time to merge this for the coming
merge window.

The contents are the same as before, except fixing the build regressions
reported by the 0day builder: on both x86 and mn10300 the rearranging
of the header files caused some missing headers that were included
implicitly before.

Things regarding rtc are a bit intertwined, so I'm mixing patches for
drivers/rtc with drivers/char and arch. This series should make that
better in the end.

This now thoroughly removes the genrtc driver including the asm/rtc.h
headers it uses. For all architectures that still have a meaningful
asm/rtc.h, this goes through two stages:

1) make the rtc-generic implementation independent of asm/rtc.h
2) remove the asm/rtc.h header and disallow the gen_rtc driver

As the last step, the driver itself gets removed. There are a
couple of follow-up cleanup tasks that we could do once this is
all merged, including removing all the remaining nonstandard
RTC drivers from drivers/char:

- alpha most likely doesn't ever use CONFIG_RTC, as it has its
  own replacement driver in arch/alpha/kernel/rtc.c, and the legacy
  driver is slightly broken on at least one alpha machine

- loongson64 is the only MIPS machine that has the option of running
(Continue reading)

Mel Gorman | 30 May 20:56 2016
Picon

Re: BUG: scheduling while atomic: cron/668/0x10c9a0c0 (was: Re: mm, page_alloc: avoid looking up the first zone in a zonelist twice)

On Mon, May 30, 2016 at 07:37:39PM +0200, Geert Uytterhoeven wrote:
> > diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> > index dba8cfd0b2d6..f2c1e47adc11 100644
> > --- a/mm/page_alloc.c
> > +++ b/mm/page_alloc.c
> >  <at>  <at>  -3232,6 +3232,9  <at>  <at>  __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order,
> >                  * allocations are system rather than user orientated
> >                  */
> >                 ac->zonelist = node_zonelist(numa_node_id(), gfp_mask);
> > +               ac->preferred_zoneref = first_zones_zonelist(ac->zonelist,
> > +                                       ac->high_zoneidx, ac->nodemask);
> > +               ac->classzone_idx = zonelist_zone_idx(ac->preferred_zoneref);
> >                 page = get_page_from_freelist(gfp_mask, order,
> >                                                 ALLOC_NO_WATERMARKS, ac);
> >                 if (page)
> 
> Thanks, but unfortunately it doesn't help.
> 

Thanks. Please try the following instead

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index bb320cde4d6d..557549c81083 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
 <at>  <at>  -3024,6 +3024,7  <at>  <at>  get_page_from_freelist(gfp_t gfp_mask, unsigned int order, int alloc_flags,
 		apply_fair = false;
 		fair_skipped = false;
 		reset_alloc_batches(ac->preferred_zoneref->zone);
+		z = ac->preferred_zoneref;
(Continue reading)

Geert Uytterhoeven | 29 May 20:09 2016
Gravatar

[PATCH] m68k/defconfig: Update defconfigs for v4.7-rc1

Signed-off-by: Geert Uytterhoeven <geert <at> linux-m68k.org>
---
 arch/m68k/configs/amiga_defconfig    | 3 +++
 arch/m68k/configs/apollo_defconfig   | 3 +++
 arch/m68k/configs/atari_defconfig    | 3 +++
 arch/m68k/configs/bvme6000_defconfig | 3 +++
 arch/m68k/configs/hp300_defconfig    | 3 +++
 arch/m68k/configs/mac_defconfig      | 3 +++
 arch/m68k/configs/multi_defconfig    | 3 +++
 arch/m68k/configs/mvme147_defconfig  | 3 +++
 arch/m68k/configs/mvme16x_defconfig  | 3 +++
 arch/m68k/configs/q40_defconfig      | 3 +++
 arch/m68k/configs/sun3_defconfig     | 3 +++
 arch/m68k/configs/sun3x_defconfig    | 3 +++
 12 files changed, 36 insertions(+)

diff --git a/arch/m68k/configs/amiga_defconfig b/arch/m68k/configs/amiga_defconfig
index 3ee6976f60885e5b..2a8f5ee65f763ba5 100644
--- a/arch/m68k/configs/amiga_defconfig
+++ b/arch/m68k/configs/amiga_defconfig
 <at>  <at>  -9,6 +9,7  <at>  <at>  CONFIG_LOG_BUF_SHIFT=16
 # CONFIG_PID_NS is not set
 # CONFIG_NET_NS is not set
 CONFIG_BLK_DEV_INITRD=y
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_USERFAULTFD=y
 CONFIG_SLAB=y
 CONFIG_MODULES=y
 <at>  <at>  -359,6 +360,7  <at>  <at>  CONFIG_MACVTAP=m
 CONFIG_IPVLAN=m
(Continue reading)

program12 | 29 May 02:44 2016

Hello

Hi,
I am Kristi and i saw your contact through google page of your country which impress me and i feel we can be
friends to share ideals and reason together for good,if not bad then let us know more about each other and i
hope there will be no problem for us to be friend with no bad intention.You can also reply me through
email(cplkristibakar <at> outlook.com) so that i can share details about myself, i will be waiting to hear
from you soon. 
George Spelvin | 25 May 09:34 2016
Picon

[PATCH 08/10] m68k: Add <asm/archhash.h>

This provides a multiply by constant GOLDEN_RATIO_32 = 0x61C88647
for the original mc68000, which lacks a 32x32-bit multiply instruction.

Yes, the amount of optimization effort put in is excessive. :-)

Addition chains found by Yevgen Voronenko's Hcub algorithm at
http://spiral.ece.cmu.edu/mcm/gen.html

Signed-off-by: George Spelvin <linux <at> sciencehorizons.net>
Cc: Geert Uytterhoeven <geert <at> linux-m68k.org>
Cc: Greg Ungerer <gerg <at> linux-m68k.org>
Cc: linux-m68k <at> lists.linux-m68k.org
---
 arch/m68k/Kconfig                |  1 +
 arch/m68k/include/asm/archhash.h | 67 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 68 insertions(+)
 create mode 100644 arch/m68k/include/asm/archhash.h

diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index 498b567f..95197d5e 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
 <at>  <at>  -23,6 +23,7  <at>  <at>  config M68K
 	select MODULES_USE_ELF_RELA
 	select OLD_SIGSUSPEND3
 	select OLD_SIGACTION
+	select HAVE_ARCH_HASH

 config RWSEM_GENERIC_SPINLOCK
 	bool
(Continue reading)

George Spelvin | 25 May 09:33 2016
Picon

[PATCH 07/10] <linux/hash.h>: Add support for architecture-specific functions

This is just the infrastructure; there are no users yet.

This is modelled on CONFIG_ARCH_RANDOM; a CONFIG_ symbol declares
the existence of <asm/archhash.h>.

That file may define its own versions of various functions, and define
HAVE_* symbols (no CONFIG_ prefix!) to suppress the generic ones.

Signed-off-by: George Spelvin <linux <at> sciencehorizons.net>
Cc: Geert Uytterhoeven <geert <at> linux-m68k.org>
Cc: Greg Ungerer <gerg <at> linux-m68k.org>
Cc: linux-m68k <at> lists.linux-m68k.org
Cc: Alistair Francis <alistai <at> xilinx.com>
Cc: Michal Simek <michal.simek <at> xilinx.com>
Cc: Yoshinori Sato <ysato <at> users.sourceforge.jp>
Cc: uclinux-h8-devel <at> lists.sourceforge.jp
---
 arch/Kconfig         |  8 ++++++++
 fs/namei.c           |  6 +++++-
 include/linux/hash.h | 11 +++++++++++
 3 files changed, 24 insertions(+), 1 deletion(-)

diff --git a/arch/Kconfig b/arch/Kconfig
index 81869a5e..33e8d7b1 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
 <at>  <at>  -589,6 +589,14  <at>  <at>  config HAVE_STACK_VALIDATION
 	  Architecture supports the 'objtool check' host tool command, which
 	  performs compile-time stack metadata validation.

(Continue reading)


Gmane