lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.1003252017360.17596@hermes-2.csi.cam.ac.uk>
Date:	Thu, 25 Mar 2010 20:48:12 +0000 (GMT)
From:	Anton Altaparmakov <aia21@....ac.uk>
To:	Ralf Baechle <ralf@...ux-mips.org>
cc:	Chris Dearman <chris@...s.com>, linux-mips@...ux-mips.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH] Fix __vmalloc(), etc on MIPS for non-GPL modules

Hi,

The commit 351336929ccf222ae38ff0cb7a8dd5fd5c6236a0 which can be seen 
here:

http://kerneltrap.org/mailarchive/git-commits-head/2008/4/28/1639134

Breaks all non-GPL modules that use __vmalloc() or any of the vmap(), 
vm_map_ram(), etc functions on MIPS architecture.

All those functions are EXPORT_SYMBOL() so are meant to be allowed to be 
used by non-GPL kernel modules.  These calls all take page protection as 
an argument which is normally a constant like PAGE_KERNEL.

This commit causes all protection constants like PAGE_KERNEL to not be 
constants and instead to contain the GPL-only symbol 
_page_cachable_default.

This means that all calls to __vmalloc(), vmap(), etc, cause non-GPL 
modules to fail to link with the complaint that they are trying to use the 
GPL-only symbol _page_cachable_default...

I therefore propose that the EXPORT_SYMBOL_GPL(_page_cachable_default) is 
changed to EXPORT_SYMBOL(_page_cachable_default) to re-instate the 
ability for non-GPL modules to call __vmalloc(), vmap(), vm_map_ram(), 
and such like.

Here is a patch that does this.  If you approve, please apply it.

Thanks a lot in advance for your consideration.

Best regards,

	Anton
-- 
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer, http://www.linux-ntfs.org/

---
[PATCH] Fix __vmalloc(), vmap(), vm_map_ram(), etc on MIPS for non-GPL modules.

Commit 351336929ccf222ae38ff0cb7a8dd5fd5c6236a0 broke these functions for 
non-GPL modules by causing the page protection constants not to be 
constants any more and instead to include a GPL-only symbol and as these 
functions take a page protection argument this causes them to not be 
callable from non-GPL modules any more even though the functions are 
EXPORT_SYMBOL().

Signed-off-by: Anton Altaparmakov <aia21@...tab.net>

diff --git a/arch/mips/mm/cache.c b/arch/mips/mm/cache.c
index be8627b..12af739 100644
--- a/arch/mips/mm/cache.c
+++ b/arch/mips/mm/cache.c
@@ -133,7 +133,7 @@ void __update_cache(struct vm_area_struct *vma, 
unsigned lon
 }
 
 unsigned long _page_cachable_default;
-EXPORT_SYMBOL_GPL(_page_cachable_default);
+EXPORT_SYMBOL(_page_cachable_default);
 
 static inline void setup_protection_map(void)
 {

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ