From: William Cohen <wcohen@redhat.com>
To: eranian@hpl.hp.com
Cc: perfmon@napali.hpl.hp.com, perfctr-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Subject: Re: [perfmon] 2.6.19-rc6-git10 new perfmon code base + libpfm + pfmon
Date: Mon, 27 Nov 2006 14:05:18 -0500 [thread overview]
Message-ID: <456B36EE.8000709@redhat.com> (raw)
In-Reply-To: <20061127143705.GC24980@frankl.hpl.hp.com>
[-- Attachment #1: Type: text/plain, Size: 1095 bytes --]
Stephane Eranian wrote:
> Hello,
>
> I have released another version of the perfmon new code base package.
> This version of the kernel patch is relative to 2.6.19-rc6-git10.
>
> This is a major update because it completes the changes requested
> during the code review on LKML. As a consequence, the kernel interface
> is NOT backward compatible with previous v2.2 versions. This release has
> the v2.3 version number. Backward compatibility with v2.0 is maintained
> on Itanium processors.
Hi Stephane,
I have built the kernel with the new patches and tried things out on x86_64 an
x88_64 machine with Fedora Core 4. I attempted use the new libpfm and pfmon to
update the source RPMs and I noticed that there were some return values from
read() and write() being ignored. When pfmon is being built as an RPM ignoring
the read and write return values cause the rpmbuild to fail. Attached is a
simple patch that stuffs the return values into dummy variable to avoid the
warnings. This patch allows libpfm and pfmon the source RPMs to compile on FC4
and Fedora Core rawhide.
-Will
[-- Attachment #2: pfmon-fortify.patch --]
[-- Type: text/x-patch, Size: 1246 bytes --]
--- pfmon-3.2-061127/pfmon/pfmon_util.c.fortify 2006-11-27 05:22:40.000000000 -0500
+++ pfmon-3.2-061127/pfmon/pfmon_util.c 2006-11-27 13:38:43.000000000 -0500
@@ -1031,6 +1031,7 @@
int fd;
size_t max, used;
char number[32];
+ ssize_t dummy;
if (options.opt_is22 == 0)
return (size_t)-1;
@@ -1042,7 +1043,7 @@
if (fd == -1)
return (size_t)-1;
memset(number, 0, sizeof(number));
- read(fd, number, sizeof(number));
+ dummy = read(fd, number, sizeof(number));
close(fd);
@@ -1055,7 +1056,7 @@
if (fd == -1)
return (size_t)-1;
memset(number, 0, sizeof(number));
- read(fd, number, sizeof(number));
+ dummy = read(fd, number, sizeof(number));
close(fd);
max = strtoul(number, NULL, 0);
--- pfmon-3.2-061127/pfmon/pfmon_task.c.fortify 2006-11-27 13:39:16.000000000 -0500
+++ pfmon-3.2-061127/pfmon/pfmon_task.c 2006-11-27 13:39:57.000000000 -0500
@@ -1675,6 +1675,7 @@
int ctrl_fd;
int max_fd;
int ndesc, msg_type;
+ ssize_t dummy;
/*
* POSIX threads:
@@ -1811,7 +1812,7 @@
/*
* ack the removal
*/
- write(workers[mycpu].from_worker[1], &msg, sizeof(msg));
+ dummy = write(workers[mycpu].from_worker[1], &msg, sizeof(msg));
break;
case PFMON_TASK_MSG_QUIT:
prev parent reply other threads:[~2006-11-27 19:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-27 14:37 2.6.19-rc6-git10 new perfmon code base + libpfm + pfmon Stephane Eranian
2006-11-27 19:05 ` William Cohen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=456B36EE.8000709@redhat.com \
--to=wcohen@redhat.com \
--cc=eranian@hpl.hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perfctr-devel@lists.sourceforge.net \
--cc=perfmon@napali.hpl.hp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox