All of lore.kernel.org
 help / color / mirror / Atom feed
* How to hook bios function?!
@ 2015-02-17  6:12 Navid Movahedi
  2015-02-17  6:46 ` Andrei Borzenkov
  0 siblings, 1 reply; 5+ messages in thread
From: Navid Movahedi @ 2015-02-17  6:12 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 200 bytes --]

Hi
Does grub2 have a mechanism to hook bios disk read function (int 0x13) and
replace it with a new function? if it is possible how can i do that and
which part of code is responsible for it?

Thanks

[-- Attachment #2: Type: text/html, Size: 255 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to hook bios function?!
  2015-02-17  6:12 How to hook bios function?! Navid Movahedi
@ 2015-02-17  6:46 ` Andrei Borzenkov
  2015-02-17 10:47   ` Navid Movahedi
  0 siblings, 1 reply; 5+ messages in thread
From: Andrei Borzenkov @ 2015-02-17  6:46 UTC (permalink / raw)
  To: The development of GNU GRUB

On Tue, Feb 17, 2015 at 9:12 AM, Navid Movahedi <n.movahedi67@gmail.com> wrote:
> Hi
> Does grub2 have a mechanism to hook bios disk read function (int 0x13) and
> replace it with a new function? if it is possible how can i do that and
> which part of code is responsible for it?

I'm not aware of any generic code to install resident handler. Special
case is drivemap command which does exactly that. What exactly are you
trying to do?


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to hook bios function?!
  2015-02-17  6:46 ` Andrei Borzenkov
@ 2015-02-17 10:47   ` Navid Movahedi
  2015-02-17 11:15     ` Navid Movahedi
  0 siblings, 1 reply; 5+ messages in thread
From: Navid Movahedi @ 2015-02-17 10:47 UTC (permalink / raw)
  To: The development of GNU GRUB

[-- Attachment #1: Type: text/plain, Size: 434 bytes --]

Thanks Andrei

I have systems with windows partition encrypted and i want to patch grub2
to boot windows from this partition. as you know in order to boot windows,
bootmgr and winload use int 0x13 to load windows kernel from disk, so i
need to hook interrupt 0x13 to decrypt disk on the fly.

Another question: After the bios hooking is done i need to do this process
for UEFI, Does grub2 support UEFI disk routines hooking? and How?

[-- Attachment #2: Type: text/html, Size: 508 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to hook bios function?!
  2015-02-17 10:47   ` Navid Movahedi
@ 2015-02-17 11:15     ` Navid Movahedi
  2015-02-17 12:30       ` Vladimir 'phcoder' Serbinenko
  0 siblings, 1 reply; 5+ messages in thread
From: Navid Movahedi @ 2015-02-17 11:15 UTC (permalink / raw)
  To: The development of GNU GRUB

[-- Attachment #1: Type: text/plain, Size: 767 bytes --]

I found function grub_disk_read in include/grub/disk.h that is implemented
in grub-core/kern/disk.c . If i add my decryption algorithm to this
function, Does this modified function do the job after chainload to windows
boot manager?

On Tue, Feb 17, 2015 at 2:17 PM, Navid Movahedi <n.movahedi67@gmail.com>
wrote:

> Thanks Andrei
>
> I have systems with windows partition encrypted and i want to patch grub2
> to boot windows from this partition. as you know in order to boot windows,
> bootmgr and winload use int 0x13 to load windows kernel from disk, so i
> need to hook interrupt 0x13 to decrypt disk on the fly.
>
> Another question: After the bios hooking is done i need to do this process
> for UEFI, Does grub2 support UEFI disk routines hooking? and How?
>

[-- Attachment #2: Type: text/html, Size: 1121 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to hook bios function?!
  2015-02-17 11:15     ` Navid Movahedi
@ 2015-02-17 12:30       ` Vladimir 'phcoder' Serbinenko
  0 siblings, 0 replies; 5+ messages in thread
From: Vladimir 'phcoder' Serbinenko @ 2015-02-17 12:30 UTC (permalink / raw)
  To: The development of GRUB 2

[-- Attachment #1: Type: text/plain, Size: 1108 bytes --]

No
Le 2015-02-17 12:15, "Navid Movahedi" <n.movahedi67@gmail.com> a écrit :
>
> I found function grub_disk_read in include/grub/disk.h that is
implemented in grub-core/kern/disk.c . If i add my decryption algorithm to
this function, Does this modified function do the job after chainload to
windows boot manager?
>
No
> On Tue, Feb 17, 2015 at 2:17 PM, Navid Movahedi <n.movahedi67@gmail.com>
wrote:
>>
>> Thanks Andrei
>>
>> I have systems with windows partition encrypted and i want to patch
grub2 to boot windows from this partition. as you know in order to boot
windows, bootmgr and winload use int 0x13 to load windows kernel from disk,
so i need to hook interrupt 0x13 to decrypt disk on the fly.
>>
Drivemap is a good example on achieving sth like this.
>> Another question: After the bios hooking is done i need to do this
process for UEFI, Does grub2 support UEFI disk routines hooking? and How?
>
Read EFI spec
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>

[-- Attachment #2: Type: text/html, Size: 1502 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-02-17 12:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-17  6:12 How to hook bios function?! Navid Movahedi
2015-02-17  6:46 ` Andrei Borzenkov
2015-02-17 10:47   ` Navid Movahedi
2015-02-17 11:15     ` Navid Movahedi
2015-02-17 12:30       ` Vladimir 'phcoder' Serbinenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.