Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
aports
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
alpine
aports
Commits
c7de7fac
Commit
c7de7fac
authored
1 year ago
by
alice
Browse files
Options
Downloads
Patches
Plain Diff
main/util-linux: backport patch for dmesg kernel arg limit
parent
8b279a53
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
main/util-linux/APKBUILD
+3
-1
3 additions, 1 deletion
main/util-linux/APKBUILD
main/util-linux/dmesg-klog-arg.patch
+31
-0
31 additions, 0 deletions
main/util-linux/dmesg-klog-arg.patch
with
34 additions
and
1 deletion
main/util-linux/APKBUILD
+
3
−
1
View file @
c7de7fac
...
...
@@ -3,7 +3,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname
=
util-linux
pkgver
=
2.38.1
pkgrel
=
7
pkgrel
=
8
pkgdesc
=
"Random collection of Linux utilities"
url
=
"https://git.kernel.org/cgit/utils/util-linux/util-linux.git"
arch
=
"all"
...
...
@@ -88,6 +88,7 @@ case $pkgver in
*
.
*
)
_v
=
$pkgver
;;
esac
source
=
"https://www.kernel.org/pub/linux/utils/util-linux/v
$_v
/util-linux-
$pkgver
.tar.xz
dmesg-klog-arg.patch
utmps.patch
ttydefaults.h
rfkill.confd
...
...
@@ -356,6 +357,7 @@ _py3() {
sha512sums
=
"
07f11147f67dfc6c8bc766dfc83266054e6ede776feada0566b447d13276b6882ee85c6fe53e8d94a17c03332106fc0549deca3cf5f2e92dda554e9bc0551957 util-linux-2.38.1.tar.xz
6fc1355cb76c3987f36ece01988e55a24a4e2d37dd35cbbe3c42b1bbffadeb2a404e62ea86fed5287d8ed97f65c94170f6473f8abe67260df4ebc850939d5324 dmesg-klog-arg.patch
88736b554b60f836357a29f537d51658bb487dd316c92cc5160ba06bed5f8cf8e34bbfb8eb7370c4e4a2e75997a6e4bd2058201d227e41f83a18abbf4a73bdbd utmps.patch
876bb9041eca1b2cca1e9aac898f282db576f7860aba690a95c0ac629d7c5b2cdeccba504dda87ff55c2a10b67165985ce16ca41a0694a267507e1e0cafd46d9 ttydefaults.h
401d2ccbdbfb0ebd573ac616c1077e2c2b79ff03e9221007759d8ac25eb522c401f705abbf7daac183d5e8017982b8ec5dd0a5ebad39507c5bb0a9f31f04ee97 rfkill.confd
...
...
This diff is collapsed.
Click to expand it.
main/util-linux/dmesg-klog-arg.patch
0 → 100644
+
31
−
0
View file @
c7de7fac
Patch-Source: https://github.com/util-linux/util-linux/commit/423bf01e7e9e2469088fd57fe5716cf2763463ca
--
From efb18899d23d8bbfa56f871c0d1fd44ac6bb838e Mon Sep 17 00:00:00 2001
From: anteater <65555601+nt8r@users.noreply.github.com>
Date: Mon, 29 May 2023 20:59:11 +0000
Subject: [PATCH] dmesg: make kmsg read() buffer big enough for kernel
otherwise, if the kernel log has an item longer than 1024B, our read() gives EINVAL and we stop reading kmsg
---
sys-utils/dmesg.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/sys-utils/dmesg.c b/sys-utils/dmesg.c
index 45075e50bd..717cc588b2 100644
--- a/sys-utils/dmesg.c
+++ b/sys-utils/dmesg.c
@@ -179,7 +179,13 @@
struct dmesg_control {
int kmsg; /* /dev/kmsg file descriptor */
ssize_t kmsg_first_read;/* initial read() return code */
- char kmsg_buf[BUFSIZ];/* buffer to read kmsg data */
+ /*
+ * the kernel will give EINVAL if we do read() on /proc/kmsg with
+ * length insufficient for the next message. messages may be up to
+ * PRINTK_MESSAGE_MAX, which is defined as 2048, so we must be
+ * able to buffer at least that much in one call
+ */
+ char kmsg_buf[2048]; /* buffer to read kmsg data */
usec_t since; /* filter records by time */
usec_t until; /* filter records by time */
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment