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] [day] [month] [year] [list]
Message-ID: <20081216171801.GA11683@elte.hu>
Date:	Tue, 16 Dec 2008 18:18:01 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Markus Metzger <markus.t.metzger@...el.com>
Cc:	linux-kernel@...r.kernel.org, tglx@...utronix.de, hpa@...or.com,
	markus.t.metzger@...il.com, roland@...hat.com,
	eranian@...glemail.com
Subject: Re: [patch 1/3] x86, bts: clear bts bits on fork


* Markus Metzger <markus.t.metzger@...el.com> wrote:

> -#ifdef CONFIG_X86_DS
> +#ifdef CONFIG_X86_PTRACE_BTS
>  	/* Free any BTS tracers that have not been properly released. */
>  	if (unlikely(current->bts)) {
>  		ds_release_bts(current->bts);
> @@ -258,7 +258,7 @@
>  		current->bts_buffer = NULL;
>  		current->bts_size = 0;
>  	}
> -#endif /* CONFIG_X86_DS */

Please eliminate the #ifdef from here by introducing a helper function - 
possibly inlined.

> +#ifdef CONFIG_X86_DS
> +	clear_tsk_thread_flag(p, TIF_DS_AREA_MSR);
> +	p->thread.ds_ctx = NULL;
> +#endif
> +#ifdef CONFIG_X86_PTRACE_BTS
> +	p->thread.bts_ovfl_signal = 0;
> +#endif

ditto.

> +#ifdef CONFIG_X86_PTRACE_BTS
> +	p->bts = NULL;
> +	p->bts_buffer = NULL;
> +	p->bts_size = 0;
> +#endif

this one too please.

There's generally little reason to put #ifdefs into .c files.

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ