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: <874nw6xiqn.fsf@gmail.com>
Date:	Mon, 09 Jan 2012 01:27:12 +0900
From:	Namhyung Kim <namhyung@...il.com>
To:	Stefan Hajnoczi <stefanha@...ux.vnet.ibm.com>
Cc:	<linux-kernel@...r.kernel.org>,
	Steven Rostedt <rostedt@...dmis.org>
Subject: Re: [PATCH][trace-cmd] blk plugin: replace BLK_TC_BARRIER with BLK_TC_FLUSH/BLK_TC_FUA

Stefan Hajnoczi <stefanha@...ux.vnet.ibm.com> wrote:

> The BLK_TC_BARRIER flag was dropped in Linux commit c09c47caedc in
> August 2011.  The blk plugin fails to build against recent kernel
> headers.  Since no flag bits were left, the new BLK_TC_FLUSH flag reused
> the BLK_TC_BARRIER bit.  The new BLK_TC_FUA flag was also added.
>
> This patch updates fill_rwbs() to reflect the new
> BLK_TC_FLUSH/BLK_TC_FUA flags.  This allows plugin_blk.c to build
> successfully on recent kernels.  The drawback is that this breaks the
> build for pre-c09c47caedc kernel headers.
>
> Signed-off-by: Stefan Hajnoczi <stefanha@...ux.vnet.ibm.com>
> ---
> There is an alternative version of this patch with a build test in the Makefile
> so that we know whether to use BLK_TC_BARRIER or BLK_TC_FLUSH/BLK_TC_FUA.  That
> would support both old and new kernel headers using a HAVE_BLK_TC_FLUSH #ifdef.
>
> I wasn't able to find the right makefile shell escaping magic to get the
> build-test function to work.  If anyone knows how to test a snippet like the
> following, then that would be nicer:
>
>   #include <linux/blktrace_api.h>
>   int main(void) { return BLK_TC_FLUSH; }
>

Hi,

The perf uses following code for that:

# try-cc
# Usage: option = $(call try-cc, source-to-build, cc-options)
try-cc = $(shell sh -c						  \
	'TMP="$(OUTPUT)$(TMPOUT).$$$$";				  \
	 echo "$(1)" |						  \
	 $(CC) -x c - $(2) -o "$$TMP" > /dev/null 2>&1 && echo y; \
	 rm -f "$$TMP"')

Thanks,
Namhyung Kim
--
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