From matt@gsicomp.on.ca  Wed Oct  2 20:21:50 2002
Return-Path: <matt@gsicomp.on.ca>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP
	id 2B94937B401; Wed,  2 Oct 2002 20:21:50 -0700 (PDT)
Received: from tomts16-srv.bellnexxia.net (tomts16.bellnexxia.net [209.226.175.4])
	by mx1.FreeBSD.org (Postfix) with ESMTP
	id 6D60843E42; Wed,  2 Oct 2002 20:21:49 -0700 (PDT)
	(envelope-from matt@gsicomp.on.ca)
Received: from xena.gsicomp.on.ca ([65.95.176.54])
          by tomts16-srv.bellnexxia.net
          (InterMail vM.5.01.04.19 201-253-122-122-119-20020516) with ESMTP
          id <20021003032148.SSJ15333.tomts16-srv.bellnexxia.net@xena.gsicomp.on.ca>;
          Wed, 2 Oct 2002 23:21:48 -0400
Received: from dhcp2.gsicomp.on.ca (dhcp2.gsicomp.on.ca [192.168.0.11])
	by xena.gsicomp.on.ca (8.11.3/8.11.3) with ESMTP id g9321mp12207;
	Wed, 2 Oct 2002 22:01:48 -0400 (EDT)
	(envelope-from matt@dhcp2.gsicomp.on.ca)
Received: (from matt@localhost)
	by dhcp2.gsicomp.on.ca (8.12.6/8.12.6/Submit) id g933LiF7023407;
	Wed, 2 Oct 2002 23:21:44 -0400 (EDT)
	(envelope-from matt)
Message-Id: <200210030321.g933LiF7023407@dhcp2.gsicomp.on.ca>
Date: Wed, 2 Oct 2002 23:21:44 -0400 (EDT)
From: Matt Emmerton <matt@gsicomp.on.ca>
Reply-To: Matt Emmerton <matt@gsicomp.on.ca>
To: FreeBSD-gnats-submit@freebsd.org, itojun@freebsd.org
Cc:
Subject: static-ize some symbols in sys/crypto
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         43611
>Category:       kern
>Synopsis:       [crypto] [patch] static-ize some symbols in sys/crypto
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    brucec
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Oct 02 20:30:00 PDT 2002
>Closed-Date:    Thu Feb 24 11:10:06 UTC 2011
>Last-Modified:  Thu Feb 24 11:10:14 UTC 2011
>Originator:     Matt Emmerton
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
GSI Computer Services
>Environment:
System: FreeBSD laptop.gsicomp.on.ca 5.0-CURRENT FreeBSD 5.0-CURRENT #5: Mon Sep 23 21:24:44 EDT 2002 root@laptop.gsicomp.on.ca:/usr/obj/usr/src/sys/LAPTOP.20020914.01 i386

>Description:

	PKH's JKH TODO List - kernel orphan symbol review

	This patch makes some symbols in sys/crypto static, as
	they are not used outside the scope of this code and do not
	need to be visible.

>How-To-Repeat:

>Fix:

--- sys/crypto/rijndael/boxes-fst.dat.orig	Wed Oct  2 23:15:21 2002
+++ sys/crypto/rijndael/boxes-fst.dat	Wed Oct  2 23:15:41 2002
@@ -1,7 +1,7 @@
 /*	$FreeBSD: src/sys/crypto/rijndael/boxes-fst.dat,v 1.2 2001/06/11 12:38:55 ume Exp $	*/
 /*	$KAME: boxes-fst.dat,v 1.6 2001/05/27 00:23:22 itojun Exp $	*/
 
-const word8 S[256] = {
+static const word8 S[256] = {
  99, 124, 119, 123, 242, 107, 111, 197,  48,   1, 103,  43, 254, 215, 171, 118, 
 202, 130, 201, 125, 250,  89,  71, 240, 173, 212, 162, 175, 156, 164, 114, 192, 
 183, 253, 147,  38,  54,  63, 247, 204,  52, 165, 229, 241, 113, 216,  49,  21, 
--- sys/crypto/sha2/sha2.c.orig	Wed Oct  2 23:14:53 2002
+++ sys/crypto/sha2/sha2.c	Wed Oct  2 23:15:01 2002
@@ -202,9 +202,9 @@
  * library -- they are intended for private internal visibility/use
  * only.
  */
-void SHA512_Last(SHA512_CTX*);
-void SHA256_Transform(SHA256_CTX*, const sha2_word32*);
-void SHA512_Transform(SHA512_CTX*, const sha2_word64*);
+static void SHA512_Last(SHA512_CTX*);
+static void SHA256_Transform(SHA256_CTX*, const sha2_word32*);
+static void SHA512_Transform(SHA512_CTX*, const sha2_word64*);
 
 
 /*** SHA-XYZ INITIAL HASH VALUES AND CONSTANTS ************************/
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->patched 
State-Changed-By: brucec 
State-Changed-When: Mon Feb 21 16:25:36 UTC 2011 
State-Changed-Why:  
Fixed in HEAD. 


Responsible-Changed-From-To: freebsd-bugs->brucec 
Responsible-Changed-By: brucec 
Responsible-Changed-When: Mon Feb 21 16:25:36 UTC 2011 
Responsible-Changed-Why:  
Take. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=43611 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/43611: commit references a PR
Date: Mon, 21 Feb 2011 16:21:49 +0000 (UTC)

 Author: brucec
 Date: Mon Feb 21 16:21:43 2011
 New Revision: 218918
 URL: http://svn.freebsd.org/changeset/base/218918
 
 Log:
   Make private functions static.
   
   PR:		kern/43611
   Submitted by:	Matt Emmerton <matt at gsicomp.on.ca>
   Reviewed by:	kib
   MFC after:	3 days
 
 Modified:
   head/sys/crypto/sha2/sha2.c
 
 Modified: head/sys/crypto/sha2/sha2.c
 ==============================================================================
 --- head/sys/crypto/sha2/sha2.c	Mon Feb 21 16:03:39 2011	(r218917)
 +++ head/sys/crypto/sha2/sha2.c	Mon Feb 21 16:21:43 2011	(r218918)
 @@ -206,9 +206,9 @@ typedef u_int64_t sha2_word64;	/* Exactl
   * library -- they are intended for private internal visibility/use
   * only.
   */
 -void SHA512_Last(SHA512_CTX*);
 -void SHA256_Transform(SHA256_CTX*, const sha2_word32*);
 -void SHA512_Transform(SHA512_CTX*, const sha2_word64*);
 +static void SHA512_Last(SHA512_CTX*);
 +static void SHA256_Transform(SHA256_CTX*, const sha2_word32*);
 +static void SHA512_Transform(SHA512_CTX*, const sha2_word64*);
  
  
  /*** SHA-XYZ INITIAL HASH VALUES AND CONSTANTS ************************/
 @@ -366,7 +366,7 @@ void SHA256_Init(SHA256_CTX* context) {
  	(h) = T1 + Sigma0_256(a) + Maj((a), (b), (c)); \
  	j++
  
 -void SHA256_Transform(SHA256_CTX* context, const sha2_word32* data) {
 +static void SHA256_Transform(SHA256_CTX* context, const sha2_word32* data) {
  	sha2_word32	a, b, c, d, e, f, g, h, s0, s1;
  	sha2_word32	T1, *W256;
  	int		j;
 @@ -424,7 +424,7 @@ void SHA256_Transform(SHA256_CTX* contex
  
  #else /* SHA2_UNROLL_TRANSFORM */
  
 -void SHA256_Transform(SHA256_CTX* context, const sha2_word32* data) {
 +static void SHA256_Transform(SHA256_CTX* context, const sha2_word32* data) {
  	sha2_word32	a, b, c, d, e, f, g, h, s0, s1;
  	sha2_word32	T1, T2, *W256;
  	int		j;
 @@ -693,7 +693,7 @@ void SHA512_Init(SHA512_CTX* context) {
  	(h) = T1 + Sigma0_512(a) + Maj((a), (b), (c)); \
  	j++
  
 -void SHA512_Transform(SHA512_CTX* context, const sha2_word64* data) {
 +static void SHA512_Transform(SHA512_CTX* context, const sha2_word64* data) {
  	sha2_word64	a, b, c, d, e, f, g, h, s0, s1;
  	sha2_word64	T1, *W512 = (sha2_word64*)context->buffer;
  	int		j;
 @@ -748,7 +748,7 @@ void SHA512_Transform(SHA512_CTX* contex
  
  #else /* SHA2_UNROLL_TRANSFORM */
  
 -void SHA512_Transform(SHA512_CTX* context, const sha2_word64* data) {
 +static void SHA512_Transform(SHA512_CTX* context, const sha2_word64* data) {
  	sha2_word64	a, b, c, d, e, f, g, h, s0, s1;
  	sha2_word64	T1 = 0, T2 = 0, *W512 = (sha2_word64*)context->buffer;
  	int		j;
 @@ -874,7 +874,7 @@ void SHA512_Update(SHA512_CTX* context, 
  	usedspace = freespace = 0;
  }
  
 -void SHA512_Last(SHA512_CTX* context) {
 +static void SHA512_Last(SHA512_CTX* context) {
  	unsigned int	usedspace;
  
  	usedspace = (context->bitcount[0] >> 3) % SHA512_BLOCK_LENGTH;
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: brucec 
State-Changed-When: Thu Feb 24 11:09:51 UTC 2011 
State-Changed-Why:  
Merged to stable/7 and stable/8. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=43611 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/43611: commit references a PR
Date: Thu, 24 Feb 2011 11:08:28 +0000 (UTC)

 Author: brucec
 Date: Thu Feb 24 11:08:23 2011
 New Revision: 218996
 URL: http://svn.freebsd.org/changeset/base/218996
 
 Log:
   MFC r218918:
   
   Make private functions static.
   
   PR:           kern/43611
   Submitted by: Matt Emmerton <matt at gsicomp.on.ca>
 
 Modified:
   stable/8/sys/crypto/sha2/sha2.c
 Directory Properties:
   stable/8/sys/   (props changed)
   stable/8/sys/amd64/include/xen/   (props changed)
   stable/8/sys/cddl/contrib/opensolaris/   (props changed)
   stable/8/sys/contrib/dev/acpica/   (props changed)
   stable/8/sys/contrib/pf/   (props changed)
 
 Modified: stable/8/sys/crypto/sha2/sha2.c
 ==============================================================================
 --- stable/8/sys/crypto/sha2/sha2.c	Thu Feb 24 11:04:47 2011	(r218995)
 +++ stable/8/sys/crypto/sha2/sha2.c	Thu Feb 24 11:08:23 2011	(r218996)
 @@ -206,9 +206,9 @@ typedef u_int64_t sha2_word64;	/* Exactl
   * library -- they are intended for private internal visibility/use
   * only.
   */
 -void SHA512_Last(SHA512_CTX*);
 -void SHA256_Transform(SHA256_CTX*, const sha2_word32*);
 -void SHA512_Transform(SHA512_CTX*, const sha2_word64*);
 +static void SHA512_Last(SHA512_CTX*);
 +static void SHA256_Transform(SHA256_CTX*, const sha2_word32*);
 +static void SHA512_Transform(SHA512_CTX*, const sha2_word64*);
  
  
  /*** SHA-XYZ INITIAL HASH VALUES AND CONSTANTS ************************/
 @@ -366,7 +366,7 @@ void SHA256_Init(SHA256_CTX* context) {
  	(h) = T1 + Sigma0_256(a) + Maj((a), (b), (c)); \
  	j++
  
 -void SHA256_Transform(SHA256_CTX* context, const sha2_word32* data) {
 +static void SHA256_Transform(SHA256_CTX* context, const sha2_word32* data) {
  	sha2_word32	a, b, c, d, e, f, g, h, s0, s1;
  	sha2_word32	T1, *W256;
  	int		j;
 @@ -424,7 +424,7 @@ void SHA256_Transform(SHA256_CTX* contex
  
  #else /* SHA2_UNROLL_TRANSFORM */
  
 -void SHA256_Transform(SHA256_CTX* context, const sha2_word32* data) {
 +static void SHA256_Transform(SHA256_CTX* context, const sha2_word32* data) {
  	sha2_word32	a, b, c, d, e, f, g, h, s0, s1;
  	sha2_word32	T1, T2, *W256;
  	int		j;
 @@ -693,7 +693,7 @@ void SHA512_Init(SHA512_CTX* context) {
  	(h) = T1 + Sigma0_512(a) + Maj((a), (b), (c)); \
  	j++
  
 -void SHA512_Transform(SHA512_CTX* context, const sha2_word64* data) {
 +static void SHA512_Transform(SHA512_CTX* context, const sha2_word64* data) {
  	sha2_word64	a, b, c, d, e, f, g, h, s0, s1;
  	sha2_word64	T1, *W512 = (sha2_word64*)context->buffer;
  	int		j;
 @@ -748,7 +748,7 @@ void SHA512_Transform(SHA512_CTX* contex
  
  #else /* SHA2_UNROLL_TRANSFORM */
  
 -void SHA512_Transform(SHA512_CTX* context, const sha2_word64* data) {
 +static void SHA512_Transform(SHA512_CTX* context, const sha2_word64* data) {
  	sha2_word64	a, b, c, d, e, f, g, h, s0, s1;
  	sha2_word64	T1 = 0, T2 = 0, *W512 = (sha2_word64*)context->buffer;
  	int		j;
 @@ -874,7 +874,7 @@ void SHA512_Update(SHA512_CTX* context, 
  	usedspace = freespace = 0;
  }
  
 -void SHA512_Last(SHA512_CTX* context) {
 +static void SHA512_Last(SHA512_CTX* context) {
  	unsigned int	usedspace;
  
  	usedspace = (context->bitcount[0] >> 3) % SHA512_BLOCK_LENGTH;
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/43611: commit references a PR
Date: Thu, 24 Feb 2011 11:09:45 +0000 (UTC)

 Author: brucec
 Date: Thu Feb 24 11:09:41 2011
 New Revision: 218997
 URL: http://svn.freebsd.org/changeset/base/218997
 
 Log:
   MFC r218918:
   
   Make private functions static.
   
   PR:           kern/43611
   Submitted by: Matt Emmerton <matt at gsicomp.on.ca>
 
 Modified:
   stable/7/sys/crypto/sha2/sha2.c
 Directory Properties:
   stable/7/sys/   (props changed)
   stable/7/sys/cddl/contrib/opensolaris/   (props changed)
   stable/7/sys/contrib/dev/acpica/   (props changed)
   stable/7/sys/contrib/pf/   (props changed)
 
 Modified: stable/7/sys/crypto/sha2/sha2.c
 ==============================================================================
 --- stable/7/sys/crypto/sha2/sha2.c	Thu Feb 24 11:08:23 2011	(r218996)
 +++ stable/7/sys/crypto/sha2/sha2.c	Thu Feb 24 11:09:41 2011	(r218997)
 @@ -206,9 +206,9 @@ typedef u_int64_t sha2_word64;	/* Exactl
   * library -- they are intended for private internal visibility/use
   * only.
   */
 -void SHA512_Last(SHA512_CTX*);
 -void SHA256_Transform(SHA256_CTX*, const sha2_word32*);
 -void SHA512_Transform(SHA512_CTX*, const sha2_word64*);
 +static void SHA512_Last(SHA512_CTX*);
 +static void SHA256_Transform(SHA256_CTX*, const sha2_word32*);
 +static void SHA512_Transform(SHA512_CTX*, const sha2_word64*);
  
  
  /*** SHA-XYZ INITIAL HASH VALUES AND CONSTANTS ************************/
 @@ -366,7 +366,7 @@ void SHA256_Init(SHA256_CTX* context) {
  	(h) = T1 + Sigma0_256(a) + Maj((a), (b), (c)); \
  	j++
  
 -void SHA256_Transform(SHA256_CTX* context, const sha2_word32* data) {
 +static void SHA256_Transform(SHA256_CTX* context, const sha2_word32* data) {
  	sha2_word32	a, b, c, d, e, f, g, h, s0, s1;
  	sha2_word32	T1, *W256;
  	int		j;
 @@ -424,7 +424,7 @@ void SHA256_Transform(SHA256_CTX* contex
  
  #else /* SHA2_UNROLL_TRANSFORM */
  
 -void SHA256_Transform(SHA256_CTX* context, const sha2_word32* data) {
 +static void SHA256_Transform(SHA256_CTX* context, const sha2_word32* data) {
  	sha2_word32	a, b, c, d, e, f, g, h, s0, s1;
  	sha2_word32	T1, T2, *W256;
  	int		j;
 @@ -693,7 +693,7 @@ void SHA512_Init(SHA512_CTX* context) {
  	(h) = T1 + Sigma0_512(a) + Maj((a), (b), (c)); \
  	j++
  
 -void SHA512_Transform(SHA512_CTX* context, const sha2_word64* data) {
 +static void SHA512_Transform(SHA512_CTX* context, const sha2_word64* data) {
  	sha2_word64	a, b, c, d, e, f, g, h, s0, s1;
  	sha2_word64	T1, *W512 = (sha2_word64*)context->buffer;
  	int		j;
 @@ -748,7 +748,7 @@ void SHA512_Transform(SHA512_CTX* contex
  
  #else /* SHA2_UNROLL_TRANSFORM */
  
 -void SHA512_Transform(SHA512_CTX* context, const sha2_word64* data) {
 +static void SHA512_Transform(SHA512_CTX* context, const sha2_word64* data) {
  	sha2_word64	a, b, c, d, e, f, g, h, s0, s1;
  	sha2_word64	T1 = 0, T2 = 0, *W512 = (sha2_word64*)context->buffer;
  	int		j;
 @@ -874,7 +874,7 @@ void SHA512_Update(SHA512_CTX* context, 
  	usedspace = freespace = 0;
  }
  
 -void SHA512_Last(SHA512_CTX* context) {
 +static void SHA512_Last(SHA512_CTX* context) {
  	unsigned int	usedspace;
  
  	usedspace = (context->bitcount[0] >> 3) % SHA512_BLOCK_LENGTH;
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
>Unformatted:
