Fix bio tools
Fix tp_args padding in bio* tools. This is an RHEL/Centos specific fix. Resolves: RHEL-61615 Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
This commit is contained in:
		
							parent
							
								
									1eb395b435
								
							
						
					
					
						commit
						0afa4cf2fa
					
				| @ -0,0 +1,61 @@ | |||||||
|  | From 8a9da1d866dfb69ad1ca59bdc50a799ba2da3a0c Mon Sep 17 00:00:00 2001 | ||||||
|  | From: Jerome Marchand <jmarchan@redhat.com> | ||||||
|  | Date: Thu, 24 Oct 2024 16:56:14 +0200 | ||||||
|  | Subject: [PATCH] RHEL/Centos: tools: fix alignment in tp_args for bio tools | ||||||
|  | 
 | ||||||
|  | The padding in tp_args is wrong on RHEL 9 / c9s kernel because of the | ||||||
|  | kernel commit 6bc27040eb90 ("sched: Add support for lazy preemption") | ||||||
|  | which added a common field to tracepoints. | ||||||
|  | 
 | ||||||
|  | Now the dev field is at an offset of 12 bytes as shown by | ||||||
|  | block_io_start/done format file. | ||||||
|  | 
 | ||||||
|  | Signed-off-by: Jerome Marchand <jmarchan@redhat.com> | ||||||
|  | ---
 | ||||||
|  |  tools/biolatency.py | 2 +- | ||||||
|  |  tools/biosnoop.py   | 2 +- | ||||||
|  |  tools/biotop.py     | 2 +- | ||||||
|  |  3 files changed, 3 insertions(+), 3 deletions(-) | ||||||
|  | 
 | ||||||
|  | diff --git a/tools/biolatency.py b/tools/biolatency.py
 | ||||||
|  | index 03b48a4c..ac150ea2 100755
 | ||||||
|  | --- a/tools/biolatency.py
 | ||||||
|  | +++ b/tools/biolatency.py
 | ||||||
|  | @@ -88,7 +88,7 @@ typedef struct ext_val {
 | ||||||
|  |  } ext_val_t; | ||||||
|  |   | ||||||
|  |  struct tp_args { | ||||||
|  | -    u64 __unused__;
 | ||||||
|  | +    u32 __unused__[3];
 | ||||||
|  |      dev_t dev; | ||||||
|  |      sector_t sector; | ||||||
|  |      unsigned int nr_sector; | ||||||
|  | diff --git a/tools/biosnoop.py b/tools/biosnoop.py
 | ||||||
|  | index f0fef98b..819e953f 100755
 | ||||||
|  | --- a/tools/biosnoop.py
 | ||||||
|  | +++ b/tools/biosnoop.py
 | ||||||
|  | @@ -66,7 +66,7 @@ struct val_t {
 | ||||||
|  |  }; | ||||||
|  |   | ||||||
|  |  struct tp_args { | ||||||
|  | -    u64 __unused__;
 | ||||||
|  | +    u32 __unused__[3];
 | ||||||
|  |      dev_t dev; | ||||||
|  |      sector_t sector; | ||||||
|  |      unsigned int nr_sector; | ||||||
|  | diff --git a/tools/biotop.py b/tools/biotop.py
 | ||||||
|  | index 879c6b8f..4c3a1c9a 100755
 | ||||||
|  | --- a/tools/biotop.py
 | ||||||
|  | +++ b/tools/biotop.py
 | ||||||
|  | @@ -91,7 +91,7 @@ struct val_t {
 | ||||||
|  |  }; | ||||||
|  |   | ||||||
|  |  struct tp_args { | ||||||
|  | -    u64 __unused__;
 | ||||||
|  | +    u32 __unused__[3];
 | ||||||
|  |      dev_t dev; | ||||||
|  |      sector_t sector; | ||||||
|  |      unsigned int nr_sector; | ||||||
|  | -- 
 | ||||||
|  | 2.47.0 | ||||||
|  | 
 | ||||||
							
								
								
									
										6
									
								
								bcc.spec
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								bcc.spec
									
									
									
									
									
								
							| @ -25,12 +25,13 @@ | |||||||
| 
 | 
 | ||||||
| Name:           bcc | Name:           bcc | ||||||
| Version:        0.30.0 | Version:        0.30.0 | ||||||
| Release:        6%{?dist} | Release:        7%{?dist} | ||||||
| Summary:        BPF Compiler Collection (BCC) | Summary:        BPF Compiler Collection (BCC) | ||||||
| License:        ASL 2.0 | License:        ASL 2.0 | ||||||
| URL:            https://github.com/iovisor/bcc | URL:            https://github.com/iovisor/bcc | ||||||
| Source0:        %{url}/archive/v%{version}/%{name}-%{version}.tar.gz | Source0:        %{url}/archive/v%{version}/%{name}-%{version}.tar.gz | ||||||
| Patch0:         %%{name}-%%{version}-clang-fail-when-the-kheaders-ownership-is-wrong-4928.patch | Patch0:         %%{name}-%%{version}-clang-fail-when-the-kheaders-ownership-is-wrong-4928.patch | ||||||
|  | Patch1:         %%{name}-%%{version}-RHEL-Centos-tools-fix-alignment-in-tp_args-for-bio-t.patch | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| # Arches will be included as upstream support is added and dependencies are | # Arches will be included as upstream support is added and dependencies are | ||||||
| @ -264,6 +265,9 @@ cp -a libbpf-tools/tmp-install/bin/* %{buildroot}/%{_sbindir}/ | |||||||
| %endif | %endif | ||||||
| 
 | 
 | ||||||
| %changelog | %changelog | ||||||
|  | * Thu Oct 24 2024 Jerome Marchand <jmarchan@redhat.com> - 0.30.0-7 | ||||||
|  | - Fic bio* tools (RHEL-61615) | ||||||
|  | 
 | ||||||
| * Thu Jul 04 2024 Jerome Marchand <jmarchan@redhat.com> - 0.30.0-6 | * Thu Jul 04 2024 Jerome Marchand <jmarchan@redhat.com> - 0.30.0-6 | ||||||
| - Rebuild with LLVM 18 (RHEL-28684) | - Rebuild with LLVM 18 (RHEL-28684) | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user