Git Product home page Git Product logo

Comments (2)

yoloVoe avatar yoloVoe commented on September 25, 2024

tl;dr the offset is from the device and not from the partition.

This took a lot longer to resolve than expected due to us trying to modify the source code and a bunch of other misunderstandings and problems.

Anyways, we went with Ashley's suggested approach to solve this issue.
This is the bio data for a ramdisk with 1 partition, with the wrapper recording data for the first partition (when we copied over a very small file):

[ 1075.XXXXX] hwm: bio rw of size 1024 headed for 0x109800 (sector 0x84c) has flags:
[ 1075.XXXXX] hwm: bio rw of size 1024 headed for 0x109c00 (sector 0x84e) has flags:

This is the bio data for a ramdisk with 2 partitions, with the wrapper recording data for the second partition (when we copied over the same file as before):

[17361.XXXXX] hwm: bio rw of size 1024 headed for 0x509800 (sector 0x284c) has flags:
[17361.XXXXX] hwm: bio rw of size 1024 headed for 0x505800 (sector 0x282c) has flags:

We can see that the sector numbers are different (and the difference is about what I'd expect, given that the distance between the first and the second partition was about 4 MB).
It thus seems safe to assume that the bi_sector is relative to the first sector in the device and not the first sector in the partition.

from crashmonkey.

ashmrtn avatar ashmrtn commented on September 25, 2024

The work these three have done has also shown that there is two possibilities when it comes to wrapping a device with multiple partitions:

  1. a user could use disk_wrapper to wrap an entire block device with multiple partitions
  2. a user could use disk_wrapper to wrap a single partition on a block device with multiple partitions

The current disk_wrapper seems to have issues with point 2 above (something about trying to access sectors past the end of the device), but Subrat et al. were able to do part 1 above. Since part 1 above creates multiple block devices in disk_wrapper (one per partition) it make sense that the blocks would be relative to the start of the block device. If we wish to investigate part 2 above, we will need to fix disk_wrapper and then try giving it only a single partition for the target_device_path. I suspect that in the case of point 2 above we will see the block address from the start of the partition as disk_wrapper will only present 1 block device to the system.

from crashmonkey.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.