Re: [PATCH v8 06/14] FG-KASLR: use a scripted approach to handle .text.* sections

From: Peter Zijlstra
Date: Fri Dec 03 2021 - 04:55:11 EST


On Thu, Dec 02, 2021 at 11:32:06PM +0100, Alexander Lobakin wrote:
> +#!/usr/bin/env perl

> + ($name, $align) = $_ =~ /^\s*\[[\s0-9]*\]\s*(\.\S*)\s*[A-Z]*\s*[0-9a-f]{16}\s*[0-9a-f]*\s*[0-9a-f]*\s*[0-9a-f]*\s*[0-9a-f]{2}\s*[A-Z]{2}\s*[0-9]\s*[0-9]\s*([0-9]*)$/;
> + if (!($name =~ /^\.text\.[0-9a-zA-Z_]*((\.constprop|\.isra|\.part)\.[0-9])*(|\.[0-9cfi]*)$/)) {

:-(