+ mm-zpool-use-prefixed-module-loading.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: mm/zpool: use prefixed module loading
has been added to the -mm tree.  Its filename is
     mm-zpool-use-prefixed-module-loading.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/mm-zpool-use-prefixed-module-loading.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/mm-zpool-use-prefixed-module-loading.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Kees Cook <keescook@xxxxxxxxxxxx>
Subject: mm/zpool: use prefixed module loading

To avoid potential format string expansion via module parameters, do not
use the zpool type directly in request_module() without a format string. 
Additionally, to avoid arbitrary modules being loaded via zpool API (e.g. 
via the zswap_zpool_type module parameter) add a "zpool-" prefix to the
requested module, as well as module aliases for the existing zpool types
(zbud and zsmalloc).

Signed-off-by: Kees Cook <keescook@xxxxxxxxxxxx>
Cc: Seth Jennings <sjennings@xxxxxxxxxxxxxx>
Cc: Minchan Kim <minchan@xxxxxxxxxx>
Cc: Nitin Gupta <ngupta@xxxxxxxxxx>
Acked-by: Dan Streetman <ddstreet@xxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/zbud.c     |    1 +
 mm/zpool.c    |    2 +-
 mm/zsmalloc.c |    1 +
 3 files changed, 3 insertions(+), 1 deletion(-)

diff -puN mm/zbud.c~mm-zpool-use-prefixed-module-loading mm/zbud.c
--- a/mm/zbud.c~mm-zpool-use-prefixed-module-loading
+++ a/mm/zbud.c
@@ -195,6 +195,7 @@ static struct zpool_driver zbud_zpool_dr
 	.total_size =	zbud_zpool_total_size,
 };
 
+MODULE_ALIAS("zpool-zbud");
 #endif /* CONFIG_ZPOOL */
 
 /*****************
diff -puN mm/zpool.c~mm-zpool-use-prefixed-module-loading mm/zpool.c
--- a/mm/zpool.c~mm-zpool-use-prefixed-module-loading
+++ a/mm/zpool.c
@@ -150,7 +150,7 @@ struct zpool *zpool_create_pool(char *ty
 	driver = zpool_get_driver(type);
 
 	if (!driver) {
-		request_module(type);
+		request_module("zpool-%s", type);
 		driver = zpool_get_driver(type);
 	}
 
diff -puN mm/zsmalloc.c~mm-zpool-use-prefixed-module-loading mm/zsmalloc.c
--- a/mm/zsmalloc.c~mm-zpool-use-prefixed-module-loading
+++ a/mm/zsmalloc.c
@@ -315,6 +315,7 @@ static struct zpool_driver zs_zpool_driv
 	.total_size =	zs_zpool_total_size,
 };
 
+MODULE_ALIAS("zpool-zsmalloc");
 #endif /* CONFIG_ZPOOL */
 
 /* per-cpu VM mapping areas for zspage accesses that cross page boundaries */
_

Patches currently in -mm which might be from keescook@xxxxxxxxxxxx are

origin.patch
mm-zpool-use-prefixed-module-loading.patch
lib-vsprintf-add-%pt-format-specifier.patch
linux-next.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux