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: <bb057cd21003181038j56992f68p6d72d0058d72f82f@mail.gmail.com>
Date:	Thu, 18 Mar 2010 10:38:44 -0700
From:	Yang <teddyyyy123@...il.com>
To:	linux-kernel@...r.kernel.org
Subject: should we use $(__USER_DS) or $(__KERNEL_DS) when entering interrupt 
	handlers?

in handling an interrupt, kernel first saves all the register contents , in
the SAVE_ALL macro, in the last part of this macro,  it adjusts the
data segment selectors for kernel mode.

in kernel 2.4, the __KERNEL_DS segment is loaded into %ds and %es, at line
98 of:

http://lxr.linux.no/#linux-old+v2.4.31/arch/i386/kernel/entry.S


but in kernel 2.6, __USER_DS segment is loaded into %ds and %es, at line
227 of :
http://lxr.linux.no/#linux+v2.6.33/arch/x86/kernel/entry_32.S


I understand that on x86, all the data segment selector contents are
basically the same, but semantically it's better to use the KERNEL_DS
because we are working in kernel mode?



Thanks!
Yang
--
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