Re: How to read a file's pages in a kernel gdb session?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



just a casual sugggestion....correct me if wrong....

On Fri, Aug 29, 2008 at 10:31 PM, sean <sean_in_raleigh@xxxxxxxxx> wrote:
> Hi,
>
> I have a machine which has been locked
> up by what we suspect to be a hardware
> or firmware bug.  We have our custom
> GDB adapter pointed at it, so we
> can read whatever kernel variables
> we want, but we can't call functions
> (similar to running GDB on a core file).
>
> What I would like to do is dump
> any pages which happen to be caching
> parts of /var/log/messages.  So
> my question is how to do that?
>
> In pseudocode, I imagine it would
> be something like this:
>
>  1. search through an in-memory inode
>     cache for /var/log/messages's inode
>  2. look at every page in the buffer
>     cache and if it is shown to be
>     caching the file with the above
>     inode, dump it
>

based on (2), how about this:   in fs/buffer.c:fsync_buffer_list(),
the algorithm is to traverse through all the dirty inodes and and
syncing it.   for your case, for reasons of urgency, just focus on
those inodes that met your specific inode condition and sync it.

make sense?
> I can handle the GDB scripting, but
> I'm having trouble finding which
> pointers I should be following to
> find the above-named structures (assuming
> such things exist).
>
> Thanks,
> Sean
>
>
>
>
>
>
> --
> To unsubscribe from this list: send an email with
> "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
> Please read the FAQ at http://kernelnewbies.org/FAQ
>
>



-- 
Regards,
Peter Teoh

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux