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: <20080623121721.37CA.KOSAKI.MOTOHIRO@jp.fujitsu.com>
Date:	Mon, 23 Jun 2008 12:25:40 +0900
From:	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
To:	Russ Anderson <rja@....com>
Cc:	kosaki.motohiro@...fujitsu.com, linux-kernel@...r.kernel.org,
	linux-ia64@...r.kernel.org,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Tony Luck <tony.luck@...el.com>,
	Christoph Lameter <clameter@....com>
Subject: Re: [PATCH 3/3] ia64: Call migration code on correctable errors v6

Hi

> +static ssize_t
> +badpage_show(struct kobject *kobj,
> +	     struct kobj_attribute *attr, char *buf)
> +
> +{
> +	struct page *page, *page2;
> +	int i = 0, cnt = 0;
> +	char *bufend = buf + PAGE_SIZE;
> +
> +	cnt = snprintf(buf, bufend - (buf + cnt),
> +			"Bad RAM: %d kB, %d pages marked bad\n"
> +			"List of bad physical pages\n",
> +			total_badpages << (PAGE_SHIFT - 10), total_badpages);
> +
> +	list_for_each_entry_safe(page, page2, &badpagelist, lru) {
> +		if (bufend - (buf + cnt) < 20)
> +			break;		/* Avoid overflowing the buffer */
> +		cnt += snprintf(buf + cnt, bufend - (buf + cnt),
> +				" 0x%011lx", page_to_phys(page));
> +		if (!(++i % 5))
> +			cnt += snprintf(buf + cnt, bufend - (buf + cnt), "\n");
> +	}
> +	cnt += snprintf(buf + cnt, bufend - (buf + cnt), "\n");
> +
> +	return cnt;
> +}

it seems /proc/meminfo is better.
because badpage is architecture independent concept.

nonsense?


--
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