mirror of
				https://github.com/speed47/spectre-meltdown-checker.git
				synced 2025-11-04 07:40:56 +01:00 
			
		
		
		
	Detect if 'strings' is present
This commit is contained in:
		@@ -280,10 +280,14 @@ if [ "$kpti_support" = 0 -a -n "$vmlinux" ]; then
 | 
				
			|||||||
	# same as above but in case we don't have System.map and only vmlinux, look for the
 | 
						# same as above but in case we don't have System.map and only vmlinux, look for the
 | 
				
			||||||
	# nopti option that is part of the patch (kernel command line option)
 | 
						# nopti option that is part of the patch (kernel command line option)
 | 
				
			||||||
	kpti_can_tell=1
 | 
						kpti_can_tell=1
 | 
				
			||||||
 | 
						if ! which strings >/dev/null 2>&1; then
 | 
				
			||||||
 | 
							pstatus yellow UNKNOWN "missing 'strings' tool, please install it, usually it's in the binutils package"
 | 
				
			||||||
 | 
						else
 | 
				
			||||||
		if strings "$vmlinux" | grep -qw nopti; then
 | 
							if strings "$vmlinux" | grep -qw nopti; then
 | 
				
			||||||
			kpti_support=1
 | 
								kpti_support=1
 | 
				
			||||||
		fi
 | 
							fi
 | 
				
			||||||
	fi
 | 
						fi
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [ "$kpti_support" = 1 ]; then
 | 
					if [ "$kpti_support" = 1 ]; then
 | 
				
			||||||
	pstatus green YES
 | 
						pstatus green YES
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user