Accepting request 1029880 from home:dirkmueller:Factory
- add uninitialized.patch (bsc#1204371) - build with thermald support on x86_64 (jsc#PED-754) OBS-URL: https://build.opensuse.org/request/show/1029880 OBS-URL: https://build.opensuse.org/package/show/Base:System/irqbalance?expand=0&rev=102
This commit is contained in:
parent
5fa256afb5
commit
86fc8c1fe0
@ -1,4 +0,0 @@
|
||||
<servicedata>
|
||||
<service name="tar_scm">
|
||||
<param name="url">https://github.com/Irqbalance/irqbalance.git</param>
|
||||
<param name="changesrevision">e16b05ce9e312a19a6d04baebc780ec5aa8813be</param></service></servicedata>
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 18 21:15:49 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- add uninitialized.patch (bsc#1204371)
|
||||
- build with thermald support on x86_64 (jsc#PED-754)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 13 09:03:59 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
|
@ -30,11 +30,15 @@ URL: https://github.com/Irqbalance/irqbalance
|
||||
Source: https://github.com/Irqbalance/irqbalance/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||
Source3: sysconfig.irqbalance
|
||||
Patch1: Set-fd-limit.patch
|
||||
Patch2: uninitialized.patch
|
||||
BuildRequires: libcap-ng-devel
|
||||
BuildRequires: libtool
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: pkgconfig(glib-2.0)
|
||||
%ifarch x86_64
|
||||
BuildRequires: pkgconfig(libnl-3.0)
|
||||
%endif
|
||||
Requires(pre): %fillup_prereq
|
||||
Recommends: %{name}-ui
|
||||
ExcludeArch: s390 s390x
|
||||
@ -61,7 +65,11 @@ Text UI for the IRQ balance daemon.
|
||||
|
||||
%build
|
||||
NOCONFIGURE=1 ./autogen.sh
|
||||
%configure
|
||||
%configure \
|
||||
%ifarch x86_64
|
||||
--enable-thermal
|
||||
%endif
|
||||
|
||||
%make_build LDFLAGS="-Wl,-z,relro,-z,now" CFLAGS="%{optflags} -fPIE -pie $(ncurses6-config --cflags)" LDFLAGS="$(ncurses6-config --libs)"
|
||||
cp %{SOURCE3} .
|
||||
|
||||
|
68
uninitialized.patch
Normal file
68
uninitialized.patch
Normal file
@ -0,0 +1,68 @@
|
||||
From 33c857d17b9af8a8a4dd785b8d511ba1f5d0bd88 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Dirk=20M=C3=BCller?= <dirk@dmllr.de>
|
||||
Date: Tue, 18 Oct 2022 23:08:31 +0200
|
||||
Subject: [PATCH] Avoid uninitialized read
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
irq_info struct is initialized on stack so the members need to
|
||||
be initalized to avoid a crash on uninitialized pointer dereference.
|
||||
|
||||
Signed-off-by: Dirk Müller <dirk@dmllr.de>
|
||||
---
|
||||
classify.c | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/classify.c b/classify.c
|
||||
index 3858754..5d3a9f0 100644
|
||||
--- a/classify.c
|
||||
+++ b/classify.c
|
||||
@@ -259,7 +259,7 @@ static gint compare_ints(gconstpointer a, gconstpointer b)
|
||||
|
||||
static void __add_banned_irq(int irq, GList **list)
|
||||
{
|
||||
- struct irq_info find, *new;
|
||||
+ struct irq_info find = {0}, *new;
|
||||
GList *entry;
|
||||
|
||||
find.irq = irq;
|
||||
@@ -394,7 +394,7 @@ get_numa_node:
|
||||
|
||||
void remove_one_irq_from_db(int irq)
|
||||
{
|
||||
- struct irq_info find, *tmp;
|
||||
+ struct irq_info find = {0}, *tmp;
|
||||
GList *entry = NULL;
|
||||
|
||||
find.irq = irq;
|
||||
@@ -646,7 +646,7 @@ static void build_one_dev_entry(const char *dirname, int build_irq)
|
||||
struct dirent *entry;
|
||||
DIR *msidir;
|
||||
int irqnum;
|
||||
- struct irq_info hint;
|
||||
+ struct irq_info hint = {0};
|
||||
char path[PATH_MAX];
|
||||
char devpath[PATH_MAX];
|
||||
|
||||
@@ -818,7 +818,7 @@ void for_each_irq(GList *list, void (*cb)(struct irq_info *info, void *data), vo
|
||||
struct irq_info *get_irq_info(int irq)
|
||||
{
|
||||
GList *entry;
|
||||
- struct irq_info find;
|
||||
+ struct irq_info find = {0};
|
||||
|
||||
find.irq = irq;
|
||||
entry = g_list_find_custom(interrupts_db, &find, compare_ints);
|
||||
@@ -832,7 +832,7 @@ struct irq_info *get_irq_info(int irq)
|
||||
void migrate_irq(GList **from, GList **to, struct irq_info *info)
|
||||
{
|
||||
GList *entry;
|
||||
- struct irq_info find, *tmp;
|
||||
+ struct irq_info find = {0}, *tmp;
|
||||
|
||||
find.irq = info->irq;
|
||||
entry = g_list_find_custom(*from, &find, compare_ints);
|
||||
--
|
||||
2.38.0
|
||||
|
Loading…
Reference in New Issue
Block a user