Compare commits

...
Author SHA1 Message Date
Glen Barber 70cb68e7a0 12.3: update to -RELEASE
- Switch releng/12.3 from RC2 to RELEASE.
- Add the anticipated 12.3-RELEASE date to UPDATING.
- Set a static __FreeBSD_version.

Approved by:	re (implicit)
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2021-12-01 19:08:38 -05:00
Allan Jude 8ffcfb399b openssl: Fix detection of ARMv7 and ARM64 CPU features
OpenSSL assumes the same value for AT_HWCAP=16 (Linux)
So it ends up calling elf_auxv_info() with AT_CANARY which
returns ENOENT, and all acceleration features are disabled.

With this, my ARM64 test machine runs the benchmark
`openssl speed -evp aes-256-gcm` nearly 20x faster
going from 100 MB/sec to 2000 MB/sec

It also improves sha256 from 300 MB/sec to 1800 MB/sec

This fix has been accepted but not yet merged upstream:
https://github.com/openssl/openssl/pull/17082

PR:		259937
Reviewed by:	manu, imp
Approved by:	re (gjb)
Relnotes:	yes
Fixes:		88e852c0b5 ("OpenSSL: Merge OpenSSL 1.1.1j")
Sponsored by:	Ampere Computing LLC
Sponsored by:	Klara Inc.
Differential Revision:	https://reviews.freebsd.org/D33060

(cherry picked from commit d9bb798725)
(cherry picked from commit 0ed191d116)
2021-11-22 18:59:32 +00:00
Mark Johnston 68396709e7 libctf: Improve check for duplicate SOU definitions in ctf_add_type()
When copying a struct or union from one CTF container to another,
ctf_add_type() checks whether it matches an existing type in the
destination container.  It does so by looking for a type with the same
name and kind as the new type, and if one exists, it iterates over all
members of the source type and checks whether a member with matching
name and offset exists in the matched destination type.  This can
produce false positives, for example because member types are not
compared, but this is not expected to arise in practice.  If the match
fails, ctf_add_type() returns an error.

The procedure used for member comparison breaks down in the face of
anonymous struct and union members.  ctf_member_iter() visits each
member in the source definition and looks up the corresponding member in
the desination definition by name using ctf_member_info(), but this
function will descend into anonymous members and thus fail to match.
Fix the problem by introducing a custom comparison routine which does
not assume member names are unique.  This should also be faster for
types with many members; in the previous scheme, membcmp() would perform
a linear scan of the desination type's members to perform a lookup by
name.  The new routine steps through the members of both types in a
single loop.

Approved by:	re (gjb)
PR:		258763
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 105fd928b0)
(cherry picked from commit 39545ce06c)
2021-11-22 11:32:18 -05:00
Jonathan T. Looney 22082f15f9 When copying types from one CTF container to another, ensure that we
always copy intrinsic data types before copying bitfields which are
based on those types. This ensures the type ordering in the destination
CTF container matches the assumption made elsewhere in the CTF code
that instrinsic data types will always appear before bitfields based on
those types.

This resolves the following error message some users have seen after
r366908:
    "/usr/lib/dtrace/ipfw.d", line 121: failed to copy type of 'ip6p':
    Conflicting type is already defined

Reviewed by:	markj
Approved by:	re (gjb)
Sponsored by:	Netflix

(cherry picked from commit 3cbb4cc200)
(cherry picked from commit 4faff19d63)
2021-11-22 11:31:45 -05:00
Eugene Grosbein f266886dd0 MFC: rc.d/rctl: unbreak for distinct /usr filesystem
Both rctl and used xargs utility live in /usr/bin
so add REQUIRE: FILESYSTEMS

Approved by:	re (gjb)
Reported by:	Peter <[email protected]>

(cherry picked from commit 0c54fe172a)
(cherry picked from commit 92b40444d0)
2021-11-22 14:36:39 +07:00
Martin Matuska 43040454e9 libarchive: cherry-pick bugfix from vendor
Vendor commit message (ede459d2e):
  archive_write_disk_posix: fix writing fflags broken in 8a1bd5c

  The fixup list was erroneously assumed to be directories only.
  Only in the case of critical file flags modification (e.g.
  SF_IMMUTABLE on BSD systems), other file types (e.g. regular files
  or symbolic links) may be added to the fixup list. We still need to
  verify that we are writing to the correct file type, so compare the
  archive entry file type with the file type of the file to be
  modified.

Fixes vendor issue #1617:
  Immutable flag no longer preserved during tar extraction on FreeBSD

Approved by:		re (gjb)
Reported by:		markj
Libarchive commit:	ede459d2ebb879f5eedb6f7abea203be0b334230

(cherry picked from commit 201d0ebee3)
(cherry picked from commit f2b106ec4e)
2021-11-21 19:03:56 +01:00
Glen Barber 53f057b3f4 12.3: update to RC2
Approved by:	re (implicit)
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2021-11-17 19:04:36 -05:00
Peter Grehan d9d6250477 igc: Use hardware routine for PHY reset
Summary:
The previously used software reset routine wasn't sufficient
to reset the PHY if the	bootloader hadn't left the device in
an initialized state. This was seen with the onboard igc port
on an 11th-gen Intel NUC.

The software reset isn't used in the Linux driver so all related
code has been removed.

Tested on: Netgate 6100 onboard ports, a discrete PCIe I225-LM card,
and an 11th-gen Intel NUC.

Approved by:	re (gjb)
Reported by:	woodsb02
Tested by:	woodsb02 (NUC)
Sponsored by:	Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 561cd74b17)
(cherry picked from commit 267a39780e)
2021-11-14 11:41:25 +10:00
Peter Grehan 3d093d5b00 igc: correctly update RCTL when changing multicast filters.
Fix clearing of bits in RCTL for the non-bpf/non-allmulti case.
Update RCTL after modifying the multicast filter registers as per
the Linux driver.

This fixes LACP on igc interfaces, where incoming LACP multicasti
control packets were being dropped.

Approved by:	re  (gjb)
Obtained from:	Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 5a3eb6207a)
(cherry picked from commit 73e1138208)
2021-11-14 11:40:32 +10:00
Glen Barber 35a5a941bf 12.3: update DVD pkg configuration
Use the release_3 package repository to populate the dvd1.iso
images.

Approved by:	re (implicit)
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2021-11-12 10:29:53 -05:00
Glen Barber 76cbfe08b4 12.3: update to RC1
Approved by:	re (implicit)
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2021-11-10 19:01:38 -05:00
Mark Johnston f552d2c115 scsi_cd: Improve TOC access validation
1. During CD probing, we read the TOC header to find the number of
   entries, then read the TOC itself.  The header determines the number
   of entries, which determines the amount of data to read from the
   device into the softc in the CD_STATE_MEDIA_TOC_FULL state.  We
   hard-code a limit of 99 tracks (plus one for the lead-out) in the
   softc, but were not validating that the size reported by the media
   would fit in this hard-coded limit.  Kernel memory corruption could
   occur if not.[1]  Add validation to check this, and refuse to cache
   the TOC if it would not fit.

2. The CDIOCPLAYTRACKS ioctl uses caller provided track numbers to index
   into the TOC, but we only validate the starting index.  Add
   validation of the ending index.

Also, raise the hard-coded limit from 100 tracks to 170, per a
suggestion from Ken.

Approved by:	re (gjb)
Reported by:	C Turt <[email protected]> [1]
Reviewed by:	ken, avg
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 6afabf0092)
(cherry picked from commit f607b686f9)
2021-11-10 09:57:14 -05:00
Glen Barber aab2bfc127 12.3: update to BETA3
Approved by:	re (implicit)
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2021-11-03 21:07:01 -04:00
Hans Petter Selasky 791f88fff3 usb(4): Fix for use after free in combination with EVDEV_SUPPORT.
When EVDEV_SUPPORT was introduced, the USB transfers may be running
after the main FIFO is closed. In connection to this a race may appear
which can lead to use-after-free scenarios. Fix this for all FIFO
consumers by initializing and resetting the FIFO queues under the
lock used by the client. Then the client driver will see an empty
queue in all cases a race may appear.

Approved by:	re@ (gjb)
Found by:	pho@
Sponsored by:	NVIDIA Networking

(cherry picked from commit aad0c65d6b)
(cherry picked from commit bb9bee1ffb)
2021-11-03 18:39:23 +01:00
Glen Barber 5f6e6bef15 12.3: Update to BETA2
Approved by:	re (implicit)
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2021-10-27 20:00:45 -04:00
Kyle Evans 3a504205e4 cmp: initialize limit to avoid stack garbage limits
Approved by:	re (gjb)
Pointy hat:	kevans
Fixes:	4e380e8474 ("cmp: add -n, --bytes to limit number of bytes [...]")
Sponsored by:	Klara, Inc.

(cherry picked from commit f1f7f31366)
(cherry picked from commit aba2dc46df)
2021-10-26 02:47:17 -05:00
Philip Paeps 30ae8267b9 contrib/tzdata: correct DST in Palestine
Direct commit to stable/12.

Merge the corrected DST transition date from tzdata 2021e.  This
corrects future timestamps in Palestine.

Approved by:	re (blanket)

(cherry picked from commit 89e293e5dc)
2021-10-25 01:12:50 +00:00
Philip Paeps bee91a0e8b contrib/tzdata: correct DST in Fiji
Direct commit to stable/12.

Unfortunately, there is still no clear consensus on the tz mailing list
about some of the changes introduced by tzdata 2021b and later releases.
Pending consensus, only merge the recently announced DST transition date
for Fiji and corrections to commentary from tzdata 2021d.  This corrects
future timestamps in Fiji.

Approved by:	re (gjb)

(cherry picked from commit 74a0f31dbb)
2021-10-24 11:11:20 +08:00
Glen Barber b9c0a61651 Revert "12.3: Makefile: add a newline to validate the git->svn exporter"
This reverts commit 51a3024ee7.

Approved by:	re (implicit)
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2021-10-21 19:08:30 -04:00
Glen Barber 51a3024ee7 12.3: Makefile: add a newline to validate the git->svn exporter
Approved by:	re (implicit)
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2021-10-21 18:47:31 -04:00
Glen Barber 27c4d9242b 12.3: create releng/12.3 branch
Update from PRERELEASE to BETA1
switch pkg(8) configuration to use 'quarterly'
Bump __FreeBSD_version

Approved by:	re (implicit)
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2021-10-20 20:44:32 -04:00
23 changed files with 293 additions and 166 deletions

No files matched your search

+3
View File
@@ -17,6 +17,9 @@ from older versions of FreeBSD, try WITHOUT_CLANG and WITH_GCC to bootstrap to
the tip of head, and then rebuild without this option. The bootstrap process
from older version of current across the gcc/clang cutover is a bit fragile.
20211206:
12.3-RELEASE.
20210730:
Commit b69019c14cd8 removes pf's DIOCGETSTATESNV ioctl.
As of be70c7a50d32 it is no longer used by userspace, but it does mean
@@ -1196,17 +1196,6 @@ enumadd(const char *name, int value, void *arg)
name, value) == CTF_ERR);
}
/*ARGSUSED*/
static int
membcmp(const char *name, ctf_id_t type, ulong_t offset, void *arg)
{
ctf_bundle_t *ctb = arg;
ctf_membinfo_t ctm;
return (ctf_member_info(ctb->ctb_file, ctb->ctb_type,
name, &ctm) == CTF_ERR || ctm.ctm_offset != offset);
}
static int
membadd(const char *name, ctf_id_t type, ulong_t offset, void *arg)
{
@@ -1240,6 +1229,71 @@ membadd(const char *name, ctf_id_t type, ulong_t offset, void *arg)
return (0);
}
static long
soucmp(ctf_file_t *src_fp, ctf_id_t src_type, ctf_file_t *dst_fp,
ctf_id_t dst_type)
{
const struct ctf_type *src_tp, *dst_tp;
const char *src_name, *dst_name;
ssize_t src_sz, dst_sz, src_inc, dst_inc;
uint_t kind, n;
if ((src_type = ctf_type_resolve(src_fp, src_type)) == CTF_ERR)
return (CTF_ERR);
if ((dst_type = ctf_type_resolve(dst_fp, dst_type)) == CTF_ERR)
return (CTF_ERR);
if ((src_tp = ctf_lookup_by_id(&src_fp, src_type)) == NULL)
return (CTF_ERR);
if ((dst_tp = ctf_lookup_by_id(&dst_fp, dst_type)) == NULL)
return (CTF_ERR);
if ((kind = LCTF_INFO_KIND(src_fp, src_tp->ctt_info)) !=
LCTF_INFO_KIND(dst_fp, dst_tp->ctt_info))
return (ctf_set_errno(dst_fp, ECTF_CONFLICT));
if (kind != CTF_K_STRUCT && kind != CTF_K_UNION)
return (ctf_set_errno(dst_fp, ECTF_CONFLICT));
if ((n = LCTF_INFO_VLEN(src_fp, src_tp->ctt_info)) !=
LCTF_INFO_VLEN(dst_fp, dst_tp->ctt_info))
return (ctf_set_errno(dst_fp, ECTF_CONFLICT));
(void) ctf_get_ctt_size(src_fp, src_tp, &src_sz, &src_inc);
(void) ctf_get_ctt_size(dst_fp, dst_tp, &dst_sz, &dst_inc);
if (src_sz != dst_sz || src_inc != dst_inc)
return (ctf_set_errno(dst_fp, ECTF_CONFLICT));
if (src_sz < CTF_LSTRUCT_THRESH) {
const ctf_member_t *src_mp, *dst_mp;
src_mp = (const ctf_member_t *)((uintptr_t)src_tp + src_inc);
dst_mp = (const ctf_member_t *)((uintptr_t)dst_tp + dst_inc);
for (; n != 0; n--, src_mp++, dst_mp++) {
if (src_mp->ctm_offset != dst_mp->ctm_offset)
return (ctf_set_errno(dst_fp, ECTF_CONFLICT));
src_name = ctf_strptr(src_fp, src_mp->ctm_name);
dst_name = ctf_strptr(dst_fp, dst_mp->ctm_name);
if (strcmp(src_name, dst_name) != 0)
return (ctf_set_errno(dst_fp, ECTF_CONFLICT));
}
} else {
const ctf_lmember_t *src_mp, *dst_mp;
src_mp = (const ctf_lmember_t *)((uintptr_t)src_tp + src_inc);
dst_mp = (const ctf_lmember_t *)((uintptr_t)dst_tp + dst_inc);
for (; n != 0; n--, src_mp++, dst_mp++) {
if (src_mp->ctlm_offsethi != dst_mp->ctlm_offsethi ||
src_mp->ctlm_offsetlo != dst_mp->ctlm_offsetlo)
return (ctf_set_errno(dst_fp, ECTF_CONFLICT));
src_name = ctf_strptr(src_fp, src_mp->ctlm_name);
dst_name = ctf_strptr(dst_fp, dst_mp->ctlm_name);
if (strcmp(src_name, dst_name) != 0)
return (ctf_set_errno(dst_fp, ECTF_CONFLICT));
}
}
return (0);
}
/*
* The ctf_add_type routine is used to copy a type from a source CTF container
* to a dynamic destination container. This routine operates recursively by
@@ -1258,7 +1312,7 @@ ctf_add_type(ctf_file_t *dst_fp, ctf_file_t *src_fp, ctf_id_t src_type)
uint_t kind, flag, vlen;
ctf_bundle_t src, dst;
ctf_encoding_t src_en, dst_en;
ctf_encoding_t src_en, main_en, dst_en;
ctf_arinfo_t src_ar, dst_ar;
ctf_dtdef_t *dtd;
@@ -1373,6 +1427,27 @@ ctf_add_type(ctf_file_t *dst_fp, ctf_file_t *src_fp, ctf_id_t src_type)
if (ctf_type_encoding(src_fp, src_type, &src_en) != 0)
return (ctf_set_errno(dst_fp, ctf_errno(src_fp)));
/*
* This could be a bitfield, and the CTF library assumes
* intrinsics will appear before bitfields. Therefore,
* try to copy over the intrinsic prior to copying the
* bitfield.
*/
if (dst_type == CTF_ERR && name[0] != '\0' &&
(hep = ctf_hash_lookup(&src_fp->ctf_names, src_fp, name,
strlen(name))) != NULL &&
src_type != (ctf_id_t)hep->h_type) {
if (ctf_type_encoding(src_fp, (ctf_id_t)hep->h_type,
&main_en) != 0) {
return (ctf_set_errno(dst_fp,
ctf_errno(src_fp)));
}
if (bcmp(&src_en, &main_en, sizeof (ctf_encoding_t)) &&
ctf_add_type(dst_fp, src_fp,
(ctf_id_t)hep->h_type) == CTF_ERR)
return (CTF_ERR); /* errno is set for us */
}
if (dst_type != CTF_ERR) {
if (ctf_type_encoding(dst_fp, dst_type, &dst_en) != 0)
return (CTF_ERR); /* errno is set for us */
@@ -1439,23 +1514,15 @@ ctf_add_type(ctf_file_t *dst_fp, ctf_file_t *src_fp, ctf_id_t src_type)
ctf_dmdef_t *dmd;
int errs = 0;
/*
* Technically to match a struct or union we need to check both
* ways (src members vs. dst, dst members vs. src) but we make
* this more optimal by only checking src vs. dst and comparing
* the total size of the structure (which we must do anyway)
* which covers the possibility of dst members not in src.
* This optimization can be defeated for unions, but is so
* pathological as to render it irrelevant for our purposes.
*/
if (dst_type != CTF_ERR && dst_kind != CTF_K_FORWARD) {
if (ctf_type_size(src_fp, src_type) !=
ctf_type_size(dst_fp, dst_type))
return (ctf_set_errno(dst_fp, ECTF_CONFLICT));
if (ctf_member_iter(src_fp, src_type, membcmp, &dst))
return (ctf_set_errno(dst_fp, ECTF_CONFLICT));
/*
* Compare the sizes and fields of the two types.
* The field comparisons only check the names and
* offsets, so this is not perfect but is good enough
* for scenarios that we care about.
*/
if (soucmp(src_fp, src_type, dst_fp, dst_type) != 0)
return (CTF_ERR); /* errno is set for us */
break;
}
@@ -173,6 +173,7 @@ struct fixup_entry {
struct fixup_entry *next;
struct archive_acl acl;
mode_t mode;
__LA_MODE_T filetype;
int64_t atime;
int64_t birthtime;
int64_t mtime;
@@ -357,6 +358,7 @@ struct archive_write_disk {
static int la_opendirat(int, const char *);
static int la_mktemp(struct archive_write_disk *);
static int la_verify_filetype(mode_t, __LA_MODE_T);
static void fsobj_error(int *, struct archive_string *, int, const char *,
const char *);
static int check_symlinks_fsobj(char *, int *, struct archive_string *,
@@ -464,6 +466,39 @@ la_opendirat(int fd, const char *path) {
#endif
}
static int
la_verify_filetype(mode_t mode, __LA_MODE_T filetype) {
int ret = 0;
switch (filetype) {
case AE_IFREG:
ret = (S_ISREG(mode));
break;
case AE_IFDIR:
ret = (S_ISDIR(mode));
break;
case AE_IFLNK:
ret = (S_ISLNK(mode));
break;
case AE_IFSOCK:
ret = (S_ISSOCK(mode));
break;
case AE_IFCHR:
ret = (S_ISCHR(mode));
break;
case AE_IFBLK:
ret = (S_ISBLK(mode));
break;
case AE_IFIFO:
ret = (S_ISFIFO(mode));
break;
default:
break;
}
return (ret);
}
static int
lazy_stat(struct archive_write_disk *a)
{
@@ -822,6 +857,7 @@ _archive_write_disk_header(struct archive *_a, struct archive_entry *entry)
fe = current_fixup(a, archive_entry_pathname(entry));
if (fe == NULL)
return (ARCHIVE_FATAL);
fe->filetype = archive_entry_filetype(entry);
fe->fixup |= TODO_MODE_BASE;
fe->mode = a->mode;
}
@@ -832,6 +868,7 @@ _archive_write_disk_header(struct archive *_a, struct archive_entry *entry)
fe = current_fixup(a, archive_entry_pathname(entry));
if (fe == NULL)
return (ARCHIVE_FATAL);
fe->filetype = archive_entry_filetype(entry);
fe->mode = a->mode;
fe->fixup |= TODO_TIMES;
if (archive_entry_atime_is_set(entry)) {
@@ -865,6 +902,7 @@ _archive_write_disk_header(struct archive *_a, struct archive_entry *entry)
fe = current_fixup(a, archive_entry_pathname(entry));
if (fe == NULL)
return (ARCHIVE_FATAL);
fe->filetype = archive_entry_filetype(entry);
fe->fixup |= TODO_ACLS;
archive_acl_copy(&fe->acl, archive_entry_acl(entry));
}
@@ -877,6 +915,7 @@ _archive_write_disk_header(struct archive *_a, struct archive_entry *entry)
fe = current_fixup(a, archive_entry_pathname(entry));
if (fe == NULL)
return (ARCHIVE_FATAL);
fe->filetype = archive_entry_filetype(entry);
fe->mac_metadata = malloc(metadata_size);
if (fe->mac_metadata != NULL) {
memcpy(fe->mac_metadata, metadata,
@@ -891,6 +930,7 @@ _archive_write_disk_header(struct archive *_a, struct archive_entry *entry)
fe = current_fixup(a, archive_entry_pathname(entry));
if (fe == NULL)
return (ARCHIVE_FATAL);
fe->filetype = archive_entry_filetype(entry);
fe->fixup |= TODO_FFLAGS;
/* TODO: Complete this.. defer fflags from below. */
}
@@ -2463,7 +2503,7 @@ _archive_write_disk_close(struct archive *_a)
struct fixup_entry *next, *p;
struct stat st;
char *c;
int fd, ret;
int fd, ret, openflags;
archive_check_magic(&a->archive, ARCHIVE_WRITE_DISK_MAGIC,
ARCHIVE_STATE_HEADER | ARCHIVE_STATE_DATA,
@@ -2490,32 +2530,53 @@ _archive_write_disk_close(struct archive *_a)
if (p->fixup == 0)
goto skip_fixup_entry;
else {
fd = open(p->name, O_BINARY | O_NOFOLLOW | O_RDONLY
#if defined(O_DIRECTORY)
| O_DIRECTORY
#endif
| O_CLOEXEC);
/*
` * If we don't support O_DIRECTORY,
* or open() has failed, we must stat()
* to verify that we are opening a directory
* We need to verify if the type of the file
* we are going to open matches the file type
* of the fixup entry.
*/
openflags = O_BINARY | O_NOFOLLOW | O_RDONLY
| O_CLOEXEC;
#if defined(O_DIRECTORY)
if (fd == -1) {
if (p->filetype == AE_IFDIR)
openflags |= O_DIRECTORY;
#endif
fd = open(p->name, openflags);
#if defined(O_DIRECTORY)
/*
* If we support O_DIRECTORY and open was
* successful we can skip the file type check
* for directories. For other file types
* we need to verify via fstat() or lstat()
*/
if (fd == -1 || p->filetype != AE_IFDIR) {
#if HAVE_FSTAT
if (fd > 0 && (
fstat(fd, &st) != 0 ||
la_verify_filetype(st.st_mode,
p->filetype) == 0)) {
goto skip_fixup_entry;
} else
#endif
if (lstat(p->name, &st) != 0 ||
!S_ISDIR(st.st_mode)) {
la_verify_filetype(st.st_mode,
p->filetype) == 0) {
goto skip_fixup_entry;
}
}
#else
#if HAVE_FSTAT
if (fd > 0 && (
fstat(fd, &st) != 0 || !S_ISDIR(st.st_mode))) {
fstat(fd, &st) != 0 ||
la_verify_filetype(st.st_mode,
p->filetype) == 0)) {
goto skip_fixup_entry;
} else
#endif
if (lstat(p->name, &st) != 0 ||
!S_ISDIR(st.st_mode)) {
la_verify_filetype(st.st_mode,
p->filetype) == 0) {
goto skip_fixup_entry;
}
#endif
@@ -2689,6 +2750,7 @@ new_fixup(struct archive_write_disk *a, const char *pathname)
fe->next = a->fixup_list;
a->fixup_list = fe;
fe->fixup = 0;
fe->filetype = 0;
fe->name = strdup(pathname);
return (fe);
}
@@ -3811,6 +3873,7 @@ set_fflags(struct archive_write_disk *a)
le = current_fixup(a, a->name);
if (le == NULL)
return (ARCHIVE_FATAL);
le->filetype = archive_entry_filetype(a->entry);
le->fixup |= TODO_FFLAGS;
le->fflags_set = set;
/* Store the mode if it's not already there. */
+13 -6
View File
@@ -3388,11 +3388,6 @@ Zone Asia/Karachi 4:28:12 - LMT 1907
# shall [end] on Oct 24th 2020 at 01:00AM by delaying the clock by 60 minutes.
# http://www.palestinecabinet.gov.ps/portal/Meeting/Details/51584
# From Tim Parenti (2020-10-20):
# Predict future fall transitions at 01:00 on the Saturday preceding October's
# last Sunday (i.e., Sat>=24). This is consistent with our predictions since
# 2016, although the time of the change differed slightly in 2019.
# From Pierre Cashon (2020-10-20):
# The summer time this year started on March 28 at 00:00.
# https://wafa.ps/ar_page.aspx?id=GveQNZa872839351758aGveQNZ
@@ -3405,6 +3400,17 @@ Zone Asia/Karachi 4:28:12 - LMT 1907
# For now, guess spring-ahead transitions are at 00:00 on the Saturday
# preceding March's last Sunday (i.e., Sat>=24).
# From P Chan (2021-10-18):
# http://wafa.ps/Pages/Details/34701
# Palestine winter time will start from midnight 2021-10-29 (Thursday-Friday).
#
# From Heba Hemad, Palestine Ministry of Telecom & IT (2021-10-20):
# ... winter time will begin in Palestine from Friday 10-29, 01:00 AM
# by 60 minutes backwards.
#
# From Paul Eggert (2021-10-20):
# Guess future fall transitions on October's last Friday at 01:00.
# Rule NAME FROM TO - IN ON AT SAVE LETTER/S
Rule EgyptAsia 1957 only - May 10 0:00 1:00 S
Rule EgyptAsia 1957 1958 - Oct 1 0:00 0 -
@@ -3440,7 +3446,8 @@ Rule Palestine 2016 2018 - Oct Sat>=24 1:00 0 -
Rule Palestine 2019 only - Mar 29 0:00 1:00 S
Rule Palestine 2019 only - Oct Sat>=24 0:00 0 -
Rule Palestine 2020 max - Mar Sat>=24 0:00 1:00 S
Rule Palestine 2020 max - Oct Sat>=24 1:00 0 -
Rule Palestine 2020 only - Oct 24 1:00 0 -
Rule Palestine 2021 max - Oct lastFri 1:00 0 -
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone Asia/Gaza 2:17:52 - LMT 1900 Oct
+19 -5
View File
@@ -385,9 +385,22 @@ Zone Indian/Cocos 6:27:40 - LMT 1900
# "Minister for Employment, Parveen Bala says they had never thought of
# stopping daylight saving. He says it was just to decide on when it should
# start and end. Bala says it is a short period..."
# Since the end date is still in line with our ongoing predictions, assume for
# now that the later-than-usual start date is a one-time departure from the
# recent second Sunday in November pattern.
#
# From Tim Parenti (2021-10-11), per Jashneel Kumar (2021-10-11) and P Chan
# (2021-10-12):
# https://www.fiji.gov.fj/Media-Centre/Speeches/English/PM-BAINIMARAMA-S-COVID-19-ANNOUNCEMENT-10-10-21
# https://www.fbcnews.com.fj/news/covid-19/curfew-moved-back-to-11pm/
# In a 2021-10-10 speech concerning updated Covid-19 mitigation measures in
# Fiji, prime minister Josaia Voreqe "Frank" Bainimarama announced the
# suspension of DST for the 2021/2022 season: "Given that we are in the process
# of readjusting in the midst of so many changes, we will also put Daylight
# Savings Time on hold for this year. It will also make the reopening of
# scheduled commercial air service much smoother if we don't have to be
# concerned shifting arrival and departure times, which may look like a simple
# thing but requires some significant logistical adjustments domestically and
# internationally."
# Assume for now that DST will resume with the recent pre-2020 rules for the
# 2022/2023 season.
# Rule NAME FROM TO - IN ON AT SAVE LETTER/S
Rule Fiji 1998 1999 - Nov Sun>=1 2:00 1:00 -
@@ -399,10 +412,11 @@ Rule Fiji 2011 only - Mar Sun>=1 3:00 0 -
Rule Fiji 2012 2013 - Jan Sun>=18 3:00 0 -
Rule Fiji 2014 only - Jan Sun>=18 2:00 0 -
Rule Fiji 2014 2018 - Nov Sun>=1 2:00 1:00 -
Rule Fiji 2015 max - Jan Sun>=12 3:00 0 -
Rule Fiji 2015 2021 - Jan Sun>=12 3:00 0 -
Rule Fiji 2019 only - Nov Sun>=8 2:00 1:00 -
Rule Fiji 2020 only - Dec 20 2:00 1:00 -
Rule Fiji 2021 max - Nov Sun>=8 2:00 1:00 -
Rule Fiji 2022 max - Nov Sun>=8 2:00 1:00 -
Rule Fiji 2023 max - Jan Sun>=12 3:00 0 -
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone Pacific/Fiji 11:55:44 - LMT 1915 Oct 26 # Suva
12:00 Fiji +12/+13
+8 -5
View File
@@ -822,7 +822,7 @@ Zone Europe/Andorra 0:06:04 - LMT 1901
# Shanks & Pottenger give 02:00, the BEV 00:00. Go with the BEV,
# and guess 02:00 for 1945-04-12.
# From Alois Triendl (2019-07-22):
# From Alois Treindl (2019-07-22):
# In 1946 the end of DST was on Monday, 7 October 1946, at 3:00 am.
# Shanks had this right. Source: Die Weltpresse, 5. Oktober 1946, page 5.
@@ -1736,19 +1736,22 @@ Zone Atlantic/Reykjavik -1:28 - LMT 1908
# advanced to sixty minutes later starting at hour two on 1944-04-02; ...
# Starting at hour three on the date 1944-09-17 standard time will be resumed.
#
# From Alois Triendl (2019-07-02):
# From Alois Treindl (2019-07-02):
# I spent 6 Euros to buy two archive copies of Il Messaggero, a Roman paper,
# for 1 and 2 April 1944. The edition of 2 April has this note: "Tonight at 2
# am, put forward the clock by one hour. Remember that in the night between
# today and Monday the 'ora legale' will come in force again." That makes it
# clear that in Rome the change was on Monday, 3 April 1944 at 2 am.
#
# From Paul Eggert (2016-10-27):
# From Paul Eggert (2021-10-05):
# Go with INRiM for DST rules, except as corrected by Inglis for 1944
# for the Kingdom of Italy. This is consistent with Renzo Baldini.
# Model Rome's occupation by using C-Eur rules from 1943-09-10
# to 1944-06-04; although Rome was an open city during this period, it
# was effectively controlled by Germany.
# was effectively controlled by Germany. Using C-Eur is consistent
# with Treindl's comment about Rome in April 1944, as the "Rule Italy"
# lines during German occupation do not affect Europe/Rome
# (though they do affect Europe/Malta).
#
# Rule NAME FROM TO - IN ON AT SAVE LETTER/S
Rule Italy 1916 only - Jun 3 24:00 1:00 S
@@ -2618,7 +2621,7 @@ Zone Europe/Bucharest 1:44:24 - LMT 1891 Oct
# Although Shanks lists 1945-01-01 as the date for transition from
# +01/+02 to +02/+03, more likely this is a placeholder. Guess that
# the transition occurred at 1945-04-10 00:00, which is about when
# Königsberg surrendered to Soviet troops. (Thanks to Alois Triendl.)
# Königsberg surrendered to Soviet troops. (Thanks to Alois Treindl.)
# From Paul Eggert (2016-03-18):
# The 1989 transition is from USSR act No. 227 (1989-03-14).
+3 -3
View File
@@ -970,7 +970,7 @@ Zone America/Indiana/Vincennes -5:50:07 - LMT 1883 Nov 18 12:09:53
-5:00 US E%sT
#
# Perry County, Indiana, switched from eastern to central time in April 2006.
# From Alois Triendl (2019-07-09):
# From Alois Treindl (2019-07-09):
# The Indianapolis News, Friday 27 October 1967 states that Perry County
# returned to CST. It went again to EST on 27 April 1969, as documented by the
# Indianapolis star of Saturday 26 April.
@@ -1998,7 +1998,7 @@ Zone America/Swift_Current -7:11:20 - LMT 1905 Sep
# Alberta
# From Alois Triendl (2019-07-19):
# From Alois Treindl (2019-07-19):
# There was no DST in Alberta in 1967... Calgary Herald, 29 April 1967.
# 1969, no DST, from Edmonton Journal 18 April 1969
#
@@ -2107,7 +2107,7 @@ Zone America/Edmonton -7:33:52 - LMT 1906 Sep
#
# From Paul Eggert (2019-07-25):
# Shanks says Fort Nelson did not observe DST in 1946, unlike Vancouver.
# Alois Triendl confirmed this on 07-22, citing the 1946-04-27 Vancouver Daily
# Alois Treindl confirmed this on 07-22, citing the 1946-04-27 Vancouver Daily
# Province. He also cited the 1946-09-28 Victoria Daily Times, which said
# that Vancouver, Victoria, etc. "change at midnight Saturday"; for now,
# guess they meant 02:00 Sunday since 02:00 was common practice in Vancouver.
+9 -6
View File
@@ -106,20 +106,23 @@ static unsigned long getauxval(unsigned long key)
* ARM puts the feature bits for Crypto Extensions in AT_HWCAP2, whereas
* AArch64 used AT_HWCAP.
*/
# ifndef AT_HWCAP
# define AT_HWCAP 16
# endif
# ifndef AT_HWCAP2
# define AT_HWCAP2 26
# endif
# if defined(__arm__) || defined (__arm)
# define HWCAP 16
/* AT_HWCAP */
# define HWCAP AT_HWCAP
# define HWCAP_NEON (1 << 12)
# define HWCAP_CE 26
/* AT_HWCAP2 */
# define HWCAP_CE AT_HWCAP2
# define HWCAP_CE_AES (1 << 0)
# define HWCAP_CE_PMULL (1 << 1)
# define HWCAP_CE_SHA1 (1 << 2)
# define HWCAP_CE_SHA256 (1 << 3)
# elif defined(__aarch64__)
# define HWCAP 16
/* AT_HWCAP */
# define HWCAP AT_HWCAP
# define HWCAP_NEON (1 << 1)
# define HWCAP_CE HWCAP
+1 -1
View File
@@ -65,7 +65,7 @@ static const struct {
.descsz = sizeof(int32_t),
.type = NT_FREEBSD_ABI_TAG,
.name = NOTE_FREEBSD_VENDOR,
.desc = __FreeBSD_version
.desc = 1203000
};
static const struct {
+1
View File
@@ -4,6 +4,7 @@
#
# PROVIDE: rctl
# REQUIRE: FILESYSTEMS
# BEFORE: LOGIN
# KEYWORD: nojail
+1 -1
View File
@@ -1,6 +1,6 @@
# $FreeBSD$
release: {
url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
url: "pkg+http://pkg.FreeBSD.org/${ABI}/release_3",
mirror_type: "srv",
signature_type: "fingerprints",
fingerprints: "/usr/share/keys/pkg",
+19 -18
View File
@@ -136,9 +136,13 @@ typedef enum {
#define ccb_state ppriv_field0
#define ccb_bp ppriv_ptr1
/*
* According to the MMC-6 spec, 6.25.3.2.11, the lead-out is reported by
* READ_TOC as logical track 170, so at most 169 tracks may be reported.
*/
struct cd_tocdata {
struct ioc_toc_header header;
struct cd_toc_entry entries[100];
struct cd_toc_entry entries[170];
};
struct cd_toc_single {
@@ -1580,12 +1584,13 @@ cddone(struct cam_periph *periph, union ccb *done_ccb)
}
/* Number of TOC entries, plus leadout */
num_entries = (toch->ending_track - toch->starting_track) + 2;
cdindex = toch->starting_track + num_entries -1;
num_entries = toch->ending_track - toch->starting_track + 2;
cdindex = toch->starting_track + num_entries - 1;
if ((done_ccb->ccb_h.ccb_state & CD_CCB_TYPE_MASK) ==
CD_CCB_MEDIA_TOC_HDR) {
if (num_entries <= 0) {
if (num_entries <= 0 ||
num_entries > nitems(softc->toc.entries)) {
softc->flags &= ~CD_FLAG_VALID_TOC;
bzero(&softc->toc, sizeof(softc->toc));
/*
@@ -1823,23 +1828,19 @@ cdioctl(struct disk *dp, u_long cmd, void *addr, int flag, struct thread *td)
*/
if (softc->flags & CD_FLAG_VALID_TOC) {
union msf_lba *sentry, *eentry;
struct ioc_toc_header *th;
int st, et;
if (args->end_track <
softc->toc.header.ending_track + 1)
th = &softc->toc.header;
if (args->end_track < th->ending_track + 1)
args->end_track++;
if (args->end_track >
softc->toc.header.ending_track + 1)
args->end_track =
softc->toc.header.ending_track + 1;
st = args->start_track -
softc->toc.header.starting_track;
et = args->end_track -
softc->toc.header.starting_track;
if ((st < 0)
|| (et < 0)
|| (st > (softc->toc.header.ending_track -
softc->toc.header.starting_track))) {
if (args->end_track > th->ending_track + 1)
args->end_track = th->ending_track + 1;
st = args->start_track - th->starting_track;
et = args->end_track - th->starting_track;
if (st < 0 || et < 0 ||
st > th->ending_track - th->starting_track ||
et > th->ending_track - th->starting_track) {
error = EINVAL;
cam_periph_unlock(periph);
break;
+1 -1
View File
@@ -49,7 +49,7 @@
TYPE="FreeBSD"
REVISION="12.3"
BRANCH="PRERELEASE"
BRANCH="RELEASE"
if [ -n "${BRANCH_OVERRIDE}" ]; then
BRANCH=${BRANCH_OVERRIDE}
fi
+3 -3
View File
@@ -1172,12 +1172,12 @@ igc_if_multi_set(if_ctx_t ctx)
reg_rctl |= IGC_RCTL_MPE;
reg_rctl &= ~IGC_RCTL_UPE;
} else
reg_rctl = ~(IGC_RCTL_UPE | IGC_RCTL_MPE);
IGC_WRITE_REG(&adapter->hw, IGC_RCTL, reg_rctl);
reg_rctl &= ~(IGC_RCTL_UPE | IGC_RCTL_MPE);
if (mcnt < MAX_NUM_MULTICAST_ADDRESSES)
igc_update_mc_addr_list(&adapter->hw, mta, mcnt);
IGC_WRITE_REG(&adapter->hw, IGC_RCTL, reg_rctl);
}
/*********************************************************************
-15
View File
@@ -535,21 +535,6 @@ s32 igc_phy_hw_reset(struct igc_hw *hw)
return IGC_SUCCESS;
}
/**
* igc_phy_commit - Soft PHY reset
* @hw: pointer to the HW structure
*
* Performs a soft PHY reset on those that apply. This is a function pointer
* entry point called by drivers.
**/
s32 igc_phy_commit(struct igc_hw *hw)
{
if (hw->phy.ops.commit)
return hw->phy.ops.commit(hw);
return IGC_SUCCESS;
}
/**
* igc_set_d0_lplu_state - Sets low power link up state for D0
* @hw: pointer to the HW structure
-1
View File
@@ -42,7 +42,6 @@ s32 igc_get_phy_info(struct igc_hw *hw);
void igc_release_phy(struct igc_hw *hw);
s32 igc_acquire_phy(struct igc_hw *hw);
s32 igc_phy_hw_reset(struct igc_hw *hw);
s32 igc_phy_commit(struct igc_hw *hw);
void igc_power_up_phy(struct igc_hw *hw);
void igc_power_down_phy(struct igc_hw *hw);
s32 igc_read_mac_addr(struct igc_hw *hw);
-1
View File
@@ -382,7 +382,6 @@ struct igc_phy_operations {
s32 (*init_params)(struct igc_hw *);
s32 (*acquire)(struct igc_hw *);
s32 (*check_reset_block)(struct igc_hw *);
s32 (*commit)(struct igc_hw *);
s32 (*force_speed_duplex)(struct igc_hw *);
s32 (*get_info)(struct igc_hw *);
s32 (*set_page)(struct igc_hw *, u16);
+3 -8
View File
@@ -136,7 +136,6 @@ static s32 igc_init_phy_params_i225(struct igc_hw *hw)
{
struct igc_phy_info *phy = &hw->phy;
s32 ret_val = IGC_SUCCESS;
u32 ctrl_ext;
DEBUGFUNC("igc_init_phy_params_i225");
@@ -155,10 +154,10 @@ static s32 igc_init_phy_params_i225(struct igc_hw *hw)
phy->ops.acquire = igc_acquire_phy_base;
phy->ops.check_reset_block = igc_check_reset_block_generic;
phy->ops.commit = igc_phy_sw_reset_generic;
phy->ops.release = igc_release_phy_base;
ctrl_ext = IGC_READ_REG(hw, IGC_CTRL_EXT);
phy->ops.reset = igc_phy_hw_reset_generic;
phy->ops.read_reg = igc_read_phy_reg_gpy;
phy->ops.write_reg = igc_write_phy_reg_gpy;
/* Make sure the PHY is in a good state. Several people have reported
* firmware leaving the PHY's page select register set to something
@@ -169,10 +168,6 @@ static s32 igc_init_phy_params_i225(struct igc_hw *hw)
if (ret_val)
goto out;
IGC_WRITE_REG(hw, IGC_CTRL_EXT, ctrl_ext);
phy->ops.read_reg = igc_read_phy_reg_gpy;
phy->ops.write_reg = igc_write_phy_reg_gpy;
ret_val = igc_get_phy_id(hw);
/* Verify phy id and set remaining function pointers */
switch (phy->id) {
+2 -35
View File
@@ -26,7 +26,6 @@ void igc_init_phy_ops_generic(struct igc_hw *hw)
phy->ops.init_params = igc_null_ops_generic;
phy->ops.acquire = igc_null_ops_generic;
phy->ops.check_reset_block = igc_null_ops_generic;
phy->ops.commit = igc_null_ops_generic;
phy->ops.force_speed_duplex = igc_null_ops_generic;
phy->ops.get_info = igc_null_ops_generic;
phy->ops.set_page = igc_null_set_page;
@@ -147,7 +146,7 @@ s32 igc_get_phy_id(struct igc_hw *hw)
return ret_val;
phy->id = (u32)(phy_id << 16);
usec_delay(20);
usec_delay(200);
ret_val = phy->ops.read_reg(hw, PHY_ID2, &phy_id);
if (ret_val)
return ret_val;
@@ -155,7 +154,6 @@ s32 igc_get_phy_id(struct igc_hw *hw)
phy->id |= (u32)(phy_id & PHY_REVISION_MASK);
phy->revision = (u32)(phy_id & ~PHY_REVISION_MASK);
return IGC_SUCCESS;
}
@@ -314,7 +312,7 @@ static s32 igc_phy_setup_autoneg(struct igc_hw *hw)
if ((phy->autoneg_mask & ADVERTISE_2500_FULL) &&
hw->phy.id == I225_I_PHY_ID) {
/* Read the MULTI GBT AN Control Register - reg 7.32 */
/* Read the MULTI GBT AN Control Register - reg 7.32 */
ret_val = phy->ops.read_reg(hw, (STANDARD_AN_REG_MASK <<
MMD_DEVADDR_SHIFT) |
ANEG_MULTIGBT_AN_CTRL,
@@ -847,37 +845,6 @@ s32 igc_phy_has_link_generic(struct igc_hw *hw, u32 iterations,
return ret_val;
}
/**
* igc_phy_sw_reset_generic - PHY software reset
* @hw: pointer to the HW structure
*
* Does a software reset of the PHY by reading the PHY control register and
* setting/write the control register reset bit to the PHY.
**/
s32 igc_phy_sw_reset_generic(struct igc_hw *hw)
{
s32 ret_val;
u16 phy_ctrl;
DEBUGFUNC("igc_phy_sw_reset_generic");
if (!hw->phy.ops.read_reg)
return IGC_SUCCESS;
ret_val = hw->phy.ops.read_reg(hw, PHY_CONTROL, &phy_ctrl);
if (ret_val)
return ret_val;
phy_ctrl |= MII_CR_RESET;
ret_val = hw->phy.ops.write_reg(hw, PHY_CONTROL, phy_ctrl);
if (ret_val)
return ret_val;
usec_delay(1);
return ret_val;
}
/**
* igc_phy_hw_reset_generic - PHY hardware reset
* @hw: pointer to the HW structure
-1
View File
@@ -18,7 +18,6 @@ s32 igc_null_set_page(struct igc_hw *hw, u16 data);
s32 igc_check_downshift_generic(struct igc_hw *hw);
s32 igc_check_reset_block_generic(struct igc_hw *hw);
s32 igc_get_phy_id(struct igc_hw *hw);
s32 igc_phy_sw_reset_generic(struct igc_hw *hw);
void igc_phy_force_speed_duplex_setup(struct igc_hw *hw, u16 *phy_ctrl);
s32 igc_phy_hw_reset_generic(struct igc_hw *hw);
s32 igc_phy_reset_dsp_generic(struct igc_hw *hw);
+34 -13
View File
@@ -1951,18 +1951,30 @@ int
usb_fifo_alloc_buffer(struct usb_fifo *f, usb_size_t bufsize,
uint16_t nbuf)
{
struct usb_ifqueue temp_q = {};
void *queue_data;
usb_fifo_free_buffer(f);
/* allocate an endpoint */
f->free_q.ifq_maxlen = nbuf;
f->used_q.ifq_maxlen = nbuf;
temp_q.ifq_maxlen = nbuf;
f->queue_data = usb_alloc_mbufs(
M_USBDEV, &f->free_q, bufsize, nbuf);
queue_data = usb_alloc_mbufs(
M_USBDEV, &temp_q, bufsize, nbuf);
if ((f->queue_data == NULL) && bufsize && nbuf) {
if (queue_data == NULL && bufsize != 0 && nbuf != 0)
return (ENOMEM);
}
mtx_lock(f->priv_mtx);
/*
* Setup queues and sizes under lock to avoid early use by
* concurrent FIFO access:
*/
f->free_q = temp_q;
f->used_q.ifq_maxlen = nbuf;
f->queue_data = queue_data;
mtx_unlock(f->priv_mtx);
return (0); /* success */
}
@@ -1975,15 +1987,24 @@ usb_fifo_alloc_buffer(struct usb_fifo *f, usb_size_t bufsize,
void
usb_fifo_free_buffer(struct usb_fifo *f)
{
if (f->queue_data) {
/* free old buffer */
free(f->queue_data, M_USBDEV);
f->queue_data = NULL;
}
/* reset queues */
void *queue_data;
mtx_lock(f->priv_mtx);
/* Get and clear pointer to free, if any. */
queue_data = f->queue_data;
f->queue_data = NULL;
/*
* Reset queues under lock to avoid use of freed buffers by
* concurrent FIFO activity:
*/
memset(&f->free_q, 0, sizeof(f->free_q));
memset(&f->used_q, 0, sizeof(f->used_q));
mtx_unlock(f->priv_mtx);
/* Free old buffer, if any. */
free(queue_data, M_USBDEV);
}
void
+1 -1
View File
@@ -60,7 +60,7 @@
* in the range 5 to 9.
*/
#undef __FreeBSD_version
#define __FreeBSD_version 1202508 /* Master, propagated to newvers */
#define __FreeBSD_version 1203000 /* Master, propagated to newvers */
/*
* __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,
+1 -1
View File
@@ -105,7 +105,7 @@ main(int argc, char *argv[])
bool special;
const char *file1, *file2;
skip1 = skip2 = 0;
limit = skip1 = skip2 = 0;
oflag = O_RDONLY;
while ((ch = getopt_long(argc, argv, "+bhi:ln:sxz", long_opts, NULL)) != -1)
switch (ch) {