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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250526185040.GT24938@noisy.programming.kicks-ass.net>
Date: Mon, 26 May 2025 20:50:40 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Josh Poimboeuf <jpoimboe@...nel.org>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org,
	Petr Mladek <pmladek@...e.com>, Miroslav Benes <mbenes@...e.cz>,
	Joe Lawrence <joe.lawrence@...hat.com>,
	live-patching@...r.kernel.org, Song Liu <song@...nel.org>,
	laokz <laokz@...mail.com>, Jiri Kosina <jikos@...nel.org>,
	Marcos Paulo de Souza <mpdesouza@...e.com>,
	Weinan Liu <wnliu@...gle.com>,
	Fazla Mehrab <a.mehrab@...edance.com>,
	Chen Zhongjin <chenzhongjin@...wei.com>,
	Puranjay Mohan <puranjay@...nel.org>
Subject: Re: [PATCH v2 52/62] objtool/klp: Introduce klp diff subcommand for
 diffing object files


Let me hand you a fresh bucket of curlies, you must've run out :-)

On Fri, May 09, 2025 at 01:17:16PM -0700, Josh Poimboeuf wrote:

> +static struct symbol *first_file_symbol(struct elf *elf)
> +{
> +	struct symbol *sym;
> +
> +	for_each_sym(elf, sym) 

{

> +		if (is_file_sym(sym))
> +			return sym;

}

> +
> +	return NULL;
> +}
> +
> +static struct symbol *next_file_symbol(struct elf *elf, struct symbol *sym)
> +{
> +	for_each_sym_continue(elf, sym)

{

> +		if (is_file_sym(sym))
> +			return sym;

}

> +
> +	return NULL;
> +}

> +static bool is_special_section(struct section *sec)
> +{
> +	static const char * const specials[] = {
> +		".altinstructions",
> +		".smp_locks",
> +		"__bug_table",
> +		"__ex_table",
> +		"__jump_table",
> +		"__mcount_loc",
> +
> +		/*
> +		 * Extract .static_call_sites here to inherit non-module
> +		 * preferential treatment.  The later static call processing
> +		 * during klp module build will be skipped when it sees this
> +		 * section already exists.
> +		 */
> +		".static_call_sites",
> +	};
> +
> +	static const char * const non_special_discards[] = {
> +		".discard.addressable",
> +		SYM_CHECKSUM_SEC,
> +	};
> +
> +	for (int i = 0; i < ARRAY_SIZE(specials); i++)
> +		if (!strcmp(sec->name, specials[i]))
> +			return true;
> +
> +	/* Most .discard sections are special */
> +	for (int i = 0; i < ARRAY_SIZE(non_special_discards); i++)

{

> +		if (!strcmp(sec->name, non_special_discards[i]))
> +			return false;

}

> +
> +	return strstarts(sec->name, ".discard.");
> +}
> +
> +/*
> + * These sections are referenced by special sections but aren't considered
> + * special sections themselves.
> + */
> +static bool is_special_section_aux(struct section *sec)
> +{
> +	static const char * const specials_aux[] = {
> +		".altinstr_replacement",
> +		".altinstr_aux",
> +	};
> +
> +	for (int i = 0; i < ARRAY_SIZE(specials_aux); i++)

{

> +		if (!strcmp(sec->name, specials_aux[i]))
> +			return true;

}

> +
> +	return false;
> +}
> +

And possibly more..

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ