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]
Date:	Tue, 23 Sep 2014 14:46:10 -0700
From:	Randy Dunlap <rdunlap@...radead.org>
To:	Ashutosh Dixit <ashutosh.dixit@...el.com>,
	linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	Peter Foley <pefoley2@...oley.com>
CC:	Sudeep Dutt <sudeep.dutt@...el.com>,
	Nikhil Rao <nikhil.rao@...el.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [PATCH linux-next] Documentation: mic: mpssd: Disable mpssd builds
 for kernels < 3.13

On 09/23/14 14:55, Ashutosh Dixit wrote:
> mpssd depends on headers available in kernels >= 3.13. Therefore
> disable the build for kernels < 3.13. For kernels < 3.13, to avoid the
> appearance of a build break simply print an error message and exit.

Why is this needed?  This file won't be built in any automated build
in v3.13 or any kernel until v3.17 at the earliest?


> Reported-by: Andrew Morton <akpm@...ux-foundation.org>
> Cc: Randy Dunlap <rdunlap@...radead.org>
> Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> Cc: Peter Foley <pefoley2@...oley.com>
> Reviewed-by: Sudeep Dutt <sudeep.dutt@...el.com>
> Reviewed-by: Nikhil Rao <nikhil.rao@...el.com>
> Signed-off-by: Ashutosh Dixit <ashutosh.dixit@...el.com>
> ---
>  Documentation/mic/mpssd/mpssd.c | 15 +++++++++++++++
>  Documentation/mic/mpssd/sysfs.c |  5 +++++
>  2 files changed, 20 insertions(+)
> 
> diff --git a/Documentation/mic/mpssd/mpssd.c b/Documentation/mic/mpssd/mpssd.c
> index 3c5c379..2cc48cc 100644
> --- a/Documentation/mic/mpssd/mpssd.c
> +++ b/Documentation/mic/mpssd/mpssd.c
> @@ -18,6 +18,10 @@
>   * Intel MIC User Space Tools.
>   */
>  
> +#include <linux/version.h>
> +
> +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0))
> +
>  #define _GNU_SOURCE
>  
>  #include <stdlib.h>
> @@ -1726,3 +1730,14 @@ main(int argc, char *argv[])
>  
>  	exit(0);
>  }
> +#else /* kernel version < 3.13 */
> +
> +#include <stdio.h>
> +#include <stdlib.h>
> +
> +int main(void)
> +{
> +	fprintf(stderr, "mpssd is only usable against kernels >= 3.13\n");
> +	exit(1);
> +}
> +#endif
> diff --git a/Documentation/mic/mpssd/sysfs.c b/Documentation/mic/mpssd/sysfs.c
> index 8dd3269..1e3ff75 100644
> --- a/Documentation/mic/mpssd/sysfs.c
> +++ b/Documentation/mic/mpssd/sysfs.c
> @@ -18,6 +18,10 @@
>   * Intel MIC User Space Tools.
>   */
>  
> +#include <linux/version.h>
> +
> +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0))
> +
>  #include "mpssd.h"
>  
>  #define PAGE_SIZE 4096
> @@ -100,3 +104,4 @@ done:
>  		free(oldvalue);
>  	return ret;
>  }
> +#endif
> 


-- 
~Randy
--
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