Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 17 Feb 2019, 05:59
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Compiling
Kernel Compiling - Kernel-kit
Post new topic   Reply to topic View previous topic :: View next topic
Page 3 of 3 [40 Posts]   Goto page: Previous 1, 2, 3
Author Message
Hesse James


Joined: 08 Feb 2010
Posts: 86

PostPosted: Thu 25 Jan 2018, 16:38    Post subject: Kernel 4.9.77 with RETPOLINE active for Xenial64  

Hello
I expect that you have heard about the recent vulnerabilities of most of the actual CPU's. These vulnerabilities are known as Meltdown and Spectre. I think this picture about these vulverabilities exaggerates a bit
but the threat should not be underestimated (picture stems from an article in ct about Spectre/Meltdown).



A mitigation (RETPOLINE) was shipped with the actual kernel 4.9.77. As a negative effect it might reduce the CPU-perfomance for about 5 %.
To evaluate the effect I compiled this kernel for Xenial64. These are the additional kernel parameters that are part of the base settings of 4.9.77 compared to 4.9.58:

# Linux/x86 4.9.77 Kernel Configuration
CONFIG_RETPOLINE=y
CONFIG_GENERIC_CPU_VULNERABILITIES=y
CONFIG_KEYS_COMPAT=y
CONFIG_PAGE_TABLE_ISOLATION=y

After changing the kernel I used HARDINFO to determine the CPU performance with the Xenial64 7.5 Standard-Kernel 4.9.58, the 4.9.77 without and with RETPOLINE activated.
According to the literature RETPOLINE should reduce the performance significantly.

______________________________________________Kernel 4.9.58________Kernel 4.9.77 no retpoline___Kernel 4.9.77 with retpoline

CPU Blowfish (lower is better)______This Machine___3581 MHz__2.025____ 3300 MHz__1.986_________3300 MHz__1.997
CPU CryptoHash (higher is better)__This Machine___3581 MHz__717.230___3300 MHz__781.685_______3300 MHz__755.834
CPU Fibonacci (lower is better)_____This Machine___3581 MHz__0.289_____3300 MHz__0.291_________3300 MHz__0.294
CPU N-Queens (lower is better)____This Machine___3581 MHz__7.153_____3300 MHz__6.935_________3300 MHz__7.236

According to these results I see only a performance reduction for N-QUEENS and CryptoHash. For some reasons the K4.9.58 doesn't determine the CPU frequency correctly.
If you are interested in testing and protecting your machine against the vulverability you can download here my compiled kernel with all necessary files including the used .config file.

Update !
http://www.mediafire.com/file/h1ys05ddq2i30d5/kernel-4.9.124_Xenial64.tar.gz

Christian

P.S. These are the configuration differences between the standard kernel .config 4.9.58 and 4.9.124:
CONFIG_RETPOLINE=y
CONFIG_GENERIC_CPU_VULNERABILITIES=y
CONFIG_PAGE_TABLE_ISOLATION=y
CONFIG_HOTPLUG_SMT=y
Back to top
View user's profile Send private message 
rockedge


Joined: 11 Apr 2012
Posts: 944
Location: Connecticut, United States

PostPosted: Thu 06 Sep 2018, 08:24    Post subject:  

I am attempting to compile a 4.14.63 RT kernel using the aufs=4.14.56+ and the RT-patches-4.14.63....but have a compiling failure about half way through the compile itself.

Code:
UPupBB 18.05 [i686]
gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0
git version 2.17.1
mksquashfs version 4.3 (2014/05/12)


Jobs for make: 2
kernel_version=4.14.63
kernel_version_info=
Linux: 4.14.63
aufs=4.14.56+
the build.log ends with
Code:
CC [M]  net/wireless/ap.o
  CC [M]  net/wireless/trace.o
  CC [M]  net/wireless/ocb.o
  CC [M]  net/wireless/debugfs.o
  CC [M]  net/wireless/wext-compat.o
  CC [M]  net/wireless/wext-sme.o
  CC [M]  net/wireless/lib80211.o
  CC [M]  net/wireless/lib80211_crypt_wep.o
  CC [M]  net/wireless/lib80211_crypt_ccmp.o
  CC [M]  net/wireless/lib80211_crypt_tkip.o
  AR      net/wireless/built-in.o
  LD [M]  net/wireless/cfg80211.o
  AR      net/built-in.o
Error: failed to compile the kernel sources
.

I have tried 7 different variations but I am missing something that is causing the failure...anyone have any ideas to throw into the mix?

copy of the complete log...it is a compressed zip file
build.log.zip
Description 
zip

 Download 
Filename  build.log.zip 
Filesize  46.02 KB 
Downloaded  83 Time(s) 
Back to top
View user's profile Send private message Visit poster's website 
peebee


Joined: 21 Sep 2008
Posts: 3667
Location: Worcestershire, UK

PostPosted: Thu 06 Sep 2018, 13:06    Post subject:  

the error is at line 6231 in the log:

CC [M] drivers/hv/vmbus_drv.o
drivers/hv/vmbus_drv.c: In function ‘vmbus_isr’:
drivers/hv/vmbus_drv.c:969:25: error: implicit declaration of function ‘get_irq_regs’; did you mean ‘get_mm_rss’? [-Werror=implicit-function-declaration]
struct pt_regs *regs = get_irq_regs();
^~~~~~~~~~~~
get_mm_rss
drivers/hv/vmbus_drv.c:969:25: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
scripts/Makefile.build:328: recipe for target 'drivers/hv/vmbus_drv.o' failed
make[2]: *** [drivers/hv/vmbus_drv.o] Error 1
scripts/Makefile.build:587: recipe for target 'drivers/hv' failed
make[1]: *** [drivers/hv] Error 2
Makefile:1035: recipe for target 'drivers' failed
make: *** [drivers] Error 2

_________________
LxPup = Puppy + LXDE
Back to top
View user's profile Send private message Visit poster's website 
rockedge


Joined: 11 Apr 2012
Posts: 944
Location: Connecticut, United States

PostPosted: Fri 07 Sep 2018, 09:13    Post subject:  

Thank you peebee!!!! I looked closer at that error and found a fix.
here : https://www.spinics.net/lists/linux-rt-users/msg19382.html

this involved fixing drivers/hv/vmbus_drv.c by adding the line
Code:
#include <asm/irq_regs.h>


this resulted in a Successful compile of a real time kernel! 4.14.63-rt37 PAE 32bit
I am about to use woof -CE to build a Tahr with this kernel.

log output :
Code:
------------------
Output files:
- output/huge-4.14.63-upupbb.tar.bz2
  (kernel tarball: vmlinuz, modules.sfs - used in the woof process)
  you can use this to replace vmlinuz and zdrv.sfs from the current wce puppy install..

- output/kernel_sources-4.14.63-upupbb.sfs
  (you can use this to compile new kernel modules - load or install first..)
------------------

Included here is a DOT config file for anyone who would like to compile a similar kernel. Remove the .gz extension.

Here is the download link for the kernel 4.14.63-rt37
http://rockedge.org/kernels

again thank you peebee for the insight!
DOTconfig-4.14.63-x86-060918.gz
Description 
gz

 Download 
Filename  DOTconfig-4.14.63-x86-060918.gz 
Filesize  170.37 KB 
Downloaded  95 Time(s) 
build.log.zip
Description 
zip

 Download 
Filename  build.log.zip 
Filesize  126.22 KB 
Downloaded  70 Time(s) 
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 3 of 3 [40 Posts]   Goto page: Previous 1, 2, 3
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Compiling
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0424s ][ Queries: 13 (0.0125s) ][ GZIP on ]