lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200724135350.GA648324@gmail.com>
Date:   Fri, 24 Jul 2020 15:53:50 +0200
From:   Ingo Molnar <mingo@...nel.org>
To:     Huaixin Chang <changhuaixin@...ux.alibaba.com>
Cc:     jpoimboe@...hat.com, bp@...en8.de, hpa@...or.com,
        linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org,
        luto@...capital.net, michal.lkml@...kovi.net, mingo@...hat.com,
        peterz@...radead.org, tglx@...utronix.de, x86@...nel.org,
        yamada.masahiro@...ionext.com
Subject: Re: [PATCH 2/3] scripts/sorttable: Build orc fast lookup table via
 sorttable tool


* Huaixin Chang <changhuaixin@...ux.alibaba.com> wrote:

> Since orc tables are already sorted by sorttable tool, let us move
> building of fast lookup table into sorttable tool too. This saves us
> 6380us from boot time under Intel(R) Xeon(R) CPU E5-2682 v4 @ 2.50GHz
> with 64 cores.

Neat!

> +struct orc_sort_param {
> +	size_t		lookup_table_size;
> +	unsigned int	*orc_lookup_table;
> +	unsigned long	start_ip;
> +	size_t		text_size;
> +	unsigned int	orc_num_entries;
> +};

>  
> +#define LOOKUP_BLOCK_ORDER	8
> +#define LOOKUP_BLOCK_SIZE	(1 << LOOKUP_BLOCK_ORDER)
> +
> +	for (i = 0; i < lookup_num_blocks-1; i++) {
> +		orc = __orc_find(g_orc_ip_table, g_orc_table,
> +				 num_entries,
> +				 lookup_start_ip + (LOOKUP_BLOCK_SIZE * i));
> +		if (!orc) {
> +			snprintf(g_err, ERRSTR_MAXSZ,
> +					"Corrupt .orc_unwind table\n");
> +			pthread_exit(g_err);
> +		}
> +
> +		orc_lookup[i] = orc - g_orc_table;
> +	}
> +
> +	/* Initialize the ending block: */
> +	orc = __orc_find(g_orc_ip_table, g_orc_table, num_entries,
> +			 lookup_stop_ip);
> +	if (!orc) {
> +		snprintf(g_err, ERRSTR_MAXSZ, "Corrupt .orc_unwind table\n");
> +		pthread_exit(g_err);
> +	}
> +	orc_lookup[lookup_num_blocks-1] = orc - g_orc_table;

Yeah, so now this definition of LOOKUP_BLOCK_* basicaly duplicates the 
arch/x86/include/asm/orc_lookup.h size, with no obvious link between 
the two. This is asking for trouble.

<asm/orc_lookup.h> looks simple enough - can we include it in 
scripts/sorttable.h?

Or better yet, please move these two defines into <asm/orc_types.h>, 
which is already included in sorttable.h.

BTW., please update your patches to spell 'ORC' in a capitalized 
fashion, like most of the existing code does:

>  	/* create thread to sort ORC unwind tables concurrently */

Thanks,

	Ingo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ