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:	Mon, 17 Sep 2007 09:16:18 -0700
From:	Joe Perches <joe@...ches.com>
To:	Avi Kivity <avi@...ranet.com>
Cc:	kvm-devel@...ts.sourceforge.net, linux-kernel@...r.kernel.org,
	Rusty Russell <rusty@...tcorp.com.au>
Subject: Re: [PATCH 048/104] KVM: Add and use pr_unimpl for standard
	formatting of unimplemented features

On Mon, 2007-09-17 at 10:31 +0200, Avi Kivity wrote:
> diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h
> index cfda3ab..6d25826 100644
> --- a/drivers/kvm/kvm.h
> +++ b/drivers/kvm/kvm.h
> @@ -474,6 +474,14 @@ struct kvm_arch_ops {
>  
>  extern struct kvm_arch_ops *kvm_arch_ops;
>  
> +/* The guest did something we don't support. */
> +#define pr_unimpl(vcpu, fmt, ...)					\
> + do {									\
> +	if (printk_ratelimit())						\
> +		printk(KERN_ERR "kvm: %i: cpu%i " fmt,			\
> +		       current->tgid, (vcpu)->vcpu_id , ## __VA_ARGS__); \
> + } while(0)
> +
>  #define kvm_printf(kvm, fmt ...) printk(KERN_DEBUG fmt)
>  #define vcpu_printf(vcpu, fmt...) kvm_printf(vcpu->kvm, fmt)
>  

This converts all KERN_<level> uses to KERN_ERR.
It seems better to add a <level> argument to kvm_printf.
pr_unimpl is perhaps a poor name choice.
perhaps vcpu_printk_ratelimit(vcpu, level, fmt, ...)


-
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