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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 22 May 2014 06:41:57 +0900 (JST)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	Cyrill Gorcunov <gorcunov@...nvz.org>
cc:	linux-kernel@...r.kernel.org, shawn@...rchofgit.com,
	akpm@...ux-foundation.org, avagin@...nvz.org, xemul@...allels.com,
	vdavydov@...allels.com
Subject: Re: [patch 1/3] timerfd: Implement show_fdinfo method

On Tue, 29 Apr 2014, Cyrill Gorcunov wrote:
>  
> +static int timerfd_show(struct seq_file *m, struct file *file)
> +{
> +	struct timerfd_ctx *ctx = file->private_data;
> +	struct itimerspec t;
> +
> +	spin_lock_irq(&ctx->wqh.lock);
> +	t.it_value = ktime_to_timespec(timerfd_get_remaining(ctx));
> +	t.it_interval = ktime_to_timespec(ctx->tintv);
> +	spin_unlock_irq(&ctx->wqh.lock);
> +
> +	return seq_printf(m,
> +			  "clockid: %d\n"
> +			  "ticks: %llu\n"
> +			  "settime flags: 0%o\n"
> +			  "it_value: (%llu, %llu)\n"
> +			  "it_interval: (%llu, %llu)\n",
> +			  ctx->clockid, (unsigned long long)ctx->ticks,
> +			  ctx->settime_flags,
> +			  (unsigned long long)t.it_value.tv_sec,
> +			  (unsigned long long)t.it_value.tv_nsec,
> +			  (unsigned long long)t.it_interval.tv_sec,
> +			  (unsigned long long)t.it_interval.tv_nsec);
> +}

Shouldn't this depend on CONFIG_PROCFS?

>  static const struct file_operations timerfd_fops = {
>  	.release	= timerfd_release,
>  	.poll		= timerfd_poll,
>  	.read		= timerfd_read,
>  	.llseek		= noop_llseek,
> +	.show_fdinfo	= timerfd_show,
>  };
>  
>  static int timerfd_fget(int fd, struct fd *p)
> 
> 
--
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