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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tencent_6238B3302FB554EC5EEF475F11470C048509@qq.com>
Date:   Tue, 17 Jan 2023 10:01:21 +0800
From:   Rong Tao <rtoax@...mail.com>
To:     42.hyeyoo@...il.com
Cc:     akpm@...ux-foundation.org, cl@...ux.com, iamjoonsoo.kim@....com,
        linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        penberg@...nel.org, rientjes@...gle.com, roman.gushchin@...ux.dev,
        rongtao@...tc.cn, rtoax@...mail.com, sdf@...gle.com,
        vbabka@...e.cz, yhs@...com
Subject: Re: [PATCH] mm: Functions used internally should not be put into

Hi, dear Hyeonggon.

If sl*b_def.h is not intended to be used externally. That is to say we should
never include sl*b_def.h in module? The following code will not compile success
since commit 40f3bf0cb04c("mm: Convert struct page to struct slab in functions
used by other subsystems"), but success in older kernel. Especially for modules
that use the kmem_cache structure, this is catastrophic.

	#include <linux/init.h>
	#include <linux/printk.h>
	#include <linux/slab.h>
	#include <linux/slab_def.h>

	static int kernel_init(void)
	{
		printk(KERN_INFO "my init.\n");
		return 0;
	}

	static void kernel_exit(void)
	{
		printk(KERN_INFO "my exit.\n");
	}

	module_init(kernel_init);
	module_exit(kernel_exit);

You are right, if sl*b_def.h is not intended to used externally, Modules that
use kmem_cache structures should not be designed from the outset to use
kmem_cache structures. Or the kernel can use this patch, and these modules can
be compiled successfully.

Best wishes.

Rong Tao

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ