svn commit: r368167 - head/sys/dev/nvme
Author: mmel Date: Mon Nov 30 07:01:12 2020 New Revision: 368167 URL: https://svnweb.freebsd.org/changeset/base/368167 Log: NVME: Don't try to swap data on little endian machines. These swapping functions violate BUSDMA contract - we cannot write to armed (by bus_dmamap_sync(PRE_..)) buffers. Remove them at least from little endian machines until a better solution will be developed. Reviewed by: imp MFC after:3 weeks Modified: head/sys/dev/nvme/nvme.h Modified: head/sys/dev/nvme/nvme.h == --- head/sys/dev/nvme/nvme.hSun Nov 29 23:37:18 2020(r368166) +++ head/sys/dev/nvme/nvme.hMon Nov 30 07:01:12 2020(r368167) @@ -1732,6 +1732,7 @@ extern int nvme_use_nvd; static inline void nvme_completion_swapbytes(struct nvme_completion *s) { +#if _BYTE_ORDER != _LITTLE_ENDIAN s->cdw0 = le32toh(s->cdw0); /* omit rsvd1 */ @@ -1739,22 +1740,26 @@ voidnvme_completion_swapbytes(struct nvme_completion s->sqid = le16toh(s->sqid); /* omit cid */ s->status = le16toh(s->status); +#endif } static inline void nvme_power_state_swapbytes(struct nvme_power_state *s) { +#if _BYTE_ORDER != _LITTLE_ENDIAN s->mp = le16toh(s->mp); s->enlat = le32toh(s->enlat); s->exlat = le32toh(s->exlat); s->idlp = le16toh(s->idlp); s->actp = le16toh(s->actp); +#endif } static inline void nvme_controller_data_swapbytes(struct nvme_controller_data *s) { +#if _BYTE_ORDER != _LITTLE_ENDIAN int i; s->vid = le16toh(s->vid); @@ -1800,11 +1805,13 @@ voidnvme_controller_data_swapbytes(struct nvme_contro s->mnan = le32toh(s->mnan); for (i = 0; i < 32; i++) nvme_power_state_swapbytes(>power_state[i]); +#endif } static inline void nvme_namespace_data_swapbytes(struct nvme_namespace_data *s) { +#if _BYTE_ORDER != _LITTLE_ENDIAN int i; s->nsze = le64toh(s->nsze); @@ -1827,11 +1834,13 @@ voidnvme_namespace_data_swapbytes(struct nvme_namespa s->endgid = le16toh(s->endgid); for (i = 0; i < 16; i++) s->lbaf[i] = le32toh(s->lbaf[i]); +#endif } static inline void nvme_error_information_entry_swapbytes(struct nvme_error_information_entry *s) { +#if _BYTE_ORDER != _LITTLE_ENDIAN s->error_count = le64toh(s->error_count); s->sqid = le16toh(s->sqid); @@ -1842,6 +1851,7 @@ void nvme_error_information_entry_swapbytes(struct nvm s->nsid = le32toh(s->nsid); s->csi = le64toh(s->csi); s->ttsi = le16toh(s->ttsi); +#endif } static inline @@ -1857,14 +1867,13 @@ voidnvme_le128toh(void *p) tmp[i] = tmp[15-i]; tmp[15-i] = b; } -#else - (void)p; #endif } static inline void nvme_health_information_page_swapbytes(struct nvme_health_information_page *s) { +#if _BYTE_ORDER != _LITTLE_ENDIAN int i; s->temperature = le16toh(s->temperature); @@ -1886,47 +1895,57 @@ voidnvme_health_information_page_swapbytes(struct nvm s->tmt2tc = le32toh(s->tmt2tc); s->ttftmt1 = le32toh(s->ttftmt1); s->ttftmt2 = le32toh(s->ttftmt2); +#endif } static inline void nvme_firmware_page_swapbytes(struct nvme_firmware_page *s) { +#if _BYTE_ORDER != _LITTLE_ENDIAN int i; for (i = 0; i < 7; i++) s->revision[i] = le64toh(s->revision[i]); +#endif } static inline void nvme_ns_list_swapbytes(struct nvme_ns_list *s) { +#if _BYTE_ORDER != _LITTLE_ENDIAN int i; for (i = 0; i < 1024; i++) s->ns[i] = le32toh(s->ns[i]); +#endif } static inline void nvme_command_effects_page_swapbytes(struct nvme_command_effects_page *s) { +#if _BYTE_ORDER != _LITTLE_ENDIAN int i; for (i = 0; i < 256; i++) s->acs[i] = le32toh(s->acs[i]); for (i = 0; i < 256; i++) s->iocs[i] = le32toh(s->iocs[i]); +#endif } static inline void nvme_res_notification_page_swapbytes(struct nvme_res_notification_page *s) { +#if _BYTE_ORDER != _LITTLE_ENDIAN s->log_page_count = le64toh(s->log_page_count); s->nsid = le32toh(s->nsid); +#endif } static inline void nvme_sanitize_status_page_swapbytes(struct nvme_sanitize_status_page *s) { +#if _BYTE_ORDER != _LITTLE_ENDIAN s->sprog = le16toh(s->sprog); s->sstat = le16toh(s->sstat); s->scdw10 = le32toh(s->scdw10); @@ -1936,11 +1955,13 @@ voidnvme_sanitize_status_page_swapbytes(struct nvme_s s->etfownd = le32toh(s->etfownd); s->etfbewnd = le32toh(s->etfbewnd); s->etfcewnd = le32toh(s->etfcewnd); +#endif } static inline void intel_log_temp_stats_swapbytes(struct intel_log_temp_stats *s) { +#if _BYTE_ORDER != _LITTLE_ENDIAN s->current = le64toh(s->current);
Re: svn commit: r368163 - in head: sbin/ifconfig sys/dev/if_wg sys/dev/if_wg/include sys/dev/if_wg/include/crypto sys/dev/if_wg/include/sys sys/dev/if_wg/include/zinc sys/dev/if_wg/module sys/dev/if_w
-Original Message- From: on behalf of Ian Lepore Date: 2020-11-29, Sunday at 16:26 To: Shawn Webb , Matt Macy Cc: , , Subject: Re: svn commit: r368163 - in head: sbin/ifconfig sys/dev/if_wg sys/dev/if_wg/include sys/dev/if_wg/include/crypto sys/dev/if_wg/include/sys sys/dev/if_wg/include/zinc sys/dev/if_wg/module sys/dev/if_wg... On Sun, 2020-11-29 at 19:20 -0500, Shawn Webb wrote: > On Sun, Nov 29, 2020 at 07:38:04PM +, Matt Macy wrote: > > Author: mmacy > > Date: Sun Nov 29 19:38:03 2020 > > New Revision: 368163 > > URL: https://svnweb.freebsd.org/changeset/base/368163 > > > > Log: > > Import kernel WireGuard support > > > > Data path largely shared with the OpenBSD implementation by > > Matt Dunwoodie > > > > Reviewed by: gre...@freebsd.org > > MFC after:1 month > > Sponsored by: Rubicon LLC, (Netgate) > > Differential Revision:https://reviews.freebsd.org/D26137 > > RELNOTES: yes? > > Thanks, > Or maybe an entry in src/RELNOTES, preferably one that (unlike the commit message) has at least some tiny shred of a clue about what Wireguard is. -- Ian In addition to an update to RELNOTES, a manpage would also be greatly appreciated. -Ravi (rpokala@) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r368163 - in head: sbin/ifconfig sys/dev/if_wg sys/dev/if_wg/include sys/dev/if_wg/include/crypto sys/dev/if_wg/include/sys sys/dev/if_wg/include/zinc sys/dev/if_wg/module sys/dev/if_w
On 29 Nov 2020, at 19:38, Matt Macy wrote: Author: mmacy Date: Sun Nov 29 19:38:03 2020 New Revision: 368163 URL: https://svnweb.freebsd.org/changeset/base/368163 Log: Import kernel WireGuard support Data path largely shared with the OpenBSD implementation by Matt Dunwoodie Reviewed by: gre...@freebsd.org MFC after:1 month Sponsored by: Rubicon LLC, (Netgate) Differential Revision:https://reviews.freebsd.org/D26137 Added: head/sbin/ifconfig/ifwg.c (contents, props changed) head/sys/dev/if_wg/ head/sys/dev/if_wg/include/ head/sys/dev/if_wg/include/crypto/blake2s.h (contents, props changed) head/sys/dev/if_wg/include/crypto/curve25519.h (contents, props changed) head/sys/dev/if_wg/include/crypto/zinc.h (contents, props changed) head/sys/dev/if_wg/include/sys/ head/sys/dev/if_wg/include/sys/if_wg_session.h (contents, props changed) head/sys/dev/if_wg/include/sys/if_wg_session_vars.h (contents, props changed) head/sys/dev/if_wg/include/sys/simd-x86_64.h (contents, props changed) head/sys/dev/if_wg/include/sys/support.h (contents, props changed) head/sys/dev/if_wg/include/sys/wg_cookie.h (contents, props changed) head/sys/dev/if_wg/include/sys/wg_module.h (contents, props changed) head/sys/dev/if_wg/include/sys/wg_noise.h (contents, props changed) head/sys/dev/if_wg/include/zinc/blake2s.h (contents, props changed) head/sys/dev/if_wg/include/zinc/chacha20.h (contents, props changed) head/sys/dev/if_wg/include/zinc/chacha20poly1305.h (contents, props changed) head/sys/dev/if_wg/include/zinc/curve25519.h (contents, props changed) head/sys/dev/if_wg/include/zinc/poly1305.h (contents, props changed) head/sys/dev/if_wg/module/ head/sys/dev/if_wg/module/blake2s.c (contents, props changed) head/sys/dev/if_wg/module/blake2s.h (contents, props changed) head/sys/dev/if_wg/module/chacha20-x86_64.S (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/chacha20/chacha20-arm-glue.c (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/chacha20/chacha20-arm.pl (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/chacha20/chacha20-arm64.pl (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/chacha20/chacha20-mips-glue.c (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/chacha20/chacha20-mips.S (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/chacha20/chacha20-unrolled-arm.S (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/chacha20/chacha20-x86_64-glue.c (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/chacha20/chacha20-x86_64.pl (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/chacha20/chacha20.c (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/chacha20poly1305.c (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/poly1305/poly1305-arm-glue.c (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/poly1305/poly1305-arm.pl (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/poly1305/poly1305-arm64.pl (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/poly1305/poly1305-donna32.c (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/poly1305/poly1305-donna64.c (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/poly1305/poly1305-mips-glue.c (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/poly1305/poly1305-mips.S (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/poly1305/poly1305-mips64.pl (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/poly1305/poly1305-x86_64-glue.c (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/poly1305/poly1305-x86_64.pl (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/poly1305/poly1305.c (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/selftest/blake2s.c (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/selftest/chacha20.c (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/selftest/chacha20poly1305.c (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/selftest/curve25519.c (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/selftest/poly1305.c (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/selftest/run.h (contents, props changed) head/sys/dev/if_wg/module/curve25519.c (contents, props changed) head/sys/dev/if_wg/module/if_wg_session.c (contents, props changed) head/sys/dev/if_wg/module/module.c (contents, props changed) head/sys/dev/if_wg/module/poly1305-x86_64.S (contents, props changed) head/sys/dev/if_wg/module/wg_cookie.c (contents, props changed) head/sys/dev/if_wg/module/wg_noise.c (contents, props changed) head/sys/modules/if_wg/
Re: svn commit: r368163 - in head: sbin/ifconfig sys/dev/if_wg sys/dev/if_wg/include sys/dev/if_wg/include/crypto sys/dev/if_wg/include/sys sys/dev/if_wg/include/zinc sys/dev/if_wg/module sys/dev/if_w
On Sun, 2020-11-29 at 19:20 -0500, Shawn Webb wrote: > On Sun, Nov 29, 2020 at 07:38:04PM +, Matt Macy wrote: > > Author: mmacy > > Date: Sun Nov 29 19:38:03 2020 > > New Revision: 368163 > > URL: https://svnweb.freebsd.org/changeset/base/368163 > > > > Log: > > Import kernel WireGuard support > > > > Data path largely shared with the OpenBSD implementation by > > Matt Dunwoodie > > > > Reviewed by: gre...@freebsd.org > > MFC after:1 month > > Sponsored by: Rubicon LLC, (Netgate) > > Differential Revision:https://reviews.freebsd.org/D26137 > > RELNOTES: yes? > > Thanks, > Or maybe an entry in src/RELNOTES, preferably one that (unlike the commit message) has at least some tiny shred of a clue about what Wireguard is. -- Ian ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r368163 - in head: sbin/ifconfig sys/dev/if_wg sys/dev/if_wg/include sys/dev/if_wg/include/crypto sys/dev/if_wg/include/sys sys/dev/if_wg/include/zinc sys/dev/if_wg/module sys/dev/if_w
On Sun, Nov 29, 2020 at 07:38:04PM +, Matt Macy wrote: > Author: mmacy > Date: Sun Nov 29 19:38:03 2020 > New Revision: 368163 > URL: https://svnweb.freebsd.org/changeset/base/368163 > > Log: > Import kernel WireGuard support > > Data path largely shared with the OpenBSD implementation by > Matt Dunwoodie > > Reviewed by:gre...@freebsd.org > MFC after: 1 month > Sponsored by: Rubicon LLC, (Netgate) > Differential Revision: https://reviews.freebsd.org/D26137 RELNOTES: yes? Thanks, -- Shawn Webb Cofounder / Security Engineer HardenedBSD GPG Key ID: 0xFF2E67A277F8E1FA GPG Key Fingerprint: D206 BB45 15E0 9C49 0CF9 3633 C85B 0AF8 AB23 0FB2 https://git-01.md.hardenedbsd.org/HardenedBSD/pubkeys/src/branch/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc signature.asc Description: PGP signature
svn commit: r368164 - in head/sys: conf net net/route netinet netinet6
Author: melifaro Date: Sun Nov 29 19:43:33 2020 New Revision: 368164 URL: https://svnweb.freebsd.org/changeset/base/368164 Log: Remove RADIX_MPATH config option. ROUTE_MPATH is the new config option controlling new multipath routing implementation. Remove the last pieces of RADIX_MPATH-related code and the config option. Reviewed by: glebius Differential Revision:https://reviews.freebsd.org/D27244 Deleted: head/sys/net/radix_mpath.c head/sys/net/radix_mpath.h Modified: head/sys/conf/options head/sys/net/route.c head/sys/net/route/route_ctl.c head/sys/net/route/route_ifaddrs.c head/sys/net/rtsock.c head/sys/netinet/ip_input.c head/sys/netinet6/nd6.c Modified: head/sys/conf/options == --- head/sys/conf/options Sun Nov 29 19:38:03 2020(r368163) +++ head/sys/conf/options Sun Nov 29 19:43:33 2020(r368164) @@ -452,7 +452,6 @@ MROUTINGopt_mrouting.h NFSLOCKD PCBGROUP opt_pcbgroup.h PF_DEFAULT_TO_DROP opt_pf.h -RADIX_MPATHopt_mpath.h ROUTE_MPATHopt_route.h ROUTETABLESopt_route.h RSSopt_rss.h Modified: head/sys/net/route.c == --- head/sys/net/route.cSun Nov 29 19:38:03 2020(r368163) +++ head/sys/net/route.cSun Nov 29 19:43:33 2020(r368164) @@ -65,10 +65,6 @@ #include #include -#ifdef RADIX_MPATH -#include -#endif - #include #include @@ -674,87 +670,6 @@ rt_print(char *buf, int buflen, struct rtentry *rt) } return (i); -} -#endif - -#ifdef RADIX_MPATH -/* - * Deletes key for single-path routes, unlinks rtentry with - * gateway specified in @info from multi-path routes. - * - * Returnes unlinked entry. In case of failure, returns NULL - * and sets @perror to ESRCH. - */ -struct radix_node * -rt_mpath_unlink(struct rib_head *rnh, struct rt_addrinfo *info, -struct rtentry *rto, int *perror) -{ - /* -* if we got multipath routes, we require users to specify -* a matching RTAX_GATEWAY. -*/ - struct rtentry *rt; // *rto = NULL; - struct radix_node *rn; - struct sockaddr *gw; - - gw = info->rti_info[RTAX_GATEWAY]; - rt = rt_mpath_matchgate(rto, gw); - if (rt == NULL) { - *perror = ESRCH; - return (NULL); - } - - /* -* this is the first entry in the chain -*/ - if (rto == rt) { - rn = rn_mpath_next((struct radix_node *)rt); - /* -* there is another entry, now it's active -*/ - if (rn) { - rto = RNTORT(rn); - rto->rte_flags |= RTF_UP; - } else if (rt->rte_flags & RTF_GATEWAY) { - /* -* For gateway routes, we need to -* make sure that we we are deleting -* the correct gateway. -* rt_mpath_matchgate() does not -* check the case when there is only -* one route in the chain. -*/ - if (gw && - (rt->rt_nhop->gw_sa.sa_len != gw->sa_len || - memcmp(>rt_nhop->gw_sa, gw, gw->sa_len))) { - *perror = ESRCH; - return (NULL); - } - } - - /* -* use the normal delete code to remove -* the first entry -*/ - rn = rnh->rnh_deladdr(info->rti_info[RTAX_DST], - info->rti_info[RTAX_NETMASK], - >head); - if (rn != NULL) { - *perror = 0; - } else { - *perror = ESRCH; - } - return (rn); - } - - /* -* if the entry is 2nd and on up -*/ - if (rt_mpath_deldup(rto, rt) == 0) - panic ("rtrequest1: rt_mpath_deldup"); - *perror = 0; - rn = (struct radix_node *)rt; - return (rn); } #endif Modified: head/sys/net/route/route_ctl.c == --- head/sys/net/route/route_ctl.c Sun Nov 29 19:38:03 2020 (r368163) +++ head/sys/net/route/route_ctl.c Sun Nov 29 19:43:33 2020 (r368164) @@ -54,10 +54,6 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef RADIX_MPATH -#include -#endif - #include /* Modified: head/sys/net/route/route_ifaddrs.c == ---
svn commit: r368163 - in head: sbin/ifconfig sys/dev/if_wg sys/dev/if_wg/include sys/dev/if_wg/include/crypto sys/dev/if_wg/include/sys sys/dev/if_wg/include/zinc sys/dev/if_wg/module sys/dev/if_wg...
Author: mmacy Date: Sun Nov 29 19:38:03 2020 New Revision: 368163 URL: https://svnweb.freebsd.org/changeset/base/368163 Log: Import kernel WireGuard support Data path largely shared with the OpenBSD implementation by Matt Dunwoodie Reviewed by: gre...@freebsd.org MFC after:1 month Sponsored by: Rubicon LLC, (Netgate) Differential Revision:https://reviews.freebsd.org/D26137 Added: head/sbin/ifconfig/ifwg.c (contents, props changed) head/sys/dev/if_wg/ head/sys/dev/if_wg/include/ head/sys/dev/if_wg/include/crypto/blake2s.h (contents, props changed) head/sys/dev/if_wg/include/crypto/curve25519.h (contents, props changed) head/sys/dev/if_wg/include/crypto/zinc.h (contents, props changed) head/sys/dev/if_wg/include/sys/ head/sys/dev/if_wg/include/sys/if_wg_session.h (contents, props changed) head/sys/dev/if_wg/include/sys/if_wg_session_vars.h (contents, props changed) head/sys/dev/if_wg/include/sys/simd-x86_64.h (contents, props changed) head/sys/dev/if_wg/include/sys/support.h (contents, props changed) head/sys/dev/if_wg/include/sys/wg_cookie.h (contents, props changed) head/sys/dev/if_wg/include/sys/wg_module.h (contents, props changed) head/sys/dev/if_wg/include/sys/wg_noise.h (contents, props changed) head/sys/dev/if_wg/include/zinc/blake2s.h (contents, props changed) head/sys/dev/if_wg/include/zinc/chacha20.h (contents, props changed) head/sys/dev/if_wg/include/zinc/chacha20poly1305.h (contents, props changed) head/sys/dev/if_wg/include/zinc/curve25519.h (contents, props changed) head/sys/dev/if_wg/include/zinc/poly1305.h (contents, props changed) head/sys/dev/if_wg/module/ head/sys/dev/if_wg/module/blake2s.c (contents, props changed) head/sys/dev/if_wg/module/blake2s.h (contents, props changed) head/sys/dev/if_wg/module/chacha20-x86_64.S (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/chacha20/chacha20-arm-glue.c (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/chacha20/chacha20-arm.pl (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/chacha20/chacha20-arm64.pl (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/chacha20/chacha20-mips-glue.c (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/chacha20/chacha20-mips.S (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/chacha20/chacha20-unrolled-arm.S (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/chacha20/chacha20-x86_64-glue.c (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/chacha20/chacha20-x86_64.pl (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/chacha20/chacha20.c (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/chacha20poly1305.c (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/poly1305/poly1305-arm-glue.c (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/poly1305/poly1305-arm.pl (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/poly1305/poly1305-arm64.pl (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/poly1305/poly1305-donna32.c (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/poly1305/poly1305-donna64.c (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/poly1305/poly1305-mips-glue.c (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/poly1305/poly1305-mips.S (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/poly1305/poly1305-mips64.pl (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/poly1305/poly1305-x86_64-glue.c (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/poly1305/poly1305-x86_64.pl (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/poly1305/poly1305.c (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/selftest/blake2s.c (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/selftest/chacha20.c (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/selftest/chacha20poly1305.c (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/selftest/curve25519.c (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/selftest/poly1305.c (contents, props changed) head/sys/dev/if_wg/module/crypto/zinc/selftest/run.h (contents, props changed) head/sys/dev/if_wg/module/curve25519.c (contents, props changed) head/sys/dev/if_wg/module/if_wg_session.c (contents, props changed) head/sys/dev/if_wg/module/module.c (contents, props changed) head/sys/dev/if_wg/module/poly1305-x86_64.S (contents, props changed) head/sys/dev/if_wg/module/wg_cookie.c (contents, props changed) head/sys/dev/if_wg/module/wg_noise.c (contents, props changed) head/sys/modules/if_wg/ head/sys/modules/if_wg/Makefile (contents, props changed) Directory Properties:
Re: svn commit: r368141 - in head/sys/arm: allwinner annapurna/alpine arm freescale/imx include mv versatile
On Sun, Nov 29, 2020 at 08:40:12AM +, Michal Meloun wrote: > Author: mmel > Date: Sun Nov 29 08:40:12 2020 > New Revision: 368141 > URL: https://svnweb.freebsd.org/changeset/base/368141 > > Log: > Remove the pre-ARMv6 and pre-INTRNG code. > ARM has required ARMV6+ and INTRNg for some time now, so remove > always false #ifdefs and unconditionally do always true #ifdefs. > > .sv_flags = > -#if __ARM_ARCH >= 6 > SV_ASLR | SV_SHP | SV_TIMEKEEP | SV_RNG_SEED_VER | > -#endif > SV_ABI_FREEBSD | SV_ILP32 | SV_ASLR, This causes SV_ASLR to be set twice. Thanks, -- Shawn Webb Cofounder / Security Engineer HardenedBSD GPG Key ID: 0xFF2E67A277F8E1FA GPG Key Fingerprint: D206 BB45 15E0 9C49 0CF9 3633 C85B 0AF8 AB23 0FB2 https://git-01.md.hardenedbsd.org/HardenedBSD/pubkeys/src/branch/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc signature.asc Description: PGP signature
svn commit: r368162 - head/sys/sys
Author: kib Date: Sun Nov 29 19:06:32 2020 New Revision: 368162 URL: https://svnweb.freebsd.org/changeset/base/368162 Log: Reduce MAXPHYS back to 128KB on 32bit architectures. Some of them have limited KVA, like arm, which prevents startup from allocating needed number of large pbufs. Other, for instance i386, are dis-balanced enough after 4/4 that blind bump is probably harmful because it allows for much more in-flight io than other tunables are ready for. Requested by: mmel Reviewed by: emaste, mmel Sponsored by: The FreeBSD Foundation Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h == --- head/sys/sys/param.hSun Nov 29 18:59:01 2020(r368161) +++ head/sys/sys/param.hSun Nov 29 19:06:32 2020(r368162) @@ -159,8 +159,12 @@ #ifndef DFLTPHYS #define DFLTPHYS (64 * 1024) /* default max raw I/O transfer size */ #endif -#ifndef MAXPHYS -#define MAXPHYS(1024 * 1024) /* max raw I/O transfer size */ +#ifndef MAXPHYS/* max raw I/O transfer size */ +#ifdef __ILP32__ +#define MAXPHYS(128 * 1024) +#else +#define MAXPHYS(1024 * 1024) +#endif #endif #ifndef MAXDUMPPGS #define MAXDUMPPGS (DFLTPHYS/PAGE_SIZE) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r368161 - in head/sys/arm: arm include
Author: mmel Date: Sun Nov 29 18:59:01 2020 New Revision: 368161 URL: https://svnweb.freebsd.org/changeset/base/368161 Log: Store MPIDR register in pcpu. MPIDR represents physical locality of given core and it should be used as the only viable/robust connection between cpuid (which have zero relation to cores topology) and external description (for example in FDT). It can be used for determining which interrupt is associated to given per-CPU PMU or by scheduler for determining big/little core or cluster topology. MFC after: 3 weeks Modified: head/sys/arm/arm/machdep.c head/sys/arm/arm/mp_machdep.c head/sys/arm/include/pcpu.h Modified: head/sys/arm/arm/machdep.c == --- head/sys/arm/arm/machdep.c Sun Nov 29 18:22:14 2020(r368160) +++ head/sys/arm/arm/machdep.c Sun Nov 29 18:59:01 2020(r368161) @@ -302,6 +302,8 @@ DELAY(int usec) void cpu_pcpu_init(struct pcpu *pcpu, int cpuid, size_t size) { + + pcpu->pc_mpidr = 0x; } void @@ -684,6 +686,7 @@ pcpu0_init(void) { set_curthread(); pcpu_init(pcpup, 0, sizeof(struct pcpu)); + pcpup->pc_mpidr = cp15_mpidr_get() & 0xFF; PCPU_SET(curthread, ); } Modified: head/sys/arm/arm/mp_machdep.c == --- head/sys/arm/arm/mp_machdep.c Sun Nov 29 18:22:14 2020 (r368160) +++ head/sys/arm/arm/mp_machdep.c Sun Nov 29 18:59:01 2020 (r368161) @@ -162,6 +162,7 @@ init_secondary(int cpu) ; pcpu_init(pc, cpu, sizeof(struct pcpu)); + pc->pc_mpidr = cp15_mpidr_get() & 0xFF; dpcpu_init(dpcpu[cpu - 1], cpu); #if defined(DDB) dbg_monitor_init_secondary(); Modified: head/sys/arm/include/pcpu.h == --- head/sys/arm/include/pcpu.h Sun Nov 29 18:22:14 2020(r368160) +++ head/sys/arm/include/pcpu.h Sun Nov 29 18:59:01 2020(r368161) @@ -65,7 +65,8 @@ struct vmspace; int pc_bp_harden_kind; \ uint32_t pc_original_actlr; \ uint64_t pc_clock; \ - char __pad[139] + uint32_t pc_mpidr; \ + char __pad[135] #ifdef _KERNEL ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r368160 - head/usr.bin/iconv
Author: fernape (ports committer) Date: Sun Nov 29 18:22:14 2020 New Revision: 368160 URL: https://svnweb.freebsd.org/changeset/base/368160 Log: iconv(1): Add EXAMPLE Just a small example to show simple usage. Approved by: manpages (0mp@) MFC after:2 weeks Differential Revision:https://reviews.freebsd.org/D27385 Modified: head/usr.bin/iconv/iconv.1 Modified: head/usr.bin/iconv/iconv.1 == --- head/usr.bin/iconv/iconv.1 Sun Nov 29 17:42:32 2020(r368159) +++ head/usr.bin/iconv/iconv.1 Sun Nov 29 18:22:14 2020(r368160) @@ -104,6 +104,13 @@ Specifies the destination codeset name as .El .Sh EXIT STATUS .Ex -std iconv +.Sh EXAMPLES +Convert +.Pa file.txt +from IBM273 to UTF-8 and save the result to +.Pa converted.txt : +.Pp +.Dl iconv -f IBM273 -t UTF-8 file.txt > converted.txt .Sh SEE ALSO .Xr mkcsmapper 1 , .Xr mkesdb 1 , ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r368124 - in head/sys: cam cam/ata cam/ctl cam/mmc cam/nvme cam/scsi compat/linprocfs compat/linux conf contrib/openzfs/module/os/freebsd/zfs dev/ahci dev/ata dev/firewire dev/flash de
On 29.11.2020 18:46, Ed Maste wrote: On Sun, 29 Nov 2020 at 12:36, Konstantin Belousov wrote: I think it is reasonable to return to 128KB for 32bit systems. ... +#ifndef MAXPHYS/* max raw I/O transfer size */ +#ifdef __ILP32__ +#define MAXPHYS(128 * 1024) +#else +#define MAXPHYS(1024 * 1024) +#endif This seems reasonable to me. Agree. Please commit it. Michal ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r368124 - in head/sys: cam cam/ata cam/ctl cam/mmc cam/nvme cam/scsi compat/linprocfs compat/linux conf contrib/openzfs/module/os/freebsd/zfs dev/ahci dev/ata dev/firewire dev/flash de
On Sun, 29 Nov 2020 at 12:36, Konstantin Belousov wrote: > > I think it is reasonable to return to 128KB for 32bit systems. ... > +#ifndef MAXPHYS/* max raw I/O transfer size > */ > +#ifdef __ILP32__ > +#define MAXPHYS(128 * 1024) > +#else > +#define MAXPHYS(1024 * 1024) > +#endif This seems reasonable to me. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r368159 - in head/sys: arm/conf conf
Author: mmel Date: Sun Nov 29 17:42:32 2020 New Revision: 368159 URL: https://svnweb.freebsd.org/changeset/base/368159 Log: Remove unused options. Marvell files and their related SOC_MV_ options should be cleaned up in another pass. Modified: head/sys/arm/conf/NOTES head/sys/arm/conf/std.armv6 head/sys/arm/conf/std.armv7 head/sys/conf/options.arm Modified: head/sys/arm/conf/NOTES == --- head/sys/arm/conf/NOTES Sun Nov 29 16:44:22 2020(r368158) +++ head/sys/arm/conf/NOTES Sun Nov 29 17:42:32 2020(r368159) @@ -9,7 +9,6 @@ makeoptions CONF_CFLAGS+="-march=armv7a" # Add options for armv7 that are not in sys/conf/NOTES... -optionsARM_L2_PIPT # Only L2 PIPT is supported optionsFDT # Flattened device tree support optionsFREEBSD_BOOT_LOADER # Process metadata passed from loader(8) optionsINTRNG # Include INTRNG framework Modified: head/sys/arm/conf/std.armv6 == --- head/sys/arm/conf/std.armv6 Sun Nov 29 16:44:22 2020(r368158) +++ head/sys/arm/conf/std.armv6 Sun Nov 29 17:42:32 2020(r368159) @@ -3,7 +3,6 @@ # $FreeBSD$ optionsHZ=1000 -optionsARM_L2_PIPT # Only L2 PIPT is supported optionsINTRNG # All arm systems use INTRNG these days optionsPREEMPTION # Enable kernel thread preemption optionsVIMAGE # Subsystem virtualization, e.g. VNET Modified: head/sys/arm/conf/std.armv7 == --- head/sys/arm/conf/std.armv7 Sun Nov 29 16:44:22 2020(r368158) +++ head/sys/arm/conf/std.armv7 Sun Nov 29 17:42:32 2020(r368159) @@ -3,7 +3,6 @@ # $FreeBSD$ optionsHZ=1000 -optionsARM_L2_PIPT # Only L2 PIPT is supported optionsINTRNG # All arm systems use INTRNG these days optionsPREEMPTION # Enable kernel thread preemption optionsVIMAGE # Subsystem virtualization, e.g. VNET Modified: head/sys/conf/options.arm == --- head/sys/conf/options.arm Sun Nov 29 16:44:22 2020(r368158) +++ head/sys/conf/options.arm Sun Nov 29 17:42:32 2020(r368159) @@ -1,13 +1,7 @@ #$FreeBSD$ ARMV6 opt_global.h ARMV7 opt_global.h -ARM_CACHE_LOCK_ENABLE opt_global.h -ARM_KERN_DIRECTMAP opt_vm.h -ARM_L2_PIPTopt_global.h -ARM_MANY_BOARD opt_global.h -ARM_WANT_TP_ADDRESSopt_global.h CPSW_ETHERSWITCH opt_cpsw.h -CPU_ARM9E opt_global.h CPU_ARM1176opt_global.h CPU_CORTEXAopt_global.h CPU_KRAIT opt_global.h @@ -23,7 +17,6 @@ FREEBSD_BOOT_LOADER opt_global.h KERNBASE opt_global.h KERNVIRTADDR opt_global.h LINUX_BOOT_ABI opt_global.h -LOADERRAMADDR opt_global.h LOCORE_MAP_MB opt_locore.h NKPT2PGopt_pmap.h PHYSADDR opt_global.h @@ -31,7 +24,6 @@ PLATFORM opt_global.h SOCDEV_PA opt_global.h SOCDEV_VA opt_global.h PV_STATS opt_pmap.h -QEMU_WORKAROUNDS opt_global.h SOC_ALLWINNER_A10 opt_global.h SOC_ALLWINNER_A13 opt_global.h SOC_ALLWINNER_A20 opt_global.h @@ -56,13 +48,6 @@ SOC_MV_KIRKWOOD opt_global.h SOC_MV_ORION opt_global.h SOC_OMAP3 opt_global.h SOC_OMAP4 opt_global.h -SOC_ROCKCHIP_RK3188opt_global.h SOC_TI_AM335X opt_global.h -SOC_TEGRA2 opt_global.h -XSCALE_CACHE_READ_WRITE_ALLOCATE opt_global.h -VERBOSE_INIT_ARM opt_global.h VM_MAXUSER_ADDRESS opt_global.h -GFB_DEBUG opt_gfb.h -GFB_NO_FONT_LOADINGopt_gfb.h -GFB_NO_MODE_CHANGE opt_gfb.h VFPopt_global.h ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r368124 - in head/sys: cam cam/ata cam/ctl cam/mmc cam/nvme cam/scsi compat/linprocfs compat/linux conf contrib/openzfs/module/os/freebsd/zfs dev/ahci dev/ata dev/firewire dev/flash de
On Sun, Nov 29, 2020 at 02:03:57PM +0100, Michal Meloun wrote: > On 28.11.2020 13:12, Konstantin Belousov wrote: > > Author: kib > > Date: Sat Nov 28 12:12:51 2020 > > New Revision: 368124 > > URL: https://svnweb.freebsd.org/changeset/base/368124 > > > > Log: > >Make MAXPHYS tunable. Bump MAXPHYS to 1M. > > > Unfortunately, bumping MAXPHYS broke arm kernel. The kernel runs out of KVA > while running 'pbuf' keg init function. This causes that keg_alloc_slab() > always returns NULL and for cycle in uma_prealloc() newer ends (whish should > be considered as another bug). > Do you think that MAXPHYS constant can depends on given arch? > 128k (or 256k) sounds reasonable for arm32 systems... I think it is reasonable to return to 128KB for 32bit systems. diff --git a/sys/sys/param.h b/sys/sys/param.h index 00fb0c860e7..076b1fcde05 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -159,8 +159,12 @@ #ifndef DFLTPHYS #define DFLTPHYS (64 * 1024) /* default max raw I/O transfer size */ #endif -#ifndef MAXPHYS -#define MAXPHYS(1024 * 1024) /* max raw I/O transfer size */ +#ifndef MAXPHYS/* max raw I/O transfer size */ +#ifdef __ILP32__ +#define MAXPHYS(128 * 1024) +#else +#define MAXPHYS(1024 * 1024) +#endif #endif #ifndef MAXDUMPPGS #define MAXDUMPPGS (DFLTPHYS/PAGE_SIZE) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r368158 - head/sys/arm/arm
Author: mmel Date: Sun Nov 29 16:44:22 2020 New Revision: 368158 URL: https://svnweb.freebsd.org/changeset/base/368158 Log: _ARM_ARCH_5E is always defined, we not support older CPUs. Modified: head/sys/arm/arm/bcopy_page.S head/sys/arm/arm/bcopyinout.S head/sys/arm/arm/in_cksum_arm.S head/sys/arm/arm/machdep.c head/sys/arm/arm/support.S Modified: head/sys/arm/arm/bcopy_page.S == --- head/sys/arm/arm/bcopy_page.S Sun Nov 29 16:29:40 2020 (r368157) +++ head/sys/arm/arm/bcopy_page.S Sun Nov 29 16:44:22 2020 (r368158) @@ -44,147 +44,8 @@ __FBSDID("$FreeBSD$"); #include "assym.inc" -#ifndef _ARM_ARCH_5E -/* #define BIG_LOOPS */ - /* - * bcopy_page(src, dest) - * - * Optimised copy page routine. - * - * On entry: - * r0 - src address - * r1 - dest address - * - * Requires: - * number of bytes per page (PAGE_SIZE) is a multiple of 512 (BIG_LOOPS), 128 - * otherwise. - */ - -#defineCHUNK_SIZE 32 - -#definePREFETCH_FIRST_CHUNK/* nothing */ -#definePREFETCH_NEXT_CHUNK /* nothing */ - -#ifndef COPY_CHUNK -#defineCOPY_CHUNK \ - PREFETCH_NEXT_CHUNK ; \ - ldmia r0!, {r3-r8,ip,lr} ; \ - stmia r1!, {r3-r8,ip,lr} -#endif /* ! COPY_CHUNK */ - -#ifndef SAVE_REGS -#defineSAVE_REGS stmfd sp!, {r4-r8, lr}; _SAVE({r4-r8, lr}) -#defineRESTORE_REGSldmfd sp!, {r4-r8, pc} -#endif - -ENTRY(bcopy_page) - PREFETCH_FIRST_CHUNK - SAVE_REGS -#ifdef BIG_LOOPS - mov r2, #(PAGE_SIZE >> 9) -#else - mov r2, #(PAGE_SIZE >> 7) -#endif - -1: - COPY_CHUNK - COPY_CHUNK - COPY_CHUNK - COPY_CHUNK - -#ifdef BIG_LOOPS - /* There is little point making the loop any larger; unless we are - running with the cache off, the load/store overheads will - completely dominate this loop. */ - COPY_CHUNK - COPY_CHUNK - COPY_CHUNK - COPY_CHUNK - - COPY_CHUNK - COPY_CHUNK - COPY_CHUNK - COPY_CHUNK - - COPY_CHUNK - COPY_CHUNK - COPY_CHUNK - COPY_CHUNK -#endif - subsr2, r2, #1 - bne 1b - - RESTORE_REGS/* ...and return. */ -END(bcopy_page) - -/* - * bzero_page(dest) - * - * Optimised zero page routine. - * - * On entry: - * r0 - dest address - * - * Requires: - * number of bytes per page (PAGE_SIZE) is a multiple of 512 (BIG_LOOPS), 128 - * otherwise - */ - -ENTRY(bzero_page) - stmfd sp!, {r4-r8, lr} - _SAVE({r4-r8, lr}) -#ifdef BIG_LOOPS - mov r2, #(PAGE_SIZE >> 9) -#else - mov r2, #(PAGE_SIZE >> 7) -#endif - mov r3, #0 - mov r4, #0 - mov r5, #0 - mov r6, #0 - mov r7, #0 - mov r8, #0 - mov ip, #0 - mov lr, #0 - -1: - stmia r0!, {r3-r8,ip,lr} - stmia r0!, {r3-r8,ip,lr} - stmia r0!, {r3-r8,ip,lr} - stmia r0!, {r3-r8,ip,lr} - -#ifdef BIG_LOOPS - /* There is little point making the loop any larger; unless we are - running with the cache off, the load/store overheads will - completely dominate this loop. */ - stmia r0!, {r3-r8,ip,lr} - stmia r0!, {r3-r8,ip,lr} - stmia r0!, {r3-r8,ip,lr} - stmia r0!, {r3-r8,ip,lr} - - stmia r0!, {r3-r8,ip,lr} - stmia r0!, {r3-r8,ip,lr} - stmia r0!, {r3-r8,ip,lr} - stmia r0!, {r3-r8,ip,lr} - - stmia r0!, {r3-r8,ip,lr} - stmia r0!, {r3-r8,ip,lr} - stmia r0!, {r3-r8,ip,lr} - stmia r0!, {r3-r8,ip,lr} - -#endif - - subsr2, r2, #1 - bne 1b - - ldmfd sp!, {r4-r8, pc} -END(bzero_page) - -#else /* _ARM_ARCH_5E */ - -/* * armv5e version of bcopy_page */ ENTRY(bcopy_page) @@ -279,4 +140,3 @@ ENTRY(bzero_page) bne 1b RET END(bzero_page) -#endif /* _ARM_ARCH_5E */ Modified: head/sys/arm/arm/bcopyinout.S == --- head/sys/arm/arm/bcopyinout.S Sun Nov 29 16:29:40 2020 (r368157) +++ head/sys/arm/arm/bcopyinout.S Sun Nov 29 16:44:22 2020 (r368158) @@ -47,510 +47,7 @@ .word _C_LABEL(_min_memcpy_size) __FBSDID("$FreeBSD$"); -#ifdef _ARM_ARCH_5E #include -#else - - .text - .align 2 - -#define GET_PCB(tmp) \ - mrc p15, 0, tmp, c13, c0, 4; \ - add tmp, tmp, #(TD_PCB) - -#define SAVE_REGS stmfd sp!, {r4-r11}; _SAVE({r4-r11}) -#define RESTORE_REGS ldmfd sp!, {r4-r11} - -#if defined(_ARM_ARCH_5E) -#define HELLOCPP # -#define PREFETCH(rx,o) pld [ rx , HELLOCPP (o) ] -#else -#define PREFETCH(rx,o) -#endif - -/* - * r0 = user space address - * r1 = kernel space address - * r2 = length - * - * Copies bytes from user space to kernel space - * - * We save/restore r4-r11: - *
svn commit: r368157 - head/share/man/man7
Author: yuripv Date: Sun Nov 29 16:29:40 2020 New Revision: 368157 URL: https://svnweb.freebsd.org/changeset/base/368157 Log: security(7): fix copy/paste error and correct aslr oids Submitted by: Mina Galić Differential Revision:https://reviews.freebsd.org/D27408 Modified: head/share/man/man7/security.7 Modified: head/share/man/man7/security.7 == --- head/share/man/man7/security.7 Sun Nov 29 16:22:33 2020 (r368156) +++ head/share/man/man7/security.7 Sun Nov 29 16:29:40 2020 (r368157) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 11, 2020 +.Dd November 28, 2020 .Dt SECURITY 7 .Os .Sh NAME @@ -1061,7 +1061,7 @@ position-independent (PIE) 32bit binaries. .It Dv kern.elf32.aslr.honor_sbrk Makes ASLR less aggressive and more compatible with old binaries relying on the sbrk area. -.It Dv kern.elf32.aslr.aslr_stack_gap +.It Dv kern.elf32.aslr.stack_gap If ASLR is enabled for a binary, a non-zero value creates a randomized stack gap between strings and the end of the aux vector. The value is the maximum percentage of main stack to waste on the gap. @@ -1072,7 +1072,7 @@ Cannot be greater than 50, i.e., at most half of the s 64bit PIE binaries ASLR control. .It Dv kern.elf64.aslr.honor_sbrk 64bit binaries ASLR sbrk compatibility control. -.It Dv kern.elf32.aslr.aslr_stack_gap +.It Dv kern.elf64.aslr.stack_gap Controls stack gap for 64bit binaries. .It Dv kern.elf32.nxstack Enables non-executable stack for 32bit processes. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r368156 - head/sys/dev/pci
Author: andrew Date: Sun Nov 29 16:22:33 2020 New Revision: 368156 URL: https://svnweb.freebsd.org/changeset/base/368156 Log: Only set the PCI bus end when we are reducing it We read the bus end value from the _CRS method. On some systems we need to further limit it based on the MCFG table. Support this by setting a default value, then update it if needed in the _CRS table, and finally reduce it if it is past the end of the MCFG tabel. This will allow for both systems that use either method to encode this value. This partially reverts r347929, removing the error printf. Reviewed by: philip Tested by:philip, Andrey Fesenko MFC after:2 weeks Sponsored by: Innovate UK Differential Revision:https://reviews.freebsd.org/D27274 Modified: head/sys/dev/pci/pci_host_generic_acpi.c Modified: head/sys/dev/pci/pci_host_generic_acpi.c == --- head/sys/dev/pci/pci_host_generic_acpi.cSun Nov 29 15:39:54 2020 (r368155) +++ head/sys/dev/pci/pci_host_generic_acpi.cSun Nov 29 16:22:33 2020 (r368156) @@ -201,7 +201,8 @@ pci_host_acpi_get_ecam_resource(device_t dev) mcfg_entry++; } if (found) { - sc->base.bus_end = mcfg_entry->EndBusNumber; + if (mcfg_entry->EndBusNumber < sc->base.bus_end) + sc->base.bus_end = mcfg_entry->EndBusNumber; base = mcfg_entry->Address; } else { device_printf(dev, "MCFG exists, but does not have bus %d-%d\n", @@ -210,10 +211,9 @@ pci_host_acpi_get_ecam_resource(device_t dev) } } else { status = acpi_GetInteger(handle, "_CBA", ); - if (ACPI_SUCCESS(status)) { + if (ACPI_SUCCESS(status)) base = val; - sc->base.bus_end = 255; - } else + else return (ENXIO); } @@ -246,6 +246,7 @@ pci_host_generic_acpi_init(device_t dev) device_printf(dev, "No _BBN, using start bus 0\n"); sc->base.bus_start = 0; } + sc->base.bus_end = 255; /* Get PCI Segment (domain) needed for MCFG lookup */ status = acpi_GetInteger(handle, "_SEG", >base.ecam); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r368155 - head/sys/arm/conf
Author: mmel Date: Sun Nov 29 15:39:54 2020 New Revision: 368155 URL: https://svnweb.freebsd.org/changeset/base/368155 Log: Remove orphaned configs. Deleted: head/sys/arm/conf/ARNDALE head/sys/arm/conf/ARNDALE-OCTA head/sys/arm/conf/EA3250.hints head/sys/arm/conf/SAM9G20EK.hints head/sys/arm/conf/VSATV102 head/sys/arm/conf/YYHD18 ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r368154 - in head/sys: arm/arm arm/include arm/mv conf
Author: mmel Date: Sun Nov 29 15:24:00 2020 New Revision: 368154 URL: https://svnweb.freebsd.org/changeset/base/368154 Log: Remove remaining fragments of code for older already ceased ARM versions. Deleted: head/sys/arm/arm/cpufunc_asm_arm9.S head/sys/arm/arm/cpufunc_asm_armv4.S head/sys/arm/arm/cpufunc_asm_armv5_ec.S head/sys/arm/arm/cpufunc_asm_sheeva.S head/sys/arm/mv/std.mv Modified: head/sys/arm/arm/cpufunc.c head/sys/arm/include/cpufunc.h head/sys/arm/include/md_var.h head/sys/conf/files.arm Modified: head/sys/arm/arm/cpufunc.c == --- head/sys/arm/arm/cpufunc.c Sun Nov 29 15:04:39 2020(r368153) +++ head/sys/arm/arm/cpufunc.c Sun Nov 29 15:24:00 2020(r368154) @@ -80,9 +80,6 @@ u_int arm_cache_level; u_int arm_cache_type[14]; u_int arm_cache_loc; -#if defined(CPU_ARM9E) -static void arm10_setup(void); -#endif #ifdef CPU_MV_PJ4B static void pj4bv7_setup(void); #endif @@ -93,107 +90,6 @@ static void arm11x6_setup(void); static void cortexa_setup(void); #endif -#if defined(CPU_ARM9E) -struct cpu_functions armv5_ec_cpufuncs = { - /* CPU functions */ - - cpufunc_nullop, /* cpwait */ - - /* MMU functions */ - - cpufunc_control,/* control */ - armv5_ec_setttb,/* Setttb */ - - /* TLB functions */ - - armv4_tlb_flushID, /* tlb_flushID */ - arm9_tlb_flushID_SE,/* tlb_flushID_SE */ - armv4_tlb_flushD, /* tlb_flushD */ - armv4_tlb_flushD_SE,/* tlb_flushD_SE*/ - - /* Cache operations */ - - armv5_ec_icache_sync_range, /* icache_sync_range*/ - - armv5_ec_dcache_wbinv_all, /* dcache_wbinv_all */ - armv5_ec_dcache_wbinv_range,/* dcache_wbinv_range */ - armv5_ec_dcache_inv_range, /* dcache_inv_range */ - armv5_ec_dcache_wb_range, /* dcache_wb_range */ - - armv4_idcache_inv_all, /* idcache_inv_all */ - armv5_ec_idcache_wbinv_all, /* idcache_wbinv_all*/ - armv5_ec_idcache_wbinv_range, /* idcache_wbinv_range */ - - cpufunc_nullop, /* l2cache_wbinv_all*/ - (void *)cpufunc_nullop, /* l2cache_wbinv_range */ - (void *)cpufunc_nullop, /* l2cache_inv_range*/ - (void *)cpufunc_nullop, /* l2cache_wb_range */ - (void *)cpufunc_nullop, /* l2cache_drain_writebuf */ - - /* Other functions */ - - armv4_drain_writebuf, /* drain_writebuf */ - - (void *)cpufunc_nullop, /* sleep*/ - - /* Soft functions */ - - arm9_context_switch,/* context_switch */ - - arm10_setup /* cpu setup*/ - -}; - -struct cpu_functions sheeva_cpufuncs = { - /* CPU functions */ - - cpufunc_nullop, /* cpwait */ - - /* MMU functions */ - - cpufunc_control,/* control */ - sheeva_setttb, /* Setttb */ - - /* TLB functions */ - - armv4_tlb_flushID, /* tlb_flushID */ - arm9_tlb_flushID_SE,/* tlb_flushID_SE */ - armv4_tlb_flushD, /* tlb_flushD */ - armv4_tlb_flushD_SE,/* tlb_flushD_SE*/ - - /* Cache operations */ - - armv5_ec_icache_sync_range, /* icache_sync_range*/ - - armv5_ec_dcache_wbinv_all, /* dcache_wbinv_all */ - sheeva_dcache_wbinv_range, /* dcache_wbinv_range */ - sheeva_dcache_inv_range,/* dcache_inv_range */ - sheeva_dcache_wb_range, /* dcache_wb_range */ - - armv4_idcache_inv_all, /* idcache_inv_all */ - armv5_ec_idcache_wbinv_all, /* idcache_wbinv_all*/ - sheeva_idcache_wbinv_range, /* idcache_wbinv_all*/ - - sheeva_l2cache_wbinv_all, /* l2cache_wbinv_all*/ - sheeva_l2cache_wbinv_range, /* l2cache_wbinv_range */ - sheeva_l2cache_inv_range, /* l2cache_inv_range*/ - sheeva_l2cache_wb_range,/* l2cache_wb_range */ - (void *)cpufunc_nullop, /* l2cache_drain_writebuf */ - - /* Other functions */ - - armv4_drain_writebuf, /* drain_writebuf */ - - sheeva_cpu_sleep, /* sleep*/ - - /* Soft functions */ - - arm9_context_switch,/* context_switch */ - - arm10_setup /* cpu setup*/ -}; -#endif /* CPU_ARM9E */ - #ifdef CPU_MV_PJ4B struct cpu_functions pj4bv7_cpufuncs = { /* Cache operations */ @@ -257,11 +153,6
svn commit: r368153 - head/sys/arm/arm
Author: mmel Date: Sun Nov 29 15:04:39 2020 New Revision: 368153 URL: https://svnweb.freebsd.org/changeset/base/368153 Log: Remove remaining support of big endian byte order. Big endian support was ceased by removing ARMv4 sub architecture. Modified: head/sys/arm/arm/bcopyinout_xscale.S head/sys/arm/arm/cpufunc.c head/sys/arm/arm/fusu.S head/sys/arm/arm/in_cksum_arm.S head/sys/arm/arm/support.S head/sys/arm/arm/vm_machdep.c Modified: head/sys/arm/arm/bcopyinout_xscale.S == --- head/sys/arm/arm/bcopyinout_xscale.SSun Nov 29 14:21:16 2020 (r368152) +++ head/sys/arm/arm/bcopyinout_xscale.SSun Nov 29 15:04:39 2020 (r368153) @@ -298,25 +298,12 @@ ENTRY(copyin) b .Lcopyin_bad1 .Lcopyin_bad1_loop16: -#ifdef __ARMEB__ - mov r4, ip, lsl #8 -#else mov r4, ip, lsr #8 -#endif ldrtr5, [r0], #0x04 pld [r0, #0x018] ldrtr6, [r0], #0x04 ldrtr7, [r0], #0x04 ldrtip, [r0], #0x04 -#ifdef __ARMEB__ - orr r4, r4, r5, lsr #24 - mov r5, r5, lsl #8 - orr r5, r5, r6, lsr #24 - mov r6, r6, lsl #8 - orr r6, r6, r7, lsr #24 - mov r7, r7, lsl #8 - orr r7, r7, ip, lsr #24 -#else orr r4, r4, r5, lsl #24 mov r5, r5, lsr #8 orr r5, r5, r6, lsl #24 @@ -324,7 +311,6 @@ ENTRY(copyin) orr r6, r6, r7, lsl #24 mov r7, r7, lsr #8 orr r7, r7, ip, lsl #24 -#endif str r4, [r1], #0x04 str r5, [r1], #0x04 str r6, [r1], #0x04 @@ -341,43 +327,22 @@ ENTRY(copyin) blt .Lcopyin_l4 .Lcopyin_bad1_loop4: -#ifdef __ARMEB__ - mov r4, ip, lsl #8 -#else mov r4, ip, lsr #8 -#endif ldrtip, [r0], #0x04 subsr2, r2, #0x04 -#ifdef __ARMEB__ - orr r4, r4, ip, lsr #24 -#else orr r4, r4, ip, lsl #24 -#endif str r4, [r1], #0x04 bge .Lcopyin_bad1_loop4 sub r0, r0, #0x03 b .Lcopyin_l4 .Lcopyin_bad2_loop16: -#ifdef __ARMEB__ - mov r4, ip, lsl #16 -#else mov r4, ip, lsr #16 -#endif ldrtr5, [r0], #0x04 pld [r0, #0x018] ldrtr6, [r0], #0x04 ldrtr7, [r0], #0x04 ldrtip, [r0], #0x04 -#ifdef __ARMEB__ - orr r4, r4, r5, lsr #16 - mov r5, r5, lsl #16 - orr r5, r5, r6, lsr #16 - mov r6, r6, lsl #16 - orr r6, r6, r7, lsr #16 - mov r7, r7, lsl #16 - orr r7, r7, ip, lsr #16 -#else orr r4, r4, r5, lsl #16 mov r5, r5, lsr #16 orr r5, r5, r6, lsl #16 @@ -385,7 +350,6 @@ ENTRY(copyin) orr r6, r6, r7, lsl #16 mov r7, r7, lsr #16 orr r7, r7, ip, lsl #16 -#endif str r4, [r1], #0x04 str r5, [r1], #0x04 str r6, [r1], #0x04 @@ -402,43 +366,22 @@ ENTRY(copyin) blt .Lcopyin_l4 .Lcopyin_bad2_loop4: -#ifdef __ARMEB__ - mov r4, ip, lsl #16 -#else mov r4, ip, lsr #16 -#endif ldrtip, [r0], #0x04 subsr2, r2, #0x04 -#ifdef __ARMEB__ - orr r4, r4, ip, lsr #16 -#else orr r4, r4, ip, lsl #16 -#endif str r4, [r1], #0x04 bge .Lcopyin_bad2_loop4 sub r0, r0, #0x02 b .Lcopyin_l4 .Lcopyin_bad3_loop16: -#ifdef __ARMEB__ - mov r4, ip, lsl #24 -#else mov r4, ip, lsr #24 -#endif ldrtr5, [r0], #0x04 pld [r0, #0x018] ldrtr6, [r0], #0x04 ldrtr7, [r0], #0x04 ldrtip, [r0], #0x04 -#ifdef __ARMEB__ - orr r4, r4, r5, lsr #8 - mov r5, r5, lsl #24 - orr r5, r5, r6, lsr #8 - mov r6, r6, lsl #24 - orr r6, r6, r7, lsr #8 - mov r7, r7, lsl #24 - orr r7, r7, ip, lsr #8 -#else orr r4, r4, r5, lsl #8 mov r5, r5, lsr #24 orr r5, r5, r6, lsl #8 @@ -446,7 +389,6 @@ ENTRY(copyin) orr r6, r6, r7, lsl #8 mov r7, r7, lsr #24 orr r7, r7, ip, lsl #8 -#endif str r4, [r1], #0x04 str r5, [r1], #0x04 str r6, [r1], #0x04 @@ -463,18 +405,10 @@ ENTRY(copyin) blt .Lcopyin_l4 .Lcopyin_bad3_loop4: -#ifdef __ARMEB__ - mov r4, ip, lsl #24 -#else mov r4, ip, lsr #24 -#endif ldrtip, [r0], #0x04 subsr2, r2, #0x04 -#ifdef __ARMEB__ - orr r4, r4, ip, lsr #8 -#else orr r4, r4, ip, lsl #8 -#endif str r4, [r1], #0x04 bge .Lcopyin_bad3_loop4 sub r0, r0, #0x01 @@ -750,25 +684,12 @@ ENTRY(copyout) b .Lcopyout_bad1 .Lcopyout_bad1_loop16: -#ifdef __ARMEB__ -
svn commit: r368150 - head/sys/net/route
Author: melifaro Date: Sun Nov 29 13:54:49 2020 New Revision: 368150 URL: https://svnweb.freebsd.org/changeset/base/368150 Log: Introduce rib_walk_ext_internal() to allow iteration with rnh pointer. This solves the case when rib is not yet attached/detached to/from the system rib array. Differential Revision:https://reviews.freebsd.org/D27406 Modified: head/sys/net/route/route_ctl.h head/sys/net/route/route_helpers.c Modified: head/sys/net/route/route_ctl.h == --- head/sys/net/route/route_ctl.h Sun Nov 29 13:52:06 2020 (r368149) +++ head/sys/net/route/route_ctl.h Sun Nov 29 13:54:49 2020 (r368150) @@ -67,17 +67,19 @@ enum rib_walk_hook { }; typedef int rib_walktree_f_t(struct rtentry *, void *); typedef void rib_walk_hook_f_t(struct rib_head *rnh, enum rib_walk_hook stage, - void *arg); +void *arg); void rib_walk(uint32_t fibnum, int af, bool wlock, rib_walktree_f_t *wa_f, - void *arg); +void *arg); void rib_walk_ext(uint32_t fibnum, int af, bool wlock, rib_walktree_f_t *wa_f, - rib_walk_hook_f_t *hook_f, void *arg); +rib_walk_hook_f_t *hook_f, void *arg); +void rib_walk_ext_internal(struct rib_head *rnh, bool wlock, +rib_walktree_f_t *wa_f, rib_walk_hook_f_t *hook_f, void *arg); void rib_walk_del(u_int fibnum, int family, rib_filter_f_t *filter_f, - void *arg, bool report); +void *arg, bool report); void rib_foreach_table_walk(int family, bool wlock, rib_walktree_f_t *wa_f, - rib_walk_hook_f_t *hook_f, void *arg); +rib_walk_hook_f_t *hook_f, void *arg); void rib_foreach_table_walk_del(int family, rib_filter_f_t *filter_f, void *arg); struct route_nhop_data; Modified: head/sys/net/route/route_helpers.c == --- head/sys/net/route/route_helpers.c Sun Nov 29 13:52:06 2020 (r368149) +++ head/sys/net/route/route_helpers.c Sun Nov 29 13:54:49 2020 (r368150) @@ -77,15 +77,11 @@ __FBSDID("$FreeBSD$"); * Table is traversed under read lock unless @wlock is set. */ void -rib_walk_ext(uint32_t fibnum, int family, bool wlock, rib_walktree_f_t *wa_f, +rib_walk_ext_internal(struct rib_head *rnh, bool wlock, rib_walktree_f_t *wa_f, rib_walk_hook_f_t *hook_f, void *arg) { RIB_RLOCK_TRACKER; - struct rib_head *rnh; - if ((rnh = rt_tables_get_rnh(fibnum, family)) == NULL) - return; - if (wlock) RIB_WLOCK(rnh); else @@ -99,6 +95,16 @@ rib_walk_ext(uint32_t fibnum, int family, bool wlock, RIB_WUNLOCK(rnh); else RIB_RUNLOCK(rnh); +} + +void +rib_walk_ext(uint32_t fibnum, int family, bool wlock, rib_walktree_f_t *wa_f, +rib_walk_hook_f_t *hook_f, void *arg) +{ + struct rib_head *rnh; + + if ((rnh = rt_tables_get_rnh(fibnum, family)) != NULL) + rib_walk_ext_internal(rnh, wlock, wa_f, hook_f, arg); } /* ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r368149 - head/sys/net/route
Author: melifaro Date: Sun Nov 29 13:52:06 2020 New Revision: 368149 URL: https://svnweb.freebsd.org/changeset/base/368149 Log: Add nhop_ref_any() to unify referencing nhop or nexthop group. It allows code within routing subsystem to transparently reference nexthops and nexthop groups, similar to nhop_free_any(), abstracting ROUTE_MPATH details. Differential Revision:https://reviews.freebsd.org/D27410 Modified: head/sys/net/route/nhgrp_ctl.c head/sys/net/route/nhop_ctl.c head/sys/net/route/route_var.h Modified: head/sys/net/route/nhgrp_ctl.c == --- head/sys/net/route/nhgrp_ctl.c Sun Nov 29 13:45:53 2020 (r368148) +++ head/sys/net/route/nhgrp_ctl.c Sun Nov 29 13:52:06 2020 (r368149) @@ -294,6 +294,17 @@ alloc_nhgrp(struct weightened_nhop *wn, int num_nhops) } void +nhgrp_ref_object(struct nhgrp_object *nhg) +{ + struct nhgrp_priv *nhg_priv; + u_int old; + + nhg_priv = NHGRP_PRIV(nhg); + old = refcount_acquire(_priv->nhg_refcount); + KASSERT(old > 0, ("%s: nhgrp object %p has 0 refs", __func__, nhg)); +} + +void nhgrp_free(struct nhgrp_object *nhg) { struct nhgrp_priv *nhg_priv; Modified: head/sys/net/route/nhop_ctl.c == --- head/sys/net/route/nhop_ctl.c Sun Nov 29 13:45:53 2020 (r368148) +++ head/sys/net/route/nhop_ctl.c Sun Nov 29 13:52:06 2020 (r368149) @@ -691,6 +691,19 @@ nhop_free(struct nhop_object *nh) } void +nhop_ref_any(struct nhop_object *nh) +{ +#ifdef ROUTE_MPATH + if (!NH_IS_NHGRP(nh)) + nhop_ref_object(nh); + else + nhgrp_ref_object((struct nhgrp_object *)nh); +#else + nhop_ref_object(nh); +#endif +} + +void nhop_free_any(struct nhop_object *nh) { Modified: head/sys/net/route/route_var.h == --- head/sys/net/route/route_var.h Sun Nov 29 13:45:53 2020 (r368148) +++ head/sys/net/route/route_var.h Sun Nov 29 13:52:06 2020 (r368149) @@ -242,6 +242,7 @@ int nhops_init_rib(struct rib_head *rh); void nhops_destroy_rib(struct rib_head *rh); void nhop_ref_object(struct nhop_object *nh); int nhop_try_ref_object(struct nhop_object *nh); +void nhop_ref_any(struct nhop_object *nh); void nhop_free_any(struct nhop_object *nh); void nhop_set_type(struct nhop_object *nh, enum nhop_type nh_type); @@ -306,6 +307,7 @@ int nhgrp_get_addition_group(struct rib_head *rnh, struct route_nhop_data *rnd_orig, struct route_nhop_data *rnd_add, struct route_nhop_data *rnd_new); +void nhgrp_ref_object(struct nhgrp_object *nhg); uint32_t nhgrp_get_idx(const struct nhgrp_object *nhg); void nhgrp_free(struct nhgrp_object *nhg); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r368148 - head/sbin/hastd
Author: eugen Date: Sun Nov 29 13:45:53 2020 New Revision: 368148 URL: https://svnweb.freebsd.org/changeset/base/368148 Log: hastd(8) assumes it has no extra file descriptors opened and aborts otherwise, so call closefrom() early. PR: 227461 MFC after:2 weeks Modified: head/sbin/hastd/hastd.c Modified: head/sbin/hastd/hastd.c == --- head/sbin/hastd/hastd.c Sun Nov 29 13:41:49 2020(r368147) +++ head/sbin/hastd/hastd.c Sun Nov 29 13:45:53 2020(r368148) @@ -1222,6 +1222,7 @@ main(int argc, char *argv[]) pjdlog_init(PJDLOG_MODE_STD); pjdlog_debug_set(debuglevel); + closefrom(MAX(MAX(STDIN_FILENO, STDOUT_FILENO), STDERR_FILENO) + 1); g_gate_load(); /* ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r368147 - in head/sys: net netinet netinet6
Author: melifaro Date: Sun Nov 29 13:41:49 2020 New Revision: 368147 URL: https://svnweb.freebsd.org/changeset/base/368147 Log: Refactor fib4/fib6 functions. No functional changes. * Make lookup path of fib<4|6>_lookup_debugnet() separate functions (fib<46>_lookup_rt()). These will be used in the control plane code requiring unlocked radix operations and actual prefix pointer. * Make lookup part of fib<4|6>_check_urpf() separate functions. This change simplifies the switch to alternative lookup implementations, which helps algorithmic lookups introduction. * While here, use static initializers for IPv4/IPv6 keys Differential Revision:https://reviews.freebsd.org/D27405 Modified: head/sys/net/route.h head/sys/netinet/in_fib.c head/sys/netinet/in_fib.h head/sys/netinet6/in6_fib.c head/sys/netinet6/in6_fib.h Modified: head/sys/net/route.h == --- head/sys/net/route.hSun Nov 29 13:27:24 2020(r368146) +++ head/sys/net/route.hSun Nov 29 13:41:49 2020(r368147) @@ -230,6 +230,7 @@ VNET_DECLARE(u_int, fib_hash_outbound); /* Control plane route request flags */ #defineNHR_COPY0x100 /* Copy rte data */ +#defineNHR_UNLOCKED0x200 /* Do not lock table */ /* * Routing statistics. Modified: head/sys/netinet/in_fib.c == --- head/sys/netinet/in_fib.c Sun Nov 29 13:27:24 2020(r368146) +++ head/sys/netinet/in_fib.c Sun Nov 29 13:41:49 2020(r368147) @@ -75,7 +75,6 @@ struct _hash_5tuple_ipv4 { _Static_assert(sizeof(struct _hash_5tuple_ipv4) == 16, "_hash_5tuple_ipv4 size is wrong"); - uint32_t fib4_calc_software_hash(struct in_addr src, struct in_addr dst, unsigned short src_port, unsigned short dst_port, char proto, @@ -119,11 +118,11 @@ fib4_lookup(uint32_t fibnum, struct in_addr dst, uint3 return (NULL); /* Prepare lookup key */ - struct sockaddr_in sin4; - memset(, 0, sizeof(sin4)); - sin4.sin_family = AF_INET; - sin4.sin_len = sizeof(struct sockaddr_in); - sin4.sin_addr = dst; + struct sockaddr_in sin4 = { + .sin_family = AF_INET, + .sin_len = sizeof(struct sockaddr_in), + .sin_addr = dst, + }; nh = NULL; RIB_RLOCK(rh); @@ -181,28 +180,18 @@ check_urpf(struct nhop_object *nh, uint32_t flags, return (check_urpf_nhop(nh, flags, src_if)); } -/* - * Performs reverse path forwarding lookup. - * If @src_if is non-zero, verifies that at least 1 path goes via - * this interface. - * If @src_if is zero, verifies that route exist. - * if @flags contains NHR_NOTDEFAULT, do not consider default route. - * - * Returns 1 if route matching conditions is found, 0 otherwise. - */ -int -fib4_check_urpf(uint32_t fibnum, struct in_addr dst, uint32_t scopeid, - uint32_t flags, const struct ifnet *src_if) +static struct nhop_object * +lookup_nhop(uint32_t fibnum, struct in_addr dst, uint32_t scopeid) { RIB_RLOCK_TRACKER; struct rib_head *rh; struct radix_node *rn; - int ret; + struct nhop_object *nh; KASSERT((fibnum < rt_numfibs), ("fib4_check_urpf: bad fibnum")); rh = rt_tables_get_rnh(fibnum, AF_INET); if (rh == NULL) - return (0); + return (NULL); /* Prepare lookup key */ struct sockaddr_in sin4; @@ -210,49 +199,96 @@ fib4_check_urpf(uint32_t fibnum, struct in_addr dst, u sin4.sin_len = sizeof(struct sockaddr_in); sin4.sin_addr = dst; + nh = NULL; RIB_RLOCK(rh); rn = rh->rnh_matchaddr((void *), >head); - if (rn != NULL && ((rn->rn_flags & RNF_ROOT) == 0)) { - ret = check_urpf(RNTORT(rn)->rt_nhop, flags, src_if); - RIB_RUNLOCK(rh); - return (ret); - } + if (rn != NULL && ((rn->rn_flags & RNF_ROOT) == 0)) + nh = RNTORT(rn)->rt_nhop; RIB_RUNLOCK(rh); + return (nh); +} + +/* + * Performs reverse path forwarding lookup. + * If @src_if is non-zero, verifies that at least 1 path goes via + * this interface. + * If @src_if is zero, verifies that route exist. + * if @flags contains NHR_NOTDEFAULT, do not consider default route. + * + * Returns 1 if route matching conditions is found, 0 otherwise. + */ +int +fib4_check_urpf(uint32_t fibnum, struct in_addr dst, uint32_t scopeid, + uint32_t flags, const struct ifnet *src_if) +{ + struct nhop_object *nh; + + nh = lookup_nhop(fibnum, dst, scopeid); + if (nh != NULL) + return (check_urpf(nh, flags, src_if)); + return (0); } -struct nhop_object * -fib4_lookup_debugnet(uint32_t fibnum, struct in_addr dst, uint32_t scopeid, -uint32_t flags) +/* + *
svn commit: r368146 - head/sys/net/route
Author: melifaro Date: Sun Nov 29 13:27:24 2020 New Revision: 368146 URL: https://svnweb.freebsd.org/changeset/base/368146 Log: Add tracking for rib/nhops/nhgrp objects and provide cumulative number accessors. The resulting KPI can be used by routing table consumers to estimate the required scale for route table export. * Add tracking for rib routes * Add accessors for number of nexthops/nexthop objects * Simplify rib_unsubscribe: store rnh we're attached to instead of requiring it up again on destruction. This helps in the cases when rnh is not linked yet/already unlinked. Differential Revision:https://reviews.freebsd.org/D27404 Modified: head/sys/net/route/nhgrp_ctl.c head/sys/net/route/nhop_ctl.c head/sys/net/route/route_ctl.c head/sys/net/route/route_ctl.h head/sys/net/route/route_var.h Modified: head/sys/net/route/nhgrp_ctl.c == --- head/sys/net/route/nhgrp_ctl.c Sun Nov 29 10:36:56 2020 (r368145) +++ head/sys/net/route/nhgrp_ctl.c Sun Nov 29 13:27:24 2020 (r368146) @@ -762,6 +762,21 @@ nhgrp_get_idx(const struct nhgrp_object *nhg) return (nhg_priv->nhg_idx); } +uint32_t +nhgrp_get_count(struct rib_head *rh) +{ + struct nh_control *ctl; + uint32_t count; + + ctl = rh->nh_control; + + NHOPS_RLOCK(ctl); + count = ctl->gr_head.items_count; + NHOPS_RUNLOCK(ctl); + + return (count); +} + int nhgrp_dump_sysctl(struct rib_head *rh, struct sysctl_req *w) { Modified: head/sys/net/route/nhop_ctl.c == --- head/sys/net/route/nhop_ctl.c Sun Nov 29 10:36:56 2020 (r368145) +++ head/sys/net/route/nhop_ctl.c Sun Nov 29 13:27:24 2020 (r368146) @@ -852,6 +852,21 @@ dump_nhop_entry(struct rib_head *rh, struct nhop_objec return (error); } +uint32_t +nhops_get_count(struct rib_head *rh) +{ + struct nh_control *ctl; + uint32_t count; + + ctl = rh->nh_control; + + NHOPS_RLOCK(ctl); + count = ctl->nh_head.items_count; + NHOPS_RUNLOCK(ctl); + + return (count); +} + int nhops_dump_sysctl(struct rib_head *rh, struct sysctl_req *w) { Modified: head/sys/net/route/route_ctl.c == --- head/sys/net/route/route_ctl.c Sun Nov 29 10:36:56 2020 (r368145) +++ head/sys/net/route/route_ctl.c Sun Nov 29 13:27:24 2020 (r368146) @@ -70,6 +70,7 @@ struct rib_subscription { CK_STAILQ_ENTRY(rib_subscription) next; rib_subscription_cb_t *func; void*arg; + struct rib_head *rnh; enum rib_subscription_type type; struct epoch_contextepoch_ctx; }; @@ -669,6 +670,8 @@ rt_unlinkrte(struct rib_head *rnh, struct rt_addrinfo /* Finalize notification */ rnh->rnh_gen++; + rnh->rnh_prefixes--; + rc->rc_cmd = RTM_DELETE; rc->rc_rt = rt; rc->rc_nh_old = rt->rt_nhop; @@ -929,6 +932,7 @@ add_route_nhop(struct rib_head *rnh, struct rtentry *r /* Finalize notification */ rnh->rnh_gen++; + rnh->rnh_prefixes++; rc->rc_cmd = RTM_ADD; rc->rc_rt = rt; @@ -984,6 +988,8 @@ change_route_nhop(struct rib_head *rnh, struct rtentry /* Finalize notification */ rnh->rnh_gen++; + if (rnd->rnd_nhop == NULL) + rnh->rnh_prefixes--; rc->rc_cmd = (rnd->rnd_nhop != NULL) ? RTM_CHANGE : RTM_DELETE; rc->rc_rt = rt; @@ -1222,7 +1228,7 @@ allocate_subscription(rib_subscription_cb_t *f, void * enum rib_subscription_type type, bool waitok) { struct rib_subscription *rs; - int flags = M_ZERO | (waitok ? M_WAITOK : 0); + int flags = M_ZERO | (waitok ? M_WAITOK : M_NOWAIT); rs = malloc(sizeof(struct rib_subscription), M_RTABLE, flags); if (rs == NULL) @@ -1246,22 +1252,14 @@ rib_subscribe(uint32_t fibnum, int family, rib_subscri enum rib_subscription_type type, bool waitok) { struct rib_head *rnh; - struct rib_subscription *rs; struct epoch_tracker et; - if ((rs = allocate_subscription(f, arg, type, waitok)) == NULL) - return (NULL); - NET_EPOCH_ENTER(et); KASSERT((fibnum < rt_numfibs), ("%s: bad fibnum", __func__)); rnh = rt_tables_get_rnh(fibnum, family); - - RIB_WLOCK(rnh); - CK_STAILQ_INSERT_TAIL(>rnh_subscribers, rs, next); - RIB_WUNLOCK(rnh); NET_EPOCH_EXIT(et); - return (rs); + return (rib_subscribe_internal(rnh, f, arg, type, waitok)); } struct rib_subscription * @@ -1273,6 +1271,7 @@ rib_subscribe_internal(struct
Re: svn commit: r368124 - in head/sys: cam cam/ata cam/ctl cam/mmc cam/nvme cam/scsi compat/linprocfs compat/linux conf contrib/openzfs/module/os/freebsd/zfs dev/ahci dev/ata dev/firewire dev/flash de
On 28.11.2020 13:12, Konstantin Belousov wrote: Author: kib Date: Sat Nov 28 12:12:51 2020 New Revision: 368124 URL: https://svnweb.freebsd.org/changeset/base/368124 Log: Make MAXPHYS tunable. Bump MAXPHYS to 1M. Unfortunately, bumping MAXPHYS broke arm kernel. The kernel runs out of KVA while running 'pbuf' keg init function. This causes that keg_alloc_slab() always returns NULL and for cycle in uma_prealloc() newer ends (whish should be considered as another bug). Do you think that MAXPHYS constant can depends on given arch? 128k (or 256k) sounds reasonable for arm32 systems... Michal Replace MAXPHYS by runtime variable maxphys. It is initialized from MAXPHYS by default, but can be also adjusted with the tunable kern.maxphys. Make b_pages[] array in struct buf flexible. Size b_pages[] for buffer cache buffers exactly to atop(maxbcachebuf) (currently it is sized to atop(MAXPHYS)), and b_pages[] for pbufs is sized to atop(maxphys) + 1. The +1 for pbufs allow several pbuf consumers, among them vmapbuf(), to use unaligned buffers still sized to maxphys, esp. when such buffers come from userspace (*). Overall, we save significant amount of otherwise wasted memory in b_pages[] for buffer cache buffers, while bumping MAXPHYS to desired high value. Eliminate all direct uses of the MAXPHYS constant in kernel and driver sources, except a place which initialize maxphys. Some random (and arguably weird) uses of MAXPHYS, e.g. in linuxolator, are converted straight. Some drivers, which use MAXPHYS to size embeded structures, get private MAXPHYS-like constant; their convertion is out of scope for this work. Changes to cam/, dev/ahci, dev/ata, dev/mpr, dev/mpt, dev/mvs, dev/siis, where either submitted by, or based on changes by mav. Suggested by: mav (*) Reviewed by: imp, mav, imp, mckusick, scottl (intermediate versions) Tested by: pho Sponsored by:The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D27225 Modified: head/sys/cam/ata/ata_da.c head/sys/cam/cam_compat.c head/sys/cam/cam_periph.c head/sys/cam/cam_xpt.c head/sys/cam/ctl/ctl_backend_block.c head/sys/cam/mmc/mmc_da.c head/sys/cam/nvme/nvme_da.c head/sys/cam/scsi/scsi_cd.c head/sys/cam/scsi/scsi_da.c head/sys/cam/scsi/scsi_pass.c head/sys/cam/scsi/scsi_sa.c head/sys/cam/scsi/scsi_sg.c head/sys/cam/scsi/scsi_target.c head/sys/compat/linprocfs/linprocfs.c head/sys/compat/linux/linux_ioctl.c head/sys/conf/options head/sys/contrib/openzfs/module/os/freebsd/zfs/vdev_geom.c head/sys/contrib/openzfs/module/os/freebsd/zfs/zvol_os.c head/sys/dev/ahci/ahci.c head/sys/dev/ahci/ahci.h head/sys/dev/ahci/ahciem.c head/sys/dev/ata/ata-all.c head/sys/dev/ata/ata-all.h head/sys/dev/ata/ata-dma.c head/sys/dev/firewire/sbp.c head/sys/dev/flash/cqspi.c head/sys/dev/isci/scil/sci_controller_constants.h head/sys/dev/iscsi/iscsi.c head/sys/dev/md/md.c head/sys/dev/mfi/mfi.c head/sys/dev/mpr/mpr.c head/sys/dev/mps/mps.c head/sys/dev/mpt/mpt.c head/sys/dev/mpt/mpt.h head/sys/dev/mrsas/mrsas.c head/sys/dev/mvs/mvs.c head/sys/dev/mvs/mvs.h head/sys/dev/nvme/nvme.h head/sys/dev/nvme/nvme_ctrlr.c head/sys/dev/pms/freebsd/driver/ini/src/agdef.h head/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c head/sys/dev/sdhci/sdhci.c head/sys/dev/siis/siis.c head/sys/dev/siis/siis.h head/sys/dev/sym/sym_conf.h head/sys/dev/usb/storage/umass.c head/sys/dev/virtio/block/virtio_blk.c head/sys/dev/virtio/scsi/virtio_scsi.c head/sys/dev/xen/blkback/blkback.c head/sys/dev/xen/blkfront/blkfront.c head/sys/fs/cd9660/cd9660_vfsops.c head/sys/fs/ext2fs/ext2_vfsops.c head/sys/fs/fuse/fuse_vfsops.c head/sys/fs/msdosfs/msdosfs_vfsops.c head/sys/fs/udf/udf_vfsops.c head/sys/geom/cache/g_cache.c head/sys/geom/eli/g_eli_integrity.c head/sys/geom/geom_dev.c head/sys/geom/geom_io.c head/sys/geom/journal/g_journal.c head/sys/geom/journal/g_journal.h head/sys/geom/mirror/g_mirror.c head/sys/geom/nop/g_nop.c head/sys/geom/part/g_part_apm.c head/sys/geom/part/g_part_gpt.c head/sys/geom/part/g_part_ldm.c head/sys/geom/raid/md_ddf.c head/sys/geom/raid/md_promise.c head/sys/geom/raid3/g_raid3.c head/sys/geom/shsec/g_shsec.c head/sys/geom/stripe/g_stripe.c head/sys/geom/uzip/g_uzip.c head/sys/geom/vinum/geom_vinum_var.h head/sys/geom/virstor/g_virstor.c head/sys/geom/virstor/g_virstor.h head/sys/kern/kern_mib.c head/sys/kern/kern_physio.c head/sys/kern/kern_sendfile.c head/sys/kern/subr_param.c head/sys/kern/vfs_aio.c head/sys/kern/vfs_bio.c head/sys/kern/vfs_cluster.c head/sys/kern/vfs_default.c head/sys/mips/ingenic/jz4780_mmc.c head/sys/net/if.c head/sys/powerpc/mambo/mambo_disk.c head/sys/powerpc/mpc85xx/fsl_sata.c
Re: svn commit: r368130 - in head: share/man/man4 sys/dev/ftwd sys/modules sys/modules/ftwd
Rodney W. Grimes writes: > > Added: head/share/man/man4/ftwd.4 > > == > > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > > +++ head/share/man/man4/ftwd.4 Sat Nov 28 22:34:33 2020 > > (r368130) > > @@ -0,0 +1,66 @@ > > +.\" > > +.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD > > +.\" > > +.\" Copyright (c) 2012 Bjoern A. Zeeb > > +.\" Copyright (c) 2019 Andriy Gapon > > This appears to be a new file, perhaps cloned from some place else? > And later you assert that you wrote this manual page, > so shouldn't you also be the copyright holder? I started out with the itwb.4 page, and replaced a few lines of text, but all the markup, the order of things etc. etc, is from itwb.4. So ftwd.4 is indisputably a "derivative work" and therefore i left the copyrights from the original in. My own contribution hardly rises to the level of a protectable work, "mere recitation of facts" do not rise to the "original work" threshold, so I did not add myself to the copyright. > > +This manual page was written by > > +.An Poul-Henning Kamp Aq Mt p...@freebsd.org . > > Here you claim you wrote it... ... so that people reading the manual page know who to bother. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 p...@freebsd.org | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r368143 - head/sys/amd64/vmm
Author: kib Date: Sun Nov 29 10:32:38 2020 New Revision: 368143 URL: https://svnweb.freebsd.org/changeset/base/368143 Log: bhyve: limit max GPA to VM_MAXUSER_ADDRESS_LA48. We use 4-level EPT pages, correct the upper bound. Reviewed by: grehan Sponsored by: The FreeBSD Foundation Differential revision:https://reviews.freebsd.org/D27402 Modified: head/sys/amd64/vmm/vmm.c Modified: head/sys/amd64/vmm/vmm.c == --- head/sys/amd64/vmm/vmm.cSun Nov 29 10:30:56 2020(r368142) +++ head/sys/amd64/vmm/vmm.cSun Nov 29 10:32:38 2020(r368143) @@ -49,12 +49,12 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include #include #include #include #include -#include -#include #include #include #include @@ -483,7 +483,7 @@ vm_create(const char *name, struct vm **retvm) if (name == NULL || strlen(name) >= VM_MAX_NAMELEN) return (EINVAL); - vmspace = vmmops_vmspace_alloc(0, VM_MAXUSER_ADDRESS); + vmspace = vmmops_vmspace_alloc(0, VM_MAXUSER_ADDRESS_LA48); if (vmspace == NULL) return (ENOMEM); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r368142 - head/sys/kern
Author: kib Date: Sun Nov 29 10:30:56 2020 New Revision: 368142 URL: https://svnweb.freebsd.org/changeset/base/368142 Log: bio aio: Destroy ephemeral mapping before unwiring page. Apparently some architectures, like ppc in its hashed page tables variants, account mappings by pmap_qenter() in the response from pmap_is_page_mapped(). While there, eliminate useless userp variable. Noted and reviewed by:alc (previous version) Sponsored by: The FreeBSD Foundation Differential revision:https://reviews.freebsd.org/D27409 Modified: head/sys/kern/vfs_aio.c Modified: head/sys/kern/vfs_aio.c == --- head/sys/kern/vfs_aio.c Sun Nov 29 08:40:12 2020(r368141) +++ head/sys/kern/vfs_aio.c Sun Nov 29 10:30:56 2020(r368142) @@ -2339,24 +2339,23 @@ static void aio_biowakeup(struct bio *bp) { struct kaiocb *job = (struct kaiocb *)bp->bio_caller1; - struct proc *userp; struct kaioinfo *ki; size_t nbytes; int error, nblks; /* Release mapping into kernel space. */ - userp = job->userproc; - ki = userp->p_aioinfo; - vm_page_unhold_pages(job->pages, job->npages); if (job->pbuf != NULL) { pmap_qremove((vm_offset_t)job->pbuf->b_data, job->npages); + vm_page_unhold_pages(job->pages, job->npages); uma_zfree(pbuf_zone, job->pbuf); job->pbuf = NULL; atomic_subtract_int(_buf_aio, 1); + ki = job->userproc->p_aioinfo; AIO_LOCK(ki); ki->kaio_buffer_count--; AIO_UNLOCK(ki); } else { + vm_page_unhold_pages(job->pages, job->npages); free(job->pages, M_TEMP); atomic_subtract_int(_unmapped_aio, 1); } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r368130 - in head: share/man/man4 sys/dev/ftwd sys/modules sys/modules/ftwd
> Author: phk > Date: Sat Nov 28 22:34:33 2020 > New Revision: 368130 > URL: https://svnweb.freebsd.org/changeset/base/368130 > > Log: > Add watchdog(9) driver for the Fintek F81803 SuperIO chip > > Added: > head/share/man/man4/ftwd.4 (contents, props changed) > head/sys/dev/ftwd/ > head/sys/dev/ftwd/ftwd.c (contents, props changed) > head/sys/modules/ftwd/ > head/sys/modules/ftwd/Makefile (contents, props changed) > Modified: > head/share/man/man4/Makefile > head/sys/modules/Makefile > > Modified: head/share/man/man4/Makefile > == > --- head/share/man/man4/Makefile Sat Nov 28 18:09:16 2020 > (r368129) > +++ head/share/man/man4/Makefile Sat Nov 28 22:34:33 2020 > (r368130) > @@ -158,6 +158,7 @@ MAN= aac.4 \ > ffclock.4 \ > filemon.4 \ > firewire.4 \ > + ${_ftwd.4} \ > full.4 \ > fwe.4 \ > fwip.4 \ > @@ -785,6 +786,7 @@ _chvgpio.4= chvgpio.4 > _coretemp.4= coretemp.4 > _cpuctl.4= cpuctl.4 > _dpms.4= dpms.4 > +_ftwd.4= ftwd.4 > _hpt27xx.4= hpt27xx.4 > _hptiop.4= hptiop.4 > _hptmv.4=hptmv.4 > > Added: head/share/man/man4/ftwd.4 > == > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/share/man/man4/ftwd.4Sat Nov 28 22:34:33 2020 > (r368130) > @@ -0,0 +1,66 @@ > +.\" > +.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD > +.\" > +.\" Copyright (c) 2012 Bjoern A. Zeeb > +.\" Copyright (c) 2019 Andriy Gapon This appears to be a new file, perhaps cloned from some place else? And later you assert that you wrote this manual page, so shouldn't you also be the copyright holder? > +.\" > +.\" Redistribution and use in source and binary forms, with or without > +.\" modification, are permitted provided that the following conditions > +.\" are met: > +.\" 1. Redistributions of source code must retain the above copyright > +.\"notice, this list of conditions and the following disclaimer. > +.\" 2. Redistributions in binary form must reproduce the above copyright > +.\"notice, this list of conditions and the following disclaimer in the > +.\"documentation and/or other materials provided with the distribution. > +.\" > +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR > PURPOSE > +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR > CONSEQUENTIAL > +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, > STRICT > +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > +.\" SUCH DAMAGE. > +.\" > +.\" $FreeBSD$ > +.\" > +.Dd November 26, 2020 > +.Dt FTWD 4 > +.Os > +.Sh NAME > +.Nm ftwd > +.Nd Fintek F81803 watchdog timer > +.Sh SYNOPSIS > +To compile this driver into the kernel, place the following lines in your > +kernel configuration file: > +.Bd -ragged -offset indent > +.Cd "device superio" > +.Cd "device ftwd" > +.Ed > +.Pp > +Alternatively, to load the driver as a module at boot time, place the > following > +line in > +.Xr loader.conf 5 : > +.Bd -literal -offset indent > +ftwd_load="YES" > +.Ed > +.Sh DESCRIPTION > +The > +.Nm > +driver provides > +.Xr watchdog 4 > +support for the watchdog timer in the Fintek F81803 chip. > +.Sh SEE ALSO > +.Xr superio 4 , > +.Xr watchdog 4 , > +.Xr device.hints 5 , > +.Xr watchdog 8 , > +.Xr watchdogd 8 , > +.Xr watchdog 9 > +.Sh AUTHORS > +.An -nosplit > +This manual page was written by > +.An Poul-Henning Kamp Aq Mt p...@freebsd.org . Here you claim you wrote it... > > Added: head/sys/dev/ftwd/ftwd.c > == > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/dev/ftwd/ftwd.c Sat Nov 28 22:34:33 2020(r368130) > @@ -0,0 +1,157 @@ > +/*- > + * SPDX-License-Identifier: BSD-2-Clause > + * > + * Copyright (c) 2020 Poul-Henning Kamp > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + *notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above copyright > + *notice, this list of conditions and the following disclaimer in the > + *
svn commit: r368141 - in head/sys/arm: allwinner annapurna/alpine arm freescale/imx include mv versatile
Author: mmel Date: Sun Nov 29 08:40:12 2020 New Revision: 368141 URL: https://svnweb.freebsd.org/changeset/base/368141 Log: Remove the pre-ARMv6 and pre-INTRNG code. ARM has required ARMV6+ and INTRNg for some time now, so remove always false #ifdefs and unconditionally do always true #ifdefs. Deleted: head/sys/arm/annapurna/alpine/alpine_common.c head/sys/arm/freescale/imx/imx_common.c head/sys/arm/versatile/versatile_common.c Modified: head/sys/arm/allwinner/aw_gpio.c head/sys/arm/allwinner/files.allwinner head/sys/arm/annapurna/alpine/files.alpine head/sys/arm/arm/bcopyinout.S head/sys/arm/arm/bcopyinout_xscale.S head/sys/arm/arm/bus_space_base.c head/sys/arm/arm/copystr.S head/sys/arm/arm/cpuinfo.c head/sys/arm/arm/db_interface.c head/sys/arm/arm/debug_monitor.c head/sys/arm/arm/disassem.c head/sys/arm/arm/elf_machdep.c head/sys/arm/arm/exception.S head/sys/arm/arm/fiq.c head/sys/arm/arm/fusu.S head/sys/arm/arm/genassym.c head/sys/arm/arm/machdep.c head/sys/arm/arm/machdep_intr.c head/sys/arm/arm/machdep_kdb.c head/sys/arm/arm/mem.c head/sys/arm/arm/minidump_machdep.c head/sys/arm/arm/mp_machdep.c head/sys/arm/arm/nexus.c head/sys/arm/arm/stdatomic.c head/sys/arm/arm/sys_machdep.c head/sys/arm/arm/vm_machdep.c head/sys/arm/freescale/imx/files.imx5 head/sys/arm/include/_align.h head/sys/arm/include/armreg.h head/sys/arm/include/asmacros.h head/sys/arm/include/atomic-v6.h head/sys/arm/include/bus.h head/sys/arm/include/bus_dma.h head/sys/arm/include/cpu-v6.h head/sys/arm/include/cpufunc.h head/sys/arm/include/cpuinfo.h head/sys/arm/include/db_machdep.h head/sys/arm/include/debug_monitor.h head/sys/arm/include/fdt.h head/sys/arm/include/frame.h head/sys/arm/include/intr.h head/sys/arm/include/kdb.h head/sys/arm/include/machdep.h head/sys/arm/include/pcpu.h head/sys/arm/include/proc.h head/sys/arm/include/sf_buf.h head/sys/arm/include/sysarch.h head/sys/arm/include/sysreg.h head/sys/arm/include/vm.h head/sys/arm/mv/gpio.c head/sys/arm/mv/mpic.c head/sys/arm/mv/mv_common.c head/sys/arm/mv/mv_pci.c head/sys/arm/versatile/files.versatile Modified: head/sys/arm/allwinner/aw_gpio.c == --- head/sys/arm/allwinner/aw_gpio.cSun Nov 29 01:43:04 2020 (r368140) +++ head/sys/arm/allwinner/aw_gpio.cSun Nov 29 08:40:12 2020 (r368141) @@ -62,10 +62,7 @@ __FBSDID("$FreeBSD$"); #include "opt_soc.h" #endif -#ifdef INTRNG #include "pic_if.h" -#endif - #include "gpio_if.h" #defineAW_GPIO_DEFAULT_CAPS(GPIO_PIN_INPUT | GPIO_PIN_OUTPUT | \ @@ -257,7 +254,6 @@ struct clk_list { clk_t clk; }; -#ifdef INTRNG struct gpio_irqsrc { struct intr_irqsrc isrc; u_int irq; @@ -269,7 +265,6 @@ struct gpio_irqsrc { uint32_toldfunc; boolenabled; }; -#endif #defineAW_GPIO_MEMRES 0 #defineAW_GPIO_IRQRES 1 @@ -286,10 +281,8 @@ struct aw_gpio_softc { struct aw_gpio_conf *conf; TAILQ_HEAD(, clk_list) clk_list; -#ifdef INTRNG struct gpio_irqsrc *gpio_pic_irqsrc; int nirqs; -#endif }; static struct resource_spec aw_gpio_res_spec[] = { @@ -1071,10 +1064,8 @@ aw_gpio_attach(device_t dev) goto fail; } -#ifdef INTRNG aw_gpio_register_isrcs(sc); intr_pic_register(dev, OF_xref_from_node(ofw_bus_get_node(dev))); -#endif sc->sc_busdev = gpiobus_attach_bus(dev); if (sc->sc_busdev == NULL) @@ -1451,7 +1442,6 @@ static device_method_t aw_gpio_methods[] = { DEVMETHOD(device_attach,aw_gpio_attach), DEVMETHOD(device_detach,aw_gpio_detach), -#ifdef INTRNG /* Interrupt controller interface */ DEVMETHOD(pic_disable_intr, aw_gpio_pic_disable_intr), DEVMETHOD(pic_enable_intr, aw_gpio_pic_enable_intr), @@ -1461,7 +1451,6 @@ static device_method_t aw_gpio_methods[] = { DEVMETHOD(pic_post_filter, aw_gpio_pic_post_filter), DEVMETHOD(pic_post_ithread, aw_gpio_pic_post_ithread), DEVMETHOD(pic_pre_ithread, aw_gpio_pic_pre_ithread), -#endif /* GPIO protocol */ DEVMETHOD(gpio_get_bus, aw_gpio_get_bus), Modified: head/sys/arm/allwinner/files.allwinner == --- head/sys/arm/allwinner/files.allwinner Sun Nov 29 01:43:04 2020 (r368140) +++ head/sys/arm/allwinner/files.allwinner Sun Nov 29 08:40:12 2020 (r368141) @@ -10,7 +10,7 @@ arm/allwinner/aw_if_dwc.c optionaldwc arm/allwinner/aw_machdep.c standard arm/allwinner/aw_mmc.c optionalmmc | mmccam