func: static int proc_keys_show(struct seq_file *m, void *v) struct key * key = rb_entry ( _p , struct key , serial_node ) struct timespec now ; key_ref_t key_ref , skey_ref ; char xbuf [ 12 ] ; int rc ; struct keyring_search_context ctx . index_key . type = key -> type . index_key . description = key -> description . cred = current_cred ( ) . match_data . cmp = lookup_user_key_possessed . match_data . raw_data = key . match_data . lookup_type = KEYRING_SEARCH_LOOKUP_DIRECT . flags = KEYRING_SEARCH_NO_STATE_CHECK , key_ref = make_key_ref ( key , 0 ); if ( key -> perm & KEY_POS_VIEW )  skey_ref = search_my_process_keyrings ( & ctx ); if ( ! IS_ERR ( skey_ref ) )  key_ref = make_key_ref ( key , 1 ); rc = key_task_permission ( key_ref , ctx . cred , KEY_NEED_VIEW ); if ( rc < 0 )  now = current_kernel_time ( ); if ( key -> expiry == 0 )  if ( now . tv_sec >= key -> expiry )  memcpy ( xbuf , "expd" , 5 ); 