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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 17 Jun 2008 23:26:56 +0800
From:	"Bob Zhang" <zhanglinbao@...il.com>
To:	"Jared Hulbert" <jaredeh@...il.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: Does anyone run AXFS in 2.4 version of kernel ? I am trying my best to apply AXFS patches into 2.4.18

Following is what I have known about AXFS implement .If I am not
right, please Jared Hulbert cto correct what I have said.


Honestly speaking , AXFS orgnization is pure complex , and no any
valuable document to help to understand the source code . if you want
to make clear what happned ,it is not easy .

I have spent over 2 days to read the mkfs.axfs.c , this is what I have known .
---
For axfs super block ,the best valuable infomation is some offset of regions ,
axfs image has many regions , such as node_type regions , node_index
regions,especially X
IP region,Compressed region and Byte Aligned region which are the most
important for us.

Important info is that once you have read the superblock into a buffer
head , you can get all the offset info of all regions. thus , you can
get the address of regions in the file image .
once you get the region structure , you can get the "region->fsoffset"
and "region->virt_addr" , the "region->fsoffset" present that the real
location region in the image .
For example , for XIP region , you can get all the pages of data
through "xip_region->fsoffset" . and then through node_index, you can
get responding pages.

Another key parameter is "virt_addr" ,

++++

First ,pages are of XIP or Compressed is decided by mkfs.axfs -i xml.txt
if no the xml.txt provided , mkfs.axfs should compress all the files
in the image by default.

in the main() of mkfs.axfs.c
the axfs will compute the number of files , there are some global
variables to record these .
in function named  parese_directory() it will generate many entries
reponding with these files ,and at last , it will call "is_xipfile()"
function to call "set_page_state" function to set some files and pages
to be XIP if these names occur in the xml file as parameter of
mkfs.axfs -i .

In fact , for XIP files and pages , axfs handling is simple , for
example , I want to set rootfs/init 's 0~4095 bytes to be XIP  ,the
length of block of data must be aligned with PAGE_SIZE .
you can set the
<chunk>
  <size>4096</size>
  <offset>0</offset>
</chunk>

In fact , the data of XIP and that of compressed will be stored
respectively different regions .
for example , a file size is large , you know ,for example ,3MB .
it will have many pages of data , only the XIP pages will be stored
into XIP region
node_index[node_count] = xip_rd.size/PAGE_SIZE . THIS INDEX is valid for XIP

For every page , it will have node_index. this node_index will be
added when parsing the root directory . that is also said that, every
page has its own unique index number . Future , in kernel ,the axfs
code will use it. the kernel axfs code will use some macros to get
detailed infomation about a page , for example , this page is of XIP
or Compressed .
--
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