CVS commit: src/include/ssp

2023-11-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Nov 15 03:14:16 UTC 2023

Modified Files:
src/include/ssp: ssp.h

Log Message:
Allow __ssp_inline to be overriden


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/include/ssp/ssp.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/include/ssp

2023-11-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Nov 15 03:14:16 UTC 2023

Modified Files:
src/include/ssp: ssp.h

Log Message:
Allow __ssp_inline to be overriden


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/include/ssp/ssp.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/include/ssp/ssp.h
diff -u src/include/ssp/ssp.h:1.15 src/include/ssp/ssp.h:1.16
--- src/include/ssp/ssp.h:1.15	Fri Nov 10 18:03:37 2023
+++ src/include/ssp/ssp.h	Tue Nov 14 22:14:16 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: ssp.h,v 1.15 2023/11/10 23:03:37 christos Exp $	*/
+/*	$NetBSD: ssp.h,v 1.16 2023/11/15 03:14:16 christos Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2011, 2023 The NetBSD Foundation, Inc.
@@ -58,8 +58,10 @@
 #endif
 #define __ssp_real(fun)		__ssp_real_(fun)
 
+#ifndef __ssp_inline
 #define __ssp_inline extern __inline \
 __attribute__((__always_inline__, __gnu_inline__))
+#endif
 
 #if __SSP_FORTIFY_LEVEL > 2
 # define __ssp_bos(ptr) __builtin_dynamic_object_size(ptr, 1)



CVS commit: src/include/ssp

2023-11-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Nov 10 23:03:37 UTC 2023

Modified Files:
src/include/ssp: ssp.h

Log Message:
PR/57689: RVP: getcwd() not overridable with -D_FORTIFY_SOURCE


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/include/ssp/ssp.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/include/ssp/ssp.h
diff -u src/include/ssp/ssp.h:1.14 src/include/ssp/ssp.h:1.15
--- src/include/ssp/ssp.h:1.14	Wed Mar 29 09:37:10 2023
+++ src/include/ssp/ssp.h	Fri Nov 10 18:03:37 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: ssp.h,v 1.14 2023/03/29 13:37:10 christos Exp $	*/
+/*	$NetBSD: ssp.h,v 1.15 2023/11/10 23:03:37 christos Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2011, 2023 The NetBSD Foundation, Inc.
@@ -58,7 +58,8 @@
 #endif
 #define __ssp_real(fun)		__ssp_real_(fun)
 
-#define __ssp_inline static __inline __attribute__((__always_inline__))
+#define __ssp_inline extern __inline \
+__attribute__((__always_inline__, __gnu_inline__))
 
 #if __SSP_FORTIFY_LEVEL > 2
 # define __ssp_bos(ptr) __builtin_dynamic_object_size(ptr, 1)



CVS commit: src/include/ssp

2023-11-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Nov 10 23:03:37 UTC 2023

Modified Files:
src/include/ssp: ssp.h

Log Message:
PR/57689: RVP: getcwd() not overridable with -D_FORTIFY_SOURCE


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/include/ssp/ssp.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/include/ssp

2023-03-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 29 13:37:10 UTC 2023

Modified Files:
src/include/ssp: ssp.h

Log Message:
PR/57288: Mingye Wang: : Use __builtin_dynamic_object_size
for LLVM > 9 and GCC > 12, introducing _SSP_FORTIFY_LEVEL == 3


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/include/ssp/ssp.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/include/ssp/ssp.h
diff -u src/include/ssp/ssp.h:1.13 src/include/ssp/ssp.h:1.14
--- src/include/ssp/ssp.h:1.13	Thu Sep  3 16:43:47 2015
+++ src/include/ssp/ssp.h	Wed Mar 29 09:37:10 2023
@@ -1,7 +1,7 @@
-/*	$NetBSD: ssp.h,v 1.13 2015/09/03 20:43:47 plunky Exp $	*/
+/*	$NetBSD: ssp.h,v 1.14 2023/03/29 13:37:10 christos Exp $	*/
 
 /*-
- * Copyright (c) 2006, 2011 The NetBSD Foundation, Inc.
+ * Copyright (c) 2006, 2011, 2023 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
@@ -36,7 +36,9 @@
 #if !defined(__cplusplus)
 # if _FORTIFY_SOURCE > 0 && !defined(__lint__) && \
  (__OPTIMIZE__ > 0 || defined(__clang__)) && __GNUC_PREREQ__(4, 1)
-#  if _FORTIFY_SOURCE > 1
+#  if _FORTIFY_SOURCE > 2 && __has_builtin(__builtin_dynamic_object_size)
+#   define __SSP_FORTIFY_LEVEL 3
+#  elif _FORTIFY_SOURCE > 1
 #   define __SSP_FORTIFY_LEVEL 2
 #  else
 #   define __SSP_FORTIFY_LEVEL 1
@@ -58,8 +60,13 @@
 
 #define __ssp_inline static __inline __attribute__((__always_inline__))
 
-#define __ssp_bos(ptr) __builtin_object_size(ptr, __SSP_FORTIFY_LEVEL > 1)
-#define __ssp_bos0(ptr) __builtin_object_size(ptr, 0)
+#if __SSP_FORTIFY_LEVEL > 2
+# define __ssp_bos(ptr) __builtin_dynamic_object_size(ptr, 1)
+# define __ssp_bos0(ptr) __builtin_dynamic_object_size(ptr, 0)
+#else
+# define __ssp_bos(ptr) __builtin_object_size(ptr, __SSP_FORTIFY_LEVEL > 1)
+# define __ssp_bos0(ptr) __builtin_object_size(ptr, 0)
+#endif
 
 #define __ssp_check(buf, len, bos) \
 	if (bos(buf) != (size_t)-1 && len > bos(buf)) \



CVS commit: src/include/ssp

2023-03-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 29 13:37:10 UTC 2023

Modified Files:
src/include/ssp: ssp.h

Log Message:
PR/57288: Mingye Wang: : Use __builtin_dynamic_object_size
for LLVM > 9 and GCC > 12, introducing _SSP_FORTIFY_LEVEL == 3


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/include/ssp/ssp.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src/include/ssp

2014-04-25 Thread Antti Kantee

On 25/04/14 18:00, Christos Zoulas wrote:

In article <20140425171614.ga22...@britannica.bec.de>,
Joerg Sonnenberger   wrote:

On Thu, Apr 24, 2014 at 08:12:56PM +, Antti Kantee wrote:

Module Name:src
Committed By:   pooka
Date:   Thu Apr 24 20:12:56 UTC 2014

Modified Files:
src/include/ssp: string.h

Log Message:
Wrap stpncpy() iff GNUC_PREREQ(4,8).  Fixes USE_SSP=yes builds
with gcc 4.5.


This produces a regerssion for clang users.


Yes, what are you trying to fix?


The thing stated in the commit message: "USE_SSP=yes builds with gcc 4.5"


Re: CVS commit: src/include/ssp

2014-04-25 Thread Christos Zoulas
In article <20140425171614.ga22...@britannica.bec.de>,
Joerg Sonnenberger   wrote:
>On Thu, Apr 24, 2014 at 08:12:56PM +, Antti Kantee wrote:
>> Module Name: src
>> Committed By:pooka
>> Date:Thu Apr 24 20:12:56 UTC 2014
>> 
>> Modified Files:
>>  src/include/ssp: string.h
>> 
>> Log Message:
>> Wrap stpncpy() iff GNUC_PREREQ(4,8).  Fixes USE_SSP=yes builds
>> with gcc 4.5.
>
>This produces a regerssion for clang users.

Yes, what are you trying to fix?

christos



Re: CVS commit: src/include/ssp

2014-04-25 Thread Joerg Sonnenberger
On Thu, Apr 24, 2014 at 08:12:56PM +, Antti Kantee wrote:
> Module Name:  src
> Committed By: pooka
> Date: Thu Apr 24 20:12:56 UTC 2014
> 
> Modified Files:
>   src/include/ssp: string.h
> 
> Log Message:
> Wrap stpncpy() iff GNUC_PREREQ(4,8).  Fixes USE_SSP=yes builds
> with gcc 4.5.

This produces a regerssion for clang users.

Joerg