svn commit: r327540 - head/sys/contrib/ipfilter/netinet

2018-01-03 Thread Cy Schubert
Author: cy
Date: Thu Jan  4 04:11:40 2018
New Revision: 327540
URL: https://svnweb.freebsd.org/changeset/base/327540

Log:
  Correct function name in description block.
  
  MFC after:3 days

Modified:
  head/sys/contrib/ipfilter/netinet/ip_state.c

Modified: head/sys/contrib/ipfilter/netinet/ip_state.c
==
--- head/sys/contrib/ipfilter/netinet/ip_state.cThu Jan  4 04:04:29 
2018(r327539)
+++ head/sys/contrib/ipfilter/netinet/ip_state.cThu Jan  4 04:11:40 
2018(r327540)
@@ -483,7 +483,7 @@ ipf_state_soft_fini(softc, arg)
 
 
 /*  */
-/* Function:ipf_state_set_lock  */
+/* Function:ipf_state_setlock   */
 /* Returns: Nil */
 /* Parameters:  arg(I) - pointer to local context to use*/
 /*  tmp(I) - new value for lock */
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r327539 - head/lib/libcasper/libcasper

2018-01-03 Thread Mariusz Zaborski
Author: oshogbo
Date: Thu Jan  4 04:04:29 2018
New Revision: 327539
URL: https://svnweb.freebsd.org/changeset/base/327539

Log:
  Add missing macro in man page.
  
  Reported by:  brueffer@

Modified:
  head/lib/libcasper/libcasper/libcasper.3

Modified: head/lib/libcasper/libcasper/libcasper.3
==
--- head/lib/libcasper/libcasper/libcasper.3Thu Jan  4 03:16:32 2018
(r327538)
+++ head/lib/libcasper/libcasper/libcasper.3Thu Jan  4 04:04:29 2018
(r327539)
@@ -27,7 +27,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd January 2, 2018
+.Dd January 3, 2018
 .Dt LIBCASPER 3
 .Os
 .Sh NAME
@@ -204,7 +204,8 @@ provides
 .Xr getpwent 3
 compatible API
 .It system.random
-allows to obtain entropy from /dev/random
+allows to obtain entropy from
+.Pa /dev/random
 .It system.sysctl
 provides
 .Xr sysctlbyname 3
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r327538 - head/sys/vm

2018-01-03 Thread Alan Cox
Author: alc
Date: Thu Jan  4 03:16:32 2018
New Revision: 327538
URL: https://svnweb.freebsd.org/changeset/base/327538

Log:
  Once we have decided to swap out a process, don't delay the laundering of
  its per-thread kernel stack pages by making them pass through the inactive
  queue first.  Instead, immediately place them in the laundry so that they
  might be cleaned and made available for reclamation sooner.
  
  Reviewed by:  kib, markj
  MFC after:1 week

Modified:
  head/sys/vm/vm_swapout.c

Modified: head/sys/vm/vm_swapout.c
==
--- head/sys/vm/vm_swapout.cThu Jan  4 01:21:24 2018(r327537)
+++ head/sys/vm/vm_swapout.cThu Jan  4 03:16:32 2018(r327538)
@@ -546,7 +546,7 @@ vm_thread_swapout(struct thread *td)
panic("vm_thread_swapout: kstack already missing?");
vm_page_dirty(m);
vm_page_lock(m);
-   vm_page_unwire(m, PQ_INACTIVE);
+   vm_page_unwire(m, PQ_LAUNDRY);
vm_page_unlock(m);
}
VM_OBJECT_WUNLOCK(ksobj);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r327537 - in stable/8/crypto/openssl: crypto/asn1 crypto/bio crypto/bn crypto/dsa crypto/evp crypto/mdc2 crypto/x509 doc/apps ssl

2018-01-03 Thread Jung-uk Kim
Author: jkim
Date: Thu Jan  4 01:21:24 2018
New Revision: 327537
URL: https://svnweb.freebsd.org/changeset/base/327537

Log:
  MFS:  r295060, r296462, r296597-296598, r299053, r306229, r306335, r308200
  
  Sync. OpenSSL with stable/9.
  
  r295060 (delphij):
  Fix OpenSSL SSLv2 ciphersuite downgrade vulnerability. [SA-16:11]
  
  r296462, r296597-296598 (delphij):
  Fix multiple OpenSSL vulnerabilities. [SA-16:12]
  
  r299053 (delphij):
  Fix several OpenSSL vulnerabilities. [SA-16:17]
  
  r306229, r306335 (delphij):
  Fix multiple OpenSSL vulnerabilities. [SA-16:26]
  
  r308200 (delphij):
  Fix OpenSSL remote DoS vulnerability. [SA-16:35]
  
  Requested by: danfe

Modified:
  stable/8/crypto/openssl/crypto/asn1/a_type.c
  stable/8/crypto/openssl/crypto/asn1/tasn_dec.c
  stable/8/crypto/openssl/crypto/asn1/tasn_enc.c
  stable/8/crypto/openssl/crypto/bio/b_print.c
  stable/8/crypto/openssl/crypto/bn/bn.h
  stable/8/crypto/openssl/crypto/bn/bn_exp.c
  stable/8/crypto/openssl/crypto/bn/bn_print.c
  stable/8/crypto/openssl/crypto/dsa/dsa_ossl.c
  stable/8/crypto/openssl/crypto/evp/encode.c
  stable/8/crypto/openssl/crypto/evp/evp_enc.c
  stable/8/crypto/openssl/crypto/mdc2/mdc2dgst.c
  stable/8/crypto/openssl/crypto/x509/x509_obj.c
  stable/8/crypto/openssl/doc/apps/ciphers.pod
  stable/8/crypto/openssl/ssl/d1_both.c
  stable/8/crypto/openssl/ssl/d1_clnt.c
  stable/8/crypto/openssl/ssl/d1_lib.c
  stable/8/crypto/openssl/ssl/d1_pkt.c
  stable/8/crypto/openssl/ssl/d1_srvr.c
  stable/8/crypto/openssl/ssl/s2_lib.c
  stable/8/crypto/openssl/ssl/s2_srvr.c
  stable/8/crypto/openssl/ssl/s3_clnt.c
  stable/8/crypto/openssl/ssl/s3_pkt.c
  stable/8/crypto/openssl/ssl/s3_srvr.c
  stable/8/crypto/openssl/ssl/ssl.h
  stable/8/crypto/openssl/ssl/ssl3.h
  stable/8/crypto/openssl/ssl/ssl_err.c
  stable/8/crypto/openssl/ssl/ssl_lib.c
  stable/8/crypto/openssl/ssl/ssl_locl.h
  stable/8/crypto/openssl/ssl/ssl_sess.c
  stable/8/crypto/openssl/ssl/t1_lib.c

Modified: stable/8/crypto/openssl/crypto/asn1/a_type.c
==
--- stable/8/crypto/openssl/crypto/asn1/a_type.cThu Jan  4 00:58:30 
2018(r327536)
+++ stable/8/crypto/openssl/crypto/asn1/a_type.cThu Jan  4 01:21:24 
2018(r327537)
@@ -123,9 +123,7 @@ int ASN1_TYPE_cmp(const ASN1_TYPE *a, const ASN1_TYPE 
 result = 0; /* They do not have content. */
 break;
 case V_ASN1_INTEGER:
-case V_ASN1_NEG_INTEGER:
 case V_ASN1_ENUMERATED:
-case V_ASN1_NEG_ENUMERATED:
 case V_ASN1_BIT_STRING:
 case V_ASN1_OCTET_STRING:
 case V_ASN1_SEQUENCE:

Modified: stable/8/crypto/openssl/crypto/asn1/tasn_dec.c
==
--- stable/8/crypto/openssl/crypto/asn1/tasn_dec.c  Thu Jan  4 00:58:30 
2018(r327536)
+++ stable/8/crypto/openssl/crypto/asn1/tasn_dec.c  Thu Jan  4 01:21:24 
2018(r327537)
@@ -901,9 +901,7 @@ int asn1_ex_c2i(ASN1_VALUE **pval, const unsigned char
 break;
 
 case V_ASN1_INTEGER:
-case V_ASN1_NEG_INTEGER:
 case V_ASN1_ENUMERATED:
-case V_ASN1_NEG_ENUMERATED:
 tint = (ASN1_INTEGER **)pval;
 if (!c2i_ASN1_INTEGER(tint, , len))
 goto err;

Modified: stable/8/crypto/openssl/crypto/asn1/tasn_enc.c
==
--- stable/8/crypto/openssl/crypto/asn1/tasn_enc.c  Thu Jan  4 00:58:30 
2018(r327536)
+++ stable/8/crypto/openssl/crypto/asn1/tasn_enc.c  Thu Jan  4 01:21:24 
2018(r327537)
@@ -610,9 +610,7 @@ int asn1_ex_i2c(ASN1_VALUE **pval, unsigned char *cout
 break;
 
 case V_ASN1_INTEGER:
-case V_ASN1_NEG_INTEGER:
 case V_ASN1_ENUMERATED:
-case V_ASN1_NEG_ENUMERATED:
 /*
  * These are all have the same content format as ASN1_INTEGER
  */

Modified: stable/8/crypto/openssl/crypto/bio/b_print.c
==
--- stable/8/crypto/openssl/crypto/bio/b_print.cThu Jan  4 00:58:30 
2018(r327536)
+++ stable/8/crypto/openssl/crypto/bio/b_print.cThu Jan  4 01:21:24 
2018(r327537)
@@ -122,20 +122,20 @@
 #  define LLONG long long
 # endif
 #else
-# define LLONG long
-#endif
-
-static void fmtstr(char **, char **, size_t *, size_t *,
-   const char *, int, int, int);
-static void fmtint(char **, char **, size_t *, size_t *,
-   LLONG, int, int, int, int);
-static void fmtfp(char **, char **, size_t *, size_t *,
-  LDOUBLE, int, int, int);
-static void doapr_outch(char **, char **, size_t *, size_t *, int);
-static void _dopr(char **sbuffer, char **buffer,
-  size_t *maxlen, size_t *retlen, int *truncated,
-  const char *format, va_list args);
-
+# define LLONG long
+#endif
+
+static int fmtstr(char 

svn commit: r327536 - in stable/8: crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/asn1 crypto/openssl/crypto/des/t crypto/openssl/crypto/evp crypto/openssl/doc crypt...

2018-01-03 Thread Jung-uk Kim
Author: jkim
Date: Thu Jan  4 00:58:30 2018
New Revision: 327536
URL: https://svnweb.freebsd.org/changeset/base/327536

Log:
  Merge OpenSSL 0.9.8zh.
  
  Requested by: danfe

Added:
  stable/8/crypto/openssl/doc/dir-locals.example.el
 - copied unchanged from r291711, 
vendor-crypto/openssl/dist-0.9.8/doc/dir-locals.example.el
  stable/8/crypto/openssl/doc/openssl-c-indent.el
 - copied unchanged from r291711, 
vendor-crypto/openssl/dist-0.9.8/doc/openssl-c-indent.el
Deleted:
  stable/8/crypto/openssl/crypto/des/t/test
  stable/8/crypto/openssl/test/bctest
  stable/8/crypto/openssl/util/pod2mantest
Modified:
  stable/8/crypto/openssl/CHANGES
  stable/8/crypto/openssl/FAQ
  stable/8/crypto/openssl/Makefile
  stable/8/crypto/openssl/Makefile.org
  stable/8/crypto/openssl/NEWS
  stable/8/crypto/openssl/README
  stable/8/crypto/openssl/apps/asn1pars.c
  stable/8/crypto/openssl/crypto/asn1/asn1_par.c
  stable/8/crypto/openssl/crypto/asn1/tasn_dec.c
  stable/8/crypto/openssl/crypto/evp/e_des3.c
  stable/8/crypto/openssl/crypto/mem_clr.c
  stable/8/crypto/openssl/crypto/opensslv.h
  stable/8/crypto/openssl/doc/crypto/X509_NAME_get_index_by_NID.pod
  stable/8/crypto/openssl/openssl.spec
  stable/8/crypto/openssl/ssl/ssl_sess.c
  stable/8/crypto/openssl/ssl/ssltest.c
  stable/8/secure/lib/libcrypto/Makefile.inc
  stable/8/secure/lib/libcrypto/man/ASN1_OBJECT_new.3
  stable/8/secure/lib/libcrypto/man/ASN1_STRING_length.3
  stable/8/secure/lib/libcrypto/man/ASN1_STRING_new.3
  stable/8/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3
  stable/8/secure/lib/libcrypto/man/ASN1_generate_nconf.3
  stable/8/secure/lib/libcrypto/man/BIO_ctrl.3
  stable/8/secure/lib/libcrypto/man/BIO_f_base64.3
  stable/8/secure/lib/libcrypto/man/BIO_f_buffer.3
  stable/8/secure/lib/libcrypto/man/BIO_f_cipher.3
  stable/8/secure/lib/libcrypto/man/BIO_f_md.3
  stable/8/secure/lib/libcrypto/man/BIO_f_null.3
  stable/8/secure/lib/libcrypto/man/BIO_f_ssl.3
  stable/8/secure/lib/libcrypto/man/BIO_find_type.3
  stable/8/secure/lib/libcrypto/man/BIO_new.3
  stable/8/secure/lib/libcrypto/man/BIO_push.3
  stable/8/secure/lib/libcrypto/man/BIO_read.3
  stable/8/secure/lib/libcrypto/man/BIO_s_accept.3
  stable/8/secure/lib/libcrypto/man/BIO_s_bio.3
  stable/8/secure/lib/libcrypto/man/BIO_s_connect.3
  stable/8/secure/lib/libcrypto/man/BIO_s_fd.3
  stable/8/secure/lib/libcrypto/man/BIO_s_file.3
  stable/8/secure/lib/libcrypto/man/BIO_s_mem.3
  stable/8/secure/lib/libcrypto/man/BIO_s_null.3
  stable/8/secure/lib/libcrypto/man/BIO_s_socket.3
  stable/8/secure/lib/libcrypto/man/BIO_set_callback.3
  stable/8/secure/lib/libcrypto/man/BIO_should_retry.3
  stable/8/secure/lib/libcrypto/man/BN_BLINDING_new.3
  stable/8/secure/lib/libcrypto/man/BN_CTX_new.3
  stable/8/secure/lib/libcrypto/man/BN_CTX_start.3
  stable/8/secure/lib/libcrypto/man/BN_add.3
  stable/8/secure/lib/libcrypto/man/BN_add_word.3
  stable/8/secure/lib/libcrypto/man/BN_bn2bin.3
  stable/8/secure/lib/libcrypto/man/BN_cmp.3
  stable/8/secure/lib/libcrypto/man/BN_copy.3
  stable/8/secure/lib/libcrypto/man/BN_generate_prime.3
  stable/8/secure/lib/libcrypto/man/BN_mod_inverse.3
  stable/8/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3
  stable/8/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3
  stable/8/secure/lib/libcrypto/man/BN_new.3
  stable/8/secure/lib/libcrypto/man/BN_num_bytes.3
  stable/8/secure/lib/libcrypto/man/BN_rand.3
  stable/8/secure/lib/libcrypto/man/BN_set_bit.3
  stable/8/secure/lib/libcrypto/man/BN_swap.3
  stable/8/secure/lib/libcrypto/man/BN_zero.3
  stable/8/secure/lib/libcrypto/man/CONF_modules_free.3
  stable/8/secure/lib/libcrypto/man/CONF_modules_load_file.3
  stable/8/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3
  stable/8/secure/lib/libcrypto/man/DH_generate_key.3
  stable/8/secure/lib/libcrypto/man/DH_generate_parameters.3
  stable/8/secure/lib/libcrypto/man/DH_get_ex_new_index.3
  stable/8/secure/lib/libcrypto/man/DH_new.3
  stable/8/secure/lib/libcrypto/man/DH_set_method.3
  stable/8/secure/lib/libcrypto/man/DH_size.3
  stable/8/secure/lib/libcrypto/man/DSA_SIG_new.3
  stable/8/secure/lib/libcrypto/man/DSA_do_sign.3
  stable/8/secure/lib/libcrypto/man/DSA_dup_DH.3
  stable/8/secure/lib/libcrypto/man/DSA_generate_key.3
  stable/8/secure/lib/libcrypto/man/DSA_generate_parameters.3
  stable/8/secure/lib/libcrypto/man/DSA_get_ex_new_index.3
  stable/8/secure/lib/libcrypto/man/DSA_new.3
  stable/8/secure/lib/libcrypto/man/DSA_set_method.3
  stable/8/secure/lib/libcrypto/man/DSA_sign.3
  stable/8/secure/lib/libcrypto/man/DSA_size.3
  stable/8/secure/lib/libcrypto/man/ERR_GET_LIB.3
  stable/8/secure/lib/libcrypto/man/ERR_clear_error.3
  stable/8/secure/lib/libcrypto/man/ERR_error_string.3
  stable/8/secure/lib/libcrypto/man/ERR_get_error.3
  stable/8/secure/lib/libcrypto/man/ERR_load_crypto_strings.3
  stable/8/secure/lib/libcrypto/man/ERR_load_strings.3
  stable/8/secure/lib/libcrypto/man/ERR_print_errors.3
  stable/8/secure/lib/libcrypto/man/ERR_put_error.3
  

Re: svn commit: r327086 - head/sys/dev/lmc

2018-01-03 Thread Pedro Giffuni



On 03/01/2018 18:03, Warner Losh wrote:



On Jan 3, 2018 3:17 PM, "Brooks Davis" > wrote:


On Fri, Dec 22, 2017 at 05:15:02PM +, Pedro F. Giffuni wrote:
> Author: pfg
> Date: Fri Dec 22 17:15:02 2017
> New Revision: 327086
> URL: https://svnweb.freebsd.org/changeset/base/327086

>
> Log:
>   SPDX: Reverse License ID tags from the lmc driver.
>
>   While the BSD-2-Clause license is there, the GPLv2 is also
present.
>   I am unsure of the implications of having both licenses as
they are here.
>
>   I'll just leave it untagged and open for interpretation.

Deleting lmc(4) is probably the appropriate fix.  You can buy the
things
on e-bay, but they look to be 32-bit PCI devices and it seems unlikely
they are in use on systems that will run FreeBSD 12.  I've updated the
wiki with a note to this effect.


Which wiki?



https://wiki.freebsd.org/GPLinBase


I'd like to formalize things a little.



Either the license is very naively stated or the device should have been 
added in the contrib/gnu branches.
I suspect the former but my attempts to contact the author were 
unsuccessful so it is probably better to just drop it.


Inc is for very old interconnect to telco... So maybe that's safe to 
delete.


Warner



Pedro.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r327086 - head/sys/dev/lmc

2018-01-03 Thread Warner Losh
On Jan 3, 2018 3:17 PM, "Brooks Davis"  wrote:

On Fri, Dec 22, 2017 at 05:15:02PM +, Pedro F. Giffuni wrote:
> Author: pfg
> Date: Fri Dec 22 17:15:02 2017
> New Revision: 327086
> URL: https://svnweb.freebsd.org/changeset/base/327086
>
> Log:
>   SPDX: Reverse License ID tags from the lmc driver.
>
>   While the BSD-2-Clause license is there, the GPLv2 is also present.
>   I am unsure of the implications of having both licenses as they are
here.
>
>   I'll just leave it untagged and open for interpretation.

Deleting lmc(4) is probably the appropriate fix.  You can buy the things
on e-bay, but they look to be 32-bit PCI devices and it seems unlikely
they are in use on systems that will run FreeBSD 12.  I've updated the
wiki with a note to this effect.


Which wiki?

I'd like to formalize things a little.

Inc is for very old interconnect to telco... So maybe that's safe to delete.

Warner
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r327086 - head/sys/dev/lmc

2018-01-03 Thread Brooks Davis
On Fri, Dec 22, 2017 at 05:15:02PM +, Pedro F. Giffuni wrote:
> Author: pfg
> Date: Fri Dec 22 17:15:02 2017
> New Revision: 327086
> URL: https://svnweb.freebsd.org/changeset/base/327086
> 
> Log:
>   SPDX: Reverse License ID tags from the lmc driver.
>   
>   While the BSD-2-Clause license is there, the GPLv2 is also present.
>   I am unsure of the implications of having both licenses as they are here.
>   
>   I'll just leave it untagged and open for interpretation.

Deleting lmc(4) is probably the appropriate fix.  You can buy the things
on e-bay, but they look to be 32-bit PCI devices and it seems unlikely
they are in use on systems that will run FreeBSD 12.  I've updated the
wiki with a note to this effect.

-- Brooks


signature.asc
Description: PGP signature


svn commit: r327530 - in head/sys/powerpc: include powerpc

2018-01-03 Thread Andreas Tobler
Author: andreast
Date: Wed Jan  3 20:20:43 2018
New Revision: 327530
URL: https://svnweb.freebsd.org/changeset/base/327530

Log:
  The recent bump of MAXDSIZ made 32-bit binary execution on 64-bit powerpc 
fail.
  The data segement was too big.
  
  Add a fix-up function like on ia32 for MAXDSIZ.
  
  While here, bring also the MAXSSIZ closer to amd64 and add an equal fix-up
  function for MAXSSIZ.
  
  Reviewed by:  jhibbits@
  Obtained from:  jhibbits@
  Differential Revision:https://reviews.freebsd.org/D13753

Modified:
  head/sys/powerpc/include/vmparam.h
  head/sys/powerpc/powerpc/elf32_machdep.c

Modified: head/sys/powerpc/include/vmparam.h
==
--- head/sys/powerpc/include/vmparam.h  Wed Jan  3 19:28:13 2018
(r327529)
+++ head/sys/powerpc/include/vmparam.h  Wed Jan  3 20:20:43 2018
(r327530)
@@ -60,7 +60,11 @@
 #endif
 
 #ifndefMAXSSIZ
+#ifdef __powerpc64__
+#defineMAXSSIZ (512*1024*1024) /* max stack size */
+#else
 #defineMAXSSIZ (64*1024*1024)  /* max stack size */
+#endif
 #endif
 
 #ifdef AIM

Modified: head/sys/powerpc/powerpc/elf32_machdep.c
==
--- head/sys/powerpc/powerpc/elf32_machdep.cWed Jan  3 19:28:13 2018
(r327529)
+++ head/sys/powerpc/powerpc/elf32_machdep.cWed Jan  3 20:20:43 2018
(r327530)
@@ -42,6 +42,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -60,6 +61,18 @@
 #include 
 
 extern const char *freebsd32_syscallnames[];
+static void ppc32_fixlimit(struct rlimit *rl, int which);
+
+static SYSCTL_NODE(_compat, OID_AUTO, ppc32, CTLFLAG_RW, 0, "32-bit mode");
+
+#define PPC32_MAXDSIZ (1024*1024*1024)
+static u_long ppc32_maxdsiz = PPC32_MAXDSIZ;
+SYSCTL_ULONG(_compat_ppc32, OID_AUTO, maxdsiz, CTLFLAG_RWTUN, _maxdsiz,
+ 0, "");
+#define PPC32_MAXSSIZ (64*1024*1024)
+u_long ppc32_maxssiz = PPC32_MAXSSIZ;
+SYSCTL_ULONG(_compat_ppc32, OID_AUTO, maxssiz, CTLFLAG_RWTUN, _maxssiz,
+ 0, "");
 #endif
 
 struct sysentvec elf32_freebsd_sysvec = {
@@ -91,6 +104,7 @@ struct sysentvec elf32_freebsd_sysvec = {
.sv_copyout_strings = freebsd32_copyout_strings,
.sv_setregs = ppc32_setregs,
.sv_syscallnames = freebsd32_syscallnames,
+   .sv_fixlimit= ppc32_fixlimit,
 #else
.sv_maxuser = VM_MAXUSER_ADDRESS,
.sv_usrstack= USRSTACK,
@@ -98,8 +112,8 @@ struct sysentvec elf32_freebsd_sysvec = {
.sv_copyout_strings = exec_copyout_strings,
.sv_setregs = exec_setregs,
.sv_syscallnames = syscallnames,
-#endif
.sv_fixlimit= NULL,
+#endif
.sv_maxssiz = NULL,
.sv_flags   = SV_ABI_FREEBSD | SV_ILP32 | SV_SHP,
.sv_set_syscall_retval = cpu_set_syscall_retval,
@@ -319,5 +333,30 @@ elf_cpu_unload_file(linker_file_t lf __unused)
 {
 
return (0);
+}
+#endif
+
+#ifdef __powerpc64__
+static void
+ppc32_fixlimit(struct rlimit *rl, int which)
+{
+   switch (which) {
+   case RLIMIT_DATA:
+   if (ppc32_maxdsiz != 0) {
+   if (rl->rlim_cur > ppc32_maxdsiz)
+   rl->rlim_cur = ppc32_maxdsiz;
+   if (rl->rlim_max > ppc32_maxdsiz)
+   rl->rlim_max = ppc32_maxdsiz;
+   }
+   break;
+   case RLIMIT_STACK:
+   if (ppc32_maxssiz != 0) {
+   if (rl->rlim_cur > ppc32_maxssiz)
+   rl->rlim_cur = ppc32_maxssiz;
+   if (rl->rlim_max > ppc32_maxssiz)
+   rl->rlim_max = ppc32_maxssiz;
+   }
+   break;
+   }
 }
 #endif
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r327523 - in head/stand/mips/beri: boot2 loader

2018-01-03 Thread Warner Losh
On Jan 3, 2018 11:44 AM, "Bryan Drewery"  wrote:

On 1/3/2018 9:35 AM, John Baldwin wrote:
> Author: jhb
> Date: Wed Jan  3 17:35:38 2018
> New Revision: 327523
> URL: https://svnweb.freebsd.org/changeset/base/327523
>
> Log:
>   Don't clobber system LDFLAGS for beri boot loaders.
>
>   Prior to r325114, bsd.init.mk was included after assignments to CFLAGS
and
>   LDFLAGS in these Makefiles.  After r325114, bare assignments (= rather
than
>   +=) lost system-assigned default values that are needed when compiling
with
>   an external toolchain.  CFLAGS in both Makefiles already uses +=.  This
>   commit changes LDFLAGS to use +=.  While here, depend on the LDFLAGS
update
>   in the parent Makefile.inc to set -nostdlib.
>


Hmm, I'm not sure it is even right for these files to be including
bsd.init.mk



It is the right thing.


It says at the top:
  # The include file  includes ,
  # ../Makefile.inc and ; this is used at the
  # top of all  files that actually "build something".

There's a bunch of other files doing this as well.

The biggest problem here is that including bsd.init.mk is like including
bsd.prog.mk first and then putting the rest of the Makefile after it. It
changes a lot of assumptions in share/mk files. And this particular file
still includes bsd.prog.mk, so things really could go wrong.  I speak of
things like dependency handling and beforebuild handling.
I think it's more likely these files just need src.opts.mk.


No. They depend on Makefile.inc stuff being done and this was the easiest
way to do that in dozens of files.

Warner

>   Sponsored by:   DARPA / AFRL
>
> Modified:
>   head/stand/mips/beri/boot2/Makefile
>   head/stand/mips/beri/loader/Makefile
>
> Modified: head/stand/mips/beri/boot2/Makefile
> 
==
> --- head/stand/mips/beri/boot2/Makefile   Wed Jan  3 17:28:01 2018
(r327522)
> +++ head/stand/mips/beri/boot2/Makefile   Wed Jan  3 17:35:38 2018
(r327523)
> @@ -53,8 +53,7 @@ CFLAGS+=-I${LDRSRC} \
>   -fno-pic -mno-abicalls  \
>   -g
>
> -LDFLAGS= -nostdlib   \
> - -static \
> +LDFLAGS+=-static \
>   -Wl,-N  \
>   -G0 \
>   -L${.CURDIR}
>
> Modified: head/stand/mips/beri/loader/Makefile
> 
==
> --- head/stand/mips/beri/loader/Makefile  Wed Jan  3 17:28:01 2018
(r327522)
> +++ head/stand/mips/beri/loader/Makefile  Wed Jan  3 17:35:38 2018
(r327523)
> @@ -85,8 +85,7 @@ CFLAGS+=-G0 \
>   -mno-abicalls   \
>   -g
>
> -LDFLAGS= -nostdlib   \
> - -static \
> +LDFLAGS+=-static \
>   -T ${.CURDIR}/loader.ldscript   \
>   -L${.CURDIR}\
>   -e __start
>


--
Regards,
Bryan Drewery
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r327529 - head/sys/dev/ath

2018-01-03 Thread Ed Maste
Author: emaste
Date: Wed Jan  3 19:28:13 2018
New Revision: 327529
URL: https://svnweb.freebsd.org/changeset/base/327529

Log:
  ath: fix possible memory disclosure in ioctl handler
  
  Submitted by: Domagoj Stolfa 
  MFC after:1 week

Modified:
  head/sys/dev/ath/if_ath_ioctl.c

Modified: head/sys/dev/ath/if_ath_ioctl.c
==
--- head/sys/dev/ath/if_ath_ioctl.c Wed Jan  3 19:24:57 2018
(r327528)
+++ head/sys/dev/ath/if_ath_ioctl.c Wed Jan  3 19:28:13 2018
(r327529)
@@ -197,7 +197,7 @@ ath_ioctl_diag(struct ath_softc *sc, struct ath_diag *
 * pointer for us to use below in reclaiming the buffer;
 * may want to be more defensive.
 */
-   outdata = malloc(outsize, M_TEMP, M_NOWAIT);
+   outdata = malloc(outsize, M_TEMP, M_NOWAIT | M_ZERO);
if (outdata == NULL) {
error = ENOMEM;
goto bad;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r327527 - head/sys/dev/ath

2018-01-03 Thread Ed Maste
Author: emaste
Date: Wed Jan  3 19:24:21 2018
New Revision: 327527
URL: https://svnweb.freebsd.org/changeset/base/327527

Log:
  ath: revert accidental change committed with r327526
  
  It will be recommitted with the correct commit message.

Modified:
  head/sys/dev/ath/if_ath_ioctl.c

Modified: head/sys/dev/ath/if_ath_ioctl.c
==
--- head/sys/dev/ath/if_ath_ioctl.c Wed Jan  3 19:22:10 2018
(r327526)
+++ head/sys/dev/ath/if_ath_ioctl.c Wed Jan  3 19:24:21 2018
(r327527)
@@ -197,7 +197,7 @@ ath_ioctl_diag(struct ath_softc *sc, struct ath_diag *
 * pointer for us to use below in reclaiming the buffer;
 * may want to be more defensive.
 */
-   outdata = malloc(outsize, M_TEMP, M_NOWAIT | M_ZERO);
+   outdata = malloc(outsize, M_TEMP, M_NOWAIT);
if (outdata == NULL) {
error = ENOMEM;
goto bad;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r327528 - in head: share/man/man4 sys/dev/cxgbe

2018-01-03 Thread Navdeep Parhar
Author: np
Date: Wed Jan  3 19:24:57 2018
New Revision: 327528
URL: https://svnweb.freebsd.org/changeset/base/327528

Log:
  cxgbe(4): Add a knob to enable/disable PCIe relaxed ordering.  Disable it by
  default when running on Intel CPUs.
  
  This is a crude fix for the performance issues alluded to in these Linux 
commits:
  
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=87e09cdec4dae08acdb4aa49beb793c19d73e73e
  
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a99b646afa8a02571ea298bedca6592d818229cd
  
  MFC after:1 week
  Sponsored by: Chelsio Communications

Modified:
  head/share/man/man4/cxgbe.4
  head/sys/dev/cxgbe/t4_main.c

Modified: head/share/man/man4/cxgbe.4
==
--- head/share/man/man4/cxgbe.4 Wed Jan  3 19:24:21 2018(r327527)
+++ head/share/man/man4/cxgbe.4 Wed Jan  3 19:24:57 2018(r327528)
@@ -243,6 +243,13 @@ Permitted interrupt types.
 Bit 0 represents INTx (line interrupts), bit 1 MSI, and bit 2 MSI-X.
 The default is 7 (all allowed).
 The driver selects the best possible type out of the allowed types.
+.It Va hw.cxgbe.pcie_relaxed_ordering
+PCIe Relaxed Ordering.
+-1 indicates the driver should determine whether to enable or disable PCIe RO.
+0 disables PCIe RO.
+1 enables PCIe RO.
+2 indicates the driver should not modify the PCIe RO setting.
+The default is -1.
 .It Va hw.cxgbe.fw_install
 0 prohibits the driver from installing a firmware on the card.
 1 allows the driver to install a new firmware if internal driver

Modified: head/sys/dev/cxgbe/t4_main.c
==
--- head/sys/dev/cxgbe/t4_main.cWed Jan  3 19:24:21 2018
(r327527)
+++ head/sys/dev/cxgbe/t4_main.cWed Jan  3 19:24:57 2018
(r327528)
@@ -63,6 +63,8 @@ __FBSDID("$FreeBSD$");
 #include 
 #endif
 #if defined(__i386__) || defined(__amd64__)
+#include 
+#include 
 #include 
 #include 
 #endif
@@ -454,7 +456,17 @@ TUNABLE_INT("hw.cxl.write_combine", _write_combine)
 
 static int t4_num_vis = 1;
 TUNABLE_INT("hw.cxgbe.num_vis", _num_vis);
+/*
+ * PCIe Relaxed Ordering.
+ * -1: driver should figure out a good value.
+ * 0: disable RO.
+ * 1: enable RO.
+ * 2: leave RO alone.
+ */
+static int pcie_relaxed_ordering = -1;
+TUNABLE_INT("hw.cxgbe.pcie_relaxed_ordering", _relaxed_ordering);
 
+
 /* Functions used by VIs to obtain unique MAC addresses for each VI. */
 static int vi_mac_funcs[] = {
FW_VI_FUNC_ETH,
@@ -856,10 +868,16 @@ t4_attach(device_t dev)
 
pci_set_max_read_req(dev, 4096);
v = pci_read_config(dev, i + PCIER_DEVICE_CTL, 2);
-   v |= PCIEM_CTL_RELAXED_ORD_ENABLE;
-   pci_write_config(dev, i + PCIER_DEVICE_CTL, v, 2);
-
sc->params.pci.mps = 128 << ((v & PCIEM_CTL_MAX_PAYLOAD) >> 5);
+   if (pcie_relaxed_ordering == 0 &&
+   (v | PCIEM_CTL_RELAXED_ORD_ENABLE) != 0) {
+   v &= ~PCIEM_CTL_RELAXED_ORD_ENABLE;
+   pci_write_config(dev, i + PCIER_DEVICE_CTL, v, 2);
+   } else if (pcie_relaxed_ordering == 1 &&
+   (v & PCIEM_CTL_RELAXED_ORD_ENABLE) == 0) {
+   v |= PCIEM_CTL_RELAXED_ORD_ENABLE;
+   pci_write_config(dev, i + PCIER_DEVICE_CTL, v, 2);
+   }
}
 
sc->sge_gts_reg = MYPF_REG(A_SGE_PF_GTS);
@@ -9961,6 +9979,14 @@ tweak_tunables(void)
if (t4_num_vis > nitems(vi_mac_funcs)) {
t4_num_vis = nitems(vi_mac_funcs);
printf("cxgbe: number of VIs limited to %d\n", t4_num_vis);
+   }
+
+   if (pcie_relaxed_ordering < 0 || pcie_relaxed_ordering > 2) {
+   pcie_relaxed_ordering = 1;
+#if defined(__i386__) || defined(__amd64__)
+   if (cpu_vendor_id == CPU_VENDOR_INTEL)
+   pcie_relaxed_ordering = 0;
+#endif
}
 }
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r327526 - in head/sys: dev/ath tools

2018-01-03 Thread Ed Maste
Author: emaste
Date: Wed Jan  3 19:22:10 2018
New Revision: 327526
URL: https://svnweb.freebsd.org/changeset/base/327526

Log:
  embed_mfs: correctly test grep return value
  
  Reported by:  br
  MFC with: r326992
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/dev/ath/if_ath_ioctl.c
  head/sys/tools/embed_mfs.sh

Modified: head/sys/dev/ath/if_ath_ioctl.c
==
--- head/sys/dev/ath/if_ath_ioctl.c Wed Jan  3 18:19:47 2018
(r327525)
+++ head/sys/dev/ath/if_ath_ioctl.c Wed Jan  3 19:22:10 2018
(r327526)
@@ -197,7 +197,7 @@ ath_ioctl_diag(struct ath_softc *sc, struct ath_diag *
 * pointer for us to use below in reclaiming the buffer;
 * may want to be more defensive.
 */
-   outdata = malloc(outsize, M_TEMP, M_NOWAIT);
+   outdata = malloc(outsize, M_TEMP, M_NOWAIT | M_ZERO);
if (outdata == NULL) {
error = ENOMEM;
goto bad;

Modified: head/sys/tools/embed_mfs.sh
==
--- head/sys/tools/embed_mfs.sh Wed Jan  3 18:19:47 2018(r327525)
+++ head/sys/tools/embed_mfs.sh Wed Jan  3 19:22:10 2018(r327526)
@@ -49,7 +49,7 @@ mfs_size=`stat -f '%z' $2 2> /dev/null`
 
 err_no_mfs="Can't locate mfs section within "
 
-if [ `file -b $1 | grep -q '^ELF ..-bit .SB executable'` ]; then
+if file -b $1 | grep -q '^ELF ..-bit .SB executable'; then
 
sec_info=`elfdump -c $1 2> /dev/null | grep -A 5 -E "sh_name: oldmfs$"`
# If we can't find the mfs section within the given kernel - bail.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r327523 - in head/stand/mips/beri: boot2 loader

2018-01-03 Thread Bryan Drewery
On 1/3/2018 9:35 AM, John Baldwin wrote:
> Author: jhb
> Date: Wed Jan  3 17:35:38 2018
> New Revision: 327523
> URL: https://svnweb.freebsd.org/changeset/base/327523
> 
> Log:
>   Don't clobber system LDFLAGS for beri boot loaders.
>   
>   Prior to r325114, bsd.init.mk was included after assignments to CFLAGS and
>   LDFLAGS in these Makefiles.  After r325114, bare assignments (= rather than
>   +=) lost system-assigned default values that are needed when compiling with
>   an external toolchain.  CFLAGS in both Makefiles already uses +=.  This
>   commit changes LDFLAGS to use +=.  While here, depend on the LDFLAGS update
>   in the parent Makefile.inc to set -nostdlib.
>   


Hmm, I'm not sure it is even right for these files to be including
bsd.init.mk.

It says at the top:
  # The include file  includes ,
  # ../Makefile.inc and ; this is used at the
  # top of all  files that actually "build something".

There's a bunch of other files doing this as well.

The biggest problem here is that including bsd.init.mk is like including
bsd.prog.mk first and then putting the rest of the Makefile after it. It
changes a lot of assumptions in share/mk files. And this particular file
still includes bsd.prog.mk, so things really could go wrong.  I speak of
things like dependency handling and beforebuild handling.
I think it's more likely these files just need src.opts.mk.

>   Sponsored by:   DARPA / AFRL
> 
> Modified:
>   head/stand/mips/beri/boot2/Makefile
>   head/stand/mips/beri/loader/Makefile
> 
> Modified: head/stand/mips/beri/boot2/Makefile
> ==
> --- head/stand/mips/beri/boot2/Makefile   Wed Jan  3 17:28:01 2018
> (r327522)
> +++ head/stand/mips/beri/boot2/Makefile   Wed Jan  3 17:35:38 2018
> (r327523)
> @@ -53,8 +53,7 @@ CFLAGS+=-I${LDRSRC} \
>   -fno-pic -mno-abicalls  \
>   -g
>  
> -LDFLAGS= -nostdlib   \
> - -static \
> +LDFLAGS+=-static \
>   -Wl,-N  \
>   -G0 \
>   -L${.CURDIR}
> 
> Modified: head/stand/mips/beri/loader/Makefile
> ==
> --- head/stand/mips/beri/loader/Makefile  Wed Jan  3 17:28:01 2018
> (r327522)
> +++ head/stand/mips/beri/loader/Makefile  Wed Jan  3 17:35:38 2018
> (r327523)
> @@ -85,8 +85,7 @@ CFLAGS+=-G0 \
>   -mno-abicalls   \
>   -g
>  
> -LDFLAGS= -nostdlib   \
> - -static \
> +LDFLAGS+=-static \
>   -T ${.CURDIR}/loader.ldscript   \
>   -L${.CURDIR}\
>   -e __start
> 


-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


svn commit: r327525 - head/sys/ufs/ufs

2018-01-03 Thread Mark Johnston
Author: markj
Date: Wed Jan  3 18:19:47 2018
New Revision: 327525
URL: https://svnweb.freebsd.org/changeset/base/327525

Log:
  Add missing newlines to a couple of error messages.
  
  Keep error messages on a single line so that they're easier to grep for.
  
  Reported by:  pho
  MFC after:1 week

Modified:
  head/sys/ufs/ufs/ufs_lookup.c
  head/sys/ufs/ufs/ufs_vnops.c

Modified: head/sys/ufs/ufs/ufs_lookup.c
==
--- head/sys/ufs/ufs/ufs_lookup.c   Wed Jan  3 17:40:51 2018
(r327524)
+++ head/sys/ufs/ufs/ufs_lookup.c   Wed Jan  3 18:19:47 2018
(r327525)
@@ -1126,8 +1126,9 @@ ufs_direnter(dvp, tvp, dirp, cnp, newdirbp, isrename)
error = UFS_TRUNCATE(dvp, (off_t)dp->i_endoff,
IO_NORMAL | (DOINGASYNC(dvp) ? 0 : IO_SYNC), cr);
if (error != 0)
-   vn_printf(dvp, "ufs_direnter: failed to truncate "
-   "err %d", error);
+   vn_printf(dvp,
+   "ufs_direnter: failed to truncate, error %d\n",
+   error);
 #ifdef UFS_DIRHASH
if (error == 0 && dp->i_dirhash != NULL)
ufsdirhash_dirtrunc(dp, dp->i_endoff);

Modified: head/sys/ufs/ufs/ufs_vnops.c
==
--- head/sys/ufs/ufs/ufs_vnops.cWed Jan  3 17:40:51 2018
(r327524)
+++ head/sys/ufs/ufs/ufs_vnops.cWed Jan  3 18:19:47 2018
(r327525)
@@ -1545,8 +1545,9 @@ unlockout:
error = UFS_TRUNCATE(tdvp, endoff, IO_NORMAL |
(DOINGASYNC(tdvp) ? 0 : IO_SYNC), tcnp->cn_cred);
if (error != 0)
-   vn_printf(tdvp, "ufs_rename: failed to truncate "
-   "err %d", error);
+   vn_printf(tdvp,
+   "ufs_rename: failed to truncate, error %d\n",
+   error);
 #ifdef UFS_DIRHASH
else if (tdp->i_dirhash != NULL)
ufsdirhash_dirtrunc(tdp, endoff);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r327524 - in head/stand/mips/beri: common loader

2018-01-03 Thread John Baldwin
Author: jhb
Date: Wed Jan  3 17:40:51 2018
New Revision: 327524
URL: https://svnweb.freebsd.org/changeset/base/327524

Log:
  Use 'extern uint8_t' instead of 'extern void' for external symbols.
  
  The beri boot loaders depend on symbols defined in linker scripts or
  assembly files.  The boot loaders do not care about the type of these
  symbols but just want to extract a pointer to them.  Older versions of
  GCC permitted external symbols to be declared of type 'void' and then
  '' generated a void pointer to the memory at the symbol's address.
  However, void objects are not valid C and newer versions of GCC error if
  these are used.  Instead, declare these symbols as being bytes (or
  an array of bytes in the cheri_sdcard_vaddr case).
  
  Sponsored by: DARPA / AFRL

Modified:
  head/stand/mips/beri/common/sdcard.c
  head/stand/mips/beri/loader/main.c

Modified: head/stand/mips/beri/common/sdcard.c
==
--- head/stand/mips/beri/common/sdcard.cWed Jan  3 17:35:38 2018
(r327523)
+++ head/stand/mips/beri/common/sdcard.cWed Jan  3 17:40:51 2018
(r327524)
@@ -109,10 +109,10 @@
 ALTERA_SDCARD_RR1_COMMANDCRCFAILED | ALTERA_SDCARD_RR1_ADDRESSMISALIGNED |\
 ALTERA_SDCARD_RR1_ADDRBLOCKRANGE)
 
-extern void __cheri_sdcard_vaddr__;
+extern uint8_t __cheri_sdcard_vaddr__[];
 
 #defineALTERA_SDCARD_PTR(type, offset) 
\
-   (volatile type *)((uint8_t *)&__cheri_sdcard_vaddr__ + (offset))
+   (volatile type *)(&__cheri_sdcard_vaddr__[(offset)])
 
 static __inline uint16_t
 altera_sdcard_read_uint16(u_int offset)

Modified: head/stand/mips/beri/loader/main.c
==
--- head/stand/mips/beri/loader/main.c  Wed Jan  3 17:35:38 2018
(r327523)
+++ head/stand/mips/beri/loader/main.c  Wed Jan  3 17:40:51 2018
(r327524)
@@ -78,8 +78,8 @@ struct console *consoles[] = {
NULL
 };
 
-extern void__bss_start, __bss_end;
-extern void__heap_start, __heap_end;
+extern uint8_t __bss_start, __bss_end;
+extern uint8_t __heap_start, __heap_end;
 
 static int
 __elfN(exec)(struct preloaded_file *fp)
@@ -108,14 +108,14 @@ main(int argc, char *argv[], char *envv[], struct boot
struct devsw **dp;
 
/* NB: Must be sure to bzero() before using any globals. */
-   bzero(&__bss_start, (uintptr_t)&__bss_end - (uintptr_t)&__bss_start);
+   bzero(&__bss_start, &__bss_end - &__bss_start);
 
boot2_argc = argc;
boot2_argv = argv;
boot2_envv = envv;
boot2_bootinfo = *bootinfop;/* Copy rather than by reference. */
 
-   setheap((void *)&__heap_start, (void *)&__heap_end);
+   setheap(&__heap_start, &__heap_end);
 
/*
 * Pick up console settings from boot2; probe console.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r327523 - in head/stand/mips/beri: boot2 loader

2018-01-03 Thread John Baldwin
Author: jhb
Date: Wed Jan  3 17:35:38 2018
New Revision: 327523
URL: https://svnweb.freebsd.org/changeset/base/327523

Log:
  Don't clobber system LDFLAGS for beri boot loaders.
  
  Prior to r325114, bsd.init.mk was included after assignments to CFLAGS and
  LDFLAGS in these Makefiles.  After r325114, bare assignments (= rather than
  +=) lost system-assigned default values that are needed when compiling with
  an external toolchain.  CFLAGS in both Makefiles already uses +=.  This
  commit changes LDFLAGS to use +=.  While here, depend on the LDFLAGS update
  in the parent Makefile.inc to set -nostdlib.
  
  Sponsored by: DARPA / AFRL

Modified:
  head/stand/mips/beri/boot2/Makefile
  head/stand/mips/beri/loader/Makefile

Modified: head/stand/mips/beri/boot2/Makefile
==
--- head/stand/mips/beri/boot2/Makefile Wed Jan  3 17:28:01 2018
(r327522)
+++ head/stand/mips/beri/boot2/Makefile Wed Jan  3 17:35:38 2018
(r327523)
@@ -53,8 +53,7 @@ CFLAGS+=  -I${LDRSRC} \
-fno-pic -mno-abicalls  \
-g
 
-LDFLAGS=   -nostdlib   \
-   -static \
+LDFLAGS+=  -static \
-Wl,-N  \
-G0 \
-L${.CURDIR}

Modified: head/stand/mips/beri/loader/Makefile
==
--- head/stand/mips/beri/loader/MakefileWed Jan  3 17:28:01 2018
(r327522)
+++ head/stand/mips/beri/loader/MakefileWed Jan  3 17:35:38 2018
(r327523)
@@ -85,8 +85,7 @@ CFLAGS+=  -G0 \
-mno-abicalls   \
-g
 
-LDFLAGS=   -nostdlib   \
-   -static \
+LDFLAGS+=  -static \
-T ${.CURDIR}/loader.ldscript   \
-L${.CURDIR}\
-e __start
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r327522 - head/usr.sbin/usbconfig

2018-01-03 Thread Edward Tomasz Napierala
Author: trasz
Date: Wed Jan  3 17:28:01 2018
New Revision: 327522
URL: https://svnweb.freebsd.org/changeset/base/327522

Log:
  Fix warnings from "mandoc -Tlint -Wwarning".
  
  Reported by:  Yuri Pankov 
  MFC after:2 weeks
  Sponsored by: The FreeBSD Foundation

Modified:
  head/usr.sbin/usbconfig/usbconfig.8

Modified: head/usr.sbin/usbconfig/usbconfig.8
==
--- head/usr.sbin/usbconfig/usbconfig.8 Wed Jan  3 17:04:13 2018
(r327521)
+++ head/usr.sbin/usbconfig/usbconfig.8 Wed Jan  3 17:28:01 2018
(r327522)
@@ -144,7 +144,6 @@ See
 for more information.
 .El
 .Sh EXAMPLES
-.Pp
 Show information about the device on USB bus 1 at address 2:
 .Pp
 .Dl usbconfig -d ugen1.2 dump_info
@@ -172,7 +171,6 @@ Program the device on USB bus 1 at address 2 to suspen
 .Dl usbconfig -d ugen1.2 power_off
 .Dl usbconfig -d ugen1.2 power_save
 .Dl usbconfig -d ugen1.2 power_on
-.Pp
 .Sh SEE ALSO
 .Xr usb 4 ,
 .Xr usb_quirk 4 ,
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r327521 - head/usr.bin/morse

2018-01-03 Thread Eitan Adler
Author: eadler
Date: Wed Jan  3 17:04:13 2018
New Revision: 327521
URL: https://svnweb.freebsd.org/changeset/base/327521

Log:
  morse(6): fix two typod

Modified:
  head/usr.bin/morse/morse.6
  head/usr.bin/morse/morse.c

Modified: head/usr.bin/morse/morse.6
==
--- head/usr.bin/morse/morse.6  Wed Jan  3 16:16:20 2018(r327520)
+++ head/usr.bin/morse/morse.6  Wed Jan  3 17:04:13 2018(r327521)
@@ -85,7 +85,7 @@ Similar to
 .Fl p ,
 but use the RTS line of
 .Ar device
-(which must by a TTY device)
+(which must be a TTY device)
 in order to emit the morse code.
 .It Fl e
 Echo each character before it is sent, used together with either

Modified: head/usr.bin/morse/morse.c
==
--- head/usr.bin/morse/morse.c  Wed Jan  3 16:16:20 2018(r327520)
+++ head/usr.bin/morse/morse.c  Wed Jan  3 17:04:13 2018(r327521)
@@ -155,7 +155,7 @@ static const struct morsetab iso8859_1tab[] = {
{'\350', "..-.."},  /* è */
{'\351', "..-.."},  /* é */
{'\352', "-..-."},  /* ê */
-   {'\361', "--.--"},  /* n */
+   {'\361', "--.--"},  /* ñ */
{'\366', "---."},   /* ö */
{'\374', "..--"},   /* ü */
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r327520 - stable/10/sys/netinet

2018-01-03 Thread Steven Hartland
Author: smh
Date: Wed Jan  3 16:16:20 2018
New Revision: 327520
URL: https://svnweb.freebsd.org/changeset/base/327520

Log:
  MFC r322812:
  
  Avoid TCP log messages which are false positives.
  
  Sponsored by: Multiplay

Modified:
  stable/10/sys/netinet/tcp_input.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/netinet/tcp_input.c
==
--- stable/10/sys/netinet/tcp_input.c   Wed Jan  3 15:01:31 2018
(r327519)
+++ stable/10/sys/netinet/tcp_input.c   Wed Jan  3 16:16:20 2018
(r327520)
@@ -1647,25 +1647,6 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, stru
to.to_tsecr = 0;
}
/*
-* If timestamps were negotiated during SYN/ACK they should
-* appear on every segment during this session and vice versa.
-*/
-   if ((tp->t_flags & TF_RCVD_TSTMP) && !(to.to_flags & TOF_TS)) {
-   if ((s = tcp_log_addrs(inc, th, NULL, NULL))) {
-   log(LOG_DEBUG, "%s; %s: Timestamp missing, "
-   "no action\n", s, __func__);
-   free(s, M_TCPLOG);
-   }
-   }
-   if (!(tp->t_flags & TF_RCVD_TSTMP) && (to.to_flags & TOF_TS)) {
-   if ((s = tcp_log_addrs(inc, th, NULL, NULL))) {
-   log(LOG_DEBUG, "%s; %s: Timestamp not expected, "
-   "no action\n", s, __func__);
-   free(s, M_TCPLOG);
-   }
-   }
-
-   /*
 * Process options only when we get SYN/ACK back. The SYN case
 * for incoming connections is handled in tcp_syncache.
 * According to RFC1323 the window field in a SYN (i.e., a 
@@ -1693,6 +1674,25 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, stru
if ((tp->t_flags & TF_SACK_PERMIT) &&
(to.to_flags & TOF_SACKPERM) == 0)
tp->t_flags &= ~TF_SACK_PERMIT;
+   }
+
+   /*
+* If timestamps were negotiated during SYN/ACK they should
+* appear on every segment during this session and vice versa.
+*/
+   if ((tp->t_flags & TF_RCVD_TSTMP) && !(to.to_flags & TOF_TS)) {
+   if ((s = tcp_log_addrs(inc, th, NULL, NULL))) {
+   log(LOG_DEBUG, "%s; %s: Timestamp missing, "
+   "no action\n", s, __func__);
+   free(s, M_TCPLOG);
+   }
+   }
+   if (!(tp->t_flags & TF_RCVD_TSTMP) && (to.to_flags & TOF_TS)) {
+   if ((s = tcp_log_addrs(inc, th, NULL, NULL))) {
+   log(LOG_DEBUG, "%s; %s: Timestamp not expected, "
+   "no action\n", s, __func__);
+   free(s, M_TCPLOG);
+   }
}
 
/*
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r327519 - stable/11/sys/netinet

2018-01-03 Thread Steven Hartland
Author: smh
Date: Wed Jan  3 15:01:31 2018
New Revision: 327519
URL: https://svnweb.freebsd.org/changeset/base/327519

Log:
  MFC r322812:
  
  Avoid TCP log messages which are false positives.
  
  Sponsored by: Multiplay

Modified:
  stable/11/sys/netinet/tcp_input.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/netinet/tcp_input.c
==
--- stable/11/sys/netinet/tcp_input.c   Wed Jan  3 12:18:55 2018
(r327518)
+++ stable/11/sys/netinet/tcp_input.c   Wed Jan  3 15:01:31 2018
(r327519)
@@ -1686,25 +1686,6 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, stru
to.to_tsecr = 0;
}
/*
-* If timestamps were negotiated during SYN/ACK they should
-* appear on every segment during this session and vice versa.
-*/
-   if ((tp->t_flags & TF_RCVD_TSTMP) && !(to.to_flags & TOF_TS)) {
-   if ((s = tcp_log_addrs(inc, th, NULL, NULL))) {
-   log(LOG_DEBUG, "%s; %s: Timestamp missing, "
-   "no action\n", s, __func__);
-   free(s, M_TCPLOG);
-   }
-   }
-   if (!(tp->t_flags & TF_RCVD_TSTMP) && (to.to_flags & TOF_TS)) {
-   if ((s = tcp_log_addrs(inc, th, NULL, NULL))) {
-   log(LOG_DEBUG, "%s; %s: Timestamp not expected, "
-   "no action\n", s, __func__);
-   free(s, M_TCPLOG);
-   }
-   }
-
-   /*
 * Process options only when we get SYN/ACK back. The SYN case
 * for incoming connections is handled in tcp_syncache.
 * According to RFC1323 the window field in a SYN (i.e., a 
@@ -1732,6 +1713,25 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, stru
if ((tp->t_flags & TF_SACK_PERMIT) &&
(to.to_flags & TOF_SACKPERM) == 0)
tp->t_flags &= ~TF_SACK_PERMIT;
+   }
+
+   /*
+* If timestamps were negotiated during SYN/ACK they should
+* appear on every segment during this session and vice versa.
+*/
+   if ((tp->t_flags & TF_RCVD_TSTMP) && !(to.to_flags & TOF_TS)) {
+   if ((s = tcp_log_addrs(inc, th, NULL, NULL))) {
+   log(LOG_DEBUG, "%s; %s: Timestamp missing, "
+   "no action\n", s, __func__);
+   free(s, M_TCPLOG);
+   }
+   }
+   if (!(tp->t_flags & TF_RCVD_TSTMP) && (to.to_flags & TOF_TS)) {
+   if ((s = tcp_log_addrs(inc, th, NULL, NULL))) {
+   log(LOG_DEBUG, "%s; %s: Timestamp not expected, "
+   "no action\n", s, __func__);
+   free(s, M_TCPLOG);
+   }
}
 
/*
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r327518 - stable/11/sbin/ipfw

2018-01-03 Thread Andrey V. Elsukov
Author: ae
Date: Wed Jan  3 12:18:55 2018
New Revision: 327518
URL: https://svnweb.freebsd.org/changeset/base/327518

Log:
  MFC r327140:
Fix rule number truncation, use uint16_t type to specify rulenum.
Also sort variable declartions by size.
  
PR: 224555

Modified:
  stable/11/sbin/ipfw/ipfw2.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sbin/ipfw/ipfw2.c
==
--- stable/11/sbin/ipfw/ipfw2.c Wed Jan  3 11:23:47 2018(r327517)
+++ stable/11/sbin/ipfw/ipfw2.c Wed Jan  3 12:18:55 2018(r327518)
@@ -2250,12 +2250,13 @@ do_range_cmd(int cmd, ipfw_range_tlv *rt)
 void
 ipfw_sets_handler(char *av[])
 {
-   uint32_t masks[2];
-   int i;
-   uint8_t cmd, rulenum;
ipfw_range_tlv rt;
char *msg;
size_t size;
+   uint32_t masks[2];
+   int i;
+   uint16_t rulenum;
+   uint8_t cmd;
 
av++;
memset(, 0, sizeof(rt));
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r327517 - head/sys/x86/x86

2018-01-03 Thread Konstantin Belousov
Author: kib
Date: Wed Jan  3 11:23:47 2018
New Revision: 327517
URL: https://svnweb.freebsd.org/changeset/base/327517

Log:
  Use the new SDM-approved way to serialize x2APIC MSR writes.
  
  SDM editions 64 and below stated that it is enough to use MFENCe or
  LFENCE to serialize x2APIC register writes.  New edition 65 requires
  either full serialization instruction or MFENCE;LFENCE sequence.  Use
  the later, FreeBSD needs serialization to ensure that writes done
  before IPI request are visible to the target IPI CPU.
  
  Sponsored by: The FreeBSD Foundation
  MFC after:1 week

Modified:
  head/sys/x86/x86/local_apic.c

Modified: head/sys/x86/x86/local_apic.c
==
--- head/sys/x86/x86/local_apic.c   Wed Jan  3 11:03:44 2018
(r327516)
+++ head/sys/x86/x86/local_apic.c   Wed Jan  3 11:23:47 2018
(r327517)
@@ -217,6 +217,7 @@ lapic_write32(enum LAPIC_REGISTERS reg, uint32_t val)
 
if (x2apic_mode) {
mfence();
+   lfence();
wrmsr(MSR_APIC_000 + reg, val);
} else {
*(volatile uint32_t *)(lapic_map + reg * LAPIC_MEM_MUL) = val;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r327516 - stable/11/sys/amd64/amd64

2018-01-03 Thread Konstantin Belousov
Author: kib
Date: Wed Jan  3 11:03:44 2018
New Revision: 327516
URL: https://svnweb.freebsd.org/changeset/base/327516

Log:
  MFC r327437:
  Remove MP SAFE marks and stray register name in comments.

Modified:
  stable/11/sys/amd64/amd64/support.S
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/amd64/amd64/support.S
==
--- stable/11/sys/amd64/amd64/support.S Wed Jan  3 09:33:59 2018
(r327515)
+++ stable/11/sys/amd64/amd64/support.S Wed Jan  3 11:03:44 2018
(r327516)
@@ -214,7 +214,7 @@ END(fillw)
  */
 
 /*
- * copyout(from_kernel, to_user, len)  - MP SAFE
+ * copyout(from_kernel, to_user, len)
  * %rdi,%rsi,%rdx
  */
 ENTRY(copyout)
@@ -277,7 +277,7 @@ copyout_fault:
 END(copyout)
 
 /*
- * copyin(from_user, to_kernel, len) - MP SAFE
+ * copyin(from_user, to_kernel, len)
  *%rdi,  %rsi,  %rdx
  */
 ENTRY(copyin)
@@ -494,7 +494,7 @@ fusufault:
 
 /*
  * Store a 64-bit word, a 32-bit word, a 16-bit word, or an 8-bit byte to
- * user memory.  All these functions are MPSAFE.
+ * user memory.
  * addr = %rdi, value = %rsi
  */
 ALTENTRY(suword64)
@@ -569,7 +569,7 @@ ENTRY(subyte)
 END(subyte)
 
 /*
- * copyinstr(from, to, maxlen, int *lencopied) - MP SAFE
+ * copyinstr(from, to, maxlen, int *lencopied)
  *   %rdi, %rsi, %rdx, %rcx
  *
  * copy a string from from to to, stop when a 0 character is reached.
@@ -640,7 +640,7 @@ cpystrflt_x:
 END(copyinstr)
 
 /*
- * copystr(from, to, maxlen, int *lencopied) - MP SAFE
+ * copystr(from, to, maxlen, int *lencopied)
  * %rdi, %rsi, %rdx, %rcx
  */
 ENTRY(copystr)
@@ -680,7 +680,6 @@ END(copystr)
 
 /*
  * Handling of special amd64 registers and descriptor tables etc
- * %rdi
  */
 /* void lgdt(struct region_descriptor *rdp); */
 ENTRY(lgdt)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r327515 - head/sys/sys

2018-01-03 Thread Poul-Henning Kamp
Author: phk
Date: Wed Jan  3 09:33:59 2018
New Revision: 327515
URL: https://svnweb.freebsd.org/changeset/base/327515

Log:
  Eliminate a paranthesis which is both unneeded and causing trouble.

Modified:
  head/sys/sys/_stdarg.h

Modified: head/sys/sys/_stdarg.h
==
--- head/sys/sys/_stdarg.h  Wed Jan  3 09:08:32 2018(r327514)
+++ head/sys/sys/_stdarg.h  Wed Jan  3 09:33:59 2018(r327515)
@@ -61,7 +61,7 @@
   #if __ISO_C_VISIBLE >= 1999
 #define va_copy(dst, src) ((dst) = (src))
   #endif
-  #define va_arg(ap, type) (*(((type)*)(((ap) += sizeof(type)) - 
sizeof(type
+  #define va_arg(ap, type) (*((type*)(((ap) += sizeof(type)) - sizeof(type
   #define va_end(ap) ((void)0)
 #endif
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r327514 - head/usr.bin/morse

2018-01-03 Thread Eitan Adler
Author: eadler
Date: Wed Jan  3 09:08:32 2018
New Revision: 327514
URL: https://svnweb.freebsd.org/changeset/base/327514

Log:
  morse(6): add a few missing characters
  
  - add ñ, ', and _
  - remove lint support
  - add missing header for ioctl

Modified:
  head/usr.bin/morse/morse.c

Modified: head/usr.bin/morse/morse.c
==
--- head/usr.bin/morse/morse.c  Wed Jan  3 07:43:04 2018(r327513)
+++ head/usr.bin/morse/morse.c  Wed Jan  3 09:08:32 2018(r327514)
@@ -32,21 +32,18 @@
  * 
  */
 
-#ifndef lint
 static const char copyright[] =
 "@(#) Copyright (c) 1988, 1993\n\
The Regents of the University of California.  All rights reserved.\n";
-#endif /* not lint */
 
-#ifndef lint
 #if 0
 static char sccsid[] = "@(#)morse.c8.1 (Berkeley) 5/31/93";
 #endif
 static const char rcsid[] =
  "$FreeBSD$";
-#endif /* not lint */
 
 #include 
+#include 
 
 #include 
 #include 
@@ -132,6 +129,8 @@ static const struct morsetab mtab[] = {
{'$', "...-..-"},
{'+', ".-.-."}, /* AR */
{'@', ".--.-."},/* AC */
+   {'_', "..--.-"},
+   {'\'', ".."},
 
/* prosigns without already assigned values */
 
@@ -156,6 +155,7 @@ static const struct morsetab iso8859_1tab[] = {
{'\350', "..-.."},  /* è */
{'\351', "..-.."},  /* é */
{'\352', "-..-."},  /* ê */
+   {'\361', "--.--"},  /* n */
{'\366', "---."},   /* ö */
{'\374', "..--"},   /* ü */
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"