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>] [day] [month] [year] [list]
Message-ID: <f750ee71003250755kf02f87au714f634070b94d26@mail.gmail.com>
Date:	Thu, 25 Mar 2010 20:25:26 +0530
From:	kartikeyan sadasivuni <s.kartikeyan@...il.com>
To:	linux-kernel@...r.kernel.org
Subject: disabling kernel preemption from user space

Hi,

I have a system where bootloader supports
core0 running linux (control plane).
core1 running application without OS (a data plane app).

(core0 and core1 share some physical memory)

Because of this setup and application requirements
I want to ocassionally disable preemption of linux kernel
for very small periods from user space process.


Is the following valid solution to achive this ?

I will load a kernel module foo.ko which supports the following
ioctl's from user space.


PREEMPT_DISABLE:
 calls preempt_disable() from the driver (foo.ko)

PREEMPT_ENABLE:
 calls premept_enable() from the driver (foo.ko)

user space process does

ioctl(FOO_FD,  PREEMPT_DISABLE, ..);
do some short critcal work
ioctl(FOO_FD,  PREEMPT_ENABLE, ..);


Basically I want to know, if preempt_disable() and preempt_enable()
are legal across user to kernel space swtiches are only within kernel.

I don't mind if the solution is wierd/stupid
but works on all 2.6.* kernels.

-- 
S.Kartikeyan
--
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