Olivier Daudel wrote:
Hi Dave,
[36] and [120] are volontary ?
Olivier

crash> struct -o security_operations
struct security_operations {
        int (*ptrace)(struct task_struct *, struct task_struct *);
        int (*capget)(struct task_struct *, kernel_cap_t *, kernel_cap_t *,
        kernel_cap_t *);
        int (*capset_check)(struct task_struct *, kernel_cap_t *,
kernel_cap_t *,
        kernel_cap_t *);
        void (*capset_set)(struct task_struct *, kernel_cap_t *,
kernel_cap_t *,
        kernel_cap_t *);
        int (*acct)(struct file *);
        int (*sysctl)(struct ctl_table *, int);
        int (*capable)(struct task_struct *, int);
        int (*quotactl)(int, int, int, struct super_block *);
        int (*quota_on)(struct dentry *);
   [36] int (*syslog)(int);
        int (*settime)(struct timespec *, struct timezone *);
        int (*vm_enough_memory)(long int);
        int (*bprm_alloc_security)(struct linux_binprm *);
        void (*bprm_free_security)(struct linux_binprm *);
        void (*bprm_apply_creds)(struct linux_binprm *, int);
        void (*bprm_post_apply_creds)(struct linux_binprm *);
        int (*bprm_set_security)(struct linux_binprm *);
        int (*bprm_check_security)(struct linux_binprm *);
        int (*bprm_secureexec)(struct linux_binprm *);
        int (*sb_alloc_security)(struct super_block *);
        void (*sb_free_security)(struct super_block *);
        int (*sb_copy_data)(struct file_system_type *, void *, void *);
        int (*sb_kern_mount)(struct super_block *, void *);
        int (*sb_statfs)(struct super_block *);
        int (*sb_mount)(char *, struct nameidata *, char *, long unsigned
int,
        void *);
        int (*sb_check_sb)(struct vfsmount *, struct nameidata *);
        int (*sb_umount)(struct vfsmount *, int);
        void (*sb_umount_close)(struct vfsmount *);
        void (*sb_umount_busy)(struct vfsmount *);
        void (*sb_post_remount)(struct vfsmount *, long unsigned int, void
*);
  [120] void (*sb_post_mountroot)(void);
        void (*sb_post_addmount)(struct vfsmount *, struct nameidata *);
[...]
}
SIZE: 560
 

No, definitely a bug, the offsets are *supposed* to be shown
for all members.  I've seen this before, usually when the
member is a function pointer type argument.

By adding some debug code to symbols.c:show_member_offset(),
when nothing (i.e., no offset) gets printed, it's because
show_member_offset() is either (1) bailing out because it can't
determine its "target" string pointer value, or (2) it sets
the "target" string incorrectly, and therefore the MEMBER_OFFSET()
call to gdb fails.  The "target" string is supposed to pick out
the member from the complete declaration line returned by gdb.

It needs fixing -- if you don't get to it first, I'll get around
to it eventually.

Thanks,
  Dave