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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20121118020459.GA10763@lizard.sbx05977.paloaca.wayport.net>
Date:	Sat, 17 Nov 2012 18:04:59 -0800
From:	Anton Vorontsov <cbouatmailru@...il.com>
To:	dragos.tatulea@...el.com
Cc:	ccross@...roid.com, keescook@...omium.org, tony.luck@...el.com,
	linux-kernel@...r.kernel.org, adrian.hunter@...el.com,
	octavian.purdila@...el.com
Subject: Re: [PATCH v3 4/9] pstore: allow storing different type id's in ram
 backend

On Thu, Oct 18, 2012 at 02:06:02PM +0300, dragos.tatulea@...el.com wrote:
> From: Dragos Tatulea <dragos.tatulea@...el.com>
> 
> Added pstore_type_id in message header when storing to ram.
> On write, take into account the contents of this header and
> set the type accordingly.
> 
> Signed-off-by: Dragos Tatulea <dragos.tatulea@...el.com>
> ---
[...]
> -static size_t ramoops_write_kmsg_hdr(struct persistent_ram_zone *prz)
> +static size_t ramoops_write_kmsg_hdr(struct persistent_ram_zone *prz,
> +				     enum pstore_type_id type)
>  {
>  	char *hdr;
>  	struct timeval timestamp;
>  	size_t len;
>  
>  	do_gettimeofday(&timestamp);
> -	hdr = kasprintf(GFP_ATOMIC, RAMOOPS_KERNMSG_HDR "%lu.%lu\n",
> -		(long)timestamp.tv_sec, (long)timestamp.tv_usec);
> +	hdr = kasprintf(GFP_ATOMIC, "%u" RAMOOPS_KERNMSG_HDR "%lu.%lu\n",
> +		type, (long)timestamp.tv_sec, (long)timestamp.tv_usec);

This will probably break scripts (and the main purpose for the header is
to make it somewhat scripts-parsable). It's safer to change it to

	RAMOOPS_KERNMSG_HDR "%lu.%lu %u"

Thanks,
Anton.
--
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