Archive for January, 2009

Changes to the Linux 2.6.26 kernel

Friday, January 2nd, 2009
  • KGDB is added into mainline kernel

 

  • class_device structure has been removed. now struct device itself is used.class_device_register and class_device_unregister functions are removed ,now you should use device_register and device_unregister. class_device_add ,class_device_del functions are removed ,you should use device_add and device_del instead.

 

  • added device_create_drvdata function

 

  • in hc_driver structure two functions pointers resume and suspend are renamed to pci_resume and pci_suspend respectively

 

  • struct class fields are changed i.e some fields are removed. uvent ,release(fields) virtual functions are removed

 

  • struct class_interface structure is changed. add and remove functuons were removed

 

  • class_device_create functions is removed and device_create_drvdata should be used instead

 

  • struct files_struct is moved to include/linux/fdtables.h

 

  • register_kprobes and unregister_kprobes functions are added for kprobe batch registration.

This can reduce waiting time for synchronized_sched() when a lot of probes have to be

  • unregistered at once.its proto type are
    • int __kprobes register_kprobes(struct kprobe **kps, int num)
    • void __kprobes unregister_kprobes(struct kprobe **kps, int num)

 

  • register_jprobes and unregister_kprobes functions are added for jprobes bactch registration.
    • Prototypes are
      • int __kprobes register_jprobes(struct jprobe **jps, int num);
      • void __kprobes unregister_jprobes(struct jprobe **jps, int num)

 

  • register_kretprobes and unregister_kretprobes functions are added for kretprobe
    • batch registration. prototypes are
      • int __kprobes register_kretprobes(struct kretprobe **rps, int num);
      • void __kprobes unregister_kretprobes(struct kretprobe **rps, int num);

 

 

  • Now find_task_by_pid function is depricated(scheduled to be removed) ,use find_task_by_pid_ns instead.
    • Reason :The function in question finds the task by its pid_t in an initial pid namespace

(init_pid_ns). This is no longer safe to simply call it, since the current task may

be in a pid namespace and it may return the wrong task. The proper behavior is to call

the find_task_by_vpid() if the caller is sure, that the target task lives in the same

namespace as he is, or the find_task_by_pid_ns() and specify the namespace to find a

task in. Since the find_task_by_pid() is a well-known API call, and its semantics

changes. Another case is to store the pointer to the struct pid of a desired task

and later call the pid_task() to get the task itself. So this set just fixes the

existing users of find_task_by_pid().

 

  • blocking_notifier_chain_cond_register function is added. This is used to add a notifier

to a blocking notifier chain, only if not already present in the chain. Must be called

in process context. Currently always returns zero.

 

  • sched_setaffinity function prototype has changed .Now it takes takes cpumask_t ‘pointer’

as it second argument.

 

  • Now symbolic links in the sysfs root  can be removed.

Callers  of sysfs_remove_link() are allowed to pass a NULL kobj, in which case
sysfs_root will be used as the parent directory. This allows us to tear down
top level symlinks created via sysfs_create_link(), which already has
similar handling of a NULL parent object.

 

  • init_timer_on_stack and destroy_timer_on_stack functions are added .

 

  • free_user_ns function now is exported

 

  • bdi_register ,bdi_register_dev and bdi_unregister functions are added in mm.

 

  • vm_insert_mixed functions is added .

 

  • ide=reverse, boot param is removed.It allows  to remove the pci_get_device_reverse() function

from the PCI core.

 

  • bdi_writeout_inc and bdi_set_max_ratio functions are added

 

  • KLIST_INIT() and DEFINE_KLIST() macros are added to statically initialze klist

 

  • Added klist_add_after() and klist_add_before() functions which puts a new node after and

before an existing node, respectively. This is useful for callers which need to keep klist

ordered.

 

  • Now /sbin/init can be ptraced

 

  • struct usb_serial_driver stucture has seen some changes.The following fields are removed from the structure:
    • num_interrupt_in, num_interrupt_out, num_bulk_in, num_bulk_out

 

  • proc_create_data function is added. Prototype is
  • struct proc_dir_entry *proc_create_data(const char *name, mode_t mode,
    • struct proc_dir_entry *parent,
    • const struct file_operations *proc_fops,
    • void *data)

 

 

  • vmalloced areas now can be seen via /proc/vmallocinfo.It allows to see the users of vmalloc.That is important if vmalloc space is scarce (i386 for example).And it’s going to be important for the compound page fallback to vmalloc.Many of the current users can be switched to use compound pages with fallback.This means that the number of users of vmalloc is reduced and pagetables no longer necessary to access the memory. /proc/vmallocinfo allows to review how that reduction occurs. /proc/vmallocinfo permissions are made readable-only-by-root to avoid possible information leakage.

 

  • Added “vlb|pci_clock=” boot parameters.
  • “vlb_clock=” parameter for specifying VLB clock frequency (in MHz).
    “pci_clock=” parameter for specifying PCI bus clock frequency (in MHz).
  • Added “noacpi”, “acpigtf”,”acpionboot” boot parameters. ide=noacpi,ide=acpigtf,ide=acpionboot kernel parameters are obsolete now.
  • Added “cdrom=” and “chs=” kernel boot parameters.
  • “hdx=cdrom”and”hdx=cyls,heads,sects” kernel parameters are obsolete now
  • proc_root_driver, a proc_dir_entry has been removed. This is used to create an entry in
  • proc/driver folder . Now you should use like this
    • proc_mkdir(“driver/youdriver”,NULL);
  • proc_root_fs entry also removed.