From 37136b849f71d99bc28b5c04d21794b3291936f1 Mon Sep 17 00:00:00 2001 From: Conrad Meyer Date: Sat, 27 Oct 2018 15:09:35 +0000 Subject: random(4): Match enabled sources mask to build options r287023 and r334450 added build option mechanisms to permanently disable spammy and/or low quality entropy sources. Follow-up those changes by updating the 'enabled' sources mask to match. When sources are compile-time disabled, represent them as disabled in the source mask, and prevent users from modifying that, like pure sources. (Modifying the mask bit would have no effect, but users might think it did if it was not prevented.) Mostly a cosmetic change. Reviewed by: markm Approved by: secteam (gordon) X-MFC-With: 334450 Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D17252 --- sys/dev/random/random_harvestq.c | 25 ++++++++++++++++++++++--- sys/sys/random.h | 3 --- 2 files changed, 22 insertions(+), 6 deletions(-) (limited to 'sys') diff --git a/sys/dev/random/random_harvestq.c b/sys/dev/random/random_harvestq.c index 6699d06156ea..6c6adb0120e8 100644 --- a/sys/dev/random/random_harvestq.c +++ b/sys/dev/random/random_harvestq.c @@ -64,6 +64,17 @@ __FBSDID("$FreeBSD$"); #include #include +#if defined(RANDOM_ENABLE_ETHER) +#define _RANDOM_HARVEST_ETHER_OFF 0 +#else +#define _RANDOM_HARVEST_ETHER_OFF (1u << RANDOM_NET_ETHER) +#endif +#if defined(RANDOM_ENABLE_UMA) +#define _RANDOM_HARVEST_UMA_OFF 0 +#else +#define _RANDOM_HARVEST_UMA_OFF (1u << RANDOM_UMA) +#endif + static void random_kthread(void); static void random_sources_feed(void); @@ -254,6 +265,10 @@ read_rate_increment(u_int chunk) static int random_check_uint_harvestmask(SYSCTL_HANDLER_ARGS) { + static const u_int user_immutable_mask = + (((1 << ENTROPYSOURCE) - 1) & (-1UL << RANDOM_PURE_START)) | + _RANDOM_HARVEST_ETHER_OFF | _RANDOM_HARVEST_UMA_OFF; + int error; u_int value, orig_value; @@ -268,8 +283,8 @@ random_check_uint_harvestmask(SYSCTL_HANDLER_ARGS) /* * Disallow userspace modification of pure entropy sources. */ - hc_source_mask = (value & ~RANDOM_HARVEST_PURE_MASK) | - (orig_value & RANDOM_HARVEST_PURE_MASK); + hc_source_mask = (value & ~user_immutable_mask) | + (orig_value & user_immutable_mask); return (0); } @@ -351,13 +366,17 @@ random_print_harvestmask_symbolic(SYSCTL_HANDLER_ARGS) static void random_harvestq_init(void *unused __unused) { + static const u_int almost_everything_mask = + (((1 << (RANDOM_ENVIRONMENTAL_END + 1)) - 1) & + ~_RANDOM_HARVEST_ETHER_OFF & ~_RANDOM_HARVEST_UMA_OFF); + struct sysctl_oid *random_sys_o; random_sys_o = SYSCTL_ADD_NODE(&random_clist, SYSCTL_STATIC_CHILDREN(_kern_random), OID_AUTO, "harvest", CTLFLAG_RW, 0, "Entropy Device Parameters"); - hc_source_mask = RANDOM_HARVEST_EVERYTHING_MASK; + hc_source_mask = almost_everything_mask; SYSCTL_ADD_PROC(&random_clist, SYSCTL_CHILDREN(random_sys_o), OID_AUTO, "mask", CTLTYPE_UINT | CTLFLAG_RW, diff --git a/sys/sys/random.h b/sys/sys/random.h index 073f97ad23c0..ad5f3e94df99 100644 --- a/sys/sys/random.h +++ b/sys/sys/random.h @@ -92,9 +92,6 @@ enum random_entropy_source { _Static_assert(ENTROPYSOURCE <= 32, "hardcoded assumption that values fit in a typical word-sized bitset"); -#define RANDOM_HARVEST_EVERYTHING_MASK ((1 << (RANDOM_ENVIRONMENTAL_END + 1)) - 1) -#define RANDOM_HARVEST_PURE_MASK (((1 << ENTROPYSOURCE) - 1) & (-1UL << RANDOM_PURE_START)) - #define RANDOM_LEGACY_BOOT_ENTROPY_MODULE "/boot/entropy" #define RANDOM_CACHED_BOOT_ENTROPY_MODULE "boot_entropy_cache" #define RANDOM_CACHED_SKIP_START 256 -- cgit v1.3 From 6d305ab0b289686aeab9774cae15ef1e2da5c7be Mon Sep 17 00:00:00 2001 From: Eugene Grosbein Date: Sat, 27 Oct 2018 16:14:42 +0000 Subject: Extend stripeoffset and stripesize of GEOMs from u_int to off_t GEOM's stripeoffset overflows at 4 gigabyte margin (2^32) because of its u_int type. This leads to incorrect data in the output generated by "sysctl kern.geom.confxml" command, "graid list" etc. when GEOM array has volumes larger than 4G, for example. This change does not affect ABI but changes KBI. No MFC planned. Differential Revision: https://reviews.freebsd.org/D13426 --- sys/geom/geom.h | 4 ++-- sys/geom/geom_disk.h | 7 ++++--- sys/geom/geom_dump.c | 8 ++++---- sys/geom/geom_redboot.c | 6 +++--- sys/geom/geom_subr.c | 4 ++-- sys/geom/nop/g_nop.c | 4 ++-- sys/geom/part/g_part.c | 6 +++--- sys/geom/raid/g_raid.c | 2 +- sys/geom/stripe/g_stripe.c | 23 ++++++++++++----------- sys/geom/stripe/g_stripe.h | 2 +- sys/geom/uzip/g_uzip.c | 6 +++--- 11 files changed, 37 insertions(+), 35 deletions(-) (limited to 'sys') diff --git a/sys/geom/geom.h b/sys/geom/geom.h index 25282805e292..d7744b01daf4 100644 --- a/sys/geom/geom.h +++ b/sys/geom/geom.h @@ -215,8 +215,8 @@ struct g_provider { TAILQ_ENTRY(g_provider) orphan; off_t mediasize; u_int sectorsize; - u_int stripesize; - u_int stripeoffset; + off_t stripesize; + off_t stripeoffset; struct devstat *stat; u_int nstart, nend; u_int flags; diff --git a/sys/geom/geom_disk.h b/sys/geom/geom_disk.h index fc7cc9818b44..fe5831a061c7 100644 --- a/sys/geom/geom_disk.h +++ b/sys/geom/geom_disk.h @@ -109,8 +109,8 @@ struct disk { u_int d_fwheads; u_int d_maxsize; off_t d_delmaxsize; - u_int d_stripeoffset; - u_int d_stripesize; + off_t d_stripeoffset; + off_t d_stripesize; char d_ident[DISK_IDENT_SIZE]; char d_descr[DISK_IDENT_SIZE]; uint16_t d_hba_vendor; @@ -151,7 +151,8 @@ void disk_add_alias(struct disk *disk, const char *); #define DISK_VERSION_03 0x5856105c #define DISK_VERSION_04 0x5856105d #define DISK_VERSION_05 0x5856105e -#define DISK_VERSION DISK_VERSION_05 +#define DISK_VERSION_06 0x5856105f +#define DISK_VERSION DISK_VERSION_06 #endif /* _KERNEL */ #endif /* _GEOM_GEOM_DISK_H_ */ diff --git a/sys/geom/geom_dump.c b/sys/geom/geom_dump.c index 7ecfadc6c010..0a4551c9fbfc 100644 --- a/sys/geom/geom_dump.c +++ b/sys/geom/geom_dump.c @@ -64,8 +64,8 @@ g_confdot_provider(struct sbuf *sb, struct g_provider *pp) { sbuf_printf(sb, "z%p [shape=hexagon,label=\"%s\\nr%dw%de%d\\nerr#%d\\n" - "sector=%u\\nstripe=%u\"];\n", pp, pp->name, pp->acr, pp->acw, - pp->ace, pp->error, pp->sectorsize, pp->stripesize); + "sector=%u\\nstripe=%ju\"];\n", pp, pp->name, pp->acr, pp->acw, + pp->ace, pp->error, pp->sectorsize, (uintmax_t)pp->stripesize); } static void @@ -216,8 +216,8 @@ g_conf_provider(struct sbuf *sb, struct g_provider *pp) sbuf_printf(sb, "\t %jd\n", (intmax_t)pp->mediasize); sbuf_printf(sb, "\t %u\n", pp->sectorsize); - sbuf_printf(sb, "\t %u\n", pp->stripesize); - sbuf_printf(sb, "\t %u\n", pp->stripeoffset); + sbuf_printf(sb, "\t %ju\n", (uintmax_t)pp->stripesize); + sbuf_printf(sb, "\t %ju\n", (uintmax_t)pp->stripeoffset); if (pp->flags & G_PF_WITHER) sbuf_printf(sb, "\t \n"); else if (pp->geom->flags & G_GEOM_WITHER) diff --git a/sys/geom/geom_redboot.c b/sys/geom/geom_redboot.c index 029d105414f0..febee5bd8377 100644 --- a/sys/geom/geom_redboot.c +++ b/sys/geom/geom_redboot.c @@ -246,7 +246,7 @@ g_redboot_taste(struct g_class *mp, struct g_provider *pp, int insist) int error, sectorsize, i; struct fis_image_desc *fd, *head; uint32_t offmask; - u_int blksize; /* NB: flash block size stored as stripesize */ + off_t blksize; /* NB: flash block size stored as stripesize */ u_char *buf; off_t offset; const char *value; @@ -283,9 +283,9 @@ g_redboot_taste(struct g_class *mp, struct g_provider *pp, int insist) else offmask = 0xffffffff; /* XXX */ if (bootverbose) - printf("%s: mediasize %ld secsize %d blksize %d offmask 0x%x\n", + printf("%s: mediasize %ld secsize %d blksize %ju offmask 0x%x\n", __func__, (long) cp->provider->mediasize, sectorsize, - blksize, offmask); + (uintmax_t)blksize, offmask); if (sectorsize < sizeof(struct fis_image_desc) || (sectorsize % sizeof(struct fis_image_desc))) return (NULL); diff --git a/sys/geom/geom_subr.c b/sys/geom/geom_subr.c index 91369cc93177..f703e3473ab3 100644 --- a/sys/geom/geom_subr.c +++ b/sys/geom/geom_subr.c @@ -1409,8 +1409,8 @@ db_show_geom_provider(int indent, struct g_provider *pp) gprintln(" geom: %s (%p)", pp->geom->name, pp->geom); gprintln(" mediasize: %jd", (intmax_t)pp->mediasize); gprintln(" sectorsize: %u", pp->sectorsize); - gprintln(" stripesize: %u", pp->stripesize); - gprintln(" stripeoffset: %u", pp->stripeoffset); + gprintln(" stripesize: %ju", (uintmax_t)pp->stripesize); + gprintln(" stripeoffset: %ju", (uintmax_t)pp->stripeoffset); gprintln(" access: r%dw%de%d", pp->acr, pp->acw, pp->ace); gprintln(" flags: %s (0x%04x)", diff --git a/sys/geom/nop/g_nop.c b/sys/geom/nop/g_nop.c index 23a06cda34fd..4e8ab8f771fd 100644 --- a/sys/geom/nop/g_nop.c +++ b/sys/geom/nop/g_nop.c @@ -187,7 +187,7 @@ g_nop_access(struct g_provider *pp, int dr, int dw, int de) static int g_nop_create(struct gctl_req *req, struct g_class *mp, struct g_provider *pp, int ioerror, u_int rfailprob, u_int wfailprob, off_t offset, off_t size, - u_int secsize, u_int stripesize, u_int stripeoffset, const char *physpath) + u_int secsize, off_t stripesize, off_t stripeoffset, const char *physpath) { struct g_nop_softc *sc; struct g_geom *gp; @@ -464,7 +464,7 @@ g_nop_ctl_create(struct gctl_req *req, struct g_class *mp) *rfailprob == -1 ? 0 : (u_int)*rfailprob, *wfailprob == -1 ? 0 : (u_int)*wfailprob, (off_t)*offset, (off_t)*size, (u_int)*secsize, - (u_int)*stripesize, (u_int)*stripeoffset, + (off_t)*stripesize, (off_t)*stripeoffset, physpath) != 0) { return; } diff --git a/sys/geom/part/g_part.c b/sys/geom/part/g_part.c index 41523c6830e8..0148f4ebb740 100644 --- a/sys/geom/part/g_part.c +++ b/sys/geom/part/g_part.c @@ -367,9 +367,9 @@ g_part_check_integrity(struct g_part_table *table, struct g_consumer *cp) offset = e1->gpe_offset; if ((offset + pp->stripeoffset) % pp->stripesize) { DPRINTF("partition %d on (%s, %s) is not " - "aligned on %u bytes\n", e1->gpe_index, + "aligned on %ju bytes\n", e1->gpe_index, pp->name, table->gpt_scheme->name, - pp->stripesize); + (uintmax_t)pp->stripesize); /* Don't treat this as a critical failure */ } } @@ -820,7 +820,7 @@ g_part_ctl_add(struct gctl_req *req, struct g_part_parms *gpp) G_PART_FULLNAME(table, entry, sb, gp->name); if (pp->stripesize > 0 && entry->gpe_pp->stripeoffset != 0) sbuf_printf(sb, " added, but partition is not " - "aligned on %u bytes\n", pp->stripesize); + "aligned on %ju bytes\n", (uintmax_t)pp->stripesize); else sbuf_cat(sb, " added\n"); sbuf_finish(sb); diff --git a/sys/geom/raid/g_raid.c b/sys/geom/raid/g_raid.c index 46748bba15cf..77b6bbf3ef17 100644 --- a/sys/geom/raid/g_raid.c +++ b/sys/geom/raid/g_raid.c @@ -2423,7 +2423,7 @@ g_raid_dumpconf(struct sbuf *sb, const char *indent, struct g_geom *gp, sbuf_printf(sb, "r%d(%s):%d@%ju", sd->sd_volume->v_global_id, sd->sd_volume->v_name, - sd->sd_pos, sd->sd_offset); + sd->sd_pos, (uintmax_t)sd->sd_offset); if (TAILQ_NEXT(sd, sd_next)) sbuf_printf(sb, ", "); } diff --git a/sys/geom/stripe/g_stripe.c b/sys/geom/stripe/g_stripe.c index 0ac90dd61529..8dc32ee2c9f1 100644 --- a/sys/geom/stripe/g_stripe.c +++ b/sys/geom/stripe/g_stripe.c @@ -249,7 +249,7 @@ static void g_stripe_copy(struct g_stripe_softc *sc, char *src, char *dst, off_t offset, off_t length, int mode) { - u_int stripesize; + off_t stripesize; size_t len; stripesize = sc->sc_stripesize; @@ -265,8 +265,8 @@ g_stripe_copy(struct g_stripe_softc *sc, char *src, char *dst, off_t offset, } length -= len; KASSERT(length >= 0, - ("Length < 0 (stripesize=%zu, offset=%jd, length=%jd).", - (size_t)stripesize, (intmax_t)offset, (intmax_t)length)); + ("Length < 0 (stripesize=%ju, offset=%ju, length=%jd).", + (uintmax_t)stripesize, (uintmax_t)offset, (intmax_t)length)); if (length > stripesize) len = stripesize; else @@ -307,10 +307,11 @@ static int g_stripe_start_fast(struct bio *bp, u_int no, off_t offset, off_t length) { TAILQ_HEAD(, bio) queue = TAILQ_HEAD_INITIALIZER(queue); - u_int nparts = 0, stripesize; struct g_stripe_softc *sc; char *addr, *data = NULL; struct bio *cbp; + off_t stripesize; + u_int nparts = 0; int error; sc = bp->bio_to->geom->softc; @@ -436,7 +437,7 @@ g_stripe_start_economic(struct bio *bp, u_int no, off_t offset, off_t length) { TAILQ_HEAD(, bio) queue = TAILQ_HEAD_INITIALIZER(queue); struct g_stripe_softc *sc; - uint32_t stripesize; + off_t stripesize; struct bio *cbp; char *addr; int error; @@ -571,9 +572,9 @@ g_stripe_flush(struct g_stripe_softc *sc, struct bio *bp) static void g_stripe_start(struct bio *bp) { - off_t offset, start, length, nstripe; + off_t offset, start, length, nstripe, stripesize; struct g_stripe_softc *sc; - u_int no, stripesize; + u_int no; int error, fast = 0; sc = bp->bio_to->geom->softc; @@ -1044,7 +1045,7 @@ g_stripe_ctl_create(struct gctl_req *req, struct g_class *mp) struct g_stripe_softc *sc; struct g_geom *gp; struct sbuf *sb; - intmax_t *stripesize; + off_t *stripesize; const char *name; char param[16]; int *nargs; @@ -1076,7 +1077,7 @@ g_stripe_ctl_create(struct gctl_req *req, struct g_class *mp) gctl_error(req, "No '%s' argument.", "stripesize"); return; } - md.md_stripesize = *stripesize; + md.md_stripesize = (uint32_t)*stripesize; bzero(md.md_provider, sizeof(md.md_provider)); /* This field is not important here. */ md.md_provsize = 0; @@ -1243,8 +1244,8 @@ g_stripe_dumpconf(struct sbuf *sb, const char *indent, struct g_geom *gp, (u_int)cp->index); } else { sbuf_printf(sb, "%s%u\n", indent, (u_int)sc->sc_id); - sbuf_printf(sb, "%s%u\n", indent, - (u_int)sc->sc_stripesize); + sbuf_printf(sb, "%s%ju\n", indent, + (uintmax_t)sc->sc_stripesize); sbuf_printf(sb, "%s", indent); switch (sc->sc_type) { case G_STRIPE_TYPE_AUTOMATIC: diff --git a/sys/geom/stripe/g_stripe.h b/sys/geom/stripe/g_stripe.h index 21b6ea666a42..beef7fe24116 100644 --- a/sys/geom/stripe/g_stripe.h +++ b/sys/geom/stripe/g_stripe.h @@ -76,7 +76,7 @@ struct g_stripe_softc { uint32_t sc_id; /* stripe unique ID */ struct g_consumer **sc_disks; uint16_t sc_ndisks; - uint32_t sc_stripesize; + off_t sc_stripesize; uint32_t sc_stripebits; struct mtx sc_lock; }; diff --git a/sys/geom/uzip/g_uzip.c b/sys/geom/uzip/g_uzip.c index ab38d18bd3f2..6c29e946d0a8 100644 --- a/sys/geom/uzip/g_uzip.c +++ b/sys/geom/uzip/g_uzip.c @@ -849,9 +849,9 @@ g_uzip_taste(struct g_class *mp, struct g_provider *pp, int flags) g_error_provider(pp2, 0); g_access(cp, -1, 0, 0); - DPRINTF(GUZ_DBG_INFO, ("%s: taste ok (%d, %jd), (%d, %d), %x\n", - gp->name, pp2->sectorsize, (intmax_t)pp2->mediasize, - pp2->stripeoffset, pp2->stripesize, pp2->flags)); + DPRINTF(GUZ_DBG_INFO, ("%s: taste ok (%d, %ju), (%ju, %ju), %x\n", + gp->name, pp2->sectorsize, (uintmax_t)pp2->mediasize, + (uintmax_t)pp2->stripeoffset, (uintmax_t)pp2->stripesize, pp2->flags)); DPRINTF(GUZ_DBG_INFO, ("%s: %u x %u blocks\n", gp->name, sc->nblocks, sc->blksz)); return (gp); -- cgit v1.3 From 9f1abe3df44028fcf378c839825e2b70703e87e8 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sat, 27 Oct 2018 17:49:46 +0000 Subject: Eliminate typically pointless calls to vm_fault_prefault() on soft, copy- on-write faults. On a page fault, when we call vm_fault_prefault(), it probes the pmap and the shadow chain of vm objects to see if there are opportunities to create read and/or execute-only mappings to neighoring pages. For example, in the case of hard faults, such effort typically pays off, that is, mappings are created that eliminate future soft page faults. However, in the the case of soft, copy-on-write faults, the effort very rarely pays off. (See the review for some specific data.) Reviewed by: kib, markj MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D17367 --- sys/vm/vm_fault.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'sys') diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index c56e51f3dbfe..e095ccc69edf 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -1181,6 +1181,16 @@ readrest: */ vm_object_pip_wakeup(fs.object); VM_OBJECT_WUNLOCK(fs.object); + + /* + * We only try to prefault read-only mappings to the + * neighboring pages when this copy-on-write fault is + * a hard fault. In other cases, trying to prefault + * is typically wasted effort. + */ + if (faultcount == 0) + faultcount = 1; + /* * Only use the new page below... */ -- cgit v1.3 From 4aed5937db13b9d52904d06c585d189fe1c4bc8f Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Sat, 27 Oct 2018 18:48:49 +0000 Subject: Use M_WAITOK in init_hwpmc(). No functional change intended. MFC after: 2 weeks --- sys/kern/kern_pmc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'sys') diff --git a/sys/kern/kern_pmc.c b/sys/kern/kern_pmc.c index 3ec091716776..5ff3caebc8ce 100644 --- a/sys/kern/kern_pmc.c +++ b/sys/kern/kern_pmc.c @@ -360,9 +360,8 @@ init_hwpmc(void *dummy __unused) "range.\n", pmc_softevents); pmc_softevents = PMC_EV_DYN_COUNT; } - pmc_softs = malloc(pmc_softevents * sizeof(struct pmc_soft *), M_PMCHOOKS, M_NOWAIT|M_ZERO); - KASSERT(pmc_softs != NULL, ("cannot allocate soft events table")); - + pmc_softs = malloc(pmc_softevents * sizeof(*pmc_softs), M_PMCHOOKS, + M_WAITOK | M_ZERO); for (domain = 0; domain < NDOMAINS; domain++) { pmc_dom_hdrs[domain] = malloc_domain(sizeof(struct pmc_domain_buffer_header), M_PMC, domain, M_WAITOK|M_ZERO); -- cgit v1.3 From f86e7267f5fd81461dbf15ee92763403191c43b9 Mon Sep 17 00:00:00 2001 From: Vladimir Kondratyev Date: Sat, 27 Oct 2018 20:22:41 +0000 Subject: evdev: Use console lock as evdev lock for all supported keyboard drivers. Now evdev part of keyboard drivers does not take any locks if corresponding input/eventN device node is not opened by userland consumers. Do not assert console lock inside evdev to handle the cases when keyboard driver is called from some special single-threaded context like shutdown thread. --- sys/dev/atkbdc/atkbd.c | 2 +- sys/dev/evdev/evdev_private.h | 7 ++++++- sys/dev/kbdmux/kbdmux.c | 2 +- sys/dev/usb/input/ukbd.c | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) (limited to 'sys') diff --git a/sys/dev/atkbdc/atkbd.c b/sys/dev/atkbdc/atkbd.c index 57772468a9b1..981828e3eb52 100644 --- a/sys/dev/atkbdc/atkbd.c +++ b/sys/dev/atkbdc/atkbd.c @@ -484,7 +484,7 @@ atkbd_init(int unit, keyboard_t **kbdp, void *arg, int flags) evdev_support_led(evdev, LED_CAPSL); evdev_support_led(evdev, LED_SCROLLL); - if (evdev_register(evdev)) + if (evdev_register_mtx(evdev, &Giant)) evdev_free(evdev); else state->ks_evdev = evdev; diff --git a/sys/dev/evdev/evdev_private.h b/sys/dev/evdev/evdev_private.h index 05206a9d09bd..e1a5d1822cd8 100644 --- a/sys/dev/evdev/evdev_private.h +++ b/sys/dev/evdev/evdev_private.h @@ -132,9 +132,14 @@ struct evdev_dev LIST_HEAD(, evdev_client) ev_clients; }; +#define SYSTEM_CONSOLE_LOCK &Giant + #define EVDEV_LOCK(evdev) mtx_lock((evdev)->ev_lock) #define EVDEV_UNLOCK(evdev) mtx_unlock((evdev)->ev_lock) -#define EVDEV_LOCK_ASSERT(evdev) mtx_assert((evdev)->ev_lock, MA_OWNED) +#define EVDEV_LOCK_ASSERT(evdev) do { \ + if ((evdev)->ev_lock != SYSTEM_CONSOLE_LOCK) \ + mtx_assert((evdev)->ev_lock, MA_OWNED); \ +} while (0) #define EVDEV_ENTER(evdev) do { \ if ((evdev)->ev_lock_type == EV_LOCK_INTERNAL) \ EVDEV_LOCK(evdev); \ diff --git a/sys/dev/kbdmux/kbdmux.c b/sys/dev/kbdmux/kbdmux.c index f17634c8879b..79f3216675e5 100644 --- a/sys/dev/kbdmux/kbdmux.c +++ b/sys/dev/kbdmux/kbdmux.c @@ -505,7 +505,7 @@ kbdmux_init(int unit, keyboard_t **kbdp, void *arg, int flags) evdev_support_led(evdev, LED_CAPSL); evdev_support_led(evdev, LED_SCROLLL); - if (evdev_register(evdev)) + if (evdev_register_mtx(evdev, &Giant)) evdev_free(evdev); else state->ks_evdev = evdev; diff --git a/sys/dev/usb/input/ukbd.c b/sys/dev/usb/input/ukbd.c index f35652c663dc..ea586990f082 100644 --- a/sys/dev/usb/input/ukbd.c +++ b/sys/dev/usb/input/ukbd.c @@ -1361,7 +1361,7 @@ ukbd_attach(device_t dev) if (sc->sc_flags & UKBD_FLAG_SCROLLLOCK) evdev_support_led(evdev, LED_SCROLLL); - if (evdev_register(evdev)) + if (evdev_register_mtx(evdev, &Giant)) evdev_free(evdev); else sc->sc_evdev = evdev; -- cgit v1.3 From 5ef2488947aacf30ce897230b8bf20be543e7447 Mon Sep 17 00:00:00 2001 From: Vladimir Kondratyev Date: Sat, 27 Oct 2018 21:04:34 +0000 Subject: evdev: disable evdev if it is invoked from KDB or panic context This allow to prevent deadlock on entering KDB if one of evdev locks is already taken by userspace process. Also this change discards all but LED console events produced by KDB as unrelated to userspace. Tested by: dumbbell (as part of D15070) Objected by: bde (as 'KDB lock an already locked mutex' problem solution) MFC after: 1 month --- sys/dev/evdev/cdev.c | 13 +++++++++++++ sys/dev/evdev/evdev.c | 44 +++++++++++++++++++++++++++++++++++++++++++ sys/dev/evdev/evdev_private.h | 5 +++++ 3 files changed, 62 insertions(+) (limited to 'sys') diff --git a/sys/dev/evdev/cdev.c b/sys/dev/evdev/cdev.c index 433444973779..615a70bafc79 100644 --- a/sys/dev/evdev/cdev.c +++ b/sys/dev/evdev/cdev.c @@ -349,6 +349,19 @@ evdev_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, if (client->ec_revoked || evdev == NULL) return (ENODEV); + /* + * Fix evdev state corrupted with discarding of kdb events. + * EVIOCGKEY and EVIOCGLED ioctls can suffer from this. + */ + if (evdev->ev_kdb_active) { + EVDEV_LOCK(evdev); + if (evdev->ev_kdb_active) { + evdev->ev_kdb_active = false; + evdev_restore_after_kdb(evdev); + } + EVDEV_UNLOCK(evdev); + } + /* file I/O ioctl handling */ switch (cmd) { case FIOSETOWN: diff --git a/sys/dev/evdev/evdev.c b/sys/dev/evdev/evdev.c index a119cbbc3ea0..2f5eb11b96b2 100644 --- a/sys/dev/evdev/evdev.c +++ b/sys/dev/evdev/evdev.c @@ -32,9 +32,11 @@ #include #include #include +#include #include #include #include +#include #include #include @@ -763,6 +765,30 @@ evdev_send_event(struct evdev_dev *evdev, uint16_t type, uint16_t code, } } +void +evdev_restore_after_kdb(struct evdev_dev *evdev) +{ + int code; + + EVDEV_LOCK_ASSERT(evdev); + + /* Report postponed leds */ + for (code = 0; code < LED_CNT; code++) + if (bit_test(evdev->ev_kdb_led_states, code)) + evdev_send_event(evdev, EV_LED, code, + !bit_test(evdev->ev_led_states, code)); + bit_nclear(evdev->ev_kdb_led_states, 0, LED_MAX); + + /* Release stuck keys (CTRL + ALT + ESC) */ + evdev_stop_repeat(evdev); + for (code = 0; code < KEY_CNT; code++) { + if (bit_test(evdev->ev_key_states, code)) { + evdev_send_event(evdev, EV_KEY, code, KEY_EVENT_UP); + evdev_send_event(evdev, EV_SYN, SYN_REPORT, 1); + } + } +} + int evdev_push_event(struct evdev_dev *evdev, uint16_t type, uint16_t code, int32_t value) @@ -771,8 +797,26 @@ evdev_push_event(struct evdev_dev *evdev, uint16_t type, uint16_t code, if (evdev_check_event(evdev, type, code, value) != 0) return (EINVAL); + /* + * Discard all but LEDs kdb events as unrelated to userspace. + * Aggregate LED updates and postpone reporting until kdb deactivation. + */ + if (kdb_active || SCHEDULER_STOPPED()) { + evdev->ev_kdb_active = true; + if (type == EV_LED) + bit_set(evdev->ev_kdb_led_states, + bit_test(evdev->ev_led_states, code) != value); + return (0); + } + EVDEV_ENTER(evdev); + /* Fix evdev state corrupted with discarding of kdb events */ + if (evdev->ev_kdb_active) { + evdev->ev_kdb_active = false; + evdev_restore_after_kdb(evdev); + } + evdev_modify_event(evdev, type, code, &value); if (type == EV_SYN && code == SYN_REPORT && bit_test(evdev->ev_flags, EVDEV_FLAG_MT_AUTOREL)) diff --git a/sys/dev/evdev/evdev_private.h b/sys/dev/evdev/evdev_private.h index e1a5d1822cd8..71bdecaa57be 100644 --- a/sys/dev/evdev/evdev_private.h +++ b/sys/dev/evdev/evdev_private.h @@ -117,6 +117,10 @@ struct evdev_dev bitstr_t bit_decl(ev_sw_states, SW_CNT); bool ev_report_opened; + /* KDB state: */ + bool ev_kdb_active; + bitstr_t bit_decl(ev_kdb_led_states, LED_CNT); + /* Multitouch protocol type B state: */ struct evdev_mt * ev_mt; @@ -190,6 +194,7 @@ int evdev_cdev_destroy(struct evdev_dev *); bool evdev_event_supported(struct evdev_dev *, uint16_t); void evdev_set_abs_bit(struct evdev_dev *, uint16_t); void evdev_set_absinfo(struct evdev_dev *, uint16_t, struct input_absinfo *); +void evdev_restore_after_kdb(struct evdev_dev *); /* Client interface: */ int evdev_register_client(struct evdev_dev *, struct evdev_client *); -- cgit v1.3 From 8d56c80545a234d84bb83da6792e1851dbeb7e38 Mon Sep 17 00:00:00 2001 From: Yuri Pankov Date: Sat, 27 Oct 2018 21:24:28 +0000 Subject: Provide basic descriptions for VMX exit reason (from "Intel 64 and IA-32 Architectures Software Developer’s Manual Volume 3"). Add the document to SEE ALSO in bhyve.8 (and pet manlint here a bit). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed by: jhb, rgrimes, 0mp Approved by: kib (mentor) Differential Revision: https://reviews.freebsd.org/D17531 --- sys/amd64/vmm/intel/vmcs.h | 8 +++++ usr.sbin/bhyve/bhyve.8 | 25 ++++++++++---- usr.sbin/bhyve/bhyverun.c | 84 ++++++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 107 insertions(+), 10 deletions(-) (limited to 'sys') diff --git a/sys/amd64/vmm/intel/vmcs.h b/sys/amd64/vmm/intel/vmcs.h index a1404834b7fa..29e0263fb9f2 100644 --- a/sys/amd64/vmm/intel/vmcs.h +++ b/sys/amd64/vmm/intel/vmcs.h @@ -338,6 +338,14 @@ vmcs_write(uint32_t encoding, uint64_t val) #define EXIT_REASON_WBINVD 54 #define EXIT_REASON_XSETBV 55 #define EXIT_REASON_APIC_WRITE 56 +#define EXIT_REASON_RDRAND 57 +#define EXIT_REASON_INVPCID 58 +#define EXIT_REASON_VMFUNC 59 +#define EXIT_REASON_ENCLS 60 +#define EXIT_REASON_RDSEED 61 +#define EXIT_REASON_PM_LOG_FULL 62 +#define EXIT_REASON_XSAVES 63 +#define EXIT_REASON_XRSTORS 64 /* * NMI unblocking due to IRET. diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index ea64d2443dfe..0578676335e8 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -367,7 +367,11 @@ Emergency write is advertised, but no-op at present. .Pp Framebuffer devices: .Bl -tag -width 10n -.It Oo rfb= Ns Oo Ar IP: Oc Ns Ar port Oc Ns Oo ,w= Ns Ar width Oc Ns Oo ,h= Ns Ar height Oc Ns Oo ,vga= Ns Ar vgaconf Oc Ns Oo Ns ,wait Oc Ns Oo ,password= Ns Ar password Oc +.It Xo +.Oo rfb= Ns Oo Ar IP\&: Oc Ns Ar port Oc Ns Oo ,w= Ns Ar width Oc Ns Oo ,h= Ns +.Ar height Oc Ns Oo ,vga= Ns Ar vgaconf Oc Ns Oo Ns ,wait Oc Ns Oo ,password= Ns +.Ar password Oc +.Xc .Bl -tag -width 8n .It Ar IPv4:port No or Ar [IPv6%zone]:port An @@ -398,8 +402,8 @@ and memory space .Pq 64KB at Ad 0xA0000 . The default .Dq io -option should be used for guests that attempt to issue BIOS -calls which result in I/O port queries, and fail to boot if I/O decode is disabled. +option should be used for guests that attempt to issue BIOS calls which result +in I/O port queries, and fail to boot if I/O decode is disabled. .Pp The .Dq on @@ -424,8 +428,8 @@ for configuration notes of particular guests. .It wait Instruct .Nm -to only boot upon the initiation of a VNC connection, simplifying the installation -of operating systems that require immediate keyboard input. +to only boot upon the initiation of a VNC connection, simplifying the +installation of operating systems that require immediate keyboard input. This can be removed for post-installation use. .It password This type of authentication is known to be cryptographically weak and is not @@ -497,8 +501,9 @@ General purpose registers can be queried for each virtual CPU, but other registers such as floating-point and system registers cannot be queried. .Ss Memory Memory (including memory mapped I/O regions) can be read by the debugger, -but not written. Memory operations use virtual addresses that are resolved -to physical addresses via the current virtual CPU's active address translation. +but not written. +Memory operations use virtual addresses that are resolved to physical addresses +via the current virtual CPU's active address translation. .Ss Control The running guest can be interrupted by the debugger at any time .Pq for example, by pressing Ctrl-C in the debugger . @@ -609,6 +614,12 @@ bhyve -c 2 -m 4G -w -H \\ .Xr ethers 5 , .Xr bhyvectl 8 , .Xr bhyveload 8 +.Pp +.Rs +.%A Intel +.%B 64 and IA-32 Architectures Software Developer’s Manual +.%V Volume 3 +.Re .Sh HISTORY .Nm first appeared in diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c index 4503797dd1f7..d7f5a7b22dbf 100644 --- a/usr.sbin/bhyve/bhyverun.c +++ b/usr.sbin/bhyve/bhyverun.c @@ -38,6 +38,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include #include @@ -89,6 +91,73 @@ __FBSDID("$FreeBSD$"); #define MB (1024UL * 1024) #define GB (1024UL * MB) +static const char * const vmx_exit_reason_desc[] = { + [EXIT_REASON_EXCEPTION] = "Exception or non-maskable interrupt (NMI)", + [EXIT_REASON_EXT_INTR] = "External interrupt", + [EXIT_REASON_TRIPLE_FAULT] = "Triple fault", + [EXIT_REASON_INIT] = "INIT signal", + [EXIT_REASON_SIPI] = "Start-up IPI (SIPI)", + [EXIT_REASON_IO_SMI] = "I/O system-management interrupt (SMI)", + [EXIT_REASON_SMI] = "Other SMI", + [EXIT_REASON_INTR_WINDOW] = "Interrupt window", + [EXIT_REASON_NMI_WINDOW] = "NMI window", + [EXIT_REASON_TASK_SWITCH] = "Task switch", + [EXIT_REASON_CPUID] = "CPUID", + [EXIT_REASON_GETSEC] = "GETSEC", + [EXIT_REASON_HLT] = "HLT", + [EXIT_REASON_INVD] = "INVD", + [EXIT_REASON_INVLPG] = "INVLPG", + [EXIT_REASON_RDPMC] = "RDPMC", + [EXIT_REASON_RDTSC] = "RDTSC", + [EXIT_REASON_RSM] = "RSM", + [EXIT_REASON_VMCALL] = "VMCALL", + [EXIT_REASON_VMCLEAR] = "VMCLEAR", + [EXIT_REASON_VMLAUNCH] = "VMLAUNCH", + [EXIT_REASON_VMPTRLD] = "VMPTRLD", + [EXIT_REASON_VMPTRST] = "VMPTRST", + [EXIT_REASON_VMREAD] = "VMREAD", + [EXIT_REASON_VMRESUME] = "VMRESUME", + [EXIT_REASON_VMWRITE] = "VMWRITE", + [EXIT_REASON_VMXOFF] = "VMXOFF", + [EXIT_REASON_VMXON] = "VMXON", + [EXIT_REASON_CR_ACCESS] = "Control-register accesses", + [EXIT_REASON_DR_ACCESS] = "MOV DR", + [EXIT_REASON_INOUT] = "I/O instruction", + [EXIT_REASON_RDMSR] = "RDMSR", + [EXIT_REASON_WRMSR] = "WRMSR", + [EXIT_REASON_INVAL_VMCS] = + "VM-entry failure due to invalid guest state", + [EXIT_REASON_INVAL_MSR] = "VM-entry failure due to MSR loading", + [EXIT_REASON_MWAIT] = "MWAIT", + [EXIT_REASON_MTF] = "Monitor trap flag", + [EXIT_REASON_MONITOR] = "MONITOR", + [EXIT_REASON_PAUSE] = "PAUSE", + [EXIT_REASON_MCE_DURING_ENTRY] = + "VM-entry failure due to machine-check event", + [EXIT_REASON_TPR] = "TPR below threshold", + [EXIT_REASON_APIC_ACCESS] = "APIC access", + [EXIT_REASON_VIRTUALIZED_EOI] = "Virtualized EOI", + [EXIT_REASON_GDTR_IDTR] = "Access to GDTR or IDTR", + [EXIT_REASON_LDTR_TR] = "Access to LDTR or TR", + [EXIT_REASON_EPT_FAULT] = "EPT violation", + [EXIT_REASON_EPT_MISCONFIG] = "EPT misconfiguration", + [EXIT_REASON_INVEPT] = "INVEPT", + [EXIT_REASON_RDTSCP] = "RDTSCP", + [EXIT_REASON_VMX_PREEMPT] = "VMX-preemption timer expired", + [EXIT_REASON_INVVPID] = "INVVPID", + [EXIT_REASON_WBINVD] = "WBINVD", + [EXIT_REASON_XSETBV] = "XSETBV", + [EXIT_REASON_APIC_WRITE] = "APIC write", + [EXIT_REASON_RDRAND] = "RDRAND", + [EXIT_REASON_INVPCID] = "INVPCID", + [EXIT_REASON_VMFUNC] = "VMFUNC", + [EXIT_REASON_ENCLS] = "ENCLS", + [EXIT_REASON_RDSEED] = "RDSEED", + [EXIT_REASON_PM_LOG_FULL] = "Page-modification log full", + [EXIT_REASON_XSAVES] = "XSAVES", + [EXIT_REASON_XRSTORS] = "XRSTORS" +}; + typedef int (*vmexit_handler_t)(struct vmctx *, struct vm_exit *, int *vcpu); extern int vmexit_task_switch(struct vmctx *, struct vm_exit *, int *vcpu); @@ -506,14 +575,22 @@ vmexit_spinup_ap(struct vmctx *ctx, struct vm_exit *vme, int *pvcpu) #define DEBUG_EPT_MISCONFIG #ifdef DEBUG_EPT_MISCONFIG -#define EXIT_REASON_EPT_MISCONFIG 49 #define VMCS_GUEST_PHYSICAL_ADDRESS 0x00002400 -#define VMCS_IDENT(x) ((x) | 0x80000000) static uint64_t ept_misconfig_gpa, ept_misconfig_pte[4]; static int ept_misconfig_ptenum; #endif +static const char * +vmexit_vmx_desc(uint32_t exit_reason) +{ + + if (exit_reason >= nitems(vmx_exit_reason_desc) || + vmx_exit_reason_desc[exit_reason] == NULL) + return ("Unknown"); + return (vmx_exit_reason_desc[exit_reason]); +} + static int vmexit_vmx(struct vmctx *ctx, struct vm_exit *vmexit, int *pvcpu) { @@ -523,7 +600,8 @@ vmexit_vmx(struct vmctx *ctx, struct vm_exit *vmexit, int *pvcpu) fprintf(stderr, "\trip\t\t0x%016lx\n", vmexit->rip); fprintf(stderr, "\tinst_length\t%d\n", vmexit->inst_length); fprintf(stderr, "\tstatus\t\t%d\n", vmexit->u.vmx.status); - fprintf(stderr, "\texit_reason\t%u\n", vmexit->u.vmx.exit_reason); + fprintf(stderr, "\texit_reason\t%u (%s)\n", vmexit->u.vmx.exit_reason, + vmexit_vmx_desc(vmexit->u.vmx.exit_reason)); fprintf(stderr, "\tqualification\t0x%016lx\n", vmexit->u.vmx.exit_qualification); fprintf(stderr, "\tinst_type\t\t%d\n", vmexit->u.vmx.inst_type); -- cgit v1.3 From 99eb00558a73186924b3dce77c96687bb0cb6b48 Mon Sep 17 00:00:00 2001 From: Kristof Provost Date: Sun, 28 Oct 2018 05:32:50 +0000 Subject: pf: Make ':0' ignore link-local v6 addresses too When users mark an interface to not use aliases they likely also don't want to use the link-local v6 address there. PR: 201695 Submitted by: Russell Yount Differential Revision: https://reviews.freebsd.org/D17633 --- sbin/pfctl/pfctl_parser.c | 3 +++ share/man/man5/pf.conf.5 | 4 ++-- sys/netpfil/pf/pf_if.c | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) (limited to 'sys') diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c index d3ac9506ac35..9fbfe7cbdb7b 100644 --- a/sbin/pfctl/pfctl_parser.c +++ b/sbin/pfctl/pfctl_parser.c @@ -1366,6 +1366,9 @@ ifa_lookup(const char *ifa_name, int flags) last_if = p->ifname; if ((flags & PFI_AFLAG_NOALIAS) && p->af == AF_INET && got4) continue; + if ((flags & PFI_AFLAG_NOALIAS) && p->af == AF_INET6 && + IN6_IS_ADDR_LINKLOCAL(&p->addr.v.a.addr.v6)) + continue; if ((flags & PFI_AFLAG_NOALIAS) && p->af == AF_INET6 && got6) continue; if (p->af == AF_INET) diff --git a/share/man/man5/pf.conf.5 b/share/man/man5/pf.conf.5 index 4b6601162cef..ab4e69dbd1d4 100644 --- a/share/man/man5/pf.conf.5 +++ b/share/man/man5/pf.conf.5 @@ -28,7 +28,7 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd October 6, 2016 +.Dd October 27, 2018 .Dt PF.CONF 5 .Os .Sh NAME @@ -1511,7 +1511,7 @@ Do not include interface aliases. Host names may also have the .Ar :0 option appended to restrict the name resolution to the first of each -v4 and v6 address found. +v4 and non-link-local v6 address found. .Pp Host name resolution and interface to address translation are done at ruleset load-time. diff --git a/sys/netpfil/pf/pf_if.c b/sys/netpfil/pf/pf_if.c index 4e3689c9d855..599f80cf7f13 100644 --- a/sys/netpfil/pf/pf_if.c +++ b/sys/netpfil/pf/pf_if.c @@ -553,7 +553,8 @@ pfi_instance_add(struct ifnet *ifp, int net, int flags) if ((flags & PFI_AFLAG_PEER) && !(ifp->if_flags & IFF_POINTOPOINT)) continue; - if ((flags & PFI_AFLAG_NETWORK) && af == AF_INET6 && + if ((flags & (PFI_AFLAG_NETWORK | PFI_AFLAG_NOALIAS)) && + af == AF_INET6 && IN6_IS_ADDR_LINKLOCAL( &((struct sockaddr_in6 *)ia->ifa_addr)->sin6_addr)) continue; -- cgit v1.3 From 5201e0f1103b63b4703e5081b86bdba3e06f51e7 Mon Sep 17 00:00:00 2001 From: Stephen Hurd Date: Mon, 29 Oct 2018 14:36:03 +0000 Subject: Drain grouptaskqueue of the gtask before detaching it. taskqgroup_detach() would remove the task even if it was running or enqueued, which could lead to panics (see D17404). With this change, taskqgroup_detach() drains the task and sets a new flag which prevents the task from being scheduled again. I've added grouptask_block() and grouptask_unblock() to allow control over the flag from other locations as well. Reviewed by: Jeffrey Pieper MFC after: 1 week Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D17674 --- sys/kern/subr_gtaskqueue.c | 56 ++++++++++++++++++++++++++++++++++++++++++++-- sys/sys/gtaskqueue.h | 5 ++++- 2 files changed, 58 insertions(+), 3 deletions(-) (limited to 'sys') diff --git a/sys/kern/subr_gtaskqueue.c b/sys/kern/subr_gtaskqueue.c index 96dc530373a3..fb68c1082147 100644 --- a/sys/kern/subr_gtaskqueue.c +++ b/sys/kern/subr_gtaskqueue.c @@ -51,6 +51,8 @@ __FBSDID("$FreeBSD$"); static MALLOC_DEFINE(M_GTASKQUEUE, "gtaskqueue", "Group Task Queues"); static void gtaskqueue_thread_enqueue(void *); static void gtaskqueue_thread_loop(void *arg); +static int task_is_running(struct gtaskqueue *queue, struct gtask *gtask); +static void gtaskqueue_drain_locked(struct gtaskqueue *queue, struct gtask *gtask); TASKQGROUP_DEFINE(softirq, mp_ncpus, 1); TASKQGROUP_DEFINE(config, 1, 1); @@ -183,6 +185,44 @@ gtaskqueue_free(struct gtaskqueue *queue) free(queue, M_GTASKQUEUE); } +/* + * Wait for all to complete, then prevent it from being enqueued + */ +void +grouptask_block(struct grouptask *grouptask) +{ + struct gtaskqueue *queue = grouptask->gt_taskqueue; + struct gtask *gtask = &grouptask->gt_task; + +#ifdef INVARIANTS + if (queue == NULL) { + gtask_dump(gtask); + panic("queue == NULL"); + } +#endif + TQ_LOCK(queue); + gtask->ta_flags |= TASK_NOENQUEUE; + gtaskqueue_drain_locked(queue, gtask); + TQ_UNLOCK(queue); +} + +void +grouptask_unblock(struct grouptask *grouptask) +{ + struct gtaskqueue *queue = grouptask->gt_taskqueue; + struct gtask *gtask = &grouptask->gt_task; + +#ifdef INVARIANTS + if (queue == NULL) { + gtask_dump(gtask); + panic("queue == NULL"); + } +#endif + TQ_LOCK(queue); + gtask->ta_flags &= ~TASK_NOENQUEUE; + TQ_UNLOCK(queue); +} + int grouptaskqueue_enqueue(struct gtaskqueue *queue, struct gtask *gtask) { @@ -197,6 +237,10 @@ grouptaskqueue_enqueue(struct gtaskqueue *queue, struct gtask *gtask) TQ_UNLOCK(queue); return (0); } + if (gtask->ta_flags & TASK_NOENQUEUE) { + TQ_UNLOCK(queue); + return (EAGAIN); + } STAILQ_INSERT_TAIL(&queue->tq_queue, gtask, ta_link); gtask->ta_flags |= TASK_ENQUEUED; TQ_UNLOCK(queue); @@ -378,6 +422,13 @@ gtaskqueue_cancel(struct gtaskqueue *queue, struct gtask *gtask) return (error); } +static void +gtaskqueue_drain_locked(struct gtaskqueue *queue, struct gtask *gtask) +{ + while ((gtask->ta_flags & TASK_ENQUEUED) || task_is_running(queue, gtask)) + TQ_SLEEP(queue, gtask, &queue->tq_mutex, PWAIT, "-", 0); +} + void gtaskqueue_drain(struct gtaskqueue *queue, struct gtask *gtask) { @@ -386,8 +437,7 @@ gtaskqueue_drain(struct gtaskqueue *queue, struct gtask *gtask) WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, __func__); TQ_LOCK(queue); - while ((gtask->ta_flags & TASK_ENQUEUED) || task_is_running(queue, gtask)) - TQ_SLEEP(queue, gtask, &queue->tq_mutex, PWAIT, "-", 0); + gtaskqueue_drain_locked(queue, gtask); TQ_UNLOCK(queue); } @@ -803,6 +853,7 @@ taskqgroup_detach(struct taskqgroup *qgroup, struct grouptask *gtask) { int i; + grouptask_block(gtask); mtx_lock(&qgroup->tqg_lock); for (i = 0; i < qgroup->tqg_cnt; i++) if (qgroup->tqg_queue[i].tgc_taskq == gtask->gt_taskqueue) @@ -813,6 +864,7 @@ taskqgroup_detach(struct taskqgroup *qgroup, struct grouptask *gtask) LIST_REMOVE(gtask, gt_list); mtx_unlock(&qgroup->tqg_lock); gtask->gt_taskqueue = NULL; + gtask->gt_task.ta_flags &= ~TASK_NOENQUEUE; } static void diff --git a/sys/sys/gtaskqueue.h b/sys/sys/gtaskqueue.h index c06ef503c11e..a36c770adb97 100644 --- a/sys/sys/gtaskqueue.h +++ b/sys/sys/gtaskqueue.h @@ -52,7 +52,9 @@ int gtaskqueue_cancel(struct gtaskqueue *queue, struct gtask *gtask); void gtaskqueue_drain(struct gtaskqueue *queue, struct gtask *task); void gtaskqueue_drain_all(struct gtaskqueue *queue); -int grouptaskqueue_enqueue(struct gtaskqueue *queue, struct gtask *task); +void grouptask_block(struct grouptask *grouptask); +void grouptask_unblock(struct grouptask *grouptask); +int grouptaskqueue_enqueue(struct gtaskqueue *queue, struct gtask *task); void taskqgroup_attach(struct taskqgroup *qgroup, struct grouptask *grptask, void *uniq, int irq, const char *name); int taskqgroup_attach_cpu(struct taskqgroup *qgroup, struct grouptask *grptask, @@ -67,6 +69,7 @@ void taskqgroup_config_gtask_deinit(struct grouptask *gtask); #define TASK_ENQUEUED 0x1 #define TASK_SKIP_WAKEUP 0x2 +#define TASK_NOENQUEUE 0x4 #define GTASK_INIT(task, flags, priority, func, context) do { \ -- cgit v1.3 From 8ad9551d36cb8872e94ab319d327dfbeb4aec20e Mon Sep 17 00:00:00 2001 From: Hans Petter Selasky Date: Mon, 29 Oct 2018 19:02:36 +0000 Subject: Implement dma_pool_zalloc() in the LinuxKPI. Submitted by: Johannes Lundberg MFC after: 3 days Sponsored by: Mellanox Technologies --- sys/compat/linuxkpi/common/include/linux/dmapool.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sys') diff --git a/sys/compat/linuxkpi/common/include/linux/dmapool.h b/sys/compat/linuxkpi/common/include/linux/dmapool.h index 0253d6f63e49..c68e34264f76 100644 --- a/sys/compat/linuxkpi/common/include/linux/dmapool.h +++ b/sys/compat/linuxkpi/common/include/linux/dmapool.h @@ -77,6 +77,13 @@ dma_pool_alloc(struct dma_pool *pool, gfp_t mem_flags, dma_addr_t *handle) return (vaddr); } +static inline void * +dma_pool_zalloc(struct dma_pool *pool, gfp_t mem_flags, dma_addr_t *handle) +{ + + return (dma_pool_alloc(pool, mem_flags | __GFP_ZERO, handle)); +} + static inline void dma_pool_free(struct dma_pool *pool, void *vaddr, dma_addr_t addr) { -- cgit v1.3 From da7d7778b06a92b7f0263537328942a9f0460757 Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Mon, 29 Oct 2018 21:16:26 +0000 Subject: Expose some netdump configuration parameters through sysctl. Reviewed by: cem MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D17755 --- share/man/man4/netdump.4 | 15 ++++++++++++++- sys/netinet/netdump/netdump_client.c | 24 ++++++++++++------------ 2 files changed, 26 insertions(+), 13 deletions(-) (limited to 'sys') diff --git a/share/man/man4/netdump.4 b/share/man/man4/netdump.4 index 31618b7f4e37..4c47dbce72ce 100644 --- a/share/man/man4/netdump.4 +++ b/share/man/man4/netdump.4 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 8, 2018 +.Dd October 29, 2018 .Dt NETDUMP 4 .Os .Sh NAME @@ -130,6 +130,19 @@ a path of will cause the server to attempt to store dumps from the client in .Pa /var/crash/foo . The server will not automatically create the relative directory. +.It Va net.netdump.polls +The client will poll the configured network interface while waiting for +acknowledgements. +This parameter controls the maximum number of poll attempts before giving +up, which typically results in a re-transmit. +Each poll attempt takes 0.5ms. +.It Va net.netdump.retries +The number of times the client will re-transmit a packet before aborting +a dump due to a lack of acknowledgement. +The default may be too small in environments with lots of packet loss. +.It Va net.netdump.arp_retries +The number of times the client will attempt to learn the MAC address of +the configured gateway or server before giving up and aborting the dump. .El .Sh SEE ALSO .Xr decryptcore 8 , diff --git a/sys/netinet/netdump/netdump_client.c b/sys/netinet/netdump/netdump_client.c index a662fa86e9c7..9df2e731fa6e 100644 --- a/sys/netinet/netdump/netdump_client.c +++ b/sys/netinet/netdump/netdump_client.c @@ -117,18 +117,6 @@ static int restore_gw_addr; static uint64_t rcvd_acks; CTASSERT(sizeof(rcvd_acks) * NBBY == NETDUMP_MAX_IN_FLIGHT); -/* - * Times to poll the NIC (0.5ms each poll) before assuming packetloss - * occurred (default to 1s). - */ -static int nd_polls = 2000; - -/* Times to retransmit lost packets. */ -static int nd_retries = 10; - -/* Number of ARP retries. */ -static int nd_arp_retries = 3; - /* Configuration parameters. */ static struct netdump_conf nd_conf; #define nd_server nd_conf.ndc_server @@ -157,6 +145,18 @@ static char nd_path[MAXPATHLEN]; SYSCTL_STRING(_net_netdump, OID_AUTO, path, CTLFLAG_RW, nd_path, sizeof(nd_path), "Server path for output files"); +static int nd_polls = 2000; +SYSCTL_INT(_net_netdump, OID_AUTO, polls, CTLFLAG_RWTUN, + &nd_polls, 0, + "Number of times to poll before assuming packet loss (0.5ms per poll)"); +static int nd_retries = 10; +SYSCTL_INT(_net_netdump, OID_AUTO, retries, CTLFLAG_RWTUN, + &nd_retries, 0, + "Number of retransmit attempts before giving up"); +static int nd_arp_retries = 3; +SYSCTL_INT(_net_netdump, OID_AUTO, arp_retries, CTLFLAG_RWTUN, + &nd_arp_retries, 0, + "Number of ARP attempts before giving up"); /* * Checks for netdump support on a network interface -- cgit v1.3 From 567a3784c2d68c8f69c4ab213bd2f8249f21ef67 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Mon, 29 Oct 2018 22:24:31 +0000 Subject: Add support for "plain" (non-HMAC) SHA digests. MFC after: 2 months Sponsored by: Chelsio Communications --- sys/dev/cxgbe/crypto/t4_crypto.c | 116 ++++++++++++++++++++++++++++++++------- 1 file changed, 95 insertions(+), 21 deletions(-) (limited to 'sys') diff --git a/sys/dev/cxgbe/crypto/t4_crypto.c b/sys/dev/cxgbe/crypto/t4_crypto.c index 1b0c46a6ac1b..028430d0663e 100644 --- a/sys/dev/cxgbe/crypto/t4_crypto.c +++ b/sys/dev/cxgbe/crypto/t4_crypto.c @@ -61,6 +61,8 @@ __FBSDID("$FreeBSD$"); * | key context header | * +-------------------------------+ * | AES key | ----- For requests with AES + * +-------------------------------+ + * | Hash state | ----- For hash-only requests * +-------------------------------+ - * | IPAD (16-byte aligned) | \ * +-------------------------------+ +---- For requests with HMAC @@ -72,7 +74,7 @@ __FBSDID("$FreeBSD$"); * +-------------------------------+ +---- Destination buffer for * | PHYS_DSGL entries | / non-hash-only requests * +-------------------------------+ - - * | 16 dummy bytes | ----- Only for hash-only requests + * | 16 dummy bytes | ----- Only for HMAC/hash-only requests * +-------------------------------+ * | IV | ----- If immediate IV * +-------------------------------+ @@ -160,7 +162,7 @@ struct ccr_session_blkcipher { struct ccr_session { bool active; int pending; - enum { HMAC, BLKCIPHER, AUTHENC, GCM } mode; + enum { HASH, HMAC, BLKCIPHER, AUTHENC, GCM } mode; union { struct ccr_session_hmac hmac; struct ccr_session_gmac gmac; @@ -200,6 +202,7 @@ struct ccr_softc { /* Statistics. */ uint64_t stats_blkcipher_encrypt; uint64_t stats_blkcipher_decrypt; + uint64_t stats_hash; uint64_t stats_hmac; uint64_t stats_authenc_encrypt; uint64_t stats_authenc_decrypt; @@ -420,7 +423,7 @@ ccr_populate_wreq(struct ccr_softc *sc, struct chcr_wr *crwr, u_int kctx_len, } static int -ccr_hmac(struct ccr_softc *sc, struct ccr_session *s, struct cryptop *crp) +ccr_hash(struct ccr_softc *sc, struct ccr_session *s, struct cryptop *crp) { struct chcr_wr *crwr; struct wrqe *wr; @@ -428,8 +431,8 @@ ccr_hmac(struct ccr_softc *sc, struct ccr_session *s, struct cryptop *crp) struct cryptodesc *crd; char *dst; u_int hash_size_in_response, kctx_flits, kctx_len, transhdr_len, wr_len; - u_int imm_len, iopad_size; - int error, sgl_nsegs, sgl_len; + u_int hmac_ctrl, imm_len, iopad_size; + int error, sgl_nsegs, sgl_len, use_opad; crd = crp->crp_desc; @@ -439,6 +442,14 @@ ccr_hmac(struct ccr_softc *sc, struct ccr_session *s, struct cryptop *crp) axf = s->hmac.auth_hash; + if (s->mode == HMAC) { + use_opad = 1; + hmac_ctrl = CHCR_SCMD_HMAC_CTRL_NO_TRUNC; + } else { + use_opad = 0; + hmac_ctrl = CHCR_SCMD_HMAC_CTRL_NOP; + } + /* PADs must be 128-bit aligned. */ iopad_size = roundup2(s->hmac.partial_digest_len, 16); @@ -446,7 +457,9 @@ ccr_hmac(struct ccr_softc *sc, struct ccr_session *s, struct cryptop *crp) * The 'key' part of the context includes the aligned IPAD and * OPAD. */ - kctx_len = iopad_size * 2; + kctx_len = iopad_size; + if (use_opad) + kctx_len += iopad_size; hash_size_in_response = axf->hashsize; transhdr_len = HASH_TRANSHDR_SIZE(kctx_len); @@ -503,19 +516,21 @@ ccr_hmac(struct ccr_softc *sc, struct ccr_session *s, struct cryptop *crp) V_SCMD_PROTO_VERSION(CHCR_SCMD_PROTO_VERSION_GENERIC) | V_SCMD_CIPH_MODE(CHCR_SCMD_CIPHER_MODE_NOP) | V_SCMD_AUTH_MODE(s->hmac.auth_mode) | - V_SCMD_HMAC_CTRL(CHCR_SCMD_HMAC_CTRL_NO_TRUNC)); + V_SCMD_HMAC_CTRL(hmac_ctrl)); crwr->sec_cpl.ivgen_hdrlen = htobe32( V_SCMD_LAST_FRAG(0) | V_SCMD_MORE_FRAGS(crd->crd_len == 0 ? 1 : 0) | V_SCMD_MAC_ONLY(1)); memcpy(crwr->key_ctx.key, s->hmac.ipad, s->hmac.partial_digest_len); - memcpy(crwr->key_ctx.key + iopad_size, s->hmac.opad, - s->hmac.partial_digest_len); + if (use_opad) + memcpy(crwr->key_ctx.key + iopad_size, s->hmac.opad, + s->hmac.partial_digest_len); /* XXX: F_KEY_CONTEXT_SALT_PRESENT set, but 'salt' not set. */ kctx_flits = (sizeof(struct _key_ctx) + kctx_len) / 16; crwr->key_ctx.ctx_hdr = htobe32(V_KEY_CONTEXT_CTX_LEN(kctx_flits) | - V_KEY_CONTEXT_OPAD_PRESENT(1) | V_KEY_CONTEXT_SALT_PRESENT(1) | + V_KEY_CONTEXT_OPAD_PRESENT(use_opad) | + V_KEY_CONTEXT_SALT_PRESENT(1) | V_KEY_CONTEXT_CK_SIZE(CHCR_KEYCTX_NO_KEY) | V_KEY_CONTEXT_MK_SIZE(s->hmac.mk_size) | V_KEY_CONTEXT_VALID(1)); @@ -537,7 +552,7 @@ ccr_hmac(struct ccr_softc *sc, struct ccr_session *s, struct cryptop *crp) } static int -ccr_hmac_done(struct ccr_softc *sc, struct ccr_session *s, struct cryptop *crp, +ccr_hash_done(struct ccr_softc *sc, struct ccr_session *s, struct cryptop *crp, const struct cpl_fw6_pld *cpl, int error) { struct cryptodesc *crd; @@ -1591,6 +1606,8 @@ ccr_sysctls(struct ccr_softc *sc) NULL, "statistics"); children = SYSCTL_CHILDREN(oid); + SYSCTL_ADD_U64(ctx, children, OID_AUTO, "hash", CTLFLAG_RD, + &sc->stats_hash, 0, "Hash requests submitted"); SYSCTL_ADD_U64(ctx, children, OID_AUTO, "hmac", CTLFLAG_RD, &sc->stats_hmac, 0, "HMAC requests submitted"); SYSCTL_ADD_U64(ctx, children, OID_AUTO, "cipher_encrypt", CTLFLAG_RD, @@ -1666,6 +1683,11 @@ ccr_attach(device_t dev) sc->sg_iv_aad = sglist_build(sc->iv_aad_buf, MAX_AAD_LEN, M_WAITOK); ccr_sysctls(sc); + crypto_register(cid, CRYPTO_SHA1, 0, 0); + crypto_register(cid, CRYPTO_SHA2_224, 0, 0); + crypto_register(cid, CRYPTO_SHA2_256, 0, 0); + crypto_register(cid, CRYPTO_SHA2_384, 0, 0); + crypto_register(cid, CRYPTO_SHA2_512, 0, 0); crypto_register(cid, CRYPTO_SHA1_HMAC, 0, 0); crypto_register(cid, CRYPTO_SHA2_224_HMAC, 0, 0); crypto_register(cid, CRYPTO_SHA2_256_HMAC, 0, 0); @@ -1714,22 +1736,27 @@ ccr_copy_partial_hash(void *dst, int cri_alg, union authctx *auth_ctx) u32 = (uint32_t *)dst; u64 = (uint64_t *)dst; switch (cri_alg) { + case CRYPTO_SHA1: case CRYPTO_SHA1_HMAC: for (i = 0; i < SHA1_HASH_LEN / 4; i++) u32[i] = htobe32(auth_ctx->sha1ctx.h.b32[i]); break; + case CRYPTO_SHA2_224: case CRYPTO_SHA2_224_HMAC: for (i = 0; i < SHA2_256_HASH_LEN / 4; i++) u32[i] = htobe32(auth_ctx->sha224ctx.state[i]); break; + case CRYPTO_SHA2_256: case CRYPTO_SHA2_256_HMAC: for (i = 0; i < SHA2_256_HASH_LEN / 4; i++) u32[i] = htobe32(auth_ctx->sha256ctx.state[i]); break; + case CRYPTO_SHA2_384: case CRYPTO_SHA2_384_HMAC: for (i = 0; i < SHA2_512_HASH_LEN / 8; i++) u64[i] = htobe64(auth_ctx->sha384ctx.state[i]); break; + case CRYPTO_SHA2_512: case CRYPTO_SHA2_512_HMAC: for (i = 0; i < SHA2_512_HASH_LEN / 8; i++) u64[i] = htobe64(auth_ctx->sha512ctx.state[i]); @@ -1737,6 +1764,17 @@ ccr_copy_partial_hash(void *dst, int cri_alg, union authctx *auth_ctx) } } +static void +ccr_init_hash_digest(struct ccr_session *s, int cri_alg) +{ + union authctx auth_ctx; + struct auth_hash *axf; + + axf = s->hmac.auth_hash; + axf->Init(&auth_ctx); + ccr_copy_partial_hash(s->hmac.ipad, cri_alg, &auth_ctx); +} + static void ccr_init_hmac_digest(struct ccr_session *s, int cri_alg, char *key, int klen) @@ -1885,12 +1923,13 @@ ccr_newsession(device_t dev, crypto_session_t cses, struct cryptoini *cri) unsigned int auth_mode, cipher_mode, iv_len, mk_size; unsigned int partial_digest_len; int error; - bool gcm_hash; + bool gcm_hash, hmac; if (cri == NULL) return (EINVAL); gcm_hash = false; + hmac = false; cipher = NULL; hash = NULL; auth_hash = NULL; @@ -1901,6 +1940,11 @@ ccr_newsession(device_t dev, crypto_session_t cses, struct cryptoini *cri) partial_digest_len = 0; for (c = cri; c != NULL; c = c->cri_next) { switch (c->cri_alg) { + case CRYPTO_SHA1: + case CRYPTO_SHA2_224: + case CRYPTO_SHA2_256: + case CRYPTO_SHA2_384: + case CRYPTO_SHA2_512: case CRYPTO_SHA1_HMAC: case CRYPTO_SHA2_224_HMAC: case CRYPTO_SHA2_256_HMAC: @@ -1913,30 +1957,35 @@ ccr_newsession(device_t dev, crypto_session_t cses, struct cryptoini *cri) return (EINVAL); hash = c; switch (c->cri_alg) { + case CRYPTO_SHA1: case CRYPTO_SHA1_HMAC: auth_hash = &auth_hash_hmac_sha1; auth_mode = CHCR_SCMD_AUTH_MODE_SHA1; mk_size = CHCR_KEYCTX_MAC_KEY_SIZE_160; partial_digest_len = SHA1_HASH_LEN; break; + case CRYPTO_SHA2_224: case CRYPTO_SHA2_224_HMAC: auth_hash = &auth_hash_hmac_sha2_224; auth_mode = CHCR_SCMD_AUTH_MODE_SHA224; mk_size = CHCR_KEYCTX_MAC_KEY_SIZE_256; partial_digest_len = SHA2_256_HASH_LEN; break; + case CRYPTO_SHA2_256: case CRYPTO_SHA2_256_HMAC: auth_hash = &auth_hash_hmac_sha2_256; auth_mode = CHCR_SCMD_AUTH_MODE_SHA256; mk_size = CHCR_KEYCTX_MAC_KEY_SIZE_256; partial_digest_len = SHA2_256_HASH_LEN; break; + case CRYPTO_SHA2_384: case CRYPTO_SHA2_384_HMAC: auth_hash = &auth_hash_hmac_sha2_384; auth_mode = CHCR_SCMD_AUTH_MODE_SHA512_384; mk_size = CHCR_KEYCTX_MAC_KEY_SIZE_512; partial_digest_len = SHA2_512_HASH_LEN; break; + case CRYPTO_SHA2_512: case CRYPTO_SHA2_512_HMAC: auth_hash = &auth_hash_hmac_sha2_512; auth_mode = CHCR_SCMD_AUTH_MODE_SHA512_512; @@ -1951,6 +2000,15 @@ ccr_newsession(device_t dev, crypto_session_t cses, struct cryptoini *cri) mk_size = CHCR_KEYCTX_MAC_KEY_SIZE_128; break; } + switch (c->cri_alg) { + case CRYPTO_SHA1_HMAC: + case CRYPTO_SHA2_224_HMAC: + case CRYPTO_SHA2_256_HMAC: + case CRYPTO_SHA2_384_HMAC: + case CRYPTO_SHA2_512_HMAC: + hmac = true; + break; + } break; case CRYPTO_AES_CBC: case CRYPTO_AES_ICM: @@ -1992,8 +2050,12 @@ ccr_newsession(device_t dev, crypto_session_t cses, struct cryptoini *cri) return (EINVAL); if (hash == NULL && cipher == NULL) return (EINVAL); - if (hash != NULL && hash->cri_key == NULL) - return (EINVAL); + if (hash != NULL) { + if ((hmac || gcm_hash) && hash->cri_key == NULL) + return (EINVAL); + if (!(hmac || gcm_hash) && hash->cri_key != NULL) + return (EINVAL); + } sc = device_get_softc(dev); mtx_lock(&sc->lock); @@ -2008,9 +2070,12 @@ ccr_newsession(device_t dev, crypto_session_t cses, struct cryptoini *cri) s->mode = GCM; else if (hash != NULL && cipher != NULL) s->mode = AUTHENC; - else if (hash != NULL) - s->mode = HMAC; - else { + else if (hash != NULL) { + if (hmac) + s->mode = HMAC; + else + s->mode = HASH; + } else { MPASS(cipher != NULL); s->mode = BLKCIPHER; } @@ -2029,8 +2094,11 @@ ccr_newsession(device_t dev, crypto_session_t cses, struct cryptoini *cri) s->hmac.hash_len = auth_hash->hashsize; else s->hmac.hash_len = hash->cri_mlen; - ccr_init_hmac_digest(s, hash->cri_alg, hash->cri_key, - hash->cri_klen); + if (hmac) + ccr_init_hmac_digest(s, hash->cri_alg, hash->cri_key, + hash->cri_klen); + else + ccr_init_hash_digest(s, hash->cri_alg); } if (cipher != NULL) { s->blkcipher.cipher_mode = cipher_mode; @@ -2085,11 +2153,16 @@ ccr_process(device_t dev, struct cryptop *crp, int hint) } switch (s->mode) { + case HASH: + error = ccr_hash(sc, s, crp); + if (error == 0) + sc->stats_hash++; + break; case HMAC: if (crd->crd_flags & CRD_F_KEY_EXPLICIT) ccr_init_hmac_digest(s, crd->crd_alg, crd->crd_key, crd->crd_klen); - error = ccr_hmac(sc, s, crp); + error = ccr_hash(sc, s, crp); if (error == 0) sc->stats_hmac++; break; @@ -2240,8 +2313,9 @@ do_cpl6_fw_pld(struct sge_iq *iq, const struct rss_header *rss, sc->stats_inflight--; switch (s->mode) { + case HASH: case HMAC: - error = ccr_hmac_done(sc, s, crp, cpl, error); + error = ccr_hash_done(sc, s, crp, cpl, error); break; case BLKCIPHER: error = ccr_blkcipher_done(sc, s, crp, cpl, error); -- cgit v1.3 From f01fc2d0e82ace225ee12109ecfd82c93ab67899 Mon Sep 17 00:00:00 2001 From: Navdeep Parhar Date: Mon, 29 Oct 2018 22:35:46 +0000 Subject: cxgbe/iw_cxgbe: Install the socket upcall before calling soconnect to ensure that it always runs when soisconnected does. Submitted by: Krishnamraju Eraparaju @ Chelsio MFC after: 1 month Sponsored by: Chelsio Communications --- sys/dev/cxgbe/iw_cxgbe/cm.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'sys') diff --git a/sys/dev/cxgbe/iw_cxgbe/cm.c b/sys/dev/cxgbe/iw_cxgbe/cm.c index bf9cf46608f6..f15ec321ad64 100644 --- a/sys/dev/cxgbe/iw_cxgbe/cm.c +++ b/sys/dev/cxgbe/iw_cxgbe/cm.c @@ -2601,22 +2601,24 @@ int c4iw_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param) goto fail; setiwsockopt(ep->com.so); + init_iwarp_socket(ep->com.so, &ep->com); err = -soconnect(ep->com.so, (struct sockaddr *)&ep->com.remote_addr, ep->com.thread); - if (!err) { - init_iwarp_socket(ep->com.so, &ep->com); - goto out; - } else + if (err) goto fail_free_so; + CTR2(KTR_IW_CXGBE, "%s:ccE, ep %p", __func__, ep); + return 0; fail_free_so: + uninit_iwarp_socket(ep->com.so); + ep->com.state = DEAD; sock_release(ep->com.so); fail: deref_cm_id(&ep->com); c4iw_put_ep(&ep->com); ep = NULL; out: - CTR2(KTR_IW_CXGBE, "%s:ccE ret:%d", __func__, err); + CTR2(KTR_IW_CXGBE, "%s:ccE Error %d", __func__, err); return err; } -- cgit v1.3 From 6acf1b203ff9dfe823d893e21425077519830510 Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Mon, 29 Oct 2018 23:43:17 +0000 Subject: Clarify explanation of VFCF_SBDRY. Requested by: mckusick Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/sys/mount.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys') diff --git a/sys/sys/mount.h b/sys/sys/mount.h index 51d709052850..ac1c215b9a83 100644 --- a/sys/sys/mount.h +++ b/sys/sys/mount.h @@ -554,7 +554,8 @@ struct ovfsconf { #define VFCF_UNICODE 0x00200000 /* stores file names as Unicode */ #define VFCF_JAIL 0x00400000 /* can be mounted from within a jail */ #define VFCF_DELEGADMIN 0x00800000 /* supports delegated administration */ -#define VFCF_SBDRY 0x01000000 /* defer stop requests */ +#define VFCF_SBDRY 0x01000000 /* Stop at Boundary: defer stop requests + to kernel->user (AST) transition */ typedef uint32_t fsctlop_t; -- cgit v1.3 From 93177620ee951331e39388613a2c9b3448ac8096 Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Mon, 29 Oct 2018 23:45:17 +0000 Subject: Style. Wrap long lines, use +4 spaces for continuation indent. Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/amd64/amd64/machdep.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) (limited to 'sys') diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 87e018e09b8f..2432adcb492b 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -2683,25 +2683,31 @@ DEFINE_IFUNC(, void *, memset, (void *, int, size_t), static) { return ((cpu_stdext_feature & CPUID_STDEXT_ERMS) != 0 ? - memset_erms : memset_std); + memset_erms : memset_std); } -void *memmove_std(void * _Nonnull dst, const void * _Nonnull src, size_t len); -void *memmove_erms(void * _Nonnull dst, const void * _Nonnull src, size_t len); -DEFINE_IFUNC(, void *, memmove, (void * _Nonnull, const void * _Nonnull, size_t), static) +void *memmove_std(void * _Nonnull dst, const void * _Nonnull src, + size_t len); +void *memmove_erms(void * _Nonnull dst, const void * _Nonnull src, + size_t len); +DEFINE_IFUNC(, void *, memmove, (void * _Nonnull, const void * _Nonnull, + size_t), static) { return ((cpu_stdext_feature & CPUID_STDEXT_ERMS) != 0 ? - memmove_erms : memmove_std); + memmove_erms : memmove_std); } -void *memcpy_std(void * _Nonnull dst, const void * _Nonnull src, size_t len); -void *memcpy_erms(void * _Nonnull dst, const void * _Nonnull src, size_t len); -DEFINE_IFUNC(, void *, memcpy, (void * _Nonnull, const void * _Nonnull, size_t), static) +void *memcpy_std(void * _Nonnull dst, const void * _Nonnull src, + size_t len); +void *memcpy_erms(void * _Nonnull dst, const void * _Nonnull src, + size_t len); +DEFINE_IFUNC(, void *, memcpy, (void * _Nonnull, const void * _Nonnull,size_t), + static) { return ((cpu_stdext_feature & CPUID_STDEXT_ERMS) != 0 ? - memcpy_erms : memcpy_std); + memcpy_erms : memcpy_std); } void pagezero_std(void *addr); @@ -2710,5 +2716,5 @@ DEFINE_IFUNC(, void , pagezero, (void *), static) { return ((cpu_stdext_feature & CPUID_STDEXT_ERMS) != 0 ? - pagezero_erms : pagezero_std); + pagezero_erms : pagezero_std); } -- cgit v1.3 From 9775a6ebd2c2fc1f673553b6516a2027fa197870 Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Mon, 29 Oct 2018 23:52:31 +0000 Subject: amd64: Use ifuncs to select suitable implementation of set_pcb_flags(). There is no reason to check for PCB_FULL_IRET if FSGSBASE instructions are not supported. Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/amd64/amd64/machdep.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'sys') diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 2432adcb492b..a743d8c63e1b 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -2616,15 +2616,14 @@ set_pcb_flags_raw(struct pcb *pcb, const u_int flags) * the PCB_FULL_IRET flag is set. We disable interrupts to sync with * context switches. */ -void -set_pcb_flags(struct pcb *pcb, const u_int flags) +static void +set_pcb_flags_fsgsbase(struct pcb *pcb, const u_int flags) { register_t r; if (curpcb == pcb && (flags & PCB_FULL_IRET) != 0 && - (pcb->pcb_flags & PCB_FULL_IRET) == 0 && - (cpu_stdext_feature & CPUID_STDEXT_FSGSBASE) != 0) { + (pcb->pcb_flags & PCB_FULL_IRET) == 0) { r = intr_disable(); if ((pcb->pcb_flags & PCB_FULL_IRET) == 0) { if (rfs() == _ufssel) @@ -2639,6 +2638,13 @@ set_pcb_flags(struct pcb *pcb, const u_int flags) } } +DEFINE_IFUNC(, void, set_pcb_flags, (struct pcb *, const u_int), static) +{ + + return ((cpu_stdext_feature & CPUID_STDEXT_FSGSBASE) != 0 ? + set_pcb_flags_fsgsbase : set_pcb_flags_raw); +} + void clear_pcb_flags(struct pcb *pcb, const u_int flags) { -- cgit v1.3 From 68d0cda6618fed0bf55c1012694346f85e399d39 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Tue, 30 Oct 2018 00:19:44 +0000 Subject: Make battery emptying rate available as sysctl variable. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Curiously, the in-kernel routines always use the design voltage to convert from mA to mW, but acpiconf in userland uses the current voltage. As a result, this can report a different mW rate than acpiconf. Submitted by: Manuel Stühn MFC after: 2 months Differential Revision: https://reviews.freebsd.org/D17077 --- sys/dev/acpica/acpi_battery.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sys') diff --git a/sys/dev/acpica/acpi_battery.c b/sys/dev/acpica/acpi_battery.c index 3d7d94ab1c2b..a9ed4796c767 100644 --- a/sys/dev/acpica/acpi_battery.c +++ b/sys/dev/acpica/acpi_battery.c @@ -485,6 +485,11 @@ acpi_battery_init(void) OID_AUTO, "time", CTLTYPE_INT | CTLFLAG_RD, &acpi_battery_battinfo.min, 0, acpi_battery_sysctl, "I", "remaining time in minutes"); + SYSCTL_ADD_PROC(&acpi_battery_sysctl_ctx, + SYSCTL_CHILDREN(acpi_battery_sysctl_tree), + OID_AUTO, "rate", CTLTYPE_INT | CTLFLAG_RD, + &acpi_battery_battinfo.rate, 0, acpi_battery_sysctl, "I", + "present rate in mW"); SYSCTL_ADD_PROC(&acpi_battery_sysctl_ctx, SYSCTL_CHILDREN(acpi_battery_sysctl_tree), OID_AUTO, "state", CTLTYPE_INT | CTLFLAG_RD, -- cgit v1.3 From 25c9cca75768bbbd1f970d5b5da5d3773e20b080 Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Tue, 30 Oct 2018 00:22:14 +0000 Subject: Have gconcat advertise delete support if one of its disks does. This follows the example set by other multi-disk GEOM classes. PR: 232676 Tested by: noah.bergbauer@tum.de MFC after: 1 month --- sys/geom/concat/g_concat.c | 35 +++++++++++++++++++++++++++++++++++ sys/geom/concat/g_concat.h | 1 + 2 files changed, 36 insertions(+) (limited to 'sys') diff --git a/sys/geom/concat/g_concat.c b/sys/geom/concat/g_concat.c index 8e1a5dd60698..f9be59101592 100644 --- a/sys/geom/concat/g_concat.c +++ b/sys/geom/concat/g_concat.c @@ -205,6 +205,27 @@ fail: return (error); } +static void +g_concat_candelete(struct bio *bp) +{ + struct g_concat_softc *sc; + struct g_concat_disk *disk; + int i, *val; + + val = (int *)bp->bio_data; + *val = 0; + + sc = bp->bio_to->geom->softc; + for (i = 0; i < sc->sc_ndisks; i++) { + disk = &sc->sc_disks[i]; + if (!disk->d_removed && disk->d_candelete) { + *val = 1; + break; + } + } + g_io_deliver(bp, 0); +} + static void g_concat_kernel_dump(struct bio *bp) { @@ -327,6 +348,9 @@ g_concat_start(struct bio *bp) if (strcmp("GEOM::kerneldump", bp->bio_attribute) == 0) { g_concat_kernel_dump(bp); return; + } else if (strcmp("GEOM::candelete", bp->bio_attribute) == 0) { + g_concat_candelete(bp); + return; } /* To which provider it should be delivered? */ /* FALLTHROUGH */ @@ -408,6 +432,7 @@ g_concat_check_and_run(struct g_concat_softc *sc) struct g_provider *dp, *pp; u_int no, sectorsize = 0; off_t start; + int error; g_topology_assert(); if (g_concat_nvalid(sc) != sc->sc_ndisks) @@ -425,6 +450,16 @@ g_concat_check_and_run(struct g_concat_softc *sc) if (sc->sc_type == G_CONCAT_TYPE_AUTOMATIC) disk->d_end -= dp->sectorsize; start = disk->d_end; + error = g_access(disk->d_consumer, 1, 0, 0); + if (error == 0) { + error = g_getattr("GEOM::candelete", disk->d_consumer, + &disk->d_candelete); + if (error != 0) + disk->d_candelete = 0; + (void)g_access(disk->d_consumer, -1, 0, 0); + } else + G_CONCAT_DEBUG(1, "Failed to access disk %s, error %d.", + dp->name, error); if (no == 0) sectorsize = dp->sectorsize; else diff --git a/sys/geom/concat/g_concat.h b/sys/geom/concat/g_concat.h index 09cc554b1968..da7b6ff72202 100644 --- a/sys/geom/concat/g_concat.h +++ b/sys/geom/concat/g_concat.h @@ -74,6 +74,7 @@ struct g_concat_disk { struct g_concat_softc *d_softc; off_t d_start; off_t d_end; + int d_candelete; int d_removed; }; -- cgit v1.3 From cd785c1b34467c93168697ab1d8d733266730b3b Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Tue, 30 Oct 2018 00:23:37 +0000 Subject: Permit local kernel modules to be built as part of a kernel build. Add support for "local" modules. By default, these modules are located in LOCALBASE/sys/modules (where LOCALBASE defaults to /usr/local). Individual modules can be built along with a kernel by defining LOCAL_MODULES to the list of modules. Each is assumed to be a subdirectory containing a valid Makefile. If LOCAL_MODULES is not specified, all of the modules present in LOCALBASE/sys/modules are built and installed along with the kernel. This means that a port that installs a kernel module can choose to install its source along with a suitable Makefile to /usr/local/sys/modules/. Future kernel builds will then include that kernel module using the kernel configuration's opt_*.h headers and install it into /boot/kernel along with other kernel-specific modules. This is not trying to solve the issue of folks running GENERIC release kernels, but is instead aimed at folks who build their own kernels. For those folks this ensures that kernel modules from ports will always be using the right KBI, etc. This includes folks running any KBI-breaking kernel configs (such as PAE). There are still some kinks to be worked out with cross-building (we probably shouldn't include local modules in cross-built kernels by default), but this is a sufficient starting point. Reviewed by: imp MFC after: 3 months Relnotes: yes Differential Revision: https://reviews.freebsd.org/D16966 --- sys/conf/kern.post.mk | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) (limited to 'sys') diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk index 046080f42f1c..bb85e919026c 100644 --- a/sys/conf/kern.post.mk +++ b/sys/conf/kern.post.mk @@ -35,15 +35,34 @@ KERN_DEBUGDIR?= ${DEBUGDIR} .MAIN: all +.if !defined(NO_MODULES) +# Default prefix used for modules installed from ports +LOCALBASE?= /usr/local + +LOCAL_MODULES_DIR?= ${LOCALBASE}/sys/modules + +# Default to installing all modules installed by ports unless overridden +# by the user. +.if !defined(LOCAL_MODULES) +LOCAL_MODULES!= ls ${LOCAL_MODULES_DIR} +.endif +.endif + .for target in all clean cleandepend cleandir clobber depend install \ ${_obj} reinstall tags ${target}: kernel-${target} -.if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists($S/modules) +.if !defined(NO_MODULES) ${target}: modules-${target} modules-${target}: +.if !defined(MODULES_WITH_WORLD) && exists($S/modules) cd $S/modules; ${MKMODULESENV} ${MAKE} \ ${target:S/^reinstall$/install/:S/^clobber$/cleandir/} .endif +.for module in ${LOCAL_MODULES} + cd ${LOCAL_MODULES_DIR}/${module}; ${MKMODULESENV} ${MAKE} \ + ${target:S/^reinstall$/install/:S/^clobber$/cleandir/} +.endfor +.endif .endfor # Handle ports (as defined by the user) that build kernel modules @@ -51,8 +70,6 @@ modules-${target}: # # The ports tree needs some environment variables defined to match the new kernel # -# Ports search for some dependencies in PATH, so add the location of the installed files -LOCALBASE?= /usr/local # SRC_BASE is how the ports tree refers to the location of the base source files .if !defined(SRC_BASE) SRC_BASE= ${SYSDIR:H:tA} @@ -64,6 +81,9 @@ OSRELDATE!= awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $$3 }' \ ${MAKEOBJDIRPREFIX}${SRC_BASE}/include/osreldate.h .endif # Keep the related ports builds in the obj directory so that they are only rebuilt once per kernel build +# +# Ports search for some dependencies in PATH, so add the location of the +# installed files WRKDIRPREFIX?= ${.OBJDIR} PORTSMODULESENV=\ env \ @@ -110,7 +130,7 @@ kernel-clobber: kernel-obj: -.if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists($S/modules) +.if !defined(NO_MODULES) modules: modules-all .if !defined(NO_MODULES_OBJ) -- cgit v1.3 From a37c714a0fc5dd681b02e852fe431ff56b34c626 Mon Sep 17 00:00:00 2001 From: Justin Hibbits Date: Tue, 30 Oct 2018 00:47:40 +0000 Subject: powerpc/mpc85xx: Reset the PCIe bus on attach It seems if a Radeon card is already initialized by u-boot, it won't be reinitialized by the kernel, and the DRM module will fail to attach. This steals the reset code from mips/octopci.c to blindly reset the bus on attach. This was tested on a AmigaOne X5000/20, such that it can be booted from the local video console, and get a video console in FreeBSD. --- sys/powerpc/mpc85xx/pci_mpc85xx.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'sys') diff --git a/sys/powerpc/mpc85xx/pci_mpc85xx.c b/sys/powerpc/mpc85xx/pci_mpc85xx.c index 7a339cc1e301..f1278d4d7646 100644 --- a/sys/powerpc/mpc85xx/pci_mpc85xx.c +++ b/sys/powerpc/mpc85xx/pci_mpc85xx.c @@ -562,7 +562,7 @@ fsl_pcib_init(struct fsl_pcib_softc *sc, int bus, int maxslot) int new_pribus, new_secbus, new_subbus; int slot, func, maxfunc; uint16_t vendor, device; - uint8_t command, hdrtype, subclass; + uint8_t brctl, command, hdrtype, subclass; secbus = bus; for (slot = 0; slot <= maxslot; slot++) { @@ -606,6 +606,17 @@ fsl_pcib_init(struct fsl_pcib_softc *sc, int bus, int maxslot) if (hdrtype != PCIM_HDRTYPE_BRIDGE) continue; + brctl = fsl_pcib_read_config(sc->sc_dev, bus, slot, func, + PCIR_BRIDGECTL_1, 1); + brctl |= PCIB_BCR_SECBUS_RESET; + fsl_pcib_write_config(sc->sc_dev, bus, slot, func, + PCIR_BRIDGECTL_1, brctl, 1); + DELAY(100000); + brctl &= ~PCIB_BCR_SECBUS_RESET; + fsl_pcib_write_config(sc->sc_dev, bus, slot, func, + PCIR_BRIDGECTL_1, brctl, 1); + DELAY(100000); + secbus++; /* Read currect bus register configuration */ -- cgit v1.3 From fbd8c330223bc4f4d13d018393b295184d611634 Mon Sep 17 00:00:00 2001 From: Marcelo Araujo Date: Tue, 30 Oct 2018 09:53:57 +0000 Subject: Allow changing lagg(4) MTU. Previously, changing the MTU would require destroying the lagg and creating a new one. Now it is allowed to change the MTU of the lagg interface and the MTU of the ports will be set to match. If any port cannot set the new MTU, all ports are reverted to the original MTU of the lagg. Additionally, when adding ports, the MTU of a port will be automatically set to the MTU of the lagg. As always, the MTU of the lagg is initially determined by the MTU of the first port added. If adding an interface as a port for some reason fails, that interface is reverted to its original MTU. Submitted by: Ryan Moeller Reviewed by: mav Relnotes: Yes Sponsored by: iXsystems Inc. Differential Revision: https://reviews.freebsd.org/D17576 --- sys/net/if_lagg.c | 67 ++++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 59 insertions(+), 8 deletions(-) (limited to 'sys') diff --git a/sys/net/if_lagg.c b/sys/net/if_lagg.c index b70916be8148..a1e7908f55ed 100644 --- a/sys/net/if_lagg.c +++ b/sys/net/if_lagg.c @@ -633,11 +633,18 @@ lagg_port_create(struct lagg_softc *sc, struct ifnet *ifp) { struct lagg_softc *sc_ptr; struct lagg_port *lp, *tlp; - int error, i; + struct ifreq ifr; + int error, i, oldmtu; uint64_t *pval; LAGG_XLOCK_ASSERT(sc); + if (sc->sc_ifp == ifp) { + if_printf(sc->sc_ifp, + "cannot add a lagg to itself as a port\n"); + return (EINVAL); + } + /* Limit the maximal number of lagg ports */ if (sc->sc_count >= LAGG_MAX_PORTS) return (ENOSPC); @@ -656,12 +663,25 @@ lagg_port_create(struct lagg_softc *sc, struct ifnet *ifp) return (EPROTONOSUPPORT); /* Allow the first Ethernet member to define the MTU */ - if (CK_SLIST_EMPTY(&sc->sc_ports)) + oldmtu = -1; + if (CK_SLIST_EMPTY(&sc->sc_ports)) { sc->sc_ifp->if_mtu = ifp->if_mtu; - else if (sc->sc_ifp->if_mtu != ifp->if_mtu) { - if_printf(sc->sc_ifp, "invalid MTU for %s\n", - ifp->if_xname); - return (EINVAL); + } else if (sc->sc_ifp->if_mtu != ifp->if_mtu) { + if (ifp->if_ioctl == NULL) { + if_printf(sc->sc_ifp, "cannot change MTU for %s\n", + ifp->if_xname); + return (EINVAL); + } + oldmtu = ifp->if_mtu; + strlcpy(ifr.ifr_name, ifp->if_xname, sizeof(ifr.ifr_name)); + ifr.ifr_mtu = sc->sc_ifp->if_mtu; + error = (*ifp->if_ioctl)(ifp, SIOCSIFMTU, (caddr_t)&ifr); + if (error != 0) { + if_printf(sc->sc_ifp, "invalid MTU for %s\n", + ifp->if_xname); + return (error); + } + ifr.ifr_mtu = oldmtu; } lp = malloc(sizeof(struct lagg_port), M_DEVBUF, M_WAITOK|M_ZERO); @@ -673,6 +693,9 @@ lagg_port_create(struct lagg_softc *sc, struct ifnet *ifp) if (ifp == sc_ptr->sc_ifp) { LAGG_LIST_UNLOCK(); free(lp, M_DEVBUF); + if (oldmtu != -1) + (*ifp->if_ioctl)(ifp, SIOCSIFMTU, + (caddr_t)&ifr); return (EINVAL); /* XXX disable stacking for the moment, its untested */ #ifdef LAGG_PORT_STACKING @@ -681,6 +704,9 @@ lagg_port_create(struct lagg_softc *sc, struct ifnet *ifp) LAGG_MAX_STACKING) { LAGG_LIST_UNLOCK(); free(lp, M_DEVBUF); + if (oldmtu != -1) + (*ifp->if_ioctl)(ifp, SIOCSIFMTU, + (caddr_t)&ifr); return (E2BIG); } #endif @@ -746,6 +772,8 @@ lagg_port_create(struct lagg_softc *sc, struct ifnet *ifp) if ((error = lagg_proto_addport(sc, lp)) != 0) { /* Remove the port, without calling pr_delport. */ lagg_port_destroy(lp, 0); + if (oldmtu != -1) + (*ifp->if_ioctl)(ifp, SIOCSIFMTU, (caddr_t)&ifr); return (error); } @@ -1464,8 +1492,31 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) break; case SIOCSIFMTU: - /* Do not allow the MTU to be directly changed */ - error = EINVAL; + LAGG_XLOCK(sc); + CK_SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) { + if (lp->lp_ioctl != NULL) + error = (*lp->lp_ioctl)(lp->lp_ifp, cmd, data); + else + error = EINVAL; + if (error != 0) { + if_printf(ifp, + "failed to change MTU to %d on port %s, " + "reverting all ports to original MTU (%d)\n", + ifr->ifr_mtu, lp->lp_ifp->if_xname, ifp->if_mtu); + break; + } + } + if (error == 0) { + ifp->if_mtu = ifr->ifr_mtu; + } else { + /* set every port back to the original MTU */ + ifr->ifr_mtu = ifp->if_mtu; + CK_SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) { + if (lp->lp_ioctl != NULL) + (*lp->lp_ioctl)(lp->lp_ifp, cmd, data); + } + } + LAGG_XUNLOCK(sc); break; default: -- cgit v1.3 From 5bae7542d4ee6f79838594156a4878c53f7caf5b Mon Sep 17 00:00:00 2001 From: Marcelo Araujo Date: Tue, 30 Oct 2018 10:02:23 +0000 Subject: Emulate machine check related MSR_EXTFEATURES to allow guest OSes to boot on AMD FX Series. PR: 224476 Submitted by: Keita Uchida Reviewed by: rgrimes Sponsored by: iXsystems Inc. Differential Revision: https://reviews.freebsd.org/D17713 --- sys/amd64/vmm/amd/svm_msr.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sys') diff --git a/sys/amd64/vmm/amd/svm_msr.c b/sys/amd64/vmm/amd/svm_msr.c index 0417983233a9..25455886a869 100644 --- a/sys/amd64/vmm/amd/svm_msr.c +++ b/sys/amd64/vmm/amd/svm_msr.c @@ -127,6 +127,9 @@ svm_rdmsr(struct svm_softc *sc, int vcpu, u_int num, uint64_t *result, case MSR_AMDK8_IPM: *result = 0; break; + case MSR_EXTFEATURES: + *result = 0; + break; default: error = EINVAL; break; @@ -163,6 +166,8 @@ svm_wrmsr(struct svm_softc *sc, int vcpu, u_int num, uint64_t val, bool *retu) * Ignore writes to microcode update register. */ break; + case MSR_EXTFEATURES: + break; default: error = EINVAL; break; -- cgit v1.3 From d59a162c118b3e3befb4f0a46ecd1cf6e5bdf353 Mon Sep 17 00:00:00 2001 From: Michael Tuexen Date: Tue, 30 Oct 2018 11:51:09 +0000 Subject: Bump the number of fans supported from 8 to 12. The number of fans on a PowerMac7,3 with liquid cooling is 9. Reviewed by: andreast@ MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D17754 --- sys/powerpc/powermac/fcu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys') diff --git a/sys/powerpc/powermac/fcu.c b/sys/powerpc/powermac/fcu.c index a1841a57ffe1..7b45aebab7c0 100644 --- a/sys/powerpc/powermac/fcu.c +++ b/sys/powerpc/powermac/fcu.c @@ -451,9 +451,9 @@ fcu_fill_fan_prop(device_t dev) { phandle_t child; struct fcu_softc *sc; - u_int id[8]; - char location[96]; - char type[64]; + u_int id[12]; + char location[144]; + char type[96]; int i = 0, j, len = 0, prop_len, prev_len = 0; sc = device_get_softc(dev); -- cgit v1.3 From fcbb889fdb3b784c57a69af58d7ee678db2fc88d Mon Sep 17 00:00:00 2001 From: Eric van Gyzen Date: Tue, 30 Oct 2018 14:54:15 +0000 Subject: Always stop the scheduler when entering kdb Set curthread->td_stopsched when entering kdb via any vector. Previously, it was only set when entering via panic, so when entering kdb another way, mutexes and such were still "live", and an attempt to lock an already locked mutex would panic. Reviewed by: kib, cem Discussed with: jhb Tested by: pho MFC after: 2 months Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D17687 --- sys/kern/subr_kdb.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'sys') diff --git a/sys/kern/subr_kdb.c b/sys/kern/subr_kdb.c index 61616088871f..f6f105743245 100644 --- a/sys/kern/subr_kdb.c +++ b/sys/kern/subr_kdb.c @@ -652,9 +652,7 @@ kdb_trap(int type, int code, struct trapframe *tf) struct kdb_dbbe *be; register_t intr; int handled; -#ifdef SMP int did_stop_cpus; -#endif be = kdb_dbbe; if (be == NULL || be->dbbe_trap == NULL) @@ -666,16 +664,17 @@ kdb_trap(int type, int code, struct trapframe *tf) intr = intr_disable(); -#ifdef SMP if (!SCHEDULER_STOPPED()) { +#ifdef SMP other_cpus = all_cpus; CPU_NAND(&other_cpus, &stopped_cpus); CPU_CLR(PCPU_GET(cpuid), &other_cpus); stop_cpus_hard(other_cpus); +#endif + curthread->td_stopsched = 1; did_stop_cpus = 1; } else did_stop_cpus = 0; -#endif kdb_active++; @@ -703,12 +702,13 @@ kdb_trap(int type, int code, struct trapframe *tf) kdb_active--; -#ifdef SMP if (did_stop_cpus) { + curthread->td_stopsched = 0; +#ifdef SMP CPU_AND(&other_cpus, &stopped_cpus); restart_cpus(other_cpus); - } #endif + } intr_restore(intr); -- cgit v1.3 From 43f75d57a243e9e2fac963b46f8eb241e7c58435 Mon Sep 17 00:00:00 2001 From: "Bjoern A. Zeeb" Date: Tue, 30 Oct 2018 15:46:30 +0000 Subject: Introduce an EXPERIMENTAL option for both src.conf(5) and the kernel. In the last decade(s) we have seen both short term or long term projects committed to the tree which were considered or even marked "experimental". While out-of-tree development has become easier than it used to be in CVS times, there still is a need to have the code shipping with HEAD but not enabled by default. While people may think about VIMAGE as one of the recent larger, long term projects, early protocol implementations (before they are standardised) are others. (Free)BSD historically was one of the operating systems which would have running code at early stages and help develop and influence standardisation and the industry. Give developers an opportunity to be more pro-active for early adoption or running large scale code changes stumbling over each others but not the user's feet. I have not added the option to NOTES in order to avoid breaking supported option builds, which require constant compile testing. Discussed with: people in the corridor --- share/man/man5/src.conf.5 | 4 +++- share/mk/src.opts.mk | 1 + sys/conf/options | 1 + tools/build/options/WITH_EXPERIMENTAL | 2 ++ 4 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 tools/build/options/WITH_EXPERIMENTAL (limited to 'sys') diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index 37fb5ef571c1..c62a6d605615 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd October 25, 2018 +.Dd October 30, 2018 .Dt SRC.CONF 5 .Os .Sh NAME @@ -659,6 +659,8 @@ An alternate bootstrap tool chain must be provided. .It Va WITHOUT_EXAMPLES Set to avoid installing examples to .Pa /usr/share/examples/ . +.It Va WITH_EXPERIMENTAL +Set to include experimental features in the build. .It Va WITH_EXTRA_TCP_STACKS Set to build extra TCP stack modules. .It Va WITHOUT_FDT diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index 7091db36459f..10aa1e8986ac 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -197,6 +197,7 @@ __DEFAULT_NO_OPTIONS = \ BSD_GREP \ CLANG_EXTRAS \ DTRACE_TESTS \ + EXPERIMENTAL \ GNU_GREP_COMPAT \ HESIOD \ LIBSOFT \ diff --git a/sys/conf/options b/sys/conf/options index 2519d17411e7..9d86cbdfd663 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -95,6 +95,7 @@ _COMPAT_LINUX32 opt_compat.h # XXX: make sure opt_compat.h exists COMPILING_LINT opt_global.h CY_PCI_FASTINTR DEADLKRES opt_watchdog.h +EXPERIMENTAL opt_global.h EXT_RESOURCES opt_global.h DIRECTIO FILEMON opt_dontuse.h diff --git a/tools/build/options/WITH_EXPERIMENTAL b/tools/build/options/WITH_EXPERIMENTAL new file mode 100644 index 000000000000..677edb6a081a --- /dev/null +++ b/tools/build/options/WITH_EXPERIMENTAL @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to include experimental features in the build. -- cgit v1.3 From bf05cd05ac79bef5f4926b086259bebbf8d36744 Mon Sep 17 00:00:00 2001 From: Hans Petter Selasky Date: Tue, 30 Oct 2018 16:32:52 +0000 Subject: Implement __KERNEL_DIV_ROUND_UP() function macro in the LinuxKPI. Submitted by: Johannes Lundberg MFC after: 3 days Sponsored by: Mellanox Technologies --- sys/compat/linuxkpi/common/include/linux/kernel.h | 1 + 1 file changed, 1 insertion(+) (limited to 'sys') diff --git a/sys/compat/linuxkpi/common/include/linux/kernel.h b/sys/compat/linuxkpi/common/include/linux/kernel.h index b66323d945de..8d2eab9d5272 100644 --- a/sys/compat/linuxkpi/common/include/linux/kernel.h +++ b/sys/compat/linuxkpi/common/include/linux/kernel.h @@ -131,6 +131,7 @@ #undef PTR_ALIGN #define PTR_ALIGN(p, a) ((__typeof(p))ALIGN((uintptr_t)(p), (a))) #define DIV_ROUND_UP(x, n) howmany(x, n) +#define __KERNEL_DIV_ROUND_UP(x, n) howmany(x, n) #define DIV_ROUND_UP_ULL(x, n) DIV_ROUND_UP((unsigned long long)(x), (n)) #define FIELD_SIZEOF(t, f) sizeof(((t *)0)->f) -- cgit v1.3 From e35079db73e74715ae6d56364dde4bf7dd970378 Mon Sep 17 00:00:00 2001 From: Hans Petter Selasky Date: Tue, 30 Oct 2018 16:42:56 +0000 Subject: Implement the dump_stack() function in the LinuxKPI. Submitted by: Johannes Lundberg MFC after: 3 days Sponsored by: Mellanox Technologies --- sys/compat/linuxkpi/common/include/linux/kernel.h | 3 +++ sys/compat/linuxkpi/common/src/linux_compat.c | 15 +++++++++++++++ sys/modules/linuxkpi/Makefile | 3 ++- 3 files changed, 20 insertions(+), 1 deletion(-) (limited to 'sys') diff --git a/sys/compat/linuxkpi/common/include/linux/kernel.h b/sys/compat/linuxkpi/common/include/linux/kernel.h index 8d2eab9d5272..5ff30ba9c28d 100644 --- a/sys/compat/linuxkpi/common/include/linux/kernel.h +++ b/sys/compat/linuxkpi/common/include/linux/kernel.h @@ -138,6 +138,9 @@ #define printk(...) printf(__VA_ARGS__) #define vprintk(f, a) vprintf(f, a) +extern void linux_dump_stack(void); +#define dump_stack() linux_dump_stack() + struct va_format { const char *fmt; va_list *va; diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c index e3fb0a0ce496..1cae0fcf1427 100644 --- a/sys/compat/linuxkpi/common/src/linux_compat.c +++ b/sys/compat/linuxkpi/common/src/linux_compat.c @@ -30,6 +30,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_stack.h" + #include #include #include @@ -46,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -2207,6 +2210,18 @@ __unregister_chrdev(unsigned int major, unsigned int baseminor, } } +void +linux_dump_stack(void) +{ +#ifdef STACK + struct stack st; + + stack_zero(&st); + stack_save(&st); + stack_print(&st); +#endif +} + #if defined(__i386__) || defined(__amd64__) bool linux_cpu_has_clflush; #endif diff --git a/sys/modules/linuxkpi/Makefile b/sys/modules/linuxkpi/Makefile index bc9716b50ade..4a7e7544ae51 100644 --- a/sys/modules/linuxkpi/Makefile +++ b/sys/modules/linuxkpi/Makefile @@ -24,7 +24,8 @@ SRCS+= bus_if.h \ pci_if.h \ vnode_if.h \ usb_if.h \ - opt_usb.h + opt_usb.h \ + opt_stack.h CFLAGS+= -I${SRCTOP}/sys/compat/linuxkpi/common/include CFLAGS+= -I${SRCTOP}/sys/contrib/ck/include -- cgit v1.3 From 920239efdee0fd217045fd6b15802374f1c43570 Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Tue, 30 Oct 2018 17:57:40 +0000 Subject: Fix some problems that manifest when NUMA domain 0 is empty. - In uma_prealloc(), we need to check for an empty domain before the first allocation attempt, not after. Fix this by switching uma_prealloc() to use a vm_domainset iterator, which addresses the secondary issue of using a signed domain identifier in round-robin iteration. - Don't automatically create a page daemon for domain 0. - In domainset_empty_vm(), recompute ds_cnt and ds_order after excluding empty domains; otherwise we may frequently specify an empty domain when calling in to the page allocator, wasting CPU time. Convert DOMAINSET_PREF() policies for empty domains to round-robin. - When freeing bootstrap pages, don't count them towards the per-domain total page counts for now: some vm_phys segments are created before the SRAT is parsed and are thus always identified as being in domain 0 even when they are not. Then, when bootstrap pages are freed, they are added to a domain that we had previously thought was empty. Until this is corrected, we simply exclude them from the per-domain page count. Reported and tested by: Rajesh Kumar Reviewed by: gallatin MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D17704 --- sys/kern/kern_cpuset.c | 32 +++++++++++++++++++++----------- sys/vm/uma_core.c | 13 +++++++------ sys/vm/vm_init.c | 8 +++++++- sys/vm/vm_kern.c | 1 - sys/vm/vm_page.c | 5 ----- sys/vm/vm_pageout.c | 42 +++++++++++++++++++++--------------------- 6 files changed, 56 insertions(+), 45 deletions(-) (limited to 'sys') diff --git a/sys/kern/kern_cpuset.c b/sys/kern/kern_cpuset.c index 8bd9d79f7cf6..e6e9458c543e 100644 --- a/sys/kern/kern_cpuset.c +++ b/sys/kern/kern_cpuset.c @@ -492,20 +492,29 @@ _domainset_create(struct domainset *domain, struct domainlist *freelist) } /* - * Are any of the domains in the mask empty? If so, silently - * remove them. If only empty domains are present, we must - * return failure. + * Are any of the domains in the mask empty? If so, silently + * remove them and update the domainset accordingly. If only empty + * domains are present, we must return failure. */ static bool domainset_empty_vm(struct domainset *domain) { - int i, max; + int i, j, max; max = DOMAINSET_FLS(&domain->ds_mask) + 1; - for (i = 0; i < max; i++) { - if (DOMAINSET_ISSET(i, &domain->ds_mask) && - VM_DOMAIN_EMPTY(i)) + for (i = 0; i < max; i++) + if (DOMAINSET_ISSET(i, &domain->ds_mask) && VM_DOMAIN_EMPTY(i)) DOMAINSET_CLR(i, &domain->ds_mask); + domain->ds_cnt = DOMAINSET_COUNT(&domain->ds_mask); + max = DOMAINSET_FLS(&domain->ds_mask) + 1; + for (i = j = 0; i < max; i++) { + if (DOMAINSET_ISSET(i, &domain->ds_mask)) + domain->ds_order[j++] = i; + else if (domain->ds_policy == DOMAINSET_POLICY_PREFER && + domain->ds_prefer == i && domain->ds_cnt > 1) { + domain->ds_policy = DOMAINSET_POLICY_ROUNDROBIN; + domain->ds_prefer = -1; + } } return (DOMAINSET_EMPTY(&domain->ds_mask)); @@ -1378,7 +1387,7 @@ cpuset_setithread(lwpid_t id, int cpu) /* * Initialize static domainsets after NUMA information is available. This is - * called very early during boot. + * called before memory allocators are initialized. */ void domainset_init(void) @@ -1407,7 +1416,7 @@ domainset_init(void) void domainset_zero(void) { - struct domainset *dset; + struct domainset *dset, *tmp; mtx_init(&cpuset_lock, "cpuset", NULL, MTX_SPIN | MTX_RECURSE); @@ -1422,8 +1431,9 @@ domainset_zero(void) kernel_object->domain.dr_policy = _domainset_create(&domainset2, NULL); /* Remove empty domains from the global policies. */ - LIST_FOREACH(dset, &cpuset_domains, ds_link) - (void)domainset_empty_vm(dset); + LIST_FOREACH_SAFE(dset, &cpuset_domains, ds_link, tmp) + if (domainset_empty_vm(dset)) + LIST_REMOVE(dset, ds_link); } /* diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c index 18eb4b57f9a0..8e0e0dc297ec 100644 --- a/sys/vm/uma_core.c +++ b/sys/vm/uma_core.c @@ -3608,29 +3608,30 @@ uma_zone_reserve_kva(uma_zone_t zone, int count) void uma_prealloc(uma_zone_t zone, int items) { + struct vm_domainset_iter di; uma_domain_t dom; uma_slab_t slab; uma_keg_t keg; - int domain, slabs; + int domain, flags, slabs; keg = zone_first_keg(zone); if (keg == NULL) return; KEG_LOCK(keg); slabs = items / keg->uk_ipers; - domain = 0; if (slabs * keg->uk_ipers < items) slabs++; + flags = M_WAITOK; + vm_domainset_iter_policy_ref_init(&di, &keg->uk_dr, &domain, &flags); while (slabs-- > 0) { - slab = keg_alloc_slab(keg, zone, domain, M_WAITOK); + slab = keg_alloc_slab(keg, zone, domain, flags); if (slab == NULL) return; MPASS(slab->us_keg == keg); dom = &keg->uk_domain[slab->us_domain]; LIST_INSERT_HEAD(&dom->ud_free_slab, slab, us_link); - do { - domain = (domain + 1) % vm_ndomains; - } while (VM_DOMAIN_EMPTY(domain)); + if (vm_domainset_iter_policy(&di, &domain) != 0) + break; } KEG_UNLOCK(keg); } diff --git a/sys/vm/vm_init.c b/sys/vm/vm_init.c index c62aae488247..2b15e53709c2 100644 --- a/sys/vm/vm_init.c +++ b/sys/vm/vm_init.c @@ -123,12 +123,18 @@ vm_mem_init(void *dummy) domainset_init(); /* - * Initializes resident memory structures. From here on, all physical + * Initialize resident memory structures. From here on, all physical * memory is accounted for, and we use only virtual addresses. */ vm_set_page_size(); virtual_avail = vm_page_startup(virtual_avail); + /* + * Set an initial domain policy for thread0 so that allocations + * can work. + */ + domainset_zero(); + #ifdef UMA_MD_SMALL_ALLOC /* Announce page availability to UMA. */ uma_startup1(); diff --git a/sys/vm/vm_kern.c b/sys/vm/vm_kern.c index e92faff0f371..f57a58383d6f 100644 --- a/sys/vm/vm_kern.c +++ b/sys/vm/vm_kern.c @@ -800,7 +800,6 @@ kmem_bootstrap_free(vm_offset_t start, vm_size_t size) vmd = vm_pagequeue_domain(m); vm_domain_free_lock(vmd); vm_phys_free_pages(m, 0); - vmd->vmd_page_count++; vm_domain_free_unlock(vmd); vm_domain_freecnt_inc(vmd, 1); diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index e7af2a363957..10b6f7b4a916 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -855,11 +855,6 @@ vm_page_startup(vm_offset_t vaddr) */ vm_reserv_init(); #endif - /* - * Set an initial domain policy for thread0 so that allocations - * can work. - */ - domainset_zero(); return (vaddr); } diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c index 5c309a04a402..9f592c38410a 100644 --- a/sys/vm/vm_pageout.c +++ b/sys/vm/vm_pageout.c @@ -2072,41 +2072,41 @@ vm_pageout_init(void) static void vm_pageout(void) { - int error; - int i; + struct proc *p; + struct thread *td; + int error, first, i; + + p = curproc; + td = curthread; swap_pager_swap_init(); - snprintf(curthread->td_name, sizeof(curthread->td_name), "dom0"); - error = kthread_add(vm_pageout_laundry_worker, NULL, curproc, NULL, - 0, 0, "laundry: dom0"); - if (error != 0) - panic("starting laundry for domain 0, error %d", error); - for (i = 1; i < vm_ndomains; i++) { + for (first = -1, i = 0; i < vm_ndomains; i++) { if (VM_DOMAIN_EMPTY(i)) { if (bootverbose) printf("domain %d empty; skipping pageout\n", i); continue; } - - error = kthread_add(vm_pageout_worker, (void *)(uintptr_t)i, - curproc, NULL, 0, 0, "dom%d", i); - if (error != 0) { - panic("starting pageout for domain %d, error %d\n", - i, error); + if (first == -1) + first = i; + else { + error = kthread_add(vm_pageout_worker, + (void *)(uintptr_t)i, p, NULL, 0, 0, "dom%d", i); + if (error != 0) + panic("starting pageout for domain %d: %d\n", + i, error); } error = kthread_add(vm_pageout_laundry_worker, - (void *)(uintptr_t)i, curproc, NULL, 0, 0, - "laundry: dom%d", i); + (void *)(uintptr_t)i, p, NULL, 0, 0, "laundry: dom%d", i); if (error != 0) - panic("starting laundry for domain %d, error %d", - i, error); + panic("starting laundry for domain %d: %d", i, error); } - error = kthread_add(uma_reclaim_worker, NULL, curproc, NULL, - 0, 0, "uma"); + error = kthread_add(uma_reclaim_worker, NULL, p, NULL, 0, 0, "uma"); if (error != 0) panic("starting uma_reclaim helper, error %d\n", error); - vm_pageout_worker((void *)(uintptr_t)0); + + snprintf(td->td_name, sizeof(td->td_name), "dom%d", first); + vm_pageout_worker((void *)(uintptr_t)first); } /* -- cgit v1.3 From 58b6812de1ecbad84ccbd914b87c84a7e94abbb9 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Tue, 30 Oct 2018 18:20:34 +0000 Subject: Only invoke 'ls' if the local modules directory exists. This avoids a spurious make warning if /usr/local/sys/modules doesn't exist. Submitted by: rgrimes Reported by: markj --- sys/conf/kern.post.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys') diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk index bb85e919026c..98d179446905 100644 --- a/sys/conf/kern.post.mk +++ b/sys/conf/kern.post.mk @@ -43,7 +43,7 @@ LOCAL_MODULES_DIR?= ${LOCALBASE}/sys/modules # Default to installing all modules installed by ports unless overridden # by the user. -.if !defined(LOCAL_MODULES) +.if !defined(LOCAL_MODULES) && exists($LOCAL_MODULES_DIR) LOCAL_MODULES!= ls ${LOCAL_MODULES_DIR} .endif .endif -- cgit v1.3 From 9978bd996b69dc6b320efce25e9d42dbdb25ac8c Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Tue, 30 Oct 2018 18:26:34 +0000 Subject: Add malloc_domainset(9) and _domainset variants to other allocator KPIs. Remove malloc_domain(9) and most other _domain KPIs added in r327900. The new functions allow the caller to specify a general NUMA domain selection policy, rather than specifically requesting an allocation from a specific domain. The latter policy tends to interact poorly with M_WAITOK, resulting in situations where a caller is blocked indefinitely because the specified domain is depleted. Most existing consumers of the _domain KPIs are converted to instead use a DOMAINSET_PREF() policy, in which we fall back to other domains to satisfy the allocation request. This change also defines a set of DOMAINSET_FIXED() policies, which only permit allocations from the specified domain. Discussed with: gallatin, jeff Reported and tested by: pho (previous version) MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D17418 --- ObsoleteFiles.inc | 2 ++ share/man/man9/Makefile | 5 ++-- share/man/man9/contigmalloc.9 | 28 +++++++++++++++++++-- share/man/man9/domainset.9 | 23 ++++++++++++++++-- share/man/man9/malloc.9 | 27 +++++++++++++-------- sys/dev/hwpmc/hwpmc_logging.c | 16 ++++++------ sys/dev/hwpmc/hwpmc_mod.c | 54 +++++++++++++++-------------------------- sys/i386/i386/pmap.c | 4 +-- sys/kern/kern_cpuset.c | 7 ++++++ sys/kern/kern_malloc.c | 30 ++++++++++++++++++----- sys/kern/kern_mbuf.c | 6 +++-- sys/kern/kern_pmc.c | 29 ++++++---------------- sys/kern/subr_busdma_bufalloc.c | 10 +++----- sys/sys/domainset.h | 3 ++- sys/sys/malloc.h | 10 +++++--- sys/vm/uma_core.c | 10 ++++---- sys/vm/vm_extern.h | 14 ++++++----- sys/vm/vm_kern.c | 40 ++++++++++++++++++++++++------ sys/x86/iommu/busdma_dmar.c | 19 ++++++++------- sys/x86/x86/busdma_bounce.c | 38 +++++++++++++++-------------- 20 files changed, 231 insertions(+), 144 deletions(-) (limited to 'sys') diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index bef88ef99502..02d0b463834b 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20181030: malloc_domain(9) KPI change +OLD_FILES+=share/man/man9/malloc_domain.9.gz # 20181026: joy(4) removal OLD_FILES+=usr/share/man/man4/joy.4.gz # 20181025: OpenSSL libraries version bump to avoid conflict with ports diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index f39220cd09b4..e8254780ea87 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -812,7 +812,8 @@ MLINKS+=condvar.9 cv_broadcast.9 \ MLINKS+=config_intrhook.9 config_intrhook_disestablish.9 \ config_intrhook.9 config_intrhook_establish.9 \ config_intrhook.9 config_intrhook_oneshot.9 -MLINKS+=contigmalloc.9 contigfree.9 +MLINKS+=contigmalloc.9 contigmalloc_domainset.9 \ + contigmalloc.9 contigfree.9 MLINKS+=casuword.9 casueword.9 \ casuword.9 casueword32.9 \ casuword.9 casuword32.9 @@ -1289,7 +1290,7 @@ MLINKS+=make_dev.9 destroy_dev.9 \ make_dev.9 make_dev_p.9 \ make_dev.9 make_dev_s.9 MLINKS+=malloc.9 free.9 \ - malloc.9 malloc_domain.9 \ + malloc.9 malloc_domainset.9 \ malloc.9 free_domain.9 \ malloc.9 mallocarray.9 \ malloc.9 MALLOC_DECLARE.9 \ diff --git a/share/man/man9/contigmalloc.9 b/share/man/man9/contigmalloc.9 index a1d447fe1bbf..5d6a531ecf98 100644 --- a/share/man/man9/contigmalloc.9 +++ b/share/man/man9/contigmalloc.9 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 29, 2015 +.Dd October 30, 2018 .Dt CONTIGMALLOC 9 .Os .Sh NAME @@ -50,6 +50,19 @@ .Fa "unsigned long size" .Fa "struct malloc_type *type" .Fc +.In sys/param.h +.In sys/domainset.h +.Ft "void *" +.Fo contigmalloc_domainset +.Fa "unsigned long size" +.Fa "struct malloc_type *type" +.Fa "struct domainset *ds" +.Fa "int flags" +.Fa "vm_paddr_t low" +.Fa "vm_paddr_t high" +.Fa "unsigned long alignment" +.Fa "vm_paddr_t boundary" +.Fc .Sh DESCRIPTION The .Fn contigmalloc @@ -70,6 +83,15 @@ address range of bytes allocated from the kernel virtual address (KVA) map. .Pp The +.Fn contigmalloc_domainset +variant allows the caller to additionally specify a +.Xr numa 4 +domain selection policy. +See +.Xr domainset 9 +for some example policies. +.Pp +The .Fa flags parameter modifies .Fn contigmalloc Ns 's @@ -90,7 +112,9 @@ Other flags (if present) are ignored. The .Fn contigfree function deallocates memory allocated by a previous call to -.Fn contigmalloc . +.Fn contigmalloc +or +.Fn contigmalloc_domainset . .Sh IMPLEMENTATION NOTES The .Fn contigmalloc diff --git a/share/man/man9/domainset.9 b/share/man/man9/domainset.9 index 470f79b250a7..5a3c763f4aa5 100644 --- a/share/man/man9/domainset.9 +++ b/share/man/man9/domainset.9 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 20, 2018 +.Dd October 30, 2018 .Dt DOMAINSET 9 .Os .Sh NAME @@ -43,7 +43,11 @@ struct domainset { }; .Ed .Pp +.Ft struct domainset * +.Fn DOMAINSET_FIXED domain +.Ft struct domainset * .Fn DOMAINSET_RR +.Ft struct domainset * .Fn DOMAINSET_PREF domain .Ft struct domainset * .Fn domainset_create "const struct domainset *key" @@ -98,11 +102,26 @@ efficiency higher and is preferential to round-robin for general use. .El .Pp The +.Fn DOMAINSET_FIXED , .Fn DOMAINSET_RR and .Fn DOMAINSET_PREF -provide pointers to global pre-defined policies for use when the +macros provide pointers to global pre-defined policies for use when the desired policy is known at compile time. +.Fn DOMAINSET_FIXED +is a policy which only permits allocations from the specified domain. +.Fn DOMAINSET_RR +provides round-robin selection among all domains in the system. +The +.Fn DOMAINSET_PREF +policies attempt allocation from the specified domain, but unlike +.Fn DOMAINSET_FIXED +will fall back to other domains to satisfy the request. +These policies should be used in preference to +.Fn DOMAINSET_FIXED +to avoid blocking indefinitely on a +.Dv M_WAITOK +request. The .Fn domainset_create function takes a partially filled in domainset as a key and returns a diff --git a/share/man/man9/malloc.9 b/share/man/man9/malloc.9 index 26ea111641c2..020b729028de 100644 --- a/share/man/man9/malloc.9 +++ b/share/man/man9/malloc.9 @@ -29,7 +29,7 @@ .\" $NetBSD: malloc.9,v 1.3 1996/11/11 00:05:11 lukem Exp $ .\" $FreeBSD$ .\" -.Dd June 13, 2018 +.Dd October 30, 2018 .Dt MALLOC 9 .Os .Sh NAME @@ -46,13 +46,9 @@ .Ft void * .Fn malloc "size_t size" "struct malloc_type *type" "int flags" .Ft void * -.Fn malloc_domain "size_t size" "struct malloc_type *type" "int domain" "int flags" -.Ft void * .Fn mallocarray "size_t nmemb" "size_t size" "struct malloc_type *type" "int flags" .Ft void .Fn free "void *addr" "struct malloc_type *type" -.Ft void -.Fn free_domain "void *addr" "struct malloc_type *type" .Ft void * .Fn realloc "void *addr" "size_t size" "struct malloc_type *type" "int flags" .Ft void * @@ -62,6 +58,12 @@ .In sys/malloc.h .In sys/kernel.h .Fn MALLOC_DEFINE type shortdesc longdesc +.In sys/param.h +.In sys/domainset.h +.Ft void * +.Fn malloc_domainset "size_t size" "struct malloc_type *type" "struct domainset *ds" "int flags" +.Ft void +.Fn free_domain "void *addr" "struct malloc_type *type" .Sh DESCRIPTION The .Fn malloc @@ -70,12 +72,15 @@ object whose size is specified by .Fa size . .Pp The -.Fn malloc_domain -variant allocates the object from the specified memory domain. Memory allocated -with this function should be returned with -.Fn free_domain . +.Fn malloc_domainset +variant allocates memory from a specific +.Xr numa 4 +domain using the specified domain selection policy. See -.Xr numa 9 for more details. +.Xr domainset 9 +for some example policies. +Memory allocated with this function should be returned with +.Fn free_domain . .Pp The .Fn mallocarray @@ -310,7 +315,9 @@ functions. Failing consistency checks will cause a panic or a system console message. .Sh SEE ALSO +.Xr numa 4 , .Xr vmstat 8 , .Xr contigmalloc 9 , +.Xr domainset 9 , .Xr memguard 9 , .Xr vnode 9 diff --git a/sys/dev/hwpmc/hwpmc_logging.c b/sys/dev/hwpmc/hwpmc_logging.c index 8764ac9e922c..e76aa9b710eb 100644 --- a/sys/dev/hwpmc/hwpmc_logging.c +++ b/sys/dev/hwpmc/hwpmc_logging.c @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -1231,8 +1232,8 @@ pmclog_process_userlog(struct pmc_owner *po, struct pmc_op_writelog *wl) void pmclog_initialize() { - int domain; struct pmclog_buffer *plb; + int domain, ncpus, total; if (pmclog_buffer_size <= 0 || pmclog_buffer_size > 16*1024) { (void) printf("hwpmc: tunable logbuffersize=%d must be " @@ -1253,16 +1254,17 @@ pmclog_initialize() pmclog_buffer_size = PMC_LOG_BUFFER_SIZE; } for (domain = 0; domain < vm_ndomains; domain++) { - int ncpus = pmc_dom_hdrs[domain]->pdbh_ncpus; - int total = ncpus*pmc_nlogbuffers_pcpu; + ncpus = pmc_dom_hdrs[domain]->pdbh_ncpus; + total = ncpus * pmc_nlogbuffers_pcpu; - plb = malloc_domain(sizeof(struct pmclog_buffer)*total, M_PMC, domain, M_WAITOK|M_ZERO); + plb = malloc_domainset(sizeof(struct pmclog_buffer) * total, + M_PMC, DOMAINSET_PREF(domain), M_WAITOK | M_ZERO); pmc_dom_hdrs[domain]->pdbh_plbs = plb; - for (int i = 0; i < total; i++, plb++) { + for (; total > 0; total--, plb++) { void *buf; - buf = malloc_domain(1024 * pmclog_buffer_size, M_PMC, domain, - M_WAITOK|M_ZERO); + buf = malloc_domainset(1024 * pmclog_buffer_size, M_PMC, + DOMAINSET_PREF(domain), M_WAITOK | M_ZERO); PMCLOG_INIT_BUFFER_DESCRIPTOR(plb, buf, domain); pmc_plb_rele_unlocked(plb); } diff --git a/sys/dev/hwpmc/hwpmc_mod.c b/sys/dev/hwpmc/hwpmc_mod.c index 1fad25c55702..f94f645b2e39 100644 --- a/sys/dev/hwpmc/hwpmc_mod.c +++ b/sys/dev/hwpmc/hwpmc_mod.c @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include @@ -78,14 +79,6 @@ __FBSDID("$FreeBSD$"); #include "hwpmc_soft.h" -#ifdef NUMA -#define NDOMAINS vm_ndomains -#else -#define NDOMAINS 1 -#define malloc_domain(size, type, domain, flags) malloc((size), (type), (flags)) -#define free_domain(addr, type) free(addr, type) -#endif - #define PMC_EPOCH_ENTER() struct epoch_tracker pmc_et; epoch_enter_preempt(global_epoch_preempt, &pmc_et) #define PMC_EPOCH_EXIT() epoch_exit_preempt(global_epoch_preempt, &pmc_et) @@ -5643,15 +5636,16 @@ pmc_initialize(void) continue; pc = pcpu_find(cpu); domain = pc->pc_domain; - sb = malloc_domain(sizeof(struct pmc_samplebuffer) + - pmc_nsamples * sizeof(struct pmc_sample), M_PMC, domain, - M_WAITOK|M_ZERO); + sb = malloc_domainset(sizeof(struct pmc_samplebuffer) + + pmc_nsamples * sizeof(struct pmc_sample), M_PMC, + DOMAINSET_PREF(domain), M_WAITOK | M_ZERO); KASSERT(pmc_pcpu[cpu] != NULL, ("[pmc,%d] cpu=%d Null per-cpu data", __LINE__, cpu)); - sb->ps_callchains = malloc_domain(pmc_callchaindepth * pmc_nsamples * - sizeof(uintptr_t), M_PMC, domain, M_WAITOK|M_ZERO); + sb->ps_callchains = malloc_domainset(pmc_callchaindepth * + pmc_nsamples * sizeof(uintptr_t), M_PMC, + DOMAINSET_PREF(domain), M_WAITOK | M_ZERO); for (n = 0, ps = sb->ps_samples; n < pmc_nsamples; n++, ps++) ps->ps_pc = sb->ps_callchains + @@ -5659,35 +5653,27 @@ pmc_initialize(void) pmc_pcpu[cpu]->pc_sb[PMC_HR] = sb; - sb = malloc_domain(sizeof(struct pmc_samplebuffer) + - pmc_nsamples * sizeof(struct pmc_sample), M_PMC, domain, - M_WAITOK|M_ZERO); - - KASSERT(pmc_pcpu[cpu] != NULL, - ("[pmc,%d] cpu=%d Null per-cpu data", __LINE__, cpu)); - - sb->ps_callchains = malloc_domain(pmc_callchaindepth * pmc_nsamples * - sizeof(uintptr_t), M_PMC, domain, M_WAITOK|M_ZERO); + sb = malloc_domainset(sizeof(struct pmc_samplebuffer) + + pmc_nsamples * sizeof(struct pmc_sample), M_PMC, + DOMAINSET_PREF(domain), M_WAITOK | M_ZERO); + sb->ps_callchains = malloc_domainset(pmc_callchaindepth * + pmc_nsamples * sizeof(uintptr_t), M_PMC, + DOMAINSET_PREF(domain), M_WAITOK | M_ZERO); for (n = 0, ps = sb->ps_samples; n < pmc_nsamples; n++, ps++) ps->ps_pc = sb->ps_callchains + (n * pmc_callchaindepth); pmc_pcpu[cpu]->pc_sb[PMC_SR] = sb; - sb = malloc_domain(sizeof(struct pmc_samplebuffer) + - pmc_nsamples * sizeof(struct pmc_sample), M_PMC, domain, - M_WAITOK|M_ZERO); - - KASSERT(pmc_pcpu[cpu] != NULL, - ("[pmc,%d] cpu=%d Null per-cpu data", __LINE__, cpu)); - - sb->ps_callchains = malloc_domain(pmc_callchaindepth * pmc_nsamples * - sizeof(uintptr_t), M_PMC, domain, M_WAITOK|M_ZERO); - + sb = malloc_domainset(sizeof(struct pmc_samplebuffer) + + pmc_nsamples * sizeof(struct pmc_sample), M_PMC, + DOMAINSET_PREF(domain), M_WAITOK | M_ZERO); + sb->ps_callchains = malloc_domainset(pmc_callchaindepth * + pmc_nsamples * sizeof(uintptr_t), M_PMC, + DOMAINSET_PREF(domain), M_WAITOK | M_ZERO); for (n = 0, ps = sb->ps_samples; n < pmc_nsamples; n++, ps++) - ps->ps_pc = sb->ps_callchains + - (n * pmc_callchaindepth); + ps->ps_pc = sb->ps_callchains + n * pmc_callchaindepth; pmc_pcpu[cpu]->pc_sb[PMC_UR] = sb; } diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index 80f10f92a2ce..ff9b8022193a 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -864,8 +864,8 @@ pmap_pdpt_allocf(uma_zone_t zone, vm_size_t bytes, int domain, uint8_t *flags, /* Inform UMA that this allocator uses kernel_map/object. */ *flags = UMA_SLAB_KERNEL; - return ((void *)kmem_alloc_contig_domain(domain, bytes, wait, 0x0ULL, - 0xffffffffULL, 1, 0, VM_MEMATTR_DEFAULT)); + return ((void *)kmem_alloc_contig_domainset(DOMAINSET_FIXED(domain), + bytes, wait, 0x0ULL, 0xffffffffULL, 1, 0, VM_MEMATTR_DEFAULT)); } #endif diff --git a/sys/kern/kern_cpuset.c b/sys/kern/kern_cpuset.c index e6e9458c543e..87f9333bf43b 100644 --- a/sys/kern/kern_cpuset.c +++ b/sys/kern/kern_cpuset.c @@ -119,6 +119,7 @@ __FBSDID("$FreeBSD$"); */ LIST_HEAD(domainlist, domainset); +struct domainset __read_mostly domainset_fixed[MAXMEMDOM]; struct domainset __read_mostly domainset_prefer[MAXMEMDOM]; struct domainset __read_mostly domainset_roundrobin; @@ -1402,6 +1403,12 @@ domainset_init(void) _domainset_create(dset, NULL); for (i = 0; i < vm_ndomains; i++) { + dset = &domainset_fixed[i]; + DOMAINSET_ZERO(&dset->ds_mask); + DOMAINSET_SET(i, &dset->ds_mask); + dset->ds_policy = DOMAINSET_POLICY_ROUNDROBIN; + _domainset_create(dset, NULL); + dset = &domainset_prefer[i]; DOMAINSET_COPY(&all_domains, &dset->ds_mask); dset->ds_policy = DOMAINSET_POLICY_PREFER; diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c index a8d42a85d949..d4ac906714b9 100644 --- a/sys/kern/kern_malloc.c +++ b/sys/kern/kern_malloc.c @@ -68,6 +68,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -453,13 +454,13 @@ contigmalloc(unsigned long size, struct malloc_type *type, int flags, } void * -contigmalloc_domain(unsigned long size, struct malloc_type *type, - int domain, int flags, vm_paddr_t low, vm_paddr_t high, +contigmalloc_domainset(unsigned long size, struct malloc_type *type, + struct domainset *ds, int flags, vm_paddr_t low, vm_paddr_t high, unsigned long alignment, vm_paddr_t boundary) { void *ret; - ret = (void *)kmem_alloc_contig_domain(domain, size, flags, low, high, + ret = (void *)kmem_alloc_contig_domainset(ds, size, flags, low, high, alignment, boundary, VM_MEMATTR_DEFAULT); if (ret != NULL) malloc_type_allocated(type, round_page(size)); @@ -595,9 +596,8 @@ void * return ((void *) va); } -void * -malloc_domain(size_t size, struct malloc_type *mtp, int domain, - int flags) +static void * +malloc_domain(size_t size, struct malloc_type *mtp, int domain, int flags) { int indx; caddr_t va; @@ -640,6 +640,24 @@ malloc_domain(size_t size, struct malloc_type *mtp, int domain, return ((void *) va); } +void * +malloc_domainset(size_t size, struct malloc_type *mtp, struct domainset *ds, + int flags) +{ + struct vm_domainset_iter di; + void *ret; + int domain; + + vm_domainset_iter_policy_init(&di, ds, &domain, &flags); + do { + ret = malloc_domain(size, mtp, domain, flags); + if (ret != NULL) + break; + } while (vm_domainset_iter_policy(&di, &domain) == 0); + + return (ret); +} + void * mallocarray(size_t nmemb, size_t size, struct malloc_type *type, int flags) { diff --git a/sys/kern/kern_mbuf.c b/sys/kern/kern_mbuf.c index 289cfddd1852..100e01a4a069 100644 --- a/sys/kern/kern_mbuf.c +++ b/sys/kern/kern_mbuf.c @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -590,8 +591,9 @@ mbuf_jumbo_alloc(uma_zone_t zone, vm_size_t bytes, int domain, uint8_t *flags, /* Inform UMA that this allocator uses kernel_map/object. */ *flags = UMA_SLAB_KERNEL; - return ((void *)kmem_alloc_contig_domain(domain, bytes, wait, - (vm_paddr_t)0, ~(vm_paddr_t)0, 1, 0, VM_MEMATTR_DEFAULT)); + return ((void *)kmem_alloc_contig_domainset(DOMAINSET_FIXED(domain), + bytes, wait, (vm_paddr_t)0, ~(vm_paddr_t)0, 1, 0, + VM_MEMATTR_DEFAULT)); } /* diff --git a/sys/kern/kern_pmc.c b/sys/kern/kern_pmc.c index 5ff3caebc8ce..4b73f134b2d4 100644 --- a/sys/kern/kern_pmc.c +++ b/sys/kern/kern_pmc.c @@ -35,8 +35,9 @@ __FBSDID("$FreeBSD$"); #include "opt_hwpmc_hooks.h" -#include +#include #include +#include #include #include #include @@ -330,22 +331,6 @@ pmc_soft_ev_release(struct pmc_soft *ps) mtx_unlock_spin(&pmc_softs_mtx); } -#ifdef NUMA -#define NDOMAINS vm_ndomains - -static int -getdomain(int cpu) -{ - struct pcpu *pc; - - pc = pcpu_find(cpu); - return (pc->pc_domain); -} -#else -#define NDOMAINS 1 -#define malloc_domain(size, type, domain, flags) malloc((size), (type), (flags)) -#define getdomain(cpu) 0 -#endif /* * Initialise hwpmc. */ @@ -362,14 +347,16 @@ init_hwpmc(void *dummy __unused) } pmc_softs = malloc(pmc_softevents * sizeof(*pmc_softs), M_PMCHOOKS, M_WAITOK | M_ZERO); - for (domain = 0; domain < NDOMAINS; domain++) { - pmc_dom_hdrs[domain] = malloc_domain(sizeof(struct pmc_domain_buffer_header), M_PMC, domain, - M_WAITOK|M_ZERO); + + for (domain = 0; domain < vm_ndomains; domain++) { + pmc_dom_hdrs[domain] = malloc_domainset( + sizeof(struct pmc_domain_buffer_header), M_PMC, + DOMAINSET_PREF(domain), M_WAITOK | M_ZERO); mtx_init(&pmc_dom_hdrs[domain]->pdbh_mtx, "pmc_bufferlist_mtx", "pmc-leaf", MTX_SPIN); TAILQ_INIT(&pmc_dom_hdrs[domain]->pdbh_head); } CPU_FOREACH(cpu) { - domain = getdomain(cpu); + domain = pcpu_find(cpu)->pc_domain; KASSERT(pmc_dom_hdrs[domain] != NULL, ("no mem allocated for domain: %d", domain)); pmc_dom_hdrs[domain]->pdbh_ncpus++; } diff --git a/sys/kern/subr_busdma_bufalloc.c b/sys/kern/subr_busdma_bufalloc.c index 52d1388ba7fc..91445aa79950 100644 --- a/sys/kern/subr_busdma_bufalloc.c +++ b/sys/kern/subr_busdma_bufalloc.c @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -152,18 +153,15 @@ void * busdma_bufalloc_alloc_uncacheable(uma_zone_t zone, vm_size_t size, int domain, uint8_t *pflag, int wait) { -#ifdef VM_MEMATTR_UNCACHEABLE +#ifdef VM_MEMATTR_UNCACHEABLE /* Inform UMA that this allocator uses kernel_arena/object. */ *pflag = UMA_SLAB_KERNEL; - return ((void *)kmem_alloc_attr_domain(domain, size, wait, 0, - BUS_SPACE_MAXADDR, VM_MEMATTR_UNCACHEABLE)); - + return ((void *)kmem_alloc_attr_domainset(DOMAINSET_FIXED(domain), size, + wait, 0, BUS_SPACE_MAXADDR, VM_MEMATTR_UNCACHEABLE)); #else - panic("VM_MEMATTR_UNCACHEABLE unavailable"); - #endif /* VM_MEMATTR_UNCACHEABLE */ } diff --git a/sys/sys/domainset.h b/sys/sys/domainset.h index 32b35ac5c1e9..5a00347f29d3 100644 --- a/sys/sys/domainset.h +++ b/sys/sys/domainset.h @@ -96,7 +96,8 @@ struct domainset { domainid_t ds_order[MAXMEMDOM]; /* nth domain table. */ }; -extern struct domainset domainset_prefer[MAXMEMDOM]; +extern struct domainset domainset_fixed[MAXMEMDOM], domainset_prefer[MAXMEMDOM]; +#define DOMAINSET_FIXED(domain) (&domainset_fixed[(domain)]) #define DOMAINSET_PREF(domain) (&domainset_prefer[(domain)]) extern struct domainset domainset_roundrobin; #define DOMAINSET_RR() (&domainset_roundrobin) diff --git a/sys/sys/malloc.h b/sys/sys/malloc.h index 520f18c5a969..be24f854b661 100644 --- a/sys/sys/malloc.h +++ b/sys/sys/malloc.h @@ -160,6 +160,7 @@ MALLOC_DECLARE(M_TEMP); */ MALLOC_DECLARE(M_IOV); +struct domainset; extern struct mtx malloc_mtx; /* @@ -172,8 +173,8 @@ void *contigmalloc(unsigned long size, struct malloc_type *type, int flags, vm_paddr_t low, vm_paddr_t high, unsigned long alignment, vm_paddr_t boundary) __malloc_like __result_use_check __alloc_size(1) __alloc_align(6); -void *contigmalloc_domain(unsigned long size, struct malloc_type *type, - int domain, int flags, vm_paddr_t low, vm_paddr_t high, +void *contigmalloc_domainset(unsigned long size, struct malloc_type *type, + struct domainset *ds, int flags, vm_paddr_t low, vm_paddr_t high, unsigned long alignment, vm_paddr_t boundary) __malloc_like __result_use_check __alloc_size(1) __alloc_align(6); void free(void *addr, struct malloc_type *type); @@ -230,8 +231,9 @@ void *malloc(size_t size, struct malloc_type *type, int flags) __malloc_like _malloc_item; \ }) -void *malloc_domain(size_t size, struct malloc_type *type, int domain, - int flags) __malloc_like __result_use_check __alloc_size(1); +void *malloc_domainset(size_t size, struct malloc_type *type, + struct domainset *ds, int flags) __malloc_like __result_use_check + __alloc_size(1); void *mallocarray(size_t nmemb, size_t size, struct malloc_type *type, int flags) __malloc_like __result_use_check __alloc_size2(1, 2); diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c index 8e0e0dc297ec..9db39ea2ac80 100644 --- a/sys/vm/uma_core.c +++ b/sys/vm/uma_core.c @@ -1172,7 +1172,7 @@ page_alloc(uma_zone_t zone, vm_size_t bytes, int domain, uint8_t *pflag, void *p; /* Returned page */ *pflag = UMA_SLAB_KERNEL; - p = (void *) kmem_malloc_domain(domain, bytes, wait); + p = (void *)kmem_malloc_domainset(DOMAINSET_FIXED(domain), bytes, wait); return (p); } @@ -3718,6 +3718,7 @@ uma_zone_exhausted_nolock(uma_zone_t zone) void * uma_large_malloc_domain(vm_size_t size, int domain, int wait) { + struct domainset *policy; vm_offset_t addr; uma_slab_t slab; @@ -3729,10 +3730,9 @@ uma_large_malloc_domain(vm_size_t size, int domain, int wait) slab = zone_alloc_item(slabzone, NULL, domain, wait); if (slab == NULL) return (NULL); - if (domain == UMA_ANYDOMAIN) - addr = kmem_malloc(size, wait); - else - addr = kmem_malloc_domain(domain, size, wait); + policy = (domain == UMA_ANYDOMAIN) ? DOMAINSET_RR() : + DOMAINSET_FIXED(domain); + addr = kmem_malloc_domainset(policy, size, wait); if (addr != 0) { vsetslab(addr, slab); slab->us_data = (void *)addr; diff --git a/sys/vm/vm_extern.h b/sys/vm/vm_extern.h index 3174e645c8be..fb06076e6c43 100644 --- a/sys/vm/vm_extern.h +++ b/sys/vm/vm_extern.h @@ -44,6 +44,7 @@ struct vmem; #ifdef _KERNEL struct cdev; struct cdevsw; +struct domainset; /* These operate on kernel virtual addresses only. */ vm_offset_t kva_alloc(vm_size_t); @@ -56,16 +57,17 @@ void kmap_free_wakeup(vm_map_t, vm_offset_t, vm_size_t); /* These operate on virtual addresses backed by memory. */ vm_offset_t kmem_alloc_attr(vm_size_t size, int flags, vm_paddr_t low, vm_paddr_t high, vm_memattr_t memattr); -vm_offset_t kmem_alloc_attr_domain(int domain, vm_size_t size, int flags, - vm_paddr_t low, vm_paddr_t high, vm_memattr_t memattr); +vm_offset_t kmem_alloc_attr_domainset(struct domainset *ds, vm_size_t size, + int flags, vm_paddr_t low, vm_paddr_t high, vm_memattr_t memattr); vm_offset_t kmem_alloc_contig(vm_size_t size, int flags, vm_paddr_t low, vm_paddr_t high, u_long alignment, vm_paddr_t boundary, vm_memattr_t memattr); -vm_offset_t kmem_alloc_contig_domain(int domain, vm_size_t size, int flags, - vm_paddr_t low, vm_paddr_t high, u_long alignment, vm_paddr_t boundary, - vm_memattr_t memattr); +vm_offset_t kmem_alloc_contig_domainset(struct domainset *ds, vm_size_t size, + int flags, vm_paddr_t low, vm_paddr_t high, u_long alignment, + vm_paddr_t boundary, vm_memattr_t memattr); vm_offset_t kmem_malloc(vm_size_t size, int flags); -vm_offset_t kmem_malloc_domain(int domain, vm_size_t size, int flags); +vm_offset_t kmem_malloc_domainset(struct domainset *ds, vm_size_t size, + int flags); void kmem_free(vm_offset_t addr, vm_size_t size); /* This provides memory for previously allocated address space. */ diff --git a/sys/vm/vm_kern.c b/sys/vm/vm_kern.c index f57a58383d6f..79108ce1ef64 100644 --- a/sys/vm/vm_kern.c +++ b/sys/vm/vm_kern.c @@ -175,7 +175,7 @@ kva_free(vm_offset_t addr, vm_size_t size) * necessarily physically contiguous. If M_ZERO is specified through the * given flags, then the pages are zeroed before they are mapped. */ -vm_offset_t +static vm_offset_t kmem_alloc_attr_domain(int domain, vm_size_t size, int flags, vm_paddr_t low, vm_paddr_t high, vm_memattr_t memattr) { @@ -231,11 +231,20 @@ vm_offset_t kmem_alloc_attr(vm_size_t size, int flags, vm_paddr_t low, vm_paddr_t high, vm_memattr_t memattr) { + + return (kmem_alloc_attr_domainset(DOMAINSET_RR(), size, flags, low, + high, memattr)); +} + +vm_offset_t +kmem_alloc_attr_domainset(struct domainset *ds, vm_size_t size, int flags, + vm_paddr_t low, vm_paddr_t high, vm_memattr_t memattr) +{ struct vm_domainset_iter di; vm_offset_t addr; int domain; - vm_domainset_iter_policy_init(&di, DOMAINSET_RR(), &domain, &flags); + vm_domainset_iter_policy_init(&di, ds, &domain, &flags); do { addr = kmem_alloc_attr_domain(domain, size, flags, low, high, memattr); @@ -254,7 +263,7 @@ kmem_alloc_attr(vm_size_t size, int flags, vm_paddr_t low, vm_paddr_t high, * through the given flags, then the pages are zeroed before they are * mapped. */ -vm_offset_t +static vm_offset_t kmem_alloc_contig_domain(int domain, vm_size_t size, int flags, vm_paddr_t low, vm_paddr_t high, u_long alignment, vm_paddr_t boundary, vm_memattr_t memattr) @@ -315,11 +324,21 @@ vm_offset_t kmem_alloc_contig(vm_size_t size, int flags, vm_paddr_t low, vm_paddr_t high, u_long alignment, vm_paddr_t boundary, vm_memattr_t memattr) { + + return (kmem_alloc_contig_domainset(DOMAINSET_RR(), size, flags, low, + high, alignment, boundary, memattr)); +} + +vm_offset_t +kmem_alloc_contig_domainset(struct domainset *ds, vm_size_t size, int flags, + vm_paddr_t low, vm_paddr_t high, u_long alignment, vm_paddr_t boundary, + vm_memattr_t memattr) +{ struct vm_domainset_iter di; vm_offset_t addr; int domain; - vm_domainset_iter_policy_init(&di, DOMAINSET_RR(), &domain, &flags); + vm_domainset_iter_policy_init(&di, ds, &domain, &flags); do { addr = kmem_alloc_contig_domain(domain, size, flags, low, high, alignment, boundary, memattr); @@ -368,11 +387,11 @@ kmem_suballoc(vm_map_t parent, vm_offset_t *min, vm_offset_t *max, } /* - * kmem_malloc: + * kmem_malloc_domain: * * Allocate wired-down pages in the kernel's address space. */ -vm_offset_t +static vm_offset_t kmem_malloc_domain(int domain, vm_size_t size, int flags) { vmem_t *arena; @@ -401,12 +420,19 @@ kmem_malloc_domain(int domain, vm_size_t size, int flags) vm_offset_t kmem_malloc(vm_size_t size, int flags) +{ + + return (kmem_malloc_domainset(DOMAINSET_RR(), size, flags)); +} + +vm_offset_t +kmem_malloc_domainset(struct domainset *ds, vm_size_t size, int flags) { struct vm_domainset_iter di; vm_offset_t addr; int domain; - vm_domainset_iter_policy_init(&di, DOMAINSET_RR(), &domain, &flags); + vm_domainset_iter_policy_init(&di, ds, &domain, &flags); do { addr = kmem_malloc_domain(domain, size, flags); if (addr != 0) diff --git a/sys/x86/iommu/busdma_dmar.c b/sys/x86/iommu/busdma_dmar.c index 40786d46621c..c4bcef01b461 100644 --- a/sys/x86/iommu/busdma_dmar.c +++ b/sys/x86/iommu/busdma_dmar.c @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -373,16 +374,16 @@ dmar_bus_dmamap_create(bus_dma_tag_t dmat, int flags, bus_dmamap_t *mapp) WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, "%s", __func__); tag = (struct bus_dma_tag_dmar *)dmat; - map = malloc_domain(sizeof(*map), M_DMAR_DMAMAP, - tag->common.domain, M_NOWAIT | M_ZERO); + map = malloc_domainset(sizeof(*map), M_DMAR_DMAMAP, + DOMAINSET_PREF(tag->common.domain), M_NOWAIT | M_ZERO); if (map == NULL) { *mapp = NULL; return (ENOMEM); } if (tag->segments == NULL) { - tag->segments = malloc_domain(sizeof(bus_dma_segment_t) * + tag->segments = malloc_domainset(sizeof(bus_dma_segment_t) * tag->common.nsegments, M_DMAR_DMAMAP, - tag->common.domain, M_NOWAIT); + DOMAINSET_PREF(tag->common.domain), M_NOWAIT); if (tag->segments == NULL) { free_domain(map, M_DMAR_DMAMAP); *mapp = NULL; @@ -447,13 +448,13 @@ dmar_bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags, if (tag->common.maxsize < PAGE_SIZE && tag->common.alignment <= tag->common.maxsize && attr == VM_MEMATTR_DEFAULT) { - *vaddr = malloc_domain(tag->common.maxsize, M_DEVBUF, - tag->common.domain, mflags); + *vaddr = malloc_domainset(tag->common.maxsize, M_DEVBUF, + DOMAINSET_PREF(tag->common.domain), mflags); map->flags |= BUS_DMAMAP_DMAR_MALLOC; } else { - *vaddr = (void *)kmem_alloc_attr_domain(tag->common.domain, - tag->common.maxsize, mflags, 0ul, BUS_SPACE_MAXADDR, - attr); + *vaddr = (void *)kmem_alloc_attr_domainset( + DOMAINSET_PREF(tag->common.domain), tag->common.maxsize, + mflags, 0ul, BUS_SPACE_MAXADDR, attr); map->flags |= BUS_DMAMAP_DMAR_KMEM_ALLOC; } if (*vaddr == NULL) { diff --git a/sys/x86/x86/busdma_bounce.c b/sys/x86/x86/busdma_bounce.c index 1c76804a61d5..a40af04f436d 100644 --- a/sys/x86/x86/busdma_bounce.c +++ b/sys/x86/x86/busdma_bounce.c @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -294,9 +295,9 @@ bounce_bus_dmamap_create(bus_dma_tag_t dmat, int flags, bus_dmamap_t *mapp) error = 0; if (dmat->segments == NULL) { - dmat->segments = (bus_dma_segment_t *)malloc_domain( + dmat->segments = (bus_dma_segment_t *)malloc_domainset( sizeof(bus_dma_segment_t) * dmat->common.nsegments, - M_DEVBUF, dmat->common.domain, M_NOWAIT); + M_DEVBUF, DOMAINSET_PREF(dmat->common.domain), M_NOWAIT); if (dmat->segments == NULL) { CTR3(KTR_BUSDMA, "%s: tag %p error %d", __func__, dmat, ENOMEM); @@ -317,8 +318,8 @@ bounce_bus_dmamap_create(bus_dma_tag_t dmat, int flags, bus_dmamap_t *mapp) } bz = dmat->bounce_zone; - *mapp = (bus_dmamap_t)malloc_domain(sizeof(**mapp), M_DEVBUF, - dmat->common.domain, M_NOWAIT | M_ZERO); + *mapp = (bus_dmamap_t)malloc_domainset(sizeof(**mapp), M_DEVBUF, + DOMAINSET_PREF(dmat->common.domain), M_NOWAIT | M_ZERO); if (*mapp == NULL) { CTR3(KTR_BUSDMA, "%s: tag %p error %d", __func__, dmat, ENOMEM); @@ -411,9 +412,9 @@ bounce_bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags, *mapp = NULL; if (dmat->segments == NULL) { - dmat->segments = (bus_dma_segment_t *)malloc_domain( + dmat->segments = (bus_dma_segment_t *)malloc_domainset( sizeof(bus_dma_segment_t) * dmat->common.nsegments, - M_DEVBUF, dmat->common.domain, mflags); + M_DEVBUF, DOMAINSET_PREF(dmat->common.domain), mflags); if (dmat->segments == NULL) { CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d", __func__, dmat, dmat->common.flags, ENOMEM); @@ -452,20 +453,21 @@ bounce_bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags, (dmat->common.alignment <= dmat->common.maxsize) && dmat->common.lowaddr >= ptoa((vm_paddr_t)Maxmem) && attr == VM_MEMATTR_DEFAULT) { - *vaddr = malloc_domain(dmat->common.maxsize, M_DEVBUF, - dmat->common.domain, mflags); + *vaddr = malloc_domainset(dmat->common.maxsize, M_DEVBUF, + DOMAINSET_PREF(dmat->common.domain), mflags); } else if (dmat->common.nsegments >= howmany(dmat->common.maxsize, MIN(dmat->common.maxsegsz, PAGE_SIZE)) && dmat->common.alignment <= PAGE_SIZE && (dmat->common.boundary % PAGE_SIZE) == 0) { /* Page-based multi-segment allocations allowed */ - *vaddr = (void *)kmem_alloc_attr_domain(dmat->common.domain, - dmat->common.maxsize, mflags, 0ul, dmat->common.lowaddr, - attr); + *vaddr = (void *)kmem_alloc_attr_domainset( + DOMAINSET_PREF(dmat->common.domain), dmat->common.maxsize, + mflags, 0ul, dmat->common.lowaddr, attr); dmat->bounce_flags |= BUS_DMA_KMEM_ALLOC; } else { - *vaddr = (void *)kmem_alloc_contig_domain(dmat->common.domain, - dmat->common.maxsize, mflags, 0ul, dmat->common.lowaddr, + *vaddr = (void *)kmem_alloc_contig_domainset( + DOMAINSET_PREF(dmat->common.domain), dmat->common.maxsize, + mflags, 0ul, dmat->common.lowaddr, dmat->common.alignment != 0 ? dmat->common.alignment : 1ul, dmat->common.boundary, attr); dmat->bounce_flags |= BUS_DMA_KMEM_ALLOC; @@ -1149,14 +1151,14 @@ alloc_bounce_pages(bus_dma_tag_t dmat, u_int numpages) while (numpages > 0) { struct bounce_page *bpage; - bpage = (struct bounce_page *)malloc_domain(sizeof(*bpage), - M_DEVBUF, dmat->common.domain, M_NOWAIT | M_ZERO); + bpage = malloc_domainset(sizeof(*bpage), M_DEVBUF, + DOMAINSET_PREF(dmat->common.domain), M_NOWAIT | M_ZERO); if (bpage == NULL) break; - bpage->vaddr = (vm_offset_t)contigmalloc_domain(PAGE_SIZE, - M_DEVBUF, dmat->common.domain, M_NOWAIT, 0ul, - bz->lowaddr, PAGE_SIZE, 0); + bpage->vaddr = (vm_offset_t)contigmalloc_domainset(PAGE_SIZE, + M_DEVBUF, DOMAINSET_PREF(dmat->common.domain), M_NOWAIT, + 0ul, bz->lowaddr, PAGE_SIZE, 0); if (bpage->vaddr == 0) { free_domain(bpage, M_DEVBUF); break; -- cgit v1.3 From 201100c58b7ad34aab387ddecb3c96c68cf203c5 Mon Sep 17 00:00:00 2001 From: "Bjoern A. Zeeb" Date: Tue, 30 Oct 2018 20:08:48 +0000 Subject: Initial implementation of draft-ietf-6man-ipv6only-flag. This change defines the RA "6" (IPv6-Only) flag which routers may advertise, kernel logic to check if all routers on a link have the flag set and accordingly update a per-interface flag. If all routers agree that it is an IPv6-only link, ether_output_frame(), based on the interface flag, will filter out all ETHERTYPE_IP/ARP frames, drop them, and return EAFNOSUPPORT to upper layers. The change also updates ndp to show the "6" flag, ifconfig to display the IPV6_ONLY nd6 flag if set, and rtadvd to allow announcing the flag. Further changes to tcpdump (contrib code) are availble and will be upstreamed. Tested the code (slightly earlier version) with 2 FreeBSD IPv6 routers, a FreeBSD laptop on ethernet as well as wifi, and with Win10 and OSX clients (which did not fall over with the "6" flag set but not understood). We may also want to (a) implement and RX filter, and (b) over time enahnce user space to, say, stop dhclient from running when the interface flag is set. Also we might want to start IPv6 before IPv4 in the future. All the code is hidden under the EXPERIMENTAL option and not compiled by default as the draft is a work-in-progress and we cannot rely on the fact that IANA will assign the bits as requested by the draft and hence they may change. Dear 6man, you have running code. Discussed with: Bob Hinden, Brian E Carpenter --- sbin/ifconfig/Makefile | 3 +++ sbin/ifconfig/af_nd6.c | 8 ++++++++ sys/net/if_ethersubr.c | 20 ++++++++++++++++++++ sys/netinet/icmp6.h | 4 ++++ sys/netinet6/nd6.h | 3 +++ sys/netinet6/nd6_rtr.c | 38 ++++++++++++++++++++++++++++++++++++++ usr.sbin/ndp/Makefile | 7 +++++++ usr.sbin/ndp/ndp.c | 3 +++ usr.sbin/rtadvd/Makefile | 7 +++++++ usr.sbin/rtadvd/config.c | 11 +++++++++++ usr.sbin/rtadvd/rtadvd.c | 13 +++++++++++++ usr.sbin/rtadvd/rtadvd.h | 3 +++ 12 files changed, 120 insertions(+) (limited to 'sys') diff --git a/sbin/ifconfig/Makefile b/sbin/ifconfig/Makefile index ae5b01682404..9e0f73bba245 100644 --- a/sbin/ifconfig/Makefile +++ b/sbin/ifconfig/Makefile @@ -51,6 +51,9 @@ SRCS+= ifpfsync.c # pfsync(4) support SRCS+= ifbridge.c # bridge support SRCS+= iflagg.c # lagg support +.if ${MK_EXPERIMENTAL} != "no" +CFLAGS+= -DDRAFT_IETF_6MAN_IPV6ONLY_FLAG +.endif .if ${MK_INET6_SUPPORT} != "no" CFLAGS+= -DINET6 .endif diff --git a/sbin/ifconfig/af_nd6.c b/sbin/ifconfig/af_nd6.c index 8c576117e226..2ce97394c700 100644 --- a/sbin/ifconfig/af_nd6.c +++ b/sbin/ifconfig/af_nd6.c @@ -57,9 +57,17 @@ static const char rcsid[] = #include "ifconfig.h" #define MAX_SYSCTL_TRY 5 +#ifdef DRAFT_IETF_6MAN_IPV6ONLY_FLAG +#define ND6BITS "\020\001PERFORMNUD\002ACCEPT_RTADV\003PREFER_SOURCE" \ + "\004IFDISABLED\005DONT_SET_IFROUTE\006AUTO_LINKLOCAL" \ + "\007NO_RADR\010NO_PREFER_IFACE\011NO_DAD" \ + "\012IPV6_ONLY" \ + "\020DEFAULTIF" +#else #define ND6BITS "\020\001PERFORMNUD\002ACCEPT_RTADV\003PREFER_SOURCE" \ "\004IFDISABLED\005DONT_SET_IFROUTE\006AUTO_LINKLOCAL" \ "\007NO_RADR\010NO_PREFER_IFACE\011NO_DAD\020DEFAULTIF" +#endif static int isnd6defif(int); void setnd6flags(const char *, int, int, const struct afswtch *); diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index 28dac295e077..628e32b17642 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -475,6 +475,26 @@ ether_output_frame(struct ifnet *ifp, struct mbuf *m) return (0); } +#ifdef EXPERIMENTAL +#if defined(INET6) && defined(INET) + /* draft-ietf-6man-ipv6only-flag */ + /* Catch ETHERTYPE_IP, and ETHERTYPE_ARP if we are v6-only. */ + if ((ND_IFINFO(ifp)->flags & ND6_IFF_IPV6_ONLY) != 0) { + struct ether_header *eh; + + eh = mtod(m, struct ether_header *); + switch (ntohs(eh->ether_type)) { + case ETHERTYPE_IP: + case ETHERTYPE_ARP: + m_freem(m); + return (EAFNOSUPPORT); + /* NOTREACHED */ + break; + }; + } +#endif +#endif + /* * Queue message on interface, update output statistics if * successful, and start output if interface not yet active. diff --git a/sys/netinet/icmp6.h b/sys/netinet/icmp6.h index 310684b8b47d..d4da06d0ff5e 100644 --- a/sys/netinet/icmp6.h +++ b/sys/netinet/icmp6.h @@ -244,6 +244,10 @@ struct nd_router_advert { /* router advertisement */ #define ND_RA_FLAG_RTPREF_LOW 0x18 /* 00011000 */ #define ND_RA_FLAG_RTPREF_RSV 0x10 /* 00010000 */ +#ifdef EXPERIMENTAL +#define ND_RA_FLAG_IPV6_ONLY 0x02 /* draft-ietf-6man-ipv6only-flag */ +#endif + #define nd_ra_router_lifetime nd_ra_hdr.icmp6_data16[1] struct nd_neighbor_solicit { /* neighbor solicitation */ diff --git a/sys/netinet6/nd6.h b/sys/netinet6/nd6.h index cabfeec0dbac..7544d23c6660 100644 --- a/sys/netinet6/nd6.h +++ b/sys/netinet6/nd6.h @@ -90,6 +90,9 @@ struct nd_ifinfo { #define ND6_IFF_NO_RADR 0x40 #define ND6_IFF_NO_PREFER_IFACE 0x80 /* XXX: not related to ND. */ #define ND6_IFF_NO_DAD 0x100 +#ifdef EXPERIMENTAL +#define ND6_IFF_IPV6_ONLY 0x200 /* draft-ietf-6man-ipv6only-flag */ +#endif #ifdef _KERNEL #define ND_IFINFO(ifp) \ diff --git a/sys/netinet6/nd6_rtr.c b/sys/netinet6/nd6_rtr.c index ec1aa13730ca..e00a0d857b5c 100644 --- a/sys/netinet6/nd6_rtr.c +++ b/sys/netinet6/nd6_rtr.c @@ -204,6 +204,37 @@ nd6_rs_input(struct mbuf *m, int off, int icmp6len) m_freem(m); } +#ifdef EXPERIMENTAL +/* + * An initial update routine for draft-ietf-6man-ipv6only-flag. + * We need to iterate over all default routers for the given + * interface to see whether they are all advertising the "6" + * (IPv6-Only) flag. If they do set, otherwise unset, the + * interface flag we later use to filter on. + */ +static void +defrtr_ipv6_only_ifp(struct ifnet *ifp) +{ + struct nd_defrouter *dr; + bool ipv6_only; + + ipv6_only = true; + ND6_RLOCK(); + TAILQ_FOREACH(dr, &V_nd_defrouter, dr_entry) + if (dr->ifp == ifp && + (dr->raflags & ND_RA_FLAG_IPV6_ONLY) == 0) + ipv6_only = false; + ND6_RUNLOCK(); + + IF_AFDATA_WLOCK(ifp); + if (ipv6_only) + ND_IFINFO(ifp)->flags |= ND6_IFF_IPV6_ONLY; + else + ND_IFINFO(ifp)->flags &= ~ND6_IFF_IPV6_ONLY; + IF_AFDATA_WUNLOCK(ifp); +} +#endif + /* * Receive Router Advertisement Message. * @@ -319,6 +350,9 @@ nd6_ra_input(struct mbuf *m, int off, int icmp6len) } } dr = defrtrlist_update(&dr0); +#ifdef EXPERIMENTAL + defrtr_ipv6_only_ifp(ifp); +#endif } /* @@ -692,6 +726,10 @@ defrouter_del(struct nd_defrouter *dr) if (ND_IFINFO(dr->ifp)->flags & ND6_IFF_ACCEPT_RTADV) rt6_flush(&dr->rtaddr, dr->ifp); +#ifdef EXPERIMENTAL + defrtr_ipv6_only_ifp(dr->ifp); +#endif + if (dr->installed) { deldr = dr; defrouter_delreq(dr); diff --git a/usr.sbin/ndp/Makefile b/usr.sbin/ndp/Makefile index c2ff3090b495..52d8304a436a 100644 --- a/usr.sbin/ndp/Makefile +++ b/usr.sbin/ndp/Makefile @@ -13,6 +13,8 @@ # A PARTICULAR PURPOSE. # $FreeBSD$ +.include + .PATH: ${SRCTOP}/contrib/tcpdump PROG= ndp @@ -22,6 +24,11 @@ SRCS= ndp.c gmt2local.c CFLAGS+= -I. -I${.CURDIR} -I${SRCTOP}/contrib/tcpdump CFLAGS+= -D_U_="" +.if ${MK_EXPERIMENTAL} != "no" +CFLAGS+= -DEXPERIMENTAL +CFLAGS+= -DDRAFT_IETF_6MAN_IPV6ONLY_FLAG +.endif + WARNS?= 3 .include diff --git a/usr.sbin/ndp/ndp.c b/usr.sbin/ndp/ndp.c index 10e186d1d9f3..a006006aab3c 100644 --- a/usr.sbin/ndp/ndp.c +++ b/usr.sbin/ndp/ndp.c @@ -1096,6 +1096,9 @@ rtrlist() printf(", flags=%s%s", p->flags & ND_RA_FLAG_MANAGED ? "M" : "", p->flags & ND_RA_FLAG_OTHER ? "O" : ""); +#ifdef DRAFT_IETF_6MAN_IPV6ONLY_FLAG + printf("%s", p->flags & ND_RA_FLAG_IPV6_ONLY ? "6" : ""); +#endif rtpref = ((p->flags & ND_RA_FLAG_RTPREF_MASK) >> 3) & 0xff; printf(", pref=%s", rtpref_str[rtpref]); diff --git a/usr.sbin/rtadvd/Makefile b/usr.sbin/rtadvd/Makefile index 5d627e55b265..920c6d966aff 100644 --- a/usr.sbin/rtadvd/Makefile +++ b/usr.sbin/rtadvd/Makefile @@ -14,11 +14,18 @@ # # $FreeBSD$ +.include + PROG= rtadvd MAN= rtadvd.conf.5 rtadvd.8 SRCS= rtadvd.c rrenum.c advcap.c if.c config.c timer.c timer_subr.c \ control.c control_server.c +.if ${MK_EXPERIMENTAL} != "no" +CFLAGS+= -DEXPERIMENTAL +CFLAGS+= -DDRAFT_IETF_6MAN_IPV6ONLY_FLAG +.endif + LIBADD= util WARNS?= 1 diff --git a/usr.sbin/rtadvd/config.c b/usr.sbin/rtadvd/config.c index cd7134cecae2..f537ace0c25f 100644 --- a/usr.sbin/rtadvd/config.c +++ b/usr.sbin/rtadvd/config.c @@ -437,6 +437,10 @@ getconfig(struct ifinfo *ifi) } val |= ND_RA_FLAG_RTPREF_LOW; } +#ifdef DRAFT_IETF_6MAN_IPV6ONLY_FLAG + if (strchr(flagstr, '6')) + val |= ND_RA_FLAG_IPV6_ONLY; +#endif } else MAYHAVE(val, "raflags", 0); @@ -452,6 +456,9 @@ getconfig(struct ifinfo *ifi) __func__, rai->rai_rtpref, ifi->ifi_ifname); goto getconfig_free_rai; } +#ifdef DRAFT_IETF_6MAN_IPV6ONLY_FLAG + rai->rai_ipv6onlyflg = val & ND_RA_FLAG_IPV6_ONLY; +#endif MAYHAVE(val, "rltime", rai->rai_maxinterval * 3); if ((uint16_t)val && ((uint16_t)val < rai->rai_maxinterval || @@ -1406,6 +1413,10 @@ make_packet(struct rainfo *rai) rai->rai_managedflg ? ND_RA_FLAG_MANAGED : 0; ra->nd_ra_flags_reserved |= rai->rai_otherflg ? ND_RA_FLAG_OTHER : 0; +#ifdef DRAFT_IETF_6MAN_IPV6ONLY_FLAG + ra->nd_ra_flags_reserved |= + rai->rai_ipv6onlyflg ? ND_RA_FLAG_IPV6_ONLY : 0; +#endif ra->nd_ra_router_lifetime = htons(rai->rai_lifetime); ra->nd_ra_reachable = htonl(rai->rai_reachabletime); ra->nd_ra_retransmit = htonl(rai->rai_retranstimer); diff --git a/usr.sbin/rtadvd/rtadvd.c b/usr.sbin/rtadvd/rtadvd.c index d46185876444..d7237f06c223 100644 --- a/usr.sbin/rtadvd/rtadvd.c +++ b/usr.sbin/rtadvd/rtadvd.c @@ -1160,6 +1160,19 @@ ra_input(int len, struct nd_router_advert *nra, sizeof(ntopbuf)), on_off[rai->rai_otherflg]); inconsistent++; } +#ifdef DRAFT_IETF_6MAN_IPV6ONLY_FLAG + /* 6 flag */ + if ((nra->nd_ra_flags_reserved & ND_RA_FLAG_IPV6_ONLY) != + rai->rai_ipv6onlyflg) { + syslog(LOG_NOTICE, + "6 flag inconsistent on %s:" + " %s from %s, %s from us", + ifi->ifi_ifname, on_off[!rai->rai_ipv6onlyflg], + inet_ntop(AF_INET6, &from->sin6_addr, ntopbuf, + sizeof(ntopbuf)), on_off[rai->rai_ipv6onlyflg]); + inconsistent++; + } +#endif /* Reachable Time */ reachabletime = ntohl(nra->nd_ra_reachable); if (reachabletime && rai->rai_reachabletime && diff --git a/usr.sbin/rtadvd/rtadvd.h b/usr.sbin/rtadvd/rtadvd.h index 005a42c2038a..885d2fbb3c80 100644 --- a/usr.sbin/rtadvd/rtadvd.h +++ b/usr.sbin/rtadvd/rtadvd.h @@ -196,6 +196,9 @@ struct rainfo { uint16_t rai_mininterval; /* MinRtrAdvInterval */ int rai_managedflg; /* AdvManagedFlag */ int rai_otherflg; /* AdvOtherConfigFlag */ +#ifdef DRAFT_IETF_6MAN_IPV6ONLY_FLAG + int rai_ipv6onlyflg; /* AdvIPv6OnlyFlag */ +#endif int rai_rtpref; /* router preference */ uint32_t rai_linkmtu; /* AdvLinkMTU */ -- cgit v1.3 From c955c6cd089dc93b9e96172514e4687a1c4e2598 Mon Sep 17 00:00:00 2001 From: "Bjoern A. Zeeb" Date: Tue, 30 Oct 2018 20:45:15 +0000 Subject: With more excessive use of modules, more kernel parts working with VIMAGE, and feature richness and global state increasing the 8k of vnet module space are no longer sufficient for people and loading multiple modules, e.g., pf(4) and ipl(4) or ipsec(4) will fail on the second module. Increase the module space to 8 * PAGE_SIZE which should be enough to hold multiple firewalls, ipsec, multicast (as in the old days was a problem), epair, carp, and any kind of other vnet enabled modules. Sadly this is a global byte array part of the vnet_set, so we cannot dynamically change its size; otherwise a TUNABLE would have been a better solution. PR: 228854 Reported by: Ernie Luzar, Marek Zarychta Discussed with: rgrimes on current MFC after: 3 days --- sys/net/vnet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys') diff --git a/sys/net/vnet.c b/sys/net/vnet.c index a124387f6f74..9a4321a8409b 100644 --- a/sys/net/vnet.c +++ b/sys/net/vnet.c @@ -171,7 +171,7 @@ static MALLOC_DEFINE(M_VNET_DATA, "vnet_data", "VNET data"); * we want the virtualized global variable space to be page-sized, we may * have more space than that in practice. */ -#define VNET_MODMIN 8192 +#define VNET_MODMIN (8 * PAGE_SIZE) #define VNET_SIZE roundup2(VNET_BYTES, PAGE_SIZE) /* -- cgit v1.3 From 0f823b649751f9c3b89ef04480fc45accce83de0 Mon Sep 17 00:00:00 2001 From: "Bjoern A. Zeeb" Date: Tue, 30 Oct 2018 20:51:03 +0000 Subject: As a follow-up to r339930 and various reports implement logging in case we fail during module load because the pcpu or vnet module sections are full. We did return a proper error but not leaving any indication to the user as to what the actual problem was. Even worse, on 12/13 currently we are seeing an unrelated error (ENOSYS instead of ENOSPC, which gets skipped over in kern_linker.c) to be printed which made problem diagnostics even harder. PR: 228854 MFC after: 3 days --- sys/kern/link_elf.c | 12 ++++++++++-- sys/kern/link_elf_obj.c | 26 ++++++++++++++++++++++++-- 2 files changed, 34 insertions(+), 4 deletions(-) (limited to 'sys') diff --git a/sys/kern/link_elf.c b/sys/kern/link_elf.c index c2014d0400d2..6ceb34d66b74 100644 --- a/sys/kern/link_elf.c +++ b/sys/kern/link_elf.c @@ -637,8 +637,12 @@ parse_dpcpu(elf_file_t ef) * all per-cpu storage from that. */ ef->pcpu_base = (Elf_Addr)(uintptr_t)dpcpu_alloc(size); - if (ef->pcpu_base == 0) + if (ef->pcpu_base == 0) { + printf("%s: pcpu module space is out of space; " + "cannot allocate %d for %s\n", + __func__, size, ef->lf.pathname); return (ENOSPC); + } memcpy((void *)ef->pcpu_base, (void *)ef->pcpu_start, size); dpcpu_copy((void *)ef->pcpu_base, size); elf_set_add(&set_pcpu_list, ef->pcpu_start, ef->pcpu_stop, @@ -670,8 +674,12 @@ parse_vnet(elf_file_t ef) * all per-vnet storage from that. */ ef->vnet_base = (Elf_Addr)(uintptr_t)vnet_data_alloc(size); - if (ef->vnet_base == 0) + if (ef->vnet_base == 0) { + printf("%s: vnet module space is out of space; " + "cannot allocate %d for %s\n", + __func__, size, ef->lf.pathname); return (ENOSPC); + } memcpy((void *)ef->vnet_base, (void *)ef->vnet_start, size); vnet_data_copy((void *)ef->vnet_base, size); elf_set_add(&set_vnet_list, ef->vnet_start, ef->vnet_stop, diff --git a/sys/kern/link_elf_obj.c b/sys/kern/link_elf_obj.c index 7df3dbc8decb..98a2fcffbc65 100644 --- a/sys/kern/link_elf_obj.c +++ b/sys/kern/link_elf_obj.c @@ -368,6 +368,10 @@ link_elf_link_preload(linker_class_t cls, const char *filename, dpcpu = dpcpu_alloc(shdr[i].sh_size); if (dpcpu == NULL) { + printf("%s: pcpu module space is out " + "of space; cannot allocate %ld for " + "%s\n", __func__, shdr[i].sh_size, + filename); error = ENOSPC; goto out; } @@ -382,6 +386,10 @@ link_elf_link_preload(linker_class_t cls, const char *filename, vnet_data = vnet_data_alloc(shdr[i].sh_size); if (vnet_data == NULL) { + printf("%s: vnet module space is out " + "of space; cannot allocate %ld for " + "%s\n", __func__, shdr[i].sh_size, + filename); error = ENOSPC; goto out; } @@ -847,14 +855,28 @@ link_elf_load_file(linker_class_t cls, const char *filename, else ef->progtab[pb].name = "<>"; if (ef->progtab[pb].name != NULL && - !strcmp(ef->progtab[pb].name, DPCPU_SETNAME)) + !strcmp(ef->progtab[pb].name, DPCPU_SETNAME)) { ef->progtab[pb].addr = dpcpu_alloc(shdr[i].sh_size); + if (ef->progtab[pb].addr == NULL) { + printf("%s: pcpu module space is out " + "of space; cannot allocate %ld for " + "%s\n", __func__, shdr[i].sh_size, + filename); + } + } #ifdef VIMAGE else if (ef->progtab[pb].name != NULL && - !strcmp(ef->progtab[pb].name, VNET_SETNAME)) + !strcmp(ef->progtab[pb].name, VNET_SETNAME)) { ef->progtab[pb].addr = vnet_data_alloc(shdr[i].sh_size); + if (ef->progtab[pb].addr == NULL) { + printf("%s: vnet module space is out " + "of space; cannot allocate %ld for " + "%s\n", __func__, shdr[i].sh_size, + filename); + } + } #endif else ef->progtab[pb].addr = -- cgit v1.3 From 9afc56849a2e3a58e853868599faf727e33b87d9 Mon Sep 17 00:00:00 2001 From: "Bjoern A. Zeeb" Date: Tue, 30 Oct 2018 21:35:56 +0000 Subject: Fix mips build after r339931. I erroneously thought that it was two 64bit platforms which use link_elf_obj.c. PR: 228854 Reported by: ci.f.o. MFC after: 3 days X-MFC with: r339931 Pointyhat to: bz --- sys/kern/link_elf_obj.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'sys') diff --git a/sys/kern/link_elf_obj.c b/sys/kern/link_elf_obj.c index 98a2fcffbc65..ac4cc8c085cb 100644 --- a/sys/kern/link_elf_obj.c +++ b/sys/kern/link_elf_obj.c @@ -369,8 +369,9 @@ link_elf_link_preload(linker_class_t cls, const char *filename, dpcpu = dpcpu_alloc(shdr[i].sh_size); if (dpcpu == NULL) { printf("%s: pcpu module space is out " - "of space; cannot allocate %ld for " - "%s\n", __func__, shdr[i].sh_size, + "of space; cannot allocate %#jx " + "for %s\n", __func__, + (uintmax_t)shdr[i].sh_size, filename); error = ENOSPC; goto out; @@ -387,8 +388,9 @@ link_elf_link_preload(linker_class_t cls, const char *filename, vnet_data = vnet_data_alloc(shdr[i].sh_size); if (vnet_data == NULL) { printf("%s: vnet module space is out " - "of space; cannot allocate %ld for " - "%s\n", __func__, shdr[i].sh_size, + "of space; cannot allocate %#jx " + "for %s\n", __func__, + (uintmax_t)shdr[i].sh_size, filename); error = ENOSPC; goto out; @@ -860,8 +862,9 @@ link_elf_load_file(linker_class_t cls, const char *filename, dpcpu_alloc(shdr[i].sh_size); if (ef->progtab[pb].addr == NULL) { printf("%s: pcpu module space is out " - "of space; cannot allocate %ld for " - "%s\n", __func__, shdr[i].sh_size, + "of space; cannot allocate %#jx " + "for %s\n", __func__, + (uintmax_t)shdr[i].sh_size, filename); } } @@ -872,8 +875,9 @@ link_elf_load_file(linker_class_t cls, const char *filename, vnet_data_alloc(shdr[i].sh_size); if (ef->progtab[pb].addr == NULL) { printf("%s: vnet module space is out " - "of space; cannot allocate %ld for " - "%s\n", __func__, shdr[i].sh_size, + "of space; cannot allocate %#jx " + "for %s\n", __func__, + (uintmax_t)shdr[i].sh_size, filename); } } -- cgit v1.3 From 5d277a85ad2844e9ad674a97ecdb964db99b9e5e Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Tue, 30 Oct 2018 22:40:40 +0000 Subject: Revert r336984. It appears to be responsible for random segfaults observed when lots of paging activity is taking place, but the root cause is not yet understood. Requested by: alc MFC after: now --- sys/vm/vm_object.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'sys') diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 578bcd760071..7a92301d3183 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -2143,9 +2143,8 @@ vm_object_coalesce(vm_object_t prev_object, vm_ooffset_t prev_offset, next_size >>= PAGE_SHIFT; next_pindex = OFF_TO_IDX(prev_offset) + prev_size; - if (prev_object->ref_count > 1 && - prev_object->size != next_pindex && - (prev_object->flags & OBJ_ONEMAPPING) == 0) { + if ((prev_object->ref_count > 1) && + (prev_object->size != next_pindex)) { VM_OBJECT_WUNLOCK(prev_object); return (FALSE); } -- cgit v1.3 From ec9e3fb0958353b9d59a7b18c22efa7b0f968070 Mon Sep 17 00:00:00 2001 From: Marcelo Araujo Date: Wed, 31 Oct 2018 01:27:44 +0000 Subject: Merge cases with upper block. This is a cosmetic change only to simplify code. Reported by: anish Sponsored by: iXsystems Inc. --- sys/amd64/vmm/amd/svm_msr.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'sys') diff --git a/sys/amd64/vmm/amd/svm_msr.c b/sys/amd64/vmm/amd/svm_msr.c index 25455886a869..67c43100f168 100644 --- a/sys/amd64/vmm/amd/svm_msr.c +++ b/sys/amd64/vmm/amd/svm_msr.c @@ -122,11 +122,7 @@ svm_rdmsr(struct svm_softc *sc, int vcpu, u_int num, uint64_t *result, case MSR_MTRR16kBase ... MSR_MTRR16kBase + 1: case MSR_MTRR64kBase: case MSR_SYSCFG: - *result = 0; - break; case MSR_AMDK8_IPM: - *result = 0; - break; case MSR_EXTFEATURES: *result = 0; break; -- cgit v1.3 From 63bf2d735ca3827c514cf154ccd16a5e59a2786a Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Wed, 31 Oct 2018 09:25:17 +0000 Subject: Remove the unused arm64_cpu driver. This was previously used for CPU initilisation, however this hasn't been the case in a long time. Sponsored by: DARPA, AFRL --- sys/arm64/arm64/mp_machdep.c | 74 -------------------------------------------- 1 file changed, 74 deletions(-) (limited to 'sys') diff --git a/sys/arm64/arm64/mp_machdep.c b/sys/arm64/arm64/mp_machdep.c index 241634a0bb44..5452924d303d 100644 --- a/sys/arm64/arm64/mp_machdep.c +++ b/sys/arm64/arm64/mp_machdep.c @@ -126,8 +126,6 @@ static void ipi_stop(void *); struct mtx ap_boot_mtx; struct pcb stoppcbs[MAXCPU]; -static device_t cpu_list[MAXCPU]; - /* * Not all systems boot from the first CPU in the device tree. To work around * this we need to find which CPU we have booted from so when we later @@ -146,78 +144,6 @@ volatile int aps_ready = 0; /* Temporary variables for init_secondary() */ void *dpcpu[MAXCPU - 1]; -static device_method_t arm64_cpu_methods[] = { - /* Device interface */ - DEVMETHOD(device_identify, arm64_cpu_identify), - DEVMETHOD(device_probe, arm64_cpu_probe), - DEVMETHOD(device_attach, arm64_cpu_attach), - - DEVMETHOD_END -}; - -static devclass_t arm64_cpu_devclass; -static driver_t arm64_cpu_driver = { - "arm64_cpu", - arm64_cpu_methods, - 0 -}; - -DRIVER_MODULE(arm64_cpu, cpu, arm64_cpu_driver, arm64_cpu_devclass, 0, 0); - -static void -arm64_cpu_identify(driver_t *driver, device_t parent) -{ - - if (device_find_child(parent, "arm64_cpu", -1) != NULL) - return; - if (BUS_ADD_CHILD(parent, 0, "arm64_cpu", -1) == NULL) - device_printf(parent, "add child failed\n"); -} - -static int -arm64_cpu_probe(device_t dev) -{ - u_int cpuid; - - cpuid = device_get_unit(dev); - if (cpuid >= MAXCPU || cpuid > mp_maxid) - return (EINVAL); - - device_quiet(dev); - return (0); -} - -static int -arm64_cpu_attach(device_t dev) -{ - const uint32_t *reg; - size_t reg_size; - u_int cpuid; - int i; - - cpuid = device_get_unit(dev); - - if (cpuid >= MAXCPU || cpuid > mp_maxid) - return (EINVAL); - KASSERT(cpu_list[cpuid] == NULL, ("Already have cpu %u", cpuid)); - - reg = cpu_get_cpuid(dev, ®_size); - if (reg == NULL) - return (EINVAL); - - if (bootverbose) { - device_printf(dev, "register <"); - for (i = 0; i < reg_size; i++) - printf("%s%x", (i == 0) ? "" : " ", reg[i]); - printf(">\n"); - } - - /* Set the device to start it later */ - cpu_list[cpuid] = dev; - - return (0); -} - static void release_aps(void *dummy __unused) { -- cgit v1.3 From 447cfc23bd95c532d7ed05e6c8f4474c9d335a50 Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Wed, 31 Oct 2018 09:39:38 +0000 Subject: Fix some style(9) issues in the arm64 pmap_mapbios/unmapbios. Split lines when they are too long. Sponsored by: DARPA, AFRL --- sys/arm64/arm64/pmap.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'sys') diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index 390bfbe307c6..1ae33292bf24 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -4604,8 +4604,9 @@ pmap_mapbios(vm_paddr_t pa, vm_size_t size) if (size == 0) return (NULL); - /* Calculate how many full L2 blocks are needed for the mapping */ - l2_blocks = (roundup2(pa + size, L2_SIZE) - rounddown2(pa, L2_SIZE)) >> L2_SHIFT; + /* Calculate how many L2 blocks are needed for the mapping */ + l2_blocks = (roundup2(pa + size, L2_SIZE) - + rounddown2(pa, L2_SIZE)) >> L2_SHIFT; offset = pa & L2_OFFSET; @@ -4652,8 +4653,10 @@ pmap_mapbios(vm_paddr_t pa, vm_size_t size) for (i = 0; i < l2_blocks; i++) { pde = pmap_pde(kernel_pmap, va, &lvl); KASSERT(pde != NULL, - ("pmap_mapbios: Invalid page entry, va: 0x%lx", va)); - KASSERT(lvl == 1, ("pmap_mapbios: Invalid level %d", lvl)); + ("pmap_mapbios: Invalid page entry, va: 0x%lx", + va)); + KASSERT(lvl == 1, + ("pmap_mapbios: Invalid level %d", lvl)); /* Insert L2_BLOCK */ l2 = pmap_l1_to_l2(pde, va); @@ -4698,7 +4701,8 @@ pmap_unmapbios(vm_offset_t va, vm_size_t size) pt_entry_t *l2; int i, lvl, l2_blocks, block; - l2_blocks = (roundup2(va + size, L2_SIZE) - rounddown2(va, L2_SIZE)) >> L2_SHIFT; + l2_blocks = + (roundup2(va + size, L2_SIZE) - rounddown2(va, L2_SIZE)) >> L2_SHIFT; KASSERT(l2_blocks > 0, ("pmap_unmapbios: invalid size %lx", size)); /* Remove preinit mapping */ @@ -4706,7 +4710,8 @@ pmap_unmapbios(vm_offset_t va, vm_size_t size) for (i = 0; i < PMAP_PREINIT_MAPPING_COUNT; i++) { ppim = pmap_preinit_mapping + i; if (ppim->va == va) { - KASSERT(ppim->size == size, ("pmap_unmapbios: size mismatch")); + KASSERT(ppim->size == size, + ("pmap_unmapbios: size mismatch")); ppim->va = 0; ppim->pa = 0; ppim->size = 0; @@ -4716,10 +4721,12 @@ pmap_unmapbios(vm_offset_t va, vm_size_t size) /* Remove L2_BLOCK */ pde = pmap_pde(kernel_pmap, va_trunc, &lvl); KASSERT(pde != NULL, - ("pmap_unmapbios: Invalid page entry, va: 0x%lx", va_trunc)); + ("pmap_unmapbios: Invalid page entry, va: 0x%lx", + va_trunc)); l2 = pmap_l1_to_l2(pde, va_trunc); pmap_load_clear(l2); - pmap_invalidate_range(kernel_pmap, va_trunc, va_trunc + L2_SIZE); + pmap_invalidate_range(kernel_pmap, va_trunc, + va_trunc + L2_SIZE); if (block == (l2_blocks - 1)) return; -- cgit v1.3 From be7018ffd4e542f73aa46f8e18301b628b966473 Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Wed, 31 Oct 2018 10:30:19 +0000 Subject: Remove function prototypes for functions removed in r339943. Sponsored by: DARPA, AFRL --- sys/arm64/arm64/mp_machdep.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'sys') diff --git a/sys/arm64/arm64/mp_machdep.c b/sys/arm64/arm64/mp_machdep.c index 5452924d303d..d07fbdb72361 100644 --- a/sys/arm64/arm64/mp_machdep.c +++ b/sys/arm64/arm64/mp_machdep.c @@ -113,10 +113,6 @@ static void intr_pic_ipi_setup(u_int, const char *, intr_ipi_handler_t *, extern struct pcpu __pcpu[]; -static device_identify_t arm64_cpu_identify; -static device_probe_t arm64_cpu_probe; -static device_attach_t arm64_cpu_attach; - static void ipi_ast(void *); static void ipi_hardclock(void *); static void ipi_preempt(void *); -- cgit v1.3 From d9961ef478406292b4ecbd38b69f6dd1e1f4c15a Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Wed, 31 Oct 2018 12:00:35 +0000 Subject: Use pmap_invalidate_all rather than invalidating 512 level 2 entries in the early pmap_mapbios/unmapbios code. It is even worse when there are multiple L2 entries to handle as we would need to iterate over all pages. Sponsored by: DARPA, AFRL --- sys/arm64/arm64/pmap.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'sys') diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index 1ae33292bf24..1e8f61fa1a5e 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -4663,11 +4663,11 @@ pmap_mapbios(vm_paddr_t pa, vm_size_t size) pmap_load_store(l2, pa | ATTR_DEFAULT | ATTR_XN | ATTR_IDX(CACHED_MEMORY) | L2_BLOCK); - pmap_invalidate_range(kernel_pmap, va, va + L2_SIZE); va += L2_SIZE; pa += L2_SIZE; } + pmap_invalidate_all(kernel_pmap); va = preinit_map_va + (start_idx * L2_SIZE); @@ -4700,12 +4700,14 @@ pmap_unmapbios(vm_offset_t va, vm_size_t size) pd_entry_t *pde; pt_entry_t *l2; int i, lvl, l2_blocks, block; + bool preinit_map; l2_blocks = (roundup2(va + size, L2_SIZE) - rounddown2(va, L2_SIZE)) >> L2_SHIFT; KASSERT(l2_blocks > 0, ("pmap_unmapbios: invalid size %lx", size)); /* Remove preinit mapping */ + preinit_map = false; block = 0; for (i = 0; i < PMAP_PREINIT_MAPPING_COUNT; i++) { ppim = pmap_preinit_mapping + i; @@ -4715,6 +4717,7 @@ pmap_unmapbios(vm_offset_t va, vm_size_t size) ppim->va = 0; ppim->pa = 0; ppim->size = 0; + preinit_map = true; offset = block * L2_SIZE; va_trunc = rounddown2(va, L2_SIZE) + offset; @@ -4725,14 +4728,16 @@ pmap_unmapbios(vm_offset_t va, vm_size_t size) va_trunc)); l2 = pmap_l1_to_l2(pde, va_trunc); pmap_load_clear(l2); - pmap_invalidate_range(kernel_pmap, va_trunc, - va_trunc + L2_SIZE); if (block == (l2_blocks - 1)) - return; + break; block++; } } + if (preinit_map) { + pmap_invalidate_all(kernel_pmap); + return; + } /* Unmap the pages reserved with kva_alloc. */ if (vm_initialized) { -- cgit v1.3 From e3e54813268664e9e8a8e3ff651b964d6173268f Mon Sep 17 00:00:00 2001 From: Brooks Davis Date: Wed, 31 Oct 2018 16:17:45 +0000 Subject: Reformat syscalls.master for better readability. This takes advantage of two recents changes to makesyscalls.sh: r328598: Permit a range of syscall numbers for UNIMPL r339624: Remove the need for backslashes in syscalls.master Syscall declerations are now split across multiple lines with the syscall name and variables each on seperate lines (with an exception for syscalls taking no arguments.) Reviewed by: imp Obtained from: CheriBSD Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D17706 --- sys/kern/syscalls.master | 4117 +++++++++++++++++++++++++++++++++------------- 1 file changed, 2959 insertions(+), 1158 deletions(-) (limited to 'sys') diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 296ddc678a8f..7544390b9e2d 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -84,314 +84,867 @@ ; redistributions should be placed in the reserved range at the end ; of the current calls. -0 AUE_NULL STD { int nosys(void); } syscall nosys_args int -1 AUE_EXIT STD { void sys_exit(int rval); } exit \ - sys_exit_args void -2 AUE_FORK STD { int fork(void); } -3 AUE_READ STD { ssize_t read(int fd, \ - _Out_writes_bytes_(nbyte) void *buf, \ - size_t nbyte); } -4 AUE_WRITE STD { ssize_t write(int fd, \ - _In_reads_bytes_(nbyte) const void *buf, \ - size_t nbyte); } -5 AUE_OPEN_RWTC STD { int open( \ - _In_z_ char *path, \ - int flags, \ - int mode); } +0 AUE_NULL STD { + int nosys(void); + } syscall nosys_args int +1 AUE_EXIT STD { + void sys_exit( + int rval + ); + } exit sys_exit_args void +2 AUE_FORK STD { + int fork(void); + } +3 AUE_READ STD { + ssize_t read( + int fd, + _Out_writes_bytes_(nbyte) void *buf, + size_t nbyte + ); + } +4 AUE_WRITE STD { + ssize_t write( + int fd, + _In_reads_bytes_(nbyte) const void *buf, + size_t nbyte + ); + } +5 AUE_OPEN_RWTC STD { + int open( + _In_z_ char *path, + int flags, + int mode + ); + } ; XXX should be { int open(const char *path, int flags, ...); } ; but we're not ready for `const' or varargs. ; XXX man page says `mode_t mode'. -6 AUE_CLOSE STD { int close(int fd); } -7 AUE_WAIT4 STD { int wait4(int pid, \ - _Out_opt_ int *status, \ - int options, \ - _Out_opt_ struct rusage *rusage); } -8 AUE_CREAT COMPAT { int creat(_In_z_ char *path, int mode); } -9 AUE_LINK STD { int link(_In_z_ char *path, \ - _In_z_ char *link); } -10 AUE_UNLINK STD { int unlink(_In_z_ char *path); } +6 AUE_CLOSE STD { + int close( + int fd + ); + } +7 AUE_WAIT4 STD { + int wait4( + int pid, + _Out_opt_ int *status, + int options, + _Out_opt_ struct rusage *rusage + ); + } +8 AUE_CREAT COMPAT { + int creat( + _In_z_ char *path, + int mode + ); + } +9 AUE_LINK STD { + int link( + _In_z_ char *path, + _In_z_ char *link + ); + } +10 AUE_UNLINK STD { + int unlink( + _In_z_ char *path + ); + } 11 AUE_NULL OBSOL execv -12 AUE_CHDIR STD { int chdir(_In_z_ char *path); } -13 AUE_FCHDIR STD { int fchdir(int fd); } -14 AUE_MKNOD COMPAT11 { int mknod(_In_z_ char *path, int mode, \ - int dev); } -15 AUE_CHMOD STD { int chmod(_In_z_ char *path, int mode); } -16 AUE_CHOWN STD { int chown(_In_z_ char *path, \ - int uid, int gid); } -17 AUE_NULL STD { caddr_t break(_In_ char *nsize); } -18 AUE_GETFSSTAT COMPAT4 { int getfsstat( \ - _Out_writes_bytes_opt_(bufsize) \ - struct ostatfs *buf, \ - long bufsize, int mode); } -19 AUE_LSEEK COMPAT { long lseek(int fd, long offset, \ - int whence); } -20 AUE_GETPID STD { pid_t getpid(void); } -21 AUE_MOUNT STD { int mount(_In_z_ char *type, \ - _In_z_ char *path, int flags, \ - _In_opt_ caddr_t data); } +12 AUE_CHDIR STD { + int chdir( + _In_z_ char *path + ); + } +13 AUE_FCHDIR STD { + int fchdir( + int fd + ); + } +14 AUE_MKNOD COMPAT11 { + int mknod( + _In_z_ char *path, + int mode, + int dev + ); + } +15 AUE_CHMOD STD { + int chmod( + _In_z_ char *path, + int mode + ); + } +16 AUE_CHOWN STD { + int chown( + _In_z_ char *path, + int uid, + int gid + ); + } +17 AUE_NULL STD { + caddr_t break( + _In_ char *nsize + ); + } +18 AUE_GETFSSTAT COMPAT4 { + int getfsstat( + _Out_writes_bytes_opt_(bufsize) struct ostatfs *buf, + long bufsize, + int mode + ); + } +19 AUE_LSEEK COMPAT { + long lseek( + int fd, + long offset, + int whence + ); + } +20 AUE_GETPID STD { + pid_t getpid(void); + } +21 AUE_MOUNT STD { + int mount( + _In_z_ char *type, + _In_z_ char *path, + int flags, + _In_opt_ caddr_t data + ); + } ; XXX `path' should have type `const char *' but we're not ready for that. -22 AUE_UMOUNT STD { int unmount(_In_z_ char *path, int flags); } -23 AUE_SETUID STD { int setuid(uid_t uid); } -24 AUE_GETUID STD { uid_t getuid(void); } -25 AUE_GETEUID STD { uid_t geteuid(void); } -26 AUE_PTRACE STD { int ptrace(int req, pid_t pid, \ - _Inout_opt_ caddr_t addr, int data); } -27 AUE_RECVMSG STD { int recvmsg(int s, \ - _Inout_ struct msghdr *msg, int flags); } -28 AUE_SENDMSG STD { int sendmsg(int s, _In_ struct msghdr *msg, \ - int flags); } -29 AUE_RECVFROM STD { int recvfrom(int s, \ - _Out_writes_bytes_(len) caddr_t buf, \ - size_t len, int flags, \ - _Out_writes_bytes_opt_(*fromlenaddr) \ - struct sockaddr *from, \ - _Inout_opt_ \ - __socklen_t *fromlenaddr); } -30 AUE_ACCEPT STD { int accept(int s, \ - _Out_writes_bytes_opt_(*anamelen) \ - struct sockaddr *name, \ - _Inout_opt_ \ - __socklen_t *anamelen); } -31 AUE_GETPEERNAME STD { int getpeername(int fdes, \ - _Out_writes_bytes_(*alen) \ - struct sockaddr *asa, \ - _Inout_opt_ \ - __socklen_t *alen); } -32 AUE_GETSOCKNAME STD { int getsockname(int fdes, \ - _Out_writes_bytes_(*alen) \ - struct sockaddr *asa, \ - _Inout_ __socklen_t *alen); } -33 AUE_ACCESS STD { int access(_In_z_ char *path, int amode); } -34 AUE_CHFLAGS STD { int chflags(_In_z_ const char *path, \ - u_long flags); } -35 AUE_FCHFLAGS STD { int fchflags(int fd, u_long flags); } -36 AUE_SYNC STD { int sync(void); } -37 AUE_KILL STD { int kill(int pid, int signum); } -38 AUE_STAT COMPAT { int stat(_In_z_ char *path, \ - _Out_ struct ostat *ub); } -39 AUE_GETPPID STD { pid_t getppid(void); } -40 AUE_LSTAT COMPAT { int lstat(_In_z_ char *path, \ - _Out_ struct ostat *ub); } -41 AUE_DUP STD { int dup(u_int fd); } -42 AUE_PIPE COMPAT10 { int pipe(void); } -43 AUE_GETEGID STD { gid_t getegid(void); } -44 AUE_PROFILE STD { int profil( \ - _Out_writes_bytes_(size) caddr_t samples, \ - size_t size, size_t offset, u_int scale); } -45 AUE_KTRACE STD { int ktrace(_In_z_ const char *fname, \ - int ops, int facs, int pid); } -46 AUE_SIGACTION COMPAT { int sigaction(int signum, \ - _In_opt_ struct osigaction *nsa, \ - _Out_opt_ struct osigaction *osa); } -47 AUE_GETGID STD { gid_t getgid(void); } -48 AUE_SIGPROCMASK COMPAT { int sigprocmask(int how, osigset_t mask); } +22 AUE_UMOUNT STD { + int unmount( + _In_z_ char *path, + int flags + ); + } +23 AUE_SETUID STD { + int setuid( + uid_t uid + ); + } +24 AUE_GETUID STD { + uid_t getuid(void); + } +25 AUE_GETEUID STD { + uid_t geteuid(void); + } +26 AUE_PTRACE STD { + int ptrace( + int req, + pid_t pid, + _Inout_opt_ caddr_t addr, + int data + ); + } +27 AUE_RECVMSG STD { + int recvmsg( + int s, + _Inout_ struct msghdr *msg, + int flags + ); + } +28 AUE_SENDMSG STD { + int sendmsg( + int s, + _In_ struct msghdr *msg, + int flags + ); + } +29 AUE_RECVFROM STD { + int recvfrom( + int s, + _Out_writes_bytes_(len) caddr_t buf, + size_t len, + int flags, + _Out_writes_bytes_opt_(*fromlenaddr) struct sockaddr *from, + _Inout_opt_ __socklen_t *fromlenaddr + ); + } +30 AUE_ACCEPT STD { + int accept( + int s, + _Out_writes_bytes_opt_(*anamelen) struct sockaddr *name, + _Inout_opt_ __socklen_t *anamelen + ); + } +31 AUE_GETPEERNAME STD { + int getpeername( + int fdes, + _Out_writes_bytes_(*alen) struct sockaddr *asa, + _Inout_opt_ __socklen_t *alen + ); + } +32 AUE_GETSOCKNAME STD { + int getsockname( + int fdes, + _Out_writes_bytes_(*alen) struct sockaddr *asa, + _Inout_ __socklen_t *alen + ); + } +33 AUE_ACCESS STD { + int access( + _In_z_ char *path, + int amode + ); + } +34 AUE_CHFLAGS STD { + int chflags( + _In_z_ const char *path, + u_long flags + ); + } +35 AUE_FCHFLAGS STD { + int fchflags( + int fd, + u_long flags + ); + } +36 AUE_SYNC STD { + int sync(void); + } +37 AUE_KILL STD { + int kill( + int pid, + int signum + ); + } +38 AUE_STAT COMPAT { + int stat( + _In_z_ char *path, + _Out_ struct ostat *ub + ); + } +39 AUE_GETPPID STD { + pid_t getppid(void); + } +40 AUE_LSTAT COMPAT { + int lstat( + _In_z_ char *path, + _Out_ struct ostat *ub + ); + } +41 AUE_DUP STD { + int dup( + u_int fd + ); + } +42 AUE_PIPE COMPAT10 { + int pipe(void); + } +43 AUE_GETEGID STD { + gid_t getegid(void); + } +44 AUE_PROFILE STD { + int profil( + _Out_writes_bytes_(size) caddr_t samples, + size_t size, + size_t offset, + u_int scale + ); + } +45 AUE_KTRACE STD { + int ktrace( + _In_z_ const char *fname, + int ops, + int facs, + int pid + ); + } +46 AUE_SIGACTION COMPAT { + int sigaction( + int signum, + _In_opt_ struct osigaction *nsa, + _Out_opt_ struct osigaction *osa + ); + } +47 AUE_GETGID STD { + gid_t getgid(void); + } +48 AUE_SIGPROCMASK COMPAT { + int sigprocmask( + int how, + osigset_t mask + ); + } ; XXX note nonstandard (bogus) calling convention - the libc stub passes ; us the mask, not a pointer to it, and we return the old mask as the ; (int) return value. -49 AUE_GETLOGIN STD { int getlogin( \ - _Out_writes_z_(namelen) char *namebuf, \ - u_int namelen); } -50 AUE_SETLOGIN STD { int setlogin(_In_z_ char *namebuf); } -51 AUE_ACCT STD { int acct(_In_z_ char *path); } -52 AUE_SIGPENDING COMPAT { int sigpending(void); } -53 AUE_SIGALTSTACK STD { int sigaltstack(_In_opt_ stack_t *ss, \ - _Out_opt_ stack_t *oss); } -54 AUE_IOCTL STD { int ioctl(int fd, u_long com, \ - _Inout_opt_ caddr_t data); } -55 AUE_REBOOT STD { int reboot(int opt); } -56 AUE_REVOKE STD { int revoke(_In_z_ char *path); } -57 AUE_SYMLINK STD { int symlink(_In_z_ char *path, \ - _In_z_ char *link); } -58 AUE_READLINK STD { ssize_t readlink(_In_z_ char *path, \ - _Out_writes_z_(count) char *buf, \ - size_t count); } -59 AUE_EXECVE STD { int execve( \ - _In_z_ char *fname, \ - _In_z_ char **argv, \ - _In_z_ char **envv); } -60 AUE_UMASK STD { int umask(int newmask); } -61 AUE_CHROOT STD { int chroot(_In_z_ char *path); } -62 AUE_FSTAT COMPAT { int fstat(int fd, _Out_ struct ostat *sb); } -63 AUE_NULL COMPAT { int getkerninfo(int op, \ - _Out_writes_bytes_opt(*size) char *where, \ - _Inout_opt_ size_t *size, \ - int arg); } getkerninfo getkerninfo_args int -64 AUE_NULL COMPAT { int getpagesize(void); } getpagesize \ - getpagesize_args int -65 AUE_MSYNC STD { int msync(_In_ void *addr, size_t len, \ - int flags); } -66 AUE_VFORK STD { int vfork(void); } +49 AUE_GETLOGIN STD { + int getlogin( + _Out_writes_z_(namelen) char *namebuf, + u_int namelen + ); + } +50 AUE_SETLOGIN STD { + int setlogin( + _In_z_ char *namebuf + ); + } +51 AUE_ACCT STD { + int acct( + _In_z_ char *path + ); + } +52 AUE_SIGPENDING COMPAT { + int sigpending(void); + } +53 AUE_SIGALTSTACK STD { + int sigaltstack( + _In_opt_ stack_t *ss, + _Out_opt_ stack_t *oss + ); + } +54 AUE_IOCTL STD { + int ioctl( + int fd, + u_long com, + _Inout_opt_ caddr_t data + ); + } +55 AUE_REBOOT STD { + int reboot( + int opt + ); + } +56 AUE_REVOKE STD { + int revoke( + _In_z_ char *path + ); + } +57 AUE_SYMLINK STD { + int symlink( + _In_z_ char *path, + _In_z_ char *link + ); + } +58 AUE_READLINK STD { + ssize_t readlink( + _In_z_ char *path, + _Out_writes_z_(count) char *buf, + size_t count + ); + } +59 AUE_EXECVE STD { + int execve( + _In_z_ char *fname, + _In_z_ char **argv, + _In_z_ char **envv + ); + } +60 AUE_UMASK STD { + int umask( + int newmask + ); + } +61 AUE_CHROOT STD { + int chroot( + _In_z_ char *path + ); + } +62 AUE_FSTAT COMPAT { + int fstat( + int fd, + _Out_ struct ostat *sb + ); + } +63 AUE_NULL COMPAT { + int getkerninfo( + int op, + _Out_writes_bytes_opt( + *size) char *where, + _Inout_opt_ size_t *size, + int arg + ); + } getkerninfo getkerninfo_args int +64 AUE_NULL COMPAT { + int getpagesize(void); + } getpagesize getpagesize_args int +65 AUE_MSYNC STD { + int msync( + _In_ void *addr, + size_t len, + int flags + ); + } +66 AUE_VFORK STD { + int vfork(void); + } 67 AUE_NULL OBSOL vread 68 AUE_NULL OBSOL vwrite -69 AUE_SBRK STD { int sbrk(int incr); } -70 AUE_SSTK STD { int sstk(int incr); } -71 AUE_MMAP COMPAT { int mmap(_In_ void *addr, int len, int prot, \ - int flags, int fd, long pos); } -72 AUE_O_VADVISE COMPAT11 { int vadvise(int anom); } -73 AUE_MUNMAP STD { int munmap(_In_ void *addr, size_t len); } -74 AUE_MPROTECT STD { int mprotect(_In_ void *addr, \ - size_t len, int prot); } -75 AUE_MADVISE STD { int madvise(_In_ void *addr, \ - size_t len, int behav); } +69 AUE_SBRK STD { + int sbrk( + int incr + ); + } +70 AUE_SSTK STD { + int sstk( + int incr + ); + } +71 AUE_MMAP COMPAT { + int mmap( + _In_ void *addr, + int len, + int prot, + int flags, + int fd, + long pos + ); + } +72 AUE_O_VADVISE COMPAT11 { + int vadvise( + int anom + ); + } +73 AUE_MUNMAP STD { + int munmap( + _In_ void *addr, + size_t len + ); + } +74 AUE_MPROTECT STD { + int mprotect( + _In_ void *addr, + size_t len, + int prot + ); + } +75 AUE_MADVISE STD { + int madvise( + _In_ void *addr, + size_t len, + int behav + ); + } 76 AUE_NULL OBSOL vhangup 77 AUE_NULL OBSOL vlimit -78 AUE_MINCORE STD { int mincore( \ - _In_ const void *addr, \ - size_t len, \ - _Out_writes_bytes_(len/PAGE_SIZE) \ - char *vec); } -79 AUE_GETGROUPS STD { int getgroups(u_int gidsetsize, \ - _Out_writes_opt_(gidsetsize) \ - gid_t *gidset); } -80 AUE_SETGROUPS STD { int setgroups(u_int gidsetsize, \ - _In_reads_(gidsetsize) gid_t *gidset); } -81 AUE_GETPGRP STD { int getpgrp(void); } -82 AUE_SETPGRP STD { int setpgid(int pid, int pgid); } -83 AUE_SETITIMER STD { int setitimer(u_int which, \ - _In_ struct itimerval *itv, \ - _Out_opt_ struct itimerval *oitv); } -84 AUE_WAIT4 COMPAT { int wait(void); } -85 AUE_SWAPON STD { int swapon(_In_z_ char *name); } -86 AUE_GETITIMER STD { int getitimer(u_int which, \ - _Out_ struct itimerval *itv); } -87 AUE_SYSCTL COMPAT { int gethostname( \ - _Out_writes_z_(len) char *hostname, \ - u_int len); } gethostname \ - gethostname_args int -88 AUE_SYSCTL COMPAT { int sethostname( \ - _In_reads_z_(len) char *hostname, \ - u_int len); } sethostname \ - sethostname_args int -89 AUE_GETDTABLESIZE STD { int getdtablesize(void); } -90 AUE_DUP2 STD { int dup2(u_int from, u_int to); } +78 AUE_MINCORE STD { + int mincore( + _In_ const void *addr, + size_t len, + _Out_writes_bytes_(len/PAGE_SIZE) char *vec + ); + } +79 AUE_GETGROUPS STD { + int getgroups( + u_int gidsetsize, + _Out_writes_opt_(gidsetsize) gid_t *gidset + ); + } +80 AUE_SETGROUPS STD { + int setgroups( + u_int gidsetsize, + _In_reads_(gidsetsize) gid_t *gidset + ); + } +81 AUE_GETPGRP STD { + int getpgrp(void); + } +82 AUE_SETPGRP STD { + int setpgid( + int pid, + int pgid + ); + } +83 AUE_SETITIMER STD { + int setitimer( + u_int which, + _In_ struct itimerval *itv, + _Out_opt_ struct itimerval *oitv + ); + } +84 AUE_WAIT4 COMPAT { + int wait(void); + } +85 AUE_SWAPON STD { + int swapon( + _In_z_ char *name + ); + } +86 AUE_GETITIMER STD { + int getitimer( + u_int which, + _Out_ struct itimerval *itv + ); + } +87 AUE_SYSCTL COMPAT { + int gethostname( + _Out_writes_z_(len) char *hostname, + u_int len + ); + } gethostname gethostname_args int +88 AUE_SYSCTL COMPAT { + int sethostname( + _In_reads_z_(len) char *hostname, + u_int len + ); + } sethostname sethostname_args int +89 AUE_GETDTABLESIZE STD { + int getdtablesize(void); + } +90 AUE_DUP2 STD { + int dup2( + u_int from, + u_int to + ); + } 91 AUE_NULL UNIMPL getdopt -92 AUE_FCNTL STD { int fcntl(int fd, int cmd, long arg); } -; XXX should be { int fcntl(int fd, int cmd, ...); } +92 AUE_FCNTL STD { + int fcntl( + int fd, + int cmd, + long arg + ); + } +; XXX should be { int fcntl(int fd, int cmd, ...); } ; but we're not ready for varargs. -93 AUE_SELECT STD { int select(int nd, \ - _Inout_opt_ fd_set *in, \ - _Inout_opt_ fd_set *ou, \ - _Inout_opt_ fd_set *ex, \ - _In_opt_ struct timeval *tv); } +93 AUE_SELECT STD { + int select( + int nd, + _Inout_opt_ fd_set *in, + _Inout_opt_ fd_set *ou, + _Inout_opt_ fd_set *ex, + _In_opt_ struct timeval *tv + ); + } 94 AUE_NULL UNIMPL setdopt -95 AUE_FSYNC STD { int fsync(int fd); } -96 AUE_SETPRIORITY STD { int setpriority(int which, int who, \ - int prio); } -97 AUE_SOCKET STD { int socket(int domain, int type, \ - int protocol); } -98 AUE_CONNECT STD { int connect(int s, \ - _In_reads_bytes_(namelen) caddr_t name, \ - int namelen); } -99 AUE_ACCEPT COMPAT|NOARGS { int accept(int s, \ - _Out_writes_bytes_opt_(*anamelen) \ - caddr_t name, int *anamelen); } \ - accept accept_args int -100 AUE_GETPRIORITY STD { int getpriority(int which, int who); } -101 AUE_SEND COMPAT { int send(int s, \ - _In_reads_bytes_(len) caddr_t buf, \ - int len, \ - int flags); } -102 AUE_RECV COMPAT { int recv(int s, \ - _Out_writes_bytes_(len) caddr_t buf, \ - int len, int flags); } -103 AUE_SIGRETURN COMPAT { int sigreturn( \ - _In_ struct osigcontext *sigcntxp); } -104 AUE_BIND STD { int bind(int s, \ - _In_reads_bytes_(namelen) caddr_t name, \ - int namelen); } -105 AUE_SETSOCKOPT STD { int setsockopt(int s, int level, int name, \ - _In_reads_bytes_opt_(valsize) caddr_t val, \ - int valsize); } -106 AUE_LISTEN STD { int listen(int s, int backlog); } +95 AUE_FSYNC STD { + int fsync( + int fd + ); + } +96 AUE_SETPRIORITY STD { + int setpriority( + int which, + int who, + int prio + ); + } +97 AUE_SOCKET STD { + int socket( + int domain, + int type, + int protocol + ); + } +98 AUE_CONNECT STD { + int connect( + int s, + _In_reads_bytes_(namelen) caddr_t name, + int namelen + ); + } +99 AUE_ACCEPT COMPAT|NOARGS { + int accept( + int s, + _Out_writes_bytes_opt_(*anamelen) caddr_t name, + int *anamelen + ); + } accept accept_args int +100 AUE_GETPRIORITY STD { + int getpriority( + int which, + int who + ); + } +101 AUE_SEND COMPAT { + int send( + int s, + _In_reads_bytes_(len) caddr_t buf, + int len, + int flags + ); + } +102 AUE_RECV COMPAT { + int recv( + int s, + _Out_writes_bytes_(len) caddr_t buf, + int len, + int flags + ); + } +103 AUE_SIGRETURN COMPAT { + int sigreturn( + _In_ struct osigcontext *sigcntxp + ); + } +104 AUE_BIND STD { + int bind( + int s, + _In_reads_bytes_(namelen) caddr_t name, + int namelen + ); + } +105 AUE_SETSOCKOPT STD { + int setsockopt( + int s, + int level, + int name, + _In_reads_bytes_opt_(valsize) caddr_t val, + int valsize + ); + } +106 AUE_LISTEN STD { + int listen( + int s, + int backlog + ); + } 107 AUE_NULL OBSOL vtimes -108 AUE_NULL COMPAT { int sigvec(int signum, \ - _In_opt_ struct sigvec *nsv, \ - _Out_opt_ struct sigvec *osv); } -109 AUE_NULL COMPAT { int sigblock(int mask); } -110 AUE_NULL COMPAT { int sigsetmask(int mask); } -111 AUE_NULL COMPAT { int sigsuspend(osigset_t mask); } +108 AUE_NULL COMPAT { + int sigvec( + int signum, + _In_opt_ struct sigvec *nsv, + _Out_opt_ struct sigvec *osv + ); + } +109 AUE_NULL COMPAT { + int sigblock( + int mask + ); + } +110 AUE_NULL COMPAT { + int sigsetmask( + int mask + ); + } +111 AUE_NULL COMPAT { + int sigsuspend( + osigset_t mask + ); + } ; XXX note nonstandard (bogus) calling convention - the libc stub passes ; us the mask, not a pointer to it. -112 AUE_NULL COMPAT { int sigstack(_In_opt_ struct sigstack *nss, \ - _Out_opt_ struct sigstack *oss); } -113 AUE_RECVMSG COMPAT { int recvmsg(int s, \ - _Inout_ struct omsghdr *msg, \ - int flags); } -114 AUE_SENDMSG COMPAT { int sendmsg(int s, _In_ caddr_t msg, \ - int flags); } +112 AUE_NULL COMPAT { + int sigstack( + _In_opt_ struct sigstack *nss, + _Out_opt_ struct sigstack *oss + ); + } +113 AUE_RECVMSG COMPAT { + int recvmsg( + int s, + _Inout_ struct omsghdr *msg, + int flags + ); + } +114 AUE_SENDMSG COMPAT { + int sendmsg( + int s, + _In_ caddr_t msg, + int flags + ); + } 115 AUE_NULL OBSOL vtrace -116 AUE_GETTIMEOFDAY STD { int gettimeofday( \ - _Out_ struct timeval *tp, \ - _Out_opt_ struct timezone *tzp); } -117 AUE_GETRUSAGE STD { int getrusage(int who, \ - _Out_ struct rusage *rusage); } -118 AUE_GETSOCKOPT STD { int getsockopt(int s, int level, int name, \ - _Out_writes_bytes_opt_(*avalsize) \ - caddr_t val, _Inout_ int *avalsize); } +116 AUE_GETTIMEOFDAY STD { + int gettimeofday( + _Out_ struct timeval *tp, + _Out_opt_ struct timezone *tzp + ); + } +117 AUE_GETRUSAGE STD { + int getrusage( + int who, + _Out_ struct rusage *rusage + ); + } +118 AUE_GETSOCKOPT STD { + int getsockopt( + int s, + int level, + int name, + _Out_writes_bytes_opt_(*avalsize) caddr_t val, + _Inout_ int *avalsize + ); + } 119 AUE_NULL UNIMPL resuba (BSD/OS 2.x) -120 AUE_READV STD { int readv(int fd, \ - _Inout_updates_(iovcnt) struct iovec *iovp, \ - u_int iovcnt); } -121 AUE_WRITEV STD { int writev(int fd, \ - _In_reads_opt_(iovcnt) struct iovec *iovp, \ - u_int iovcnt); } -122 AUE_SETTIMEOFDAY STD { int settimeofday( \ - _In_ struct timeval *tv, \ - _In_opt_ struct timezone *tzp); } -123 AUE_FCHOWN STD { int fchown(int fd, int uid, int gid); } -124 AUE_FCHMOD STD { int fchmod(int fd, int mode); } -125 AUE_RECVFROM COMPAT|NOARGS { int recvfrom(int s, \ - _Out_writes_(len) caddr_t buf, \ - size_t len, int flags, \ - _Out_writes_bytes_(*fromlenaddr) \ - caddr_t from, \ - _Inout_ int *fromlenaddr); } \ - recvfrom recvfrom_args int -126 AUE_SETREUID STD { int setreuid(int ruid, int euid); } -127 AUE_SETREGID STD { int setregid(int rgid, int egid); } -128 AUE_RENAME STD { int rename(_In_z_ char *from, \ - _In_z_ char *to); } -129 AUE_TRUNCATE COMPAT { int truncate(_In_z_ char *path, \ - long length); } -130 AUE_FTRUNCATE COMPAT { int ftruncate(int fd, long length); } -131 AUE_FLOCK STD { int flock(int fd, int how); } -132 AUE_MKFIFO STD { int mkfifo(_In_z_ char *path, int mode); } -133 AUE_SENDTO STD { int sendto(int s, \ - _In_reads_bytes_(len) caddr_t buf, \ - size_t len, int flags, \ - _In_reads_bytes_opt_(tolen) caddr_t to, \ - int tolen); } -134 AUE_SHUTDOWN STD { int shutdown(int s, int how); } -135 AUE_SOCKETPAIR STD { int socketpair(int domain, int type, \ - int protocol, _Out_writes_(2) int *rsv); } -136 AUE_MKDIR STD { int mkdir(_In_z_ char *path, int mode); } -137 AUE_RMDIR STD { int rmdir(_In_z_ char *path); } -138 AUE_UTIMES STD { int utimes(_In_z_ char *path, \ - _In_ struct timeval *tptr); } +120 AUE_READV STD { + int readv( + int fd, + _Inout_updates_(iovcnt) struct iovec *iovp, + u_int iovcnt + ); + } +121 AUE_WRITEV STD { + int writev( + int fd, + _In_reads_opt_(iovcnt) struct iovec *iovp, + u_int iovcnt + ); + } +122 AUE_SETTIMEOFDAY STD { + int settimeofday( + _In_ struct timeval *tv, + _In_opt_ struct timezone *tzp + ); + } +123 AUE_FCHOWN STD { + int fchown( + int fd, + int uid, + int gid + ); + } +124 AUE_FCHMOD STD { + int fchmod( + int fd, + int mode + ); + } +125 AUE_RECVFROM COMPAT|NOARGS { + int recvfrom( + int s, + _Out_writes_(len) caddr_t buf, + size_t len, + int flags, + _Out_writes_bytes_(*fromlenaddr) caddr_t from, + _Inout_ int *fromlenaddr + ); + } recvfrom recvfrom_args int +126 AUE_SETREUID STD { + int setreuid( + int ruid, + int euid + ); + } +127 AUE_SETREGID STD { + int setregid( + int rgid, + int egid + ); + } +128 AUE_RENAME STD { + int rename( + _In_z_ char *from, + _In_z_ char *to + ); + } +129 AUE_TRUNCATE COMPAT { + int truncate( + _In_z_ char *path, + long length + ); + } +130 AUE_FTRUNCATE COMPAT { + int ftruncate( + int fd, + long length + ); + } +131 AUE_FLOCK STD { + int flock( + int fd, + int how + ); + } +132 AUE_MKFIFO STD { + int mkfifo( + _In_z_ char *path, + int mode + ); + } +133 AUE_SENDTO STD { + int sendto( + int s, + _In_reads_bytes_(len) caddr_t buf, + size_t len, + int flags, + _In_reads_bytes_opt_(tolen) caddr_t to, + int tolen + ); + } +134 AUE_SHUTDOWN STD { + int shutdown( + int s, + int how + ); + } +135 AUE_SOCKETPAIR STD { + int socketpair( + int domain, + int type, + int protocol, + _Out_writes_(2) int *rsv + ); + } +136 AUE_MKDIR STD { + int mkdir( + _In_z_ char *path, + int mode + ); + } +137 AUE_RMDIR STD { + int rmdir( + _In_z_ char *path + ); + } +138 AUE_UTIMES STD { + int utimes( + _In_z_ char *path, + _In_ struct timeval *tptr + ); + } 139 AUE_NULL OBSOL 4.2 sigreturn -140 AUE_ADJTIME STD { int adjtime(_In_ struct timeval *delta, \ - _Out_opt_ struct timeval *olddelta); } -141 AUE_GETPEERNAME COMPAT { int getpeername(int fdes, \ - _Out_writes_bytes_(*alen) \ - caddr_t asa, \ - _Inout_opt_ int *alen); } -142 AUE_SYSCTL COMPAT { long gethostid(void); } -143 AUE_SYSCTL COMPAT { int sethostid(long hostid); } -144 AUE_GETRLIMIT COMPAT { int getrlimit(u_int which, _Out_ struct \ - orlimit *rlp); } -145 AUE_SETRLIMIT COMPAT { int setrlimit(u_int which, \ - _Out_ struct orlimit *rlp); } -146 AUE_KILLPG COMPAT { int killpg(int pgid, int signum); } -147 AUE_SETSID STD { int setsid(void); } -148 AUE_QUOTACTL STD { int quotactl( \ - _In_z_ char *path, int cmd, int uid, \ - _In_ caddr_t arg); } -149 AUE_O_QUOTA COMPAT { int quota(void); } -150 AUE_GETSOCKNAME COMPAT|NOARGS { int getsockname(int fdec, \ - _Out_writes_bytes_(*alen) \ - caddr_t asa, \ - _Inout_ int *alen); } getsockname \ - getsockname_args int +140 AUE_ADJTIME STD { + int adjtime( + _In_ struct timeval *delta, + _Out_opt_ struct timeval *olddelta + ); + } +141 AUE_GETPEERNAME COMPAT { + int getpeername( + int fdes, + _Out_writes_bytes_(*alen) caddr_t asa, + _Inout_opt_ int *alen + ); + } +142 AUE_SYSCTL COMPAT { + long gethostid(void); + } +143 AUE_SYSCTL COMPAT { + int sethostid( + long hostid + ); + } +144 AUE_GETRLIMIT COMPAT { + int getrlimit( + u_int which, + _Out_ struct orlimit *rlp + ); + } +145 AUE_SETRLIMIT COMPAT { + int setrlimit( + u_int which, + _Out_ struct orlimit *rlp + ); + } +146 AUE_KILLPG COMPAT { + int killpg( + int pgid, + int signum + ); + } +147 AUE_SETSID STD { + int setsid(void); + } +148 AUE_QUOTACTL STD { + int quotactl( + _In_z_ char *path, + int cmd, + int uid, + _In_ caddr_t arg + ); + } +149 AUE_O_QUOTA COMPAT { + int quota(void); + } +150 AUE_GETSOCKNAME COMPAT|NOARGS { + int getsockname( + int fdec, + _Out_writes_bytes_(*alen) caddr_t asa, + _Inout_ int *alen + ); + } getsockname getsockname_args int ; Syscalls 151-180 inclusive are reserved for vendor-specific ; system calls. (This includes various calls added for compatibity @@ -401,120 +954,303 @@ 152 AUE_NULL UNIMPL sem_wakeup (BSD/OS 2.x) 153 AUE_NULL UNIMPL asyncdaemon (BSD/OS 2.x) ; 154 is initialised by the NLM code, if present. -154 AUE_NULL NOSTD { int nlm_syscall(int debug_level, \ - int grace_period, int addr_count, \ - _In_reads_(addr_count) \ - char **addrs); } +154 AUE_NULL NOSTD { + int nlm_syscall( + int debug_level, + int grace_period, + int addr_count, + _In_reads_(addr_count) char **addrs + ); + } ; 155 is initialized by the NFS code, if present. -155 AUE_NFS_SVC NOSTD { int nfssvc(int flag, _In_ caddr_t argp); } -156 AUE_GETDIRENTRIES COMPAT { int getdirentries(int fd, \ - _Out_writes_bytes_(count) char *buf, \ - u_int count, _Out_ long *basep); } -157 AUE_STATFS COMPAT4 { int statfs(_In_z_ char *path, \ - _Out_ struct ostatfs *buf); } -158 AUE_FSTATFS COMPAT4 { int fstatfs(int fd, \ - _Out_ struct ostatfs *buf); } +155 AUE_NFS_SVC NOSTD { + int nfssvc( + int flag, + _In_ caddr_t argp + ); + } +156 AUE_GETDIRENTRIES COMPAT { + int getdirentries( + int fd, + _Out_writes_bytes_(count) char *buf, + u_int count, + _Out_ long *basep + ); + } +157 AUE_STATFS COMPAT4 { + int statfs( + _In_z_ char *path, + _Out_ struct ostatfs *buf + ); + } +158 AUE_FSTATFS COMPAT4 { + int fstatfs( + int fd, + _Out_ struct ostatfs *buf + ); + } 159 AUE_NULL UNIMPL nosys -160 AUE_LGETFH STD { int lgetfh(_In_z_ char *fname, \ - _Out_ struct fhandle *fhp); } -161 AUE_NFS_GETFH STD { int getfh(_In_z_ char *fname, \ - _Out_ struct fhandle *fhp); } -162 AUE_SYSCTL COMPAT4 { int getdomainname( \ - _Out_writes_z_(len) char *domainname, \ - int len); } -163 AUE_SYSCTL COMPAT4 { int setdomainname( \ - _In_reads_z_(len) char *domainname, \ - int len); } -164 AUE_NULL COMPAT4 { int uname(_Out_ struct utsname *name); } -165 AUE_SYSARCH STD { int sysarch(int op, _In_z_ char *parms); } -166 AUE_RTPRIO STD { int rtprio(int function, pid_t pid, \ - _Inout_ struct rtprio *rtp); } +160 AUE_LGETFH STD { + int lgetfh( + _In_z_ char *fname, + _Out_ struct fhandle *fhp + ); + } +161 AUE_NFS_GETFH STD { + int getfh( + _In_z_ char *fname, + _Out_ struct fhandle *fhp + ); + } +162 AUE_SYSCTL COMPAT4 { + int getdomainname( + _Out_writes_z_(len) char *domainname, + int len + ); + } +163 AUE_SYSCTL COMPAT4 { + int setdomainname( + _In_reads_z_(len) char *domainname, + int len + ); + } +164 AUE_NULL COMPAT4 { + int uname( + _Out_ struct utsname *name + ); + } +165 AUE_SYSARCH STD { + int sysarch( + int op, + _In_z_ char *parms + ); + } +166 AUE_RTPRIO STD { + int rtprio( + int function, + pid_t pid, + _Inout_ struct rtprio *rtp + ); + } 167 AUE_NULL UNIMPL nosys 168 AUE_NULL UNIMPL nosys -169 AUE_SEMSYS NOSTD { int semsys(int which, int a2, int a3, \ - int a4, int a5); } -; XXX should be { int semsys(int which, ...); } -170 AUE_MSGSYS NOSTD { int msgsys(int which, int a2, int a3, \ - int a4, int a5, int a6); } -; XXX should be { int msgsys(int which, ...); } -171 AUE_SHMSYS NOSTD { int shmsys(int which, int a2, int a3, \ - int a4); } -; XXX should be { int shmsys(int which, ...); } +169 AUE_SEMSYS NOSTD { + int semsys( + int which, + int a2, + int a3, + int a4, + int a5 + ); + } +; XXX should be { int semsys(int which, ...); } +170 AUE_MSGSYS NOSTD { + int msgsys( + int which, + int a2, + int a3, + int a4, + int a5, + int a6 + ); + } +; XXX should be { int msgsys(int which, ...); } +171 AUE_SHMSYS NOSTD { + int shmsys( + int which, + int a2, + int a3, + int a4 + ); + } +; XXX should be { int shmsys(int which, ...); } 172 AUE_NULL UNIMPL nosys -173 AUE_PREAD COMPAT6 { ssize_t pread(int fd, \ - _Out_writes_bytes_(nbyte) void *buf, \ - size_t nbyte, int pad, off_t offset); } -174 AUE_PWRITE COMPAT6 { ssize_t pwrite(int fd, \ - _In_reads_bytes_(nbyte) \ - const void *buf, \ - size_t nbyte, int pad, off_t offset); } -175 AUE_SETFIB STD { int setfib(int fibnum); } -176 AUE_NTP_ADJTIME STD { int ntp_adjtime(_Inout_ struct timex *tp); } +173 AUE_PREAD COMPAT6 { + ssize_t pread( + int fd, + _Out_writes_bytes_(nbyte) void *buf, + size_t nbyte, + int pad, + off_t offset + ); + } +174 AUE_PWRITE COMPAT6 { + ssize_t pwrite( + int fd, + _In_reads_bytes_(nbyte) const void *buf, + size_t nbyte, + int pad, + off_t offset + ); + } +175 AUE_SETFIB STD { + int setfib( + int fibnum + ); + } +176 AUE_NTP_ADJTIME STD { + int ntp_adjtime( + _Inout_ struct timex *tp + ); + } 177 AUE_NULL UNIMPL sfork (BSD/OS 2.x) 178 AUE_NULL UNIMPL getdescriptor (BSD/OS 2.x) 179 AUE_NULL UNIMPL setdescriptor (BSD/OS 2.x) 180 AUE_NULL UNIMPL nosys ; Syscalls 181-199 are used by/reserved for BSD -181 AUE_SETGID STD { int setgid(gid_t gid); } -182 AUE_SETEGID STD { int setegid(gid_t egid); } -183 AUE_SETEUID STD { int seteuid(uid_t euid); } +181 AUE_SETGID STD { + int setgid( + gid_t gid + ); + } +182 AUE_SETEGID STD { + int setegid( + gid_t egid + ); + } +183 AUE_SETEUID STD { + int seteuid( + uid_t euid + ); + } 184 AUE_NULL OBSOL lfs_bmapv 185 AUE_NULL OBSOL lfs_markv 186 AUE_NULL OBSOL lfs_segclean 187 AUE_NULL OBSOL lfs_segwait -188 AUE_STAT COMPAT11 { int stat(_In_z_ char *path, \ - _Out_ struct freebsd11_stat *ub); } -189 AUE_FSTAT COMPAT11 { int fstat(int fd, \ - _Out_ struct freebsd11_stat *sb); } -190 AUE_LSTAT COMPAT11 { int lstat(_In_z_ char *path, \ - _Out_ struct freebsd11_stat *ub); } -191 AUE_PATHCONF STD { int pathconf(_In_z_ char *path, int name); } -192 AUE_FPATHCONF STD { int fpathconf(int fd, int name); } +188 AUE_STAT COMPAT11 { + int stat( + _In_z_ char *path, + _Out_ struct freebsd11_stat *ub + ); + } +189 AUE_FSTAT COMPAT11 { + int fstat( + int fd, + _Out_ struct freebsd11_stat *sb + ); + } +190 AUE_LSTAT COMPAT11 { + int lstat( + _In_z_ char *path, + _Out_ struct freebsd11_stat *ub + ); + } +191 AUE_PATHCONF STD { + int pathconf( + _In_z_ char *path, + int name + ); + } +192 AUE_FPATHCONF STD { + int fpathconf( + int fd, + int name + ); + } 193 AUE_NULL UNIMPL nosys -194 AUE_GETRLIMIT STD { int getrlimit(u_int which, \ - _Out_ struct rlimit *rlp); } getrlimit \ - __getrlimit_args int -195 AUE_SETRLIMIT STD { int setrlimit(u_int which, \ - _In_ struct rlimit *rlp); } setrlimit \ - __setrlimit_args int -196 AUE_GETDIRENTRIES COMPAT11 { int getdirentries(int fd, \ - _Out_writes_bytes_(count) char *buf, \ - u_int count, _Out_ long *basep); } -197 AUE_MMAP COMPAT6 { caddr_t mmap(_In_ caddr_t addr, size_t len, \ - int prot, int flags, int fd, int pad, \ - off_t pos); } -198 AUE_NULL NOPROTO { int nosys(void); } __syscall \ - __syscall_args int -199 AUE_LSEEK COMPAT6 { off_t lseek(int fd, int pad, \ - off_t offset, int whence); } -200 AUE_TRUNCATE COMPAT6 { int truncate(_In_z_ char *path, int pad, \ - off_t length); } -201 AUE_FTRUNCATE COMPAT6 { int ftruncate(int fd, int pad, \ - off_t length); } -202 AUE_SYSCTL STD { int __sysctl( \ - _In_reads_(namelen) int *name, \ - u_int namelen, \ - _Out_writes_bytes_opt_(*oldlenp) \ - void *old, \ - _Inout_opt_ size_t *oldlenp, \ - _In_reads_bytes_opt_(newlen) \ - void *new, \ - size_t newlen); } \ - __sysctl sysctl_args int -203 AUE_MLOCK STD { int mlock(_In_ const void *addr, \ - size_t len); } -204 AUE_MUNLOCK STD { int munlock(_In_ const void *addr, \ - size_t len); } -205 AUE_UNDELETE STD { int undelete(_In_z_ char *path); } -206 AUE_FUTIMES STD { int futimes(int fd, \ - _In_reads_(2) struct timeval *tptr); } -207 AUE_GETPGID STD { int getpgid(pid_t pid); } +194 AUE_GETRLIMIT STD { + int getrlimit( + u_int which, + _Out_ struct rlimit *rlp + ); + } getrlimit __getrlimit_args int +195 AUE_SETRLIMIT STD { + int setrlimit( + u_int which, + _In_ struct rlimit *rlp + ); + } setrlimit __setrlimit_args int +196 AUE_GETDIRENTRIES COMPAT11 { + int getdirentries( + int fd, + _Out_writes_bytes_(count) char *buf, + u_int count, + _Out_ long *basep + ); + } +197 AUE_MMAP COMPAT6 { + caddr_t mmap( + _In_ caddr_t addr, + size_t len, + int prot, + int flags, + int fd, + int pad, + off_t pos + ); + } +198 AUE_NULL NOPROTO { + int nosys(void); + } __syscall __syscall_args int +199 AUE_LSEEK COMPAT6 { + off_t lseek( + int fd, + int pad, + off_t offset, + int whence + ); + } +200 AUE_TRUNCATE COMPAT6 { + int truncate( + _In_z_ char *path, + int pad, + off_t length + ); + } +201 AUE_FTRUNCATE COMPAT6 { + int ftruncate( + int fd, + int pad, + off_t length + ); + } +202 AUE_SYSCTL STD { + int __sysctl( + _In_reads_(namelen) int *name, + u_int namelen, + _Out_writes_bytes_opt_(*oldlenp) void *old, + _Inout_opt_ size_t *oldlenp, + _In_reads_bytes_opt_(newlen) void *new, + size_t newlen + ); + } __sysctl sysctl_args int +203 AUE_MLOCK STD { + int mlock( + _In_ const void *addr, + size_t len + ); + } +204 AUE_MUNLOCK STD { + int munlock( + _In_ const void *addr, + size_t len + ); + } +205 AUE_UNDELETE STD { + int undelete( + _In_z_ char *path + ); + } +206 AUE_FUTIMES STD { + int futimes( + int fd, + _In_reads_(2) struct timeval *tptr + ); + } +207 AUE_GETPGID STD { + int getpgid( + pid_t pid + ); + } 208 AUE_NULL UNIMPL nosys -209 AUE_POLL STD { int poll( \ - _Inout_updates_(nfds) \ - struct pollfd *fds, \ - u_int nfds, int timeout); } +209 AUE_POLL STD { + int poll( + _Inout_updates_(nfds) struct pollfd *fds, + u_int nfds, + int timeout + ); + } ; ; The following are reserved for loadable syscalls ; @@ -529,298 +1265,671 @@ 218 AUE_NULL NODEF|NOTSTATIC lkmnosys lkmnosys nosys_args int 219 AUE_NULL NODEF|NOTSTATIC lkmnosys lkmnosys nosys_args int -220 AUE_SEMCTL COMPAT7|NOSTD { int __semctl(int semid, int semnum, \ - int cmd, union semun_old *arg); } -221 AUE_SEMGET NOSTD { int semget(key_t key, int nsems, \ - int semflg); } -222 AUE_SEMOP NOSTD { int semop(int semid, \ - _In_reads_(nsops) struct sembuf *sops, \ - size_t nsops); } +220 AUE_SEMCTL COMPAT7|NOSTD { + int __semctl( + int semid, + int semnum, + int cmd, + union semun_old *arg + ); + } +221 AUE_SEMGET NOSTD { + int semget( + key_t key, + int nsems, + int semflg + ); + } +222 AUE_SEMOP NOSTD { + int semop( + int semid, + _In_reads_(nsops) struct sembuf *sops, + size_t nsops + ); + } 223 AUE_NULL OBSOL semconfig -224 AUE_MSGCTL COMPAT7|NOSTD { int msgctl(int msqid, int cmd, \ - struct msqid_ds_old *buf); } -225 AUE_MSGGET NOSTD { int msgget(key_t key, int msgflg); } -226 AUE_MSGSND NOSTD { int msgsnd(int msqid, \ - _In_reads_bytes_(msgsz) const void *msgp, \ - size_t msgsz, int msgflg); } -227 AUE_MSGRCV NOSTD { ssize_t msgrcv(int msqid, \ - _Out_writes_bytes_(msgsz) void *msgp, \ - size_t msgsz, long msgtyp, int msgflg); } -228 AUE_SHMAT NOSTD { int shmat(int shmid, \ - _In_ const void *shmaddr, \ - int shmflg); } -229 AUE_SHMCTL COMPAT7|NOSTD { int shmctl(int shmid, int cmd, \ - struct shmid_ds_old *buf); } -230 AUE_SHMDT NOSTD { int shmdt(_In_ const void *shmaddr); } -231 AUE_SHMGET NOSTD { int shmget(key_t key, size_t size, \ - int shmflg); } -; -232 AUE_NULL STD { int clock_gettime(clockid_t clock_id, \ - _Out_ struct timespec *tp); } -233 AUE_CLOCK_SETTIME STD { int clock_settime(clockid_t clock_id, \ - _In_ const struct timespec *tp); } -234 AUE_NULL STD { int clock_getres(clockid_t clock_id, \ - _Out_ struct timespec *tp); } -235 AUE_NULL STD { int ktimer_create( \ - clockid_t clock_id, \ - _In_ struct sigevent *evp, \ - _Out_ int *timerid); } -236 AUE_NULL STD { int ktimer_delete(int timerid); } -237 AUE_NULL STD { int ktimer_settime(int timerid, \ - int flags, \ - _In_ const struct itimerspec *value, \ - _Out_opt_ struct itimerspec *ovalue); } -238 AUE_NULL STD { int ktimer_gettime(int timerid, \ - _Out_ struct itimerspec *value); } -239 AUE_NULL STD { int ktimer_getoverrun(int timerid); } -240 AUE_NULL STD { int nanosleep( \ - _In_ const struct timespec *rqtp, \ - _Out_opt_ struct timespec *rmtp); } -241 AUE_NULL STD { int ffclock_getcounter( \ - _Out_ ffcounter *ffcount); } -242 AUE_NULL STD { int ffclock_setestimate( \ - _In_ struct ffclock_estimate *cest); } -243 AUE_NULL STD { int ffclock_getestimate( \ - _Out_ struct ffclock_estimate *cest); } -244 AUE_NULL STD { int clock_nanosleep(clockid_t clock_id, \ - int flags, \ - _In_ const struct timespec *rqtp, \ - _Out_opt_ struct timespec *rmtp); } -245 AUE_NULL UNIMPL nosys -246 AUE_NULL UNIMPL nosys -247 AUE_NULL STD { int clock_getcpuclockid2(id_t id, \ - int which, _Out_ clockid_t *clock_id); } -248 AUE_NULL STD { int ntp_gettime( \ - _Out_ struct ntptimeval *ntvp); } +224 AUE_MSGCTL COMPAT7|NOSTD { + int msgctl( + int msqid, + int cmd, + struct msqid_ds_old *buf + ); + } +225 AUE_MSGGET NOSTD { + int msgget( + key_t key, + int msgflg + ); + } +226 AUE_MSGSND NOSTD { + int msgsnd( + int msqid, + _In_reads_bytes_(msgsz) const void *msgp, + size_t msgsz, + int msgflg + ); + } +227 AUE_MSGRCV NOSTD { + ssize_t msgrcv( + int msqid, + _Out_writes_bytes_(msgsz) void *msgp, + size_t msgsz, + long msgtyp, + int msgflg + ); + } +228 AUE_SHMAT NOSTD { + int shmat( + int shmid, + _In_ const void *shmaddr, + int shmflg + ); + } +229 AUE_SHMCTL COMPAT7|NOSTD { + int shmctl( + int shmid, + int cmd, + struct shmid_ds_old *buf + ); + } +230 AUE_SHMDT NOSTD { + int shmdt( + _In_ const void *shmaddr + ); + } +231 AUE_SHMGET NOSTD { + int shmget( + key_t key, + size_t size, + int shmflg + ); + } +232 AUE_NULL STD { + int clock_gettime( + clockid_t clock_id, + _Out_ struct timespec *tp + ); + } +233 AUE_CLOCK_SETTIME STD { + int clock_settime( + clockid_t clock_id, + _In_ const struct timespec *tp + ); + } +234 AUE_NULL STD { + int clock_getres( + clockid_t clock_id, + _Out_ struct timespec *tp + ); + } +235 AUE_NULL STD { + int ktimer_create( + clockid_t clock_id, + _In_ struct sigevent *evp, + _Out_ int *timerid + ); + } +236 AUE_NULL STD { + int ktimer_delete( + int timerid + ); + } +237 AUE_NULL STD { + int ktimer_settime( + int timerid, + int flags, + _In_ const struct itimerspec *value, + _Out_opt_ struct itimerspec *ovalue + ); + } +238 AUE_NULL STD { + int ktimer_gettime( + int timerid, + _Out_ struct itimerspec *value + ); + } +239 AUE_NULL STD { + int ktimer_getoverrun( + int timerid + ); + } +240 AUE_NULL STD { + int nanosleep( + _In_ const struct timespec *rqtp, + _Out_opt_ struct timespec *rmtp + ); + } +241 AUE_NULL STD { + int ffclock_getcounter( + _Out_ ffcounter *ffcount + ); + } +242 AUE_NULL STD { + int ffclock_setestimate( + _In_ struct ffclock_estimate *cest + ); + } +243 AUE_NULL STD { + int ffclock_getestimate( + _Out_ struct ffclock_estimate *cest + ); + } +244 AUE_NULL STD { + int clock_nanosleep( + clockid_t clock_id, + int flags, + _In_ const struct timespec *rqtp, + _Out_opt_ struct timespec *rmtp + ); + } +245-246 AUE_NULL UNIMPL nosys +247 AUE_NULL STD { + int clock_getcpuclockid2( + id_t id, + int which, + _Out_ clockid_t *clock_id + ); + } +248 AUE_NULL STD { + int ntp_gettime( + _Out_ struct ntptimeval *ntvp + ); + } 249 AUE_NULL UNIMPL nosys ; syscall numbers initially used in OpenBSD -250 AUE_MINHERIT STD { int minherit( \ - _In_ void *addr, \ - size_t len, int inherit); } -251 AUE_RFORK STD { int rfork(int flags); } +250 AUE_MINHERIT STD { + int minherit( + _In_ void *addr, + size_t len, + int inherit + ); + } +251 AUE_RFORK STD { + int rfork( + int flags + ); + } 252 AUE_POLL OBSOL openbsd_poll -253 AUE_ISSETUGID STD { int issetugid(void); } -254 AUE_LCHOWN STD { int lchown(_In_z_ char *path, int uid, \ - int gid); } -255 AUE_AIO_READ STD { int aio_read( \ - _Inout_ struct aiocb *aiocbp); } -256 AUE_AIO_WRITE STD { int aio_write( \ - _Inout_ struct aiocb *aiocbp); } -257 AUE_LIO_LISTIO STD { int lio_listio(int mode, \ - _Inout_updates_(nent) \ - struct aiocb* const *acb_list, \ - int nent, \ - _In_opt_ struct sigevent *sig); } -258 AUE_NULL UNIMPL nosys -259 AUE_NULL UNIMPL nosys -260 AUE_NULL UNIMPL nosys -261 AUE_NULL UNIMPL nosys -262 AUE_NULL UNIMPL nosys -263 AUE_NULL UNIMPL nosys -264 AUE_NULL UNIMPL nosys -265 AUE_NULL UNIMPL nosys -266 AUE_NULL UNIMPL nosys -267 AUE_NULL UNIMPL nosys -268 AUE_NULL UNIMPL nosys -269 AUE_NULL UNIMPL nosys -270 AUE_NULL UNIMPL nosys -271 AUE_NULL UNIMPL nosys -272 AUE_O_GETDENTS COMPAT11 { int getdents(int fd, \ - _Out_writes_bytes_(count) char *buf, \ - size_t count); } +253 AUE_ISSETUGID STD { + int issetugid(void); + } +254 AUE_LCHOWN STD { + int lchown( + _In_z_ char *path, + int uid, + int gid + ); + } +255 AUE_AIO_READ STD { + int aio_read( + _Inout_ struct aiocb *aiocbp + ); + } +256 AUE_AIO_WRITE STD { + int aio_write( + _Inout_ struct aiocb *aiocbp + ); + } +257 AUE_LIO_LISTIO STD { + int lio_listio( + int mode, + _Inout_updates_(nent) struct aiocb* const *acb_list, + int nent, + _In_opt_ struct sigevent *sig + ); + } +258-271 AUE_NULL UNIMPL nosys +272 AUE_O_GETDENTS COMPAT11 { + int getdents( + int fd, + _Out_writes_bytes_(count) char *buf, + size_t count + ); + } 273 AUE_NULL UNIMPL nosys -274 AUE_LCHMOD STD { int lchmod(_In_z_ char *path, mode_t mode); } +274 AUE_LCHMOD STD { + int lchmod( + _In_z_ char *path, + mode_t mode + ); + } 275 AUE_NULL OBSOL netbsd_lchown -276 AUE_LUTIMES STD { int lutimes(_In_z_ char *path, \ - _In_ struct timeval *tptr); } +276 AUE_LUTIMES STD { + int lutimes( + _In_z_ char *path, + _In_ struct timeval *tptr + ); + } 277 AUE_NULL OBSOL netbsd_msync -278 AUE_STAT COMPAT11 { int nstat(_In_z_ char *path, \ - _Out_ struct nstat *ub); } -279 AUE_FSTAT COMPAT11 { int nfstat(int fd, _Out_ struct nstat *sb); } -280 AUE_LSTAT COMPAT11 { int nlstat(_In_z_ char *path, \ - _Out_ struct nstat *ub); } -281 AUE_NULL UNIMPL nosys -282 AUE_NULL UNIMPL nosys -283 AUE_NULL UNIMPL nosys -284 AUE_NULL UNIMPL nosys -285 AUE_NULL UNIMPL nosys -286 AUE_NULL UNIMPL nosys -287 AUE_NULL UNIMPL nosys -288 AUE_NULL UNIMPL nosys -289 AUE_PREADV STD { ssize_t preadv(int fd, \ - _In_reads_(iovcnt) \ - struct iovec *iovp, \ - u_int iovcnt, off_t offset); } -290 AUE_PWRITEV STD { ssize_t pwritev(int fd, \ - _In_reads_(iovcnt) struct iovec *iovp, \ - u_int iovcnt, off_t offset); } -291 AUE_NULL UNIMPL nosys -292 AUE_NULL UNIMPL nosys -293 AUE_NULL UNIMPL nosys -294 AUE_NULL UNIMPL nosys -295 AUE_NULL UNIMPL nosys -296 AUE_NULL UNIMPL nosys -297 AUE_FHSTATFS COMPAT4 { int fhstatfs( \ - _In_ const struct fhandle *u_fhp, \ - _Out_ struct ostatfs *buf); } -298 AUE_FHOPEN STD { int fhopen( \ - _In_ const struct fhandle *u_fhp, \ - int flags); } -299 AUE_FHSTAT COMPAT11 { int fhstat( \ - _In_ const struct fhandle *u_fhp, \ - _Out_ struct freebsd11_stat *sb); } -300 AUE_NULL STD { int modnext(int modid); } -301 AUE_NULL STD { int modstat(int modid, \ - _Out_ struct module_stat* stat); } -302 AUE_NULL STD { int modfnext(int modid); } -303 AUE_NULL STD { int modfind(_In_z_ const char *name); } -304 AUE_MODLOAD STD { int kldload(_In_z_ const char *file); } -305 AUE_MODUNLOAD STD { int kldunload(int fileid); } -306 AUE_NULL STD { int kldfind(_In_z_ const char *file); } -307 AUE_NULL STD { int kldnext(int fileid); } -308 AUE_NULL STD { int kldstat(int fileid, \ - _Out_ struct kld_file_stat *stat); } -309 AUE_NULL STD { int kldfirstmod(int fileid); } -310 AUE_GETSID STD { int getsid(pid_t pid); } -311 AUE_SETRESUID STD { int setresuid(uid_t ruid, uid_t euid, \ - uid_t suid); } -312 AUE_SETRESGID STD { int setresgid(gid_t rgid, gid_t egid, \ - gid_t sgid); } +278 AUE_STAT COMPAT11 { + int nstat( + _In_z_ char *path, + _Out_ struct nstat *ub + ); + } +279 AUE_FSTAT COMPAT11 { + int nfstat( + int fd, + _Out_ struct nstat *sb + ); + } +280 AUE_LSTAT COMPAT11 { + int nlstat( + _In_z_ char *path, + _Out_ struct nstat *ub + ); + } +281-288 AUE_NULL UNIMPL nosys +289 AUE_PREADV STD { + ssize_t preadv( + int fd, + _In_reads_(iovcnt) struct iovec *iovp, + u_int iovcnt, + off_t offset + ); + } +290 AUE_PWRITEV STD { + ssize_t pwritev( + int fd, + _In_reads_(iovcnt) struct iovec *iovp, + u_int iovcnt, + off_t offset + ); + } +291-296 AUE_NULL UNIMPL nosys +297 AUE_FHSTATFS COMPAT4 { + int fhstatfs( + _In_ const struct fhandle *u_fhp, + _Out_ struct ostatfs *buf + ); + } +298 AUE_FHOPEN STD { + int fhopen( + _In_ const struct fhandle *u_fhp, + int flags + ); + } +299 AUE_FHSTAT COMPAT11 { + int fhstat( + _In_ const struct fhandle *u_fhp, + _Out_ struct freebsd11_stat *sb + ); + } +300 AUE_NULL STD { + int modnext( + int modid + ); + } +301 AUE_NULL STD { + int modstat( + int modid, + _Out_ struct module_stat* stat + ); + } +302 AUE_NULL STD { + int modfnext( + int modid + ); + } +303 AUE_NULL STD { + int modfind( + _In_z_ const char *name + ); + } +304 AUE_MODLOAD STD { + int kldload( + _In_z_ const char *file + ); + } +305 AUE_MODUNLOAD STD { + int kldunload( + int fileid + ); + } +306 AUE_NULL STD { + int kldfind( + _In_z_ const char *file + ); + } +307 AUE_NULL STD { + int kldnext( + int fileid + ); + } +308 AUE_NULL STD { + int kldstat( + int fileid, + _Out_ struct kld_file_stat *stat + ); + } +309 AUE_NULL STD { + int kldfirstmod( + int fileid + ); + } +310 AUE_GETSID STD { + int getsid( + pid_t pid + ); + } +311 AUE_SETRESUID STD { + int setresuid( + uid_t ruid, + uid_t euid, + uid_t suid + ); + } +312 AUE_SETRESGID STD { + int setresgid( + gid_t rgid, + gid_t egid, + gid_t sgid + ); + } 313 AUE_NULL OBSOL signanosleep -314 AUE_AIO_RETURN STD { ssize_t aio_return( \ - _Inout_ struct aiocb *aiocbp); } -315 AUE_AIO_SUSPEND STD { int aio_suspend( \ - _Inout_updates_(nent) \ - struct aiocb * const * aiocbp, \ - int nent, \ - _In_opt_ \ - const struct timespec *timeout); } -316 AUE_AIO_CANCEL STD { int aio_cancel(int fd, \ - _In_opt_ struct aiocb *aiocbp); } -317 AUE_AIO_ERROR STD { int aio_error( \ - _In_ struct aiocb *aiocbp); } -318 AUE_AIO_READ COMPAT6 { int aio_read( \ - _Inout_ struct oaiocb *aiocbp); } -319 AUE_AIO_WRITE COMPAT6 { int aio_write( \ - _Inout_ struct oaiocb *aiocbp); } -320 AUE_LIO_LISTIO COMPAT6 { int lio_listio(int mode, \ - _Inout_updates_(nent) \ - struct oaiocb * const *acb_list, \ - int nent, \ - _In_opt_ struct osigevent *sig); } -321 AUE_NULL STD { int yield(void); } +314 AUE_AIO_RETURN STD { + ssize_t aio_return( + _Inout_ struct aiocb *aiocbp + ); + } +315 AUE_AIO_SUSPEND STD { + int aio_suspend( + _Inout_updates_(nent) struct aiocb * const * aiocbp, + int nent, + _In_opt_ const struct timespec *timeout + ); + } +316 AUE_AIO_CANCEL STD { + int aio_cancel( + int fd, + _In_opt_ struct aiocb *aiocbp + ); + } +317 AUE_AIO_ERROR STD { + int aio_error( + _In_ struct aiocb *aiocbp + ); + } +318 AUE_AIO_READ COMPAT6 { + int aio_read( + _Inout_ struct oaiocb *aiocbp + ); + } +319 AUE_AIO_WRITE COMPAT6 { + int aio_write( + _Inout_ struct oaiocb *aiocbp + ); + } +320 AUE_LIO_LISTIO COMPAT6 { + int lio_listio( + int mode, + _Inout_updates_(nent) struct oaiocb * const *acb_list, + int nent, + _In_opt_ struct osigevent *sig + ); + } +321 AUE_NULL STD { + int yield(void); + } 322 AUE_NULL OBSOL thr_sleep 323 AUE_NULL OBSOL thr_wakeup -324 AUE_MLOCKALL STD { int mlockall(int how); } -325 AUE_MUNLOCKALL STD { int munlockall(void); } -326 AUE_GETCWD STD { int __getcwd( \ - _Out_writes_z_(buflen) char *buf, \ - size_t buflen); } -327 AUE_NULL STD { int sched_setparam (pid_t pid, \ - _In_ const struct sched_param *param); } -328 AUE_NULL STD { int sched_getparam (pid_t pid, \ - _Out_ struct sched_param *param); } -329 AUE_NULL STD { int sched_setscheduler (pid_t pid, int \ - policy, _In_ const struct sched_param \ - *param); } -330 AUE_NULL STD { int sched_getscheduler (pid_t pid); } -331 AUE_NULL STD { int sched_yield (void); } -332 AUE_NULL STD { int sched_get_priority_max (int policy); } -333 AUE_NULL STD { int sched_get_priority_min (int policy); } -334 AUE_NULL STD { int sched_rr_get_interval (pid_t pid, \ - _Out_ struct timespec *interval); } -335 AUE_NULL STD { int utrace( \ - _In_reads_bytes_(len) const void *addr, \ - size_t len); } -336 AUE_SENDFILE COMPAT4 { int sendfile(int fd, int s, \ - off_t offset, size_t nbytes, \ - _In_opt_ struct sf_hdtr *hdtr, \ - _Out_opt_ off_t *sbytes, int flags); } -337 AUE_NULL STD { int kldsym(int fileid, int cmd, \ - _In_ void *data); } -338 AUE_JAIL STD { int jail( \ - _In_ struct jail *jail); } - -339 AUE_NULL NOSTD|NOTSTATIC { int nnpfs_syscall(int operation, \ - char *a_pathP, int a_opcode, \ - void *a_paramsP, \ - int a_followSymlinks); } -340 AUE_SIGPROCMASK STD { int sigprocmask(int how, \ - _In_opt_ const sigset_t *set, \ - _Out_opt_ sigset_t *oset); } -341 AUE_SIGSUSPEND STD { int sigsuspend( \ - _In_ const sigset_t *sigmask); } -342 AUE_SIGACTION COMPAT4 { int sigaction(int sig, \ - _In_opt_ const struct sigaction *act, \ - _Out_opt_ struct sigaction *oact); } -343 AUE_SIGPENDING STD { int sigpending(_In_ sigset_t *set); } -344 AUE_SIGRETURN COMPAT4 { int sigreturn( \ - _In_ const struct ucontext4 *sigcntxp); } -345 AUE_SIGWAIT STD { int sigtimedwait(_In_ const sigset_t *set, \ - _Out_opt_ siginfo_t *info, \ - _In_opt_ const struct timespec *timeout); } -346 AUE_NULL STD { int sigwaitinfo(_In_ const sigset_t *set, \ - _Out_opt_ siginfo_t *info); } -347 AUE_ACL_GET_FILE STD { int __acl_get_file( \ - _In_z_ const char *path, \ - acl_type_t type, \ - _Out_ struct acl *aclp); } -348 AUE_ACL_SET_FILE STD { int __acl_set_file( \ - _In_z_ const char *path, \ - acl_type_t type, _In_ struct acl *aclp); } -349 AUE_ACL_GET_FD STD { int __acl_get_fd(int filedes, \ - acl_type_t type, _Out_ struct acl *aclp); } -350 AUE_ACL_SET_FD STD { int __acl_set_fd(int filedes, \ - acl_type_t type, _In_ struct acl *aclp); } -351 AUE_ACL_DELETE_FILE STD { int __acl_delete_file( \ - _In_z_ const char *path, \ - acl_type_t type); } -352 AUE_ACL_DELETE_FD STD { int __acl_delete_fd(int filedes, \ - acl_type_t type); } -353 AUE_ACL_CHECK_FILE STD { int __acl_aclcheck_file( \ - _In_z_ const char *path, \ - acl_type_t type, _In_ struct acl *aclp); } -354 AUE_ACL_CHECK_FD STD { int __acl_aclcheck_fd(int filedes, \ - acl_type_t type, _In_ struct acl *aclp); } -355 AUE_EXTATTRCTL STD { int extattrctl(_In_z_ const char *path, \ - int cmd, _In_z_opt_ const char *filename, \ - int attrnamespace, \ - _In_z_ const char *attrname); } -356 AUE_EXTATTR_SET_FILE STD { ssize_t extattr_set_file( \ - _In_z_ const char *path, \ - int attrnamespace, \ - _In_z_ const char *attrname, \ - _In_reads_bytes_(nbytes) void *data, \ - size_t nbytes); } -357 AUE_EXTATTR_GET_FILE STD { ssize_t extattr_get_file( \ - _In_z_ const char *path, \ - int attrnamespace, \ - _In_z_ const char *attrname, \ - _Out_writes_bytes_(nbytes) void *data, \ - size_t nbytes); } -358 AUE_EXTATTR_DELETE_FILE STD { int extattr_delete_file( \ - _In_z_ const char *path, \ - int attrnamespace, \ - _In_z_ const char *attrname); } -359 AUE_AIO_WAITCOMPLETE STD { ssize_t aio_waitcomplete( \ - _Outptr_result_maybenull_ \ - struct aiocb **aiocbp, \ - _In_opt_ struct timespec *timeout); } -360 AUE_GETRESUID STD { int getresuid(_Out_opt_ uid_t *ruid, \ - _Out_opt_ uid_t *euid, \ - _Out_opt_ uid_t *suid); } -361 AUE_GETRESGID STD { int getresgid(_Out_opt_ gid_t *rgid, \ - _Out_opt_ gid_t *egid, \ - _Out_opt_ gid_t *sgid); } -362 AUE_KQUEUE STD { int kqueue(void); } -363 AUE_KEVENT COMPAT11 { int kevent(int fd, \ - _In_reads_opt_(nchanges) \ - struct kevent_freebsd11 *changelist, \ - int nchanges, \ - _Out_writes_opt_(nevents) \ - struct kevent_freebsd11 *eventlist, \ - int nevents, \ - _In_opt_ const struct timespec *timeout); } +324 AUE_MLOCKALL STD { + int mlockall( + int how + ); + } +325 AUE_MUNLOCKALL STD { + int munlockall(void); } +326 AUE_GETCWD STD { + int __getcwd( + _Out_writes_z_(buflen) char *buf, + size_t buflen + ); + } +327 AUE_NULL STD { + int sched_setparam( + pid_t pid, + _In_ const struct sched_param *param + ); + } +328 AUE_NULL STD { + int sched_getparam( + pid_t pid, + _Out_ struct sched_param *param + ); + } +329 AUE_NULL STD { + int sched_setscheduler( + pid_t pid, + int policy, + _In_ const struct sched_param *param + ); + } +330 AUE_NULL STD { + int sched_getscheduler( + pid_t pid + ); + } +331 AUE_NULL STD { + int sched_yield(void); + } +332 AUE_NULL STD { + int sched_get_priority_max( + int policy + ); + } +333 AUE_NULL STD { + int sched_get_priority_min( + int policy + ); + } +334 AUE_NULL STD { + int sched_rr_get_interval( + pid_t pid, + _Out_ struct timespec *interval + ); + } +335 AUE_NULL STD { + int utrace( + _In_reads_bytes_(len) const void *addr, + size_t len + ); + } +336 AUE_SENDFILE COMPAT4 { + int sendfile( + int fd, + int s, + off_t offset, + size_t nbytes, + _In_opt_ struct sf_hdtr *hdtr, + _Out_opt_ off_t *sbytes, + int flags + ); + } +337 AUE_NULL STD { + int kldsym( + int fileid, + int cmd, + _In_ void *data + ); + } +338 AUE_JAIL STD { + int jail( + _In_ struct jail *jail + ); + } +339 AUE_NULL NOSTD|NOTSTATIC { + int nnpfs_syscall( + int operation, + char *a_pathP, + int a_opcode, + void *a_paramsP, + int a_followSymlinks + ); + } +340 AUE_SIGPROCMASK STD { + int sigprocmask( + int how, + _In_opt_ const sigset_t *set, + _Out_opt_ sigset_t *oset + ); + } +341 AUE_SIGSUSPEND STD { + int sigsuspend( + _In_ const sigset_t *sigmask + ); + } +342 AUE_SIGACTION COMPAT4 { + int sigaction( + int sig, + _In_opt_ const struct sigaction *act, + _Out_opt_ struct sigaction *oact + ); + } +343 AUE_SIGPENDING STD { + int sigpending( + _In_ sigset_t *set + ); + } +344 AUE_SIGRETURN COMPAT4 { + int sigreturn( + _In_ const struct ucontext4 *sigcntxp + ); + } +345 AUE_SIGWAIT STD { + int sigtimedwait( + _In_ const sigset_t *set, + _Out_opt_ siginfo_t *info, + _In_opt_ const struct timespec *timeout + ); + } +346 AUE_NULL STD { + int sigwaitinfo( + _In_ const sigset_t *set, + _Out_opt_ siginfo_t *info + ); + } +347 AUE_ACL_GET_FILE STD { + int __acl_get_file( + _In_z_ const char *path, + acl_type_t type, + _Out_ struct acl *aclp + ); + } +348 AUE_ACL_SET_FILE STD { + int __acl_set_file( + _In_z_ const char *path, + acl_type_t type, + _In_ struct acl *aclp + ); + } +349 AUE_ACL_GET_FD STD { + int __acl_get_fd( + int filedes, + acl_type_t type, + _Out_ struct acl *aclp + ); + } +350 AUE_ACL_SET_FD STD { + int __acl_set_fd( + int filedes, + acl_type_t type, + _In_ struct acl *aclp + ); + } +351 AUE_ACL_DELETE_FILE STD { + int __acl_delete_file( + _In_z_ const char *path, + acl_type_t type + ); + } +352 AUE_ACL_DELETE_FD STD { + int __acl_delete_fd( + int filedes, + acl_type_t type + ); + } +353 AUE_ACL_CHECK_FILE STD { + int __acl_aclcheck_file( + _In_z_ const char *path, + acl_type_t type, + _In_ struct acl *aclp + ); + } +354 AUE_ACL_CHECK_FD STD { + int __acl_aclcheck_fd( + int filedes, + acl_type_t type, + _In_ struct acl *aclp + ); + } +355 AUE_EXTATTRCTL STD { + int extattrctl( + _In_z_ const char *path, + int cmd, + _In_z_opt_ const char *filename, + int attrnamespace, + _In_z_ const char *attrname + ); + } +356 AUE_EXTATTR_SET_FILE STD { + ssize_t extattr_set_file( + _In_z_ const char *path, + int attrnamespace, + _In_z_ const char *attrname, + _In_reads_bytes_(nbytes) void *data, + size_t nbytes + ); + } +357 AUE_EXTATTR_GET_FILE STD { + ssize_t extattr_get_file( + _In_z_ const char *path, + int attrnamespace, + _In_z_ const char *attrname, + _Out_writes_bytes_(nbytes) void *data, + size_t nbytes + ); + } +358 AUE_EXTATTR_DELETE_FILE STD { + int extattr_delete_file( + _In_z_ const char *path, + int attrnamespace, + _In_z_ const char *attrname + ); + } +359 AUE_AIO_WAITCOMPLETE STD { + ssize_t aio_waitcomplete( + _Outptr_result_maybenull_ struct aiocb **aiocbp, + _In_opt_ struct timespec *timeout + ); + } +360 AUE_GETRESUID STD { + int getresuid( + _Out_opt_ uid_t *ruid, + _Out_opt_ uid_t *euid, + _Out_opt_ uid_t *suid + ); + } +361 AUE_GETRESGID STD { + int getresgid( + _Out_opt_ gid_t *rgid, + _Out_opt_ gid_t *egid, + _Out_opt_ gid_t *sgid + ); + } +362 AUE_KQUEUE STD { + int kqueue(void); + } +363 AUE_KEVENT COMPAT11 { + int kevent( + int fd, + _In_reads_opt_(nchanges) struct kevent_freebsd11 *changelist, + int nchanges, + _Out_writes_opt_(nevents) struct kevent_freebsd11 *eventlist, + int nevents, + _In_opt_ const struct timespec *timeout + ); + } 364 AUE_NULL OBSOL __cap_get_proc 365 AUE_NULL OBSOL __cap_set_proc 366 AUE_NULL OBSOL __cap_get_fd @@ -828,518 +1937,1210 @@ 368 AUE_NULL OBSOL __cap_set_fd 369 AUE_NULL OBSOL __cap_set_file 370 AUE_NULL UNIMPL nosys -371 AUE_EXTATTR_SET_FD STD { ssize_t extattr_set_fd(int fd, \ - int attrnamespace, \ - _In_z_ const char *attrname, \ - _In_reads_bytes_(nbytes) void *data, \ - size_t nbytes); } -372 AUE_EXTATTR_GET_FD STD { ssize_t extattr_get_fd(int fd, \ - int attrnamespace, \ - _In_z_ const char *attrname, \ - _Out_writes_bytes_(nbytes) void *data, \ - size_t nbytes); } -373 AUE_EXTATTR_DELETE_FD STD { int extattr_delete_fd(int fd, \ - int attrnamespace, \ - _In_z_ const char *attrname); } -374 AUE_SETUGID STD { int __setugid(int flag); } +371 AUE_EXTATTR_SET_FD STD { + ssize_t extattr_set_fd( + int fd, + int attrnamespace, + _In_z_ const char *attrname, + _In_reads_bytes_(nbytes) void *data, + size_t nbytes + ); + } +372 AUE_EXTATTR_GET_FD STD { + ssize_t extattr_get_fd( + int fd, + int attrnamespace, + _In_z_ const char *attrname, + _Out_writes_bytes_(nbytes) void *data, + size_t nbytes + ); + } +373 AUE_EXTATTR_DELETE_FD STD { + int extattr_delete_fd( + int fd, + int attrnamespace, + _In_z_ const char *attrname + ); + } +374 AUE_SETUGID STD { + int __setugid( + int flag + ); + } 375 AUE_NULL OBSOL nfsclnt -376 AUE_EACCESS STD { int eaccess(_In_z_ char *path, int amode); } -377 AUE_NULL NOSTD|NOTSTATIC { int afs3_syscall(long syscall, \ - long parm1, long parm2, long parm3, \ - long parm4, long parm5, long parm6); } -378 AUE_NMOUNT STD { int nmount( \ - _In_reads_(iovcnt) struct iovec *iovp, \ - unsigned int iovcnt, int flags); } +376 AUE_EACCESS STD { + int eaccess( + _In_z_ char *path, + int amode + ); + } +377 AUE_NULL NOSTD|NOTSTATIC { + int afs3_syscall( + long syscall, + long parm1, + long parm2, + long parm3, + long parm4, + long parm5, + long parm6 + ); + } +378 AUE_NMOUNT STD { + int nmount( + _In_reads_(iovcnt) struct iovec *iovp, + unsigned int iovcnt, + int flags + ); + } 379 AUE_NULL OBSOL kse_exit 380 AUE_NULL OBSOL kse_wakeup 381 AUE_NULL OBSOL kse_create 382 AUE_NULL OBSOL kse_thr_interrupt 383 AUE_NULL OBSOL kse_release -384 AUE_NULL STD { int __mac_get_proc( \ - _In_ struct mac *mac_p); } -385 AUE_NULL STD { int __mac_set_proc( \ - _In_ struct mac *mac_p); } -386 AUE_NULL STD { int __mac_get_fd(int fd, \ - _In_ struct mac *mac_p); } -387 AUE_NULL STD { int __mac_get_file( \ - _In_z_ const char *path_p, \ - _In_ struct mac *mac_p); } -388 AUE_NULL STD { int __mac_set_fd(int fd, \ - _In_ struct mac *mac_p); } -389 AUE_NULL STD { int __mac_set_file( \ - _In_z_ const char *path_p, \ - _In_ struct mac *mac_p); } -390 AUE_NULL STD { int kenv(int what, \ - _In_z_opt_ const char *name, \ - _Inout_updates_opt_(len) \ - char *value, int len); } -391 AUE_LCHFLAGS STD { int lchflags(_In_z_ const char *path, \ - u_long flags); } -392 AUE_NULL STD { int uuidgen( \ - _Out_writes_(count) struct uuid *store, \ - int count); } -393 AUE_SENDFILE STD { int sendfile(int fd, int s, \ - off_t offset, \ - size_t nbytes, \ - _In_opt_ struct sf_hdtr *hdtr, \ - _Out_opt_ off_t *sbytes, int flags); } -394 AUE_NULL STD { int mac_syscall( \ - _In_z_ const char *policy, \ - int call, \ - _In_opt_ void *arg); } -395 AUE_GETFSSTAT COMPAT11 { int getfsstat( \ - _Out_writes_bytes_opt_(bufsize) \ - struct freebsd11_statfs *buf, \ - long bufsize, int mode); } -396 AUE_STATFS COMPAT11 { int statfs(_In_z_ char *path, \ - _Out_ struct freebsd11_statfs *buf); } -397 AUE_FSTATFS COMPAT11 { int fstatfs(int fd, \ - _Out_ struct freebsd11_statfs *buf); } -398 AUE_FHSTATFS COMPAT11 { int fhstatfs( \ - _In_ const struct fhandle *u_fhp, \ - _Out_ struct freebsd11_statfs *buf); } +384 AUE_NULL STD { + int __mac_get_proc( + _In_ struct mac *mac_p + ); + } +385 AUE_NULL STD { + int __mac_set_proc( + _In_ struct mac *mac_p + ); + } +386 AUE_NULL STD { + int __mac_get_fd( + int fd, + _In_ struct mac *mac_p + ); + } +387 AUE_NULL STD { + int __mac_get_file( + _In_z_ const char *path_p, + _In_ struct mac *mac_p + ); + } +388 AUE_NULL STD { + int __mac_set_fd( + int fd, + _In_ struct mac *mac_p + ); + } +389 AUE_NULL STD { + int __mac_set_file( + _In_z_ const char *path_p, + _In_ struct mac *mac_p + ); + } +390 AUE_NULL STD { + int kenv( + int what, + _In_z_opt_ const char *name, + _Inout_updates_opt_(len) char *value, + int len + ); + } +391 AUE_LCHFLAGS STD { + int lchflags( + _In_z_ const char *path, + u_long flags + ); + } +392 AUE_NULL STD { + int uuidgen( + _Out_writes_(count) struct uuid *store, + int count + ); + } +393 AUE_SENDFILE STD { + int sendfile( + int fd, + int s, + off_t offset, + size_t nbytes, + _In_opt_ struct sf_hdtr *hdtr, + _Out_opt_ off_t *sbytes, + int flags + ); + } +394 AUE_NULL STD { + int mac_syscall( + _In_z_ const char *policy, + int call, + _In_opt_ void *arg + ); + } +395 AUE_GETFSSTAT COMPAT11 { + int getfsstat( + _Out_writes_bytes_opt_(bufsize) struct freebsd11_statfs *buf, + long bufsize, + int mode + ); + } +396 AUE_STATFS COMPAT11 { + int statfs( + _In_z_ char *path, + _Out_ struct freebsd11_statfs *buf + ); + } +397 AUE_FSTATFS COMPAT11 { + int fstatfs( + int fd, + _Out_ struct freebsd11_statfs *buf + ); + } +398 AUE_FHSTATFS COMPAT11 { + int fhstatfs( + _In_ const struct fhandle *u_fhp, + _Out_ struct freebsd11_statfs *buf + ); + } 399 AUE_NULL UNIMPL nosys -400 AUE_SEMCLOSE NOSTD { int ksem_close(semid_t id); } -401 AUE_SEMPOST NOSTD { int ksem_post(semid_t id); } -402 AUE_SEMWAIT NOSTD { int ksem_wait(semid_t id); } -403 AUE_SEMTRYWAIT NOSTD { int ksem_trywait(semid_t id); } -404 AUE_SEMINIT NOSTD { int ksem_init(_Out_ semid_t *idp, \ - unsigned int value); } -405 AUE_SEMOPEN NOSTD { int ksem_open(_Out_ semid_t *idp, \ - _In_z_ const char *name, int oflag, \ - mode_t mode, unsigned int value); } -406 AUE_SEMUNLINK NOSTD { int ksem_unlink( \ - _In_z_ const char *name); } -407 AUE_SEMGETVALUE NOSTD { int ksem_getvalue(semid_t id, \ - _Out_ int *val); } -408 AUE_SEMDESTROY NOSTD { int ksem_destroy(semid_t id); } -409 AUE_NULL STD { int __mac_get_pid(pid_t pid, \ - _In_ struct mac *mac_p); } -410 AUE_NULL STD { int __mac_get_link( \ - _In_z_ const char *path_p, \ - _In_ struct mac *mac_p); } -411 AUE_NULL STD { int __mac_set_link( \ - _In_z_ const char *path_p, \ - _In_ struct mac *mac_p); } -412 AUE_EXTATTR_SET_LINK STD { ssize_t extattr_set_link( \ - _In_z_ const char *path, \ - int attrnamespace, \ - _In_z_ const char *attrname, \ - _In_reads_bytes_(nbytes) void *data, \ - size_t nbytes); } -413 AUE_EXTATTR_GET_LINK STD { ssize_t extattr_get_link( \ - _In_z_ const char *path, \ - int attrnamespace, \ - _In_z_ const char *attrname, \ - _Out_writes_bytes_(nbytes) void *data, \ - size_t nbytes); } -414 AUE_EXTATTR_DELETE_LINK STD { int extattr_delete_link( \ - _In_z_ const char *path, \ - int attrnamespace, \ - _In_z_ const char *attrname); } -415 AUE_NULL STD { int __mac_execve(_In_z_ char *fname, \ - _In_ char **argv, \ - _In_ char **envv, \ - _In_ struct mac *mac_p); } -416 AUE_SIGACTION STD { int sigaction(int sig, \ - _In_opt_ const struct sigaction *act, \ - _Out_opt_ struct sigaction *oact); } -417 AUE_SIGRETURN STD { int sigreturn( \ - _In_ const struct __ucontext *sigcntxp); } +400 AUE_SEMCLOSE NOSTD { + int ksem_close( + semid_t id + ); + } +401 AUE_SEMPOST NOSTD { + int ksem_post( + semid_t id + ); + } +402 AUE_SEMWAIT NOSTD { + int ksem_wait( + semid_t id + ); + } +403 AUE_SEMTRYWAIT NOSTD { + int ksem_trywait( + semid_t id + ); + } +404 AUE_SEMINIT NOSTD { + int ksem_init( + _Out_ semid_t *idp, + unsigned int value + ); + } +405 AUE_SEMOPEN NOSTD { + int ksem_open( + _Out_ semid_t *idp, + _In_z_ const char *name, + int oflag, + mode_t mode, + unsigned int value + ); + } +406 AUE_SEMUNLINK NOSTD { + int ksem_unlink( + _In_z_ const char *name + ); + } +407 AUE_SEMGETVALUE NOSTD { + int ksem_getvalue( + semid_t id, + _Out_ int *val + ); + } +408 AUE_SEMDESTROY NOSTD { + int ksem_destroy( + semid_t id + ); + } +409 AUE_NULL STD { + int __mac_get_pid( + pid_t pid, + _In_ struct mac *mac_p + ); + } +410 AUE_NULL STD { + int __mac_get_link( + _In_z_ const char *path_p, + _In_ struct mac *mac_p + ); + } +411 AUE_NULL STD { + int __mac_set_link( + _In_z_ const char *path_p, + _In_ struct mac *mac_p + ); + } +412 AUE_EXTATTR_SET_LINK STD { + ssize_t extattr_set_link( + _In_z_ const char *path, + int attrnamespace, + _In_z_ const char *attrname, + _In_reads_bytes_(nbytes) void *data, + size_t nbytes + ); + } +413 AUE_EXTATTR_GET_LINK STD { + ssize_t extattr_get_link( + _In_z_ const char *path, + int attrnamespace, + _In_z_ const char *attrname, + _Out_writes_bytes_(nbytes) void *data, + size_t nbytes + ); + } +414 AUE_EXTATTR_DELETE_LINK STD { + int extattr_delete_link( + _In_z_ const char *path, + int attrnamespace, + _In_z_ const char *attrname + ); + } +415 AUE_NULL STD { + int __mac_execve( + _In_z_ char *fname, + _In_ char **argv, + _In_ char **envv, + _In_ struct mac *mac_p + ); + } +416 AUE_SIGACTION STD { + int sigaction( + int sig, + _In_opt_ const struct sigaction *act, + _Out_opt_ struct sigaction *oact + ); + } +417 AUE_SIGRETURN STD { + int sigreturn( + _In_ const struct __ucontext *sigcntxp + ); + } 418 AUE_NULL UNIMPL __xstat 419 AUE_NULL UNIMPL __xfstat 420 AUE_NULL UNIMPL __xlstat -421 AUE_NULL STD { int getcontext( \ - _Out_ struct __ucontext *ucp); } -422 AUE_NULL STD { int setcontext( \ - _In_ const struct __ucontext *ucp); } -423 AUE_NULL STD { int swapcontext( \ - _Out_ struct __ucontext *oucp, \ - _In_ const struct __ucontext *ucp); } -424 AUE_SWAPOFF STD { int swapoff(_In_z_ const char *name); } -425 AUE_ACL_GET_LINK STD { int __acl_get_link( \ - _In_z_ const char *path, acl_type_t type, \ - _Out_ struct acl *aclp); } -426 AUE_ACL_SET_LINK STD { int __acl_set_link( \ - _In_z_ const char *path, acl_type_t type, \ - _In_ struct acl *aclp); } -427 AUE_ACL_DELETE_LINK STD { int __acl_delete_link( \ - _In_z_ const char *path, \ - acl_type_t type); } -428 AUE_ACL_CHECK_LINK STD { int __acl_aclcheck_link( \ - _In_z_ const char *path, acl_type_t type, \ - _In_ struct acl *aclp); } -429 AUE_SIGWAIT STD { int sigwait(_In_ const sigset_t *set, \ - _Out_ int *sig); } -430 AUE_THR_CREATE STD { int thr_create(_In_ ucontext_t *ctx, \ - _Out_ long *id, int flags); } -431 AUE_THR_EXIT STD { void thr_exit(_Out_opt_ long *state); } -432 AUE_NULL STD { int thr_self(_Out_ long *id); } -433 AUE_THR_KILL STD { int thr_kill(long id, int sig); } -434 AUE_NULL UNIMPL nosys -435 AUE_NULL UNIMPL nosys -436 AUE_JAIL_ATTACH STD { int jail_attach(int jid); } -437 AUE_EXTATTR_LIST_FD STD { ssize_t extattr_list_fd(int fd, \ - int attrnamespace, \ - _Out_writes_bytes_opt_(nbytes) \ - void *data, \ - size_t nbytes); } -438 AUE_EXTATTR_LIST_FILE STD { ssize_t extattr_list_file( \ - _In_z_ const char *path, \ - int attrnamespace, \ - _Out_writes_bytes_opt_(nbytes) \ - void *data, size_t nbytes); } -439 AUE_EXTATTR_LIST_LINK STD { ssize_t extattr_list_link( \ - _In_z_ const char *path, \ - int attrnamespace, \ - _Out_writes_bytes_opt_(nbytes) \ - void *data, size_t nbytes); } +421 AUE_NULL STD { + int getcontext( + _Out_ struct __ucontext *ucp + ); + } +422 AUE_NULL STD { + int setcontext( + _In_ const struct __ucontext *ucp + ); + } +423 AUE_NULL STD { + int swapcontext( + _Out_ struct __ucontext *oucp, + _In_ const struct __ucontext *ucp + ); + } +424 AUE_SWAPOFF STD { + int swapoff( + _In_z_ const char *name + ); + } +425 AUE_ACL_GET_LINK STD { + int __acl_get_link( + _In_z_ const char *path, + acl_type_t type, + _Out_ struct acl *aclp + ); + } +426 AUE_ACL_SET_LINK STD { + int __acl_set_link( + _In_z_ const char *path, + acl_type_t type, + _In_ struct acl *aclp + ); + } +427 AUE_ACL_DELETE_LINK STD { + int __acl_delete_link( + _In_z_ const char *path, + acl_type_t type + ); + } +428 AUE_ACL_CHECK_LINK STD { + int __acl_aclcheck_link( + _In_z_ const char *path, + acl_type_t type, + _In_ struct acl *aclp + ); + } +429 AUE_SIGWAIT STD { + int sigwait( + _In_ const sigset_t *set, + _Out_ int *sig + ); + } +430 AUE_THR_CREATE STD { + int thr_create( + _In_ ucontext_t *ctx, + _Out_ long *id, + int flags + ); + } +431 AUE_THR_EXIT STD { + void thr_exit( + _Out_opt_ long *state + ); + } +432 AUE_NULL STD { + int thr_self( + _Out_ long *id + ); + } +433 AUE_THR_KILL STD { + int thr_kill( + long id, + int sig + ); + } +434-435 AUE_NULL UNIMPL nosys +436 AUE_JAIL_ATTACH STD { + int jail_attach( + int jid + ); + } +437 AUE_EXTATTR_LIST_FD STD { + ssize_t extattr_list_fd( + int fd, + int attrnamespace, + _Out_writes_bytes_opt_(nbytes) void *data, + size_t nbytes + ); + } +438 AUE_EXTATTR_LIST_FILE STD { + ssize_t extattr_list_file( + _In_z_ const char *path, + int attrnamespace, + _Out_writes_bytes_opt_(nbytes) void *data, + size_t nbytes + ); + } +439 AUE_EXTATTR_LIST_LINK STD { + ssize_t extattr_list_link( + _In_z_ const char *path, + int attrnamespace, + _Out_writes_bytes_opt_(nbytes) + void *data, + size_t nbytes + ); + } 440 AUE_NULL OBSOL kse_switchin -441 AUE_SEMWAIT NOSTD { int ksem_timedwait(semid_t id, \ - _In_opt_ const struct timespec *abstime); } -442 AUE_NULL STD { int thr_suspend( \ - _In_opt_ const struct timespec *timeout); } -443 AUE_NULL STD { int thr_wake(long id); } -444 AUE_MODUNLOAD STD { int kldunloadf(int fileid, int flags); } -445 AUE_AUDIT STD { int audit( \ - _In_reads_bytes_(length) \ - const void *record, \ - u_int length); } -446 AUE_AUDITON STD { int auditon(int cmd, \ - _In_opt_ void *data, \ - u_int length); } -447 AUE_GETAUID STD { int getauid(_Out_ uid_t *auid); } -448 AUE_SETAUID STD { int setauid(_In_ uid_t *auid); } -449 AUE_GETAUDIT STD { int getaudit( \ - _Out_ struct auditinfo *auditinfo); } -450 AUE_SETAUDIT STD { int setaudit( \ - _In_ struct auditinfo *auditinfo); } -451 AUE_GETAUDIT_ADDR STD { int getaudit_addr( \ - _Out_writes_bytes_(length) \ - struct auditinfo_addr *auditinfo_addr, \ - u_int length); } -452 AUE_SETAUDIT_ADDR STD { int setaudit_addr( \ - _In_reads_bytes_(length) \ - struct auditinfo_addr *auditinfo_addr, \ - u_int length); } -453 AUE_AUDITCTL STD { int auditctl(_In_z_ char *path); } -454 AUE_NULL STD { int _umtx_op(_Inout_ void *obj, int op, \ - u_long val, _In_ void *uaddr1, \ - _In_ void *uaddr2); } -455 AUE_THR_NEW STD { int thr_new(_In_ struct thr_param *param, \ - int param_size); } -456 AUE_NULL STD { int sigqueue(pid_t pid, int signum, \ - _In_ void *value); } +441 AUE_SEMWAIT NOSTD { + int ksem_timedwait( + semid_t id, + _In_opt_ const struct timespec *abstime + ); + } +442 AUE_NULL STD { + int thr_suspend( + _In_opt_ const struct timespec *timeout + ); + } +443 AUE_NULL STD { + int thr_wake( + long id + ); + } +444 AUE_MODUNLOAD STD { + int kldunloadf( + int fileid, + int flags + ); + } +445 AUE_AUDIT STD { + int audit( + _In_reads_bytes_(length) const void *record, + u_int length + ); + } +446 AUE_AUDITON STD { + int auditon( + int cmd, + _In_opt_ void *data, + u_int length + ); + } +447 AUE_GETAUID STD { + int getauid( + _Out_ uid_t *auid + ); + } +448 AUE_SETAUID STD { + int setauid( + _In_ uid_t *auid + ); + } +449 AUE_GETAUDIT STD { + int getaudit( + _Out_ struct auditinfo *auditinfo + ); + } +450 AUE_SETAUDIT STD { + int setaudit( + _In_ struct auditinfo *auditinfo + ); + } +451 AUE_GETAUDIT_ADDR STD { + int getaudit_addr( + _Out_writes_bytes_(length) struct auditinfo_addr *auditinfo_addr, + u_int length + ); + } +452 AUE_SETAUDIT_ADDR STD { + int setaudit_addr( + _In_reads_bytes_(length) struct auditinfo_addr *auditinfo_addr, + u_int length + ); + } +453 AUE_AUDITCTL STD { + int auditctl( + _In_z_ char *path + ); + } +454 AUE_NULL STD { + int _umtx_op( + _Inout_ void *obj, + int op, + u_long val, + _In_ void *uaddr1, + _In_ void *uaddr2 + ); + } +455 AUE_THR_NEW STD { + int thr_new( + _In_ struct thr_param *param, + int param_size + ); + } +456 AUE_NULL STD { + int sigqueue( + pid_t pid, + int signum, + _In_ void *value + ); + } -457 AUE_MQ_OPEN NOSTD { int kmq_open( \ - _In_z_ const char *path, \ - int flags, \ - mode_t mode, \ - _In_opt_ const struct mq_attr *attr); } -458 AUE_MQ_SETATTR NOSTD { int kmq_setattr(int mqd, \ - _In_opt_ const struct mq_attr *attr, \ - _Out_opt_ struct mq_attr *oattr); } -459 AUE_MQ_TIMEDRECEIVE NOSTD { int kmq_timedreceive( \ - int mqd, \ - _Out_writes_bytes_(msg_len) char *msg_ptr, \ - size_t msg_len, \ - _Out_opt_ unsigned *msg_prio, \ - _In_opt_ \ - const struct timespec *abs_timeout); } -460 AUE_MQ_TIMEDSEND NOSTD { int kmq_timedsend(int mqd, \ - _In_reads_bytes_(msg_len) \ - const char *msg_ptr, size_t msg_len, \ - unsigned msg_prio, \ - _In_opt_ \ - const struct timespec *abs_timeout); } -461 AUE_MQ_NOTIFY NOSTD { int kmq_notify(int mqd, \ - _In_opt_ const struct sigevent *sigev); } -462 AUE_MQ_UNLINK NOSTD { int kmq_unlink(_In_z_ const char *path); } -463 AUE_NULL STD { int abort2(_In_z_ const char *why, \ - int nargs, \ - _In_reads_(nargs) void **args); } -464 AUE_NULL STD { int thr_set_name(long id, \ - _In_z_ const char *name); } -465 AUE_AIO_FSYNC STD { int aio_fsync(int op, \ - _In_ struct aiocb *aiocbp); } -466 AUE_RTPRIO STD { int rtprio_thread(int function, \ - lwpid_t lwpid, \ - _Inout_ struct rtprio *rtp); } -467 AUE_NULL UNIMPL nosys -468 AUE_NULL UNIMPL nosys +457 AUE_MQ_OPEN NOSTD { + int kmq_open( + _In_z_ const char *path, + int flags, + mode_t mode, + _In_opt_ const struct mq_attr *attr + ); + } +458 AUE_MQ_SETATTR NOSTD { + int kmq_setattr( + int mqd, + _In_opt_ const struct mq_attr *attr, + _Out_opt_ struct mq_attr *oattr + ); + } +459 AUE_MQ_TIMEDRECEIVE NOSTD { + int kmq_timedreceive( + int mqd, + _Out_writes_bytes_(msg_len) char *msg_ptr, + size_t msg_len, + _Out_opt_ unsigned *msg_prio, + _In_opt_ const struct timespec *abs_timeout + ); + } +460 AUE_MQ_TIMEDSEND NOSTD { + int kmq_timedsend( + int mqd, + _In_reads_bytes_(msg_len) const char *msg_ptr, + size_t msg_len, + unsigned msg_prio, + _In_opt_ const struct timespec *abs_timeout + ); + } +461 AUE_MQ_NOTIFY NOSTD { + int kmq_notify( + int mqd, + _In_opt_ const struct sigevent *sigev + ); + } +462 AUE_MQ_UNLINK NOSTD { + int kmq_unlink( + _In_z_ const char *path + ); + } +463 AUE_NULL STD { + int abort2( + _In_z_ const char *why, + int nargs, + _In_reads_(nargs) void **args + ); + } +464 AUE_NULL STD { + int thr_set_name( + long id, + _In_z_ const char *name + ); + } +465 AUE_AIO_FSYNC STD { + int aio_fsync( + int op, + _In_ struct aiocb *aiocbp + ); + } +466 AUE_RTPRIO STD { + int rtprio_thread( + int function, + lwpid_t lwpid, + _Inout_ struct rtprio *rtp + ); + } +467-468 AUE_NULL UNIMPL nosys 469 AUE_NULL UNIMPL __getpath_fromfd 470 AUE_NULL UNIMPL __getpath_fromaddr -471 AUE_SCTP_PEELOFF NOSTD { int sctp_peeloff(int sd, \ - uint32_t name); } -472 AUE_SCTP_GENERIC_SENDMSG NOSTD { int sctp_generic_sendmsg( \ - int sd, \ - _In_reads_bytes_(mlen) caddr_t msg, \ - int mlen, \ - _In_reads_bytes_(tolen) \ - caddr_t to, \ - __socklen_t tolen, \ - _In_opt_ struct sctp_sndrcvinfo *sinfo, \ - int flags); } -473 AUE_SCTP_GENERIC_SENDMSG_IOV NOSTD { \ - int sctp_generic_sendmsg_iov( \ - int sd, \ - _In_reads_(iovlen) struct iovec *iov, \ - int iovlen, \ - _In_reads_bytes_(tolen) \ - caddr_t to, \ - __socklen_t tolen, \ - _In_opt_ struct sctp_sndrcvinfo *sinfo, \ - int flags); } -474 AUE_SCTP_GENERIC_RECVMSG NOSTD { int sctp_generic_recvmsg( \ - int sd, \ - _In_reads_(iovlen) struct iovec *iov, \ - int iovlen, \ - _Out_writes_bytes_(*fromlenaddr) \ - struct sockaddr *from, \ - _Out_ __socklen_t *fromlenaddr, \ - _In_opt_ struct sctp_sndrcvinfo *sinfo, \ - _Out_opt_ int *msg_flags); } -475 AUE_PREAD STD { ssize_t pread(int fd, \ - _Out_writes_bytes_(nbyte) void *buf, \ - size_t nbyte, off_t offset); } -476 AUE_PWRITE STD { ssize_t pwrite(int fd, \ - _In_reads_bytes_(nbyte) \ - const void *buf, \ - size_t nbyte, off_t offset); } -477 AUE_MMAP STD { caddr_t mmap(_In_ caddr_t addr, size_t len, \ - int prot, int flags, int fd, off_t pos); } -478 AUE_LSEEK STD { off_t lseek(int fd, off_t offset, \ - int whence); } -479 AUE_TRUNCATE STD { int truncate(_In_z_ char *path, \ - off_t length); } -480 AUE_FTRUNCATE STD { int ftruncate(int fd, off_t length); } -481 AUE_THR_KILL2 STD { int thr_kill2(pid_t pid, long id, int sig); } -482 AUE_SHMOPEN STD { int shm_open( \ - _In_z_ const char *path, \ - int flags, \ - mode_t mode); } -483 AUE_SHMUNLINK STD { int shm_unlink(_In_z_ const char *path); } -484 AUE_NULL STD { int cpuset(_Out_ cpusetid_t *setid); } -485 AUE_NULL STD { int cpuset_setid(cpuwhich_t which, id_t id, \ - cpusetid_t setid); } -486 AUE_NULL STD { int cpuset_getid(cpulevel_t level, \ - cpuwhich_t which, id_t id, \ - _Out_ cpusetid_t *setid); } -487 AUE_NULL STD { int cpuset_getaffinity(cpulevel_t level, \ - cpuwhich_t which, id_t id, \ - size_t cpusetsize, \ - _Out_ cpuset_t *mask); } -488 AUE_NULL STD { int cpuset_setaffinity(cpulevel_t level, \ - cpuwhich_t which, id_t id, \ - size_t cpusetsize, \ - _Out_ const cpuset_t *mask); } -489 AUE_FACCESSAT STD { int faccessat(int fd, _In_z_ char *path, \ - int amode, int flag); } -490 AUE_FCHMODAT STD { int fchmodat(int fd, \ - _In_z_ char *path, mode_t mode, \ - int flag); } -491 AUE_FCHOWNAT STD { int fchownat(int fd, _In_z_ char *path, \ - uid_t uid, gid_t gid, int flag); } -492 AUE_FEXECVE STD { int fexecve(int fd, \ - _In_ char **argv, \ - _In_ char **envv); } -493 AUE_FSTATAT COMPAT11 { int fstatat(int fd, _In_z_ char *path, \ - _Out_ struct freebsd11_stat *buf, \ - int flag); } -494 AUE_FUTIMESAT STD { int futimesat(int fd, \ - _In_z_ char *path, \ - _In_reads_(2) struct timeval *times); } -495 AUE_LINKAT STD { int linkat(int fd1, \ - _In_z_ char *path1, \ - int fd2, \ - _In_z_ char *path2, \ - int flag); } -496 AUE_MKDIRAT STD { int mkdirat(int fd, _In_z_ char *path, \ - mode_t mode); } -497 AUE_MKFIFOAT STD { int mkfifoat(int fd, \ - _In_z_ char *path, mode_t mode); } -498 AUE_MKNODAT COMPAT11 { int mknodat(int fd, _In_z_ char *path, \ - mode_t mode, \ - uint32_t dev); } +471 AUE_SCTP_PEELOFF NOSTD { + int sctp_peeloff( + int sd, + uint32_t name + ); + } +472 AUE_SCTP_GENERIC_SENDMSG NOSTD { + int sctp_generic_sendmsg( + int sd, + _In_reads_bytes_(mlen) caddr_t msg, + int mlen, + _In_reads_bytes_(tolen) caddr_t to, + __socklen_t tolen, + _In_opt_ struct sctp_sndrcvinfo *sinfo, + int flags + ); + } +473 AUE_SCTP_GENERIC_SENDMSG_IOV NOSTD { + int sctp_generic_sendmsg_iov( + int sd, + _In_reads_(iovlen) struct iovec *iov, + int iovlen, + _In_reads_bytes_(tolen) caddr_t to, + __socklen_t tolen, + _In_opt_ struct sctp_sndrcvinfo *sinfo, + int flags + ); + } +474 AUE_SCTP_GENERIC_RECVMSG NOSTD { + int sctp_generic_recvmsg( + int sd, + _In_reads_(iovlen) struct iovec *iov, + int iovlen, + _Out_writes_bytes_(*fromlenaddr) struct sockaddr *from, + _Out_ __socklen_t *fromlenaddr, + _In_opt_ struct sctp_sndrcvinfo *sinfo, + _Out_opt_ int *msg_flags + ); + } +475 AUE_PREAD STD { + ssize_t pread( + int fd, + _Out_writes_bytes_(nbyte) void *buf, + size_t nbyte, + off_t offset + ); + } +476 AUE_PWRITE STD { + ssize_t pwrite( + int fd, + _In_reads_bytes_(nbyte) const void *buf, + size_t nbyte, + off_t offset + ); + } +477 AUE_MMAP STD { + caddr_t mmap( + _In_ caddr_t addr, + size_t len, + int prot, + int flags, + int fd, + off_t pos + ); + } +478 AUE_LSEEK STD { + off_t lseek( + int fd, + off_t offset, + int whence + ); + } +479 AUE_TRUNCATE STD { + int truncate( + _In_z_ char *path, + off_t length + ); + } +480 AUE_FTRUNCATE STD { + int ftruncate( + int fd, + off_t length + ); + } +481 AUE_THR_KILL2 STD { + int thr_kill2( + pid_t pid, + long id, + int sig + ); + } +482 AUE_SHMOPEN STD { + int shm_open( + _In_z_ const char *path, + int flags, + mode_t mode + ); + } +483 AUE_SHMUNLINK STD { + int shm_unlink( + _In_z_ const char *path + ); + } +484 AUE_NULL STD { + int cpuset( + _Out_ cpusetid_t *setid + ); + } +485 AUE_NULL STD { + int cpuset_setid( + cpuwhich_t which, + id_t id, + cpusetid_t setid + ); + } +486 AUE_NULL STD { + int cpuset_getid( + cpulevel_t level, + cpuwhich_t which, + id_t id, + _Out_ cpusetid_t *setid + ); + } +487 AUE_NULL STD { + int cpuset_getaffinity( + cpulevel_t level, + cpuwhich_t which, + id_t id, + size_t cpusetsize, + _Out_ cpuset_t *mask + ); + } +488 AUE_NULL STD { + int cpuset_setaffinity( + cpulevel_t level, + cpuwhich_t which, + id_t id, + size_t cpusetsize, + _Out_ const cpuset_t *mask + ); + } +489 AUE_FACCESSAT STD { + int faccessat( + int fd, + _In_z_ char *path, + int amode, + int flag + ); + } +490 AUE_FCHMODAT STD { + int fchmodat( + int fd, + _In_z_ char *path, + mode_t mode, + int flag + ); + } +491 AUE_FCHOWNAT STD { + int fchownat( + int fd, + _In_z_ char *path, + uid_t uid, + gid_t gid, + int flag + ); + } +492 AUE_FEXECVE STD { + int fexecve( + int fd, + _In_ char **argv, + _In_ char **envv + ); + } +493 AUE_FSTATAT COMPAT11 { + int fstatat( + int fd, + _In_z_ char *path, + _Out_ struct freebsd11_stat *buf, + int flag + ); + } +494 AUE_FUTIMESAT STD { + int futimesat( + int fd, + _In_z_ char *path, + _In_reads_(2) struct timeval *times + ); + } +495 AUE_LINKAT STD { + int linkat( + int fd1, + _In_z_ char *path1, + int fd2, + _In_z_ char *path2, + int flag + ); + } +496 AUE_MKDIRAT STD { + int mkdirat( + int fd, + _In_z_ char *path, + mode_t mode + ); + } +497 AUE_MKFIFOAT STD { + int mkfifoat( + int fd, + _In_z_ char *path, + mode_t mode + ); + } +498 AUE_MKNODAT COMPAT11 { + int mknodat( + int fd, + _In_z_ char *path, + mode_t mode, + uint32_t dev + ); + } ; XXX: see the comment for open -499 AUE_OPENAT_RWTC STD { int openat(int fd, _In_z_ char *path, \ - int flag, mode_t mode); } -500 AUE_READLINKAT STD { int readlinkat(int fd, \ - _In_z_ char *path, \ - _Out_writes_bytes_(bufsize) char *buf, \ - size_t bufsize); } -501 AUE_RENAMEAT STD { int renameat(int oldfd, \ - _In_z_ char *old, \ - int newfd, _In_z_ char *new); } -502 AUE_SYMLINKAT STD { int symlinkat(_In_z_ char *path1, int fd, \ - _In_z_ char *path2); } -503 AUE_UNLINKAT STD { int unlinkat(int fd, _In_z_ char *path, \ - int flag); } -504 AUE_POSIX_OPENPT STD { int posix_openpt(int flags); } +499 AUE_OPENAT_RWTC STD { + int openat( + int fd, + _In_z_ char *path, + int flag, + mode_t mode + ); + } +500 AUE_READLINKAT STD { + int readlinkat( + int fd, + _In_z_ char *path, + _Out_writes_bytes_(bufsize) char *buf, + size_t bufsize + ); + } +501 AUE_RENAMEAT STD { + int renameat( + int oldfd, + _In_z_ char *old, + int newfd, + _In_z_ char *new + ); + } +502 AUE_SYMLINKAT STD { + int symlinkat( + _In_z_ char *path1, + int fd, + _In_z_ char *path2 + ); + } +503 AUE_UNLINKAT STD { + int unlinkat( + int fd, + _In_z_ char *path, + int flag + ); + } +504 AUE_POSIX_OPENPT STD { + int posix_openpt( + int flags + ); + } ; 505 is initialised by the kgssapi code, if present. -505 AUE_NULL NOSTD { int gssd_syscall(_In_z_ char *path); } -506 AUE_JAIL_GET STD { int jail_get( \ - _In_reads_(iovcnt) struct iovec *iovp, \ - unsigned int iovcnt, int flags); } -507 AUE_JAIL_SET STD { int jail_set( \ - _In_reads_(iovcnt) struct iovec *iovp, \ - unsigned int iovcnt, int flags); } -508 AUE_JAIL_REMOVE STD { int jail_remove(int jid); } -509 AUE_CLOSEFROM STD { int closefrom(int lowfd); } -510 AUE_SEMCTL NOSTD { int __semctl(int semid, int semnum, \ - int cmd, _Inout_ union semun *arg); } -511 AUE_MSGCTL NOSTD { int msgctl(int msqid, int cmd, \ - _Inout_opt_ struct msqid_ds *buf); } -512 AUE_SHMCTL NOSTD { int shmctl(int shmid, int cmd, \ - _Inout_opt_ struct shmid_ds *buf); } -513 AUE_LPATHCONF STD { int lpathconf(_In_z_ char *path, \ - int name); } +505 AUE_NULL NOSTD { + int gssd_syscall( + _In_z_ char *path + ); + } +506 AUE_JAIL_GET STD { + int jail_get( + _In_reads_(iovcnt) struct iovec *iovp, + unsigned int iovcnt, + int flags + ); + } +507 AUE_JAIL_SET STD { + int jail_set( + _In_reads_(iovcnt) struct iovec *iovp, + unsigned int iovcnt, + int flags + ); + } +508 AUE_JAIL_REMOVE STD { + int jail_remove( + int jid + ); + } +509 AUE_CLOSEFROM STD { + int closefrom( + int lowfd + ); + } +510 AUE_SEMCTL NOSTD { + int __semctl( + int semid, + int semnum, + int cmd, + _Inout_ union semun *arg + ); + } +511 AUE_MSGCTL NOSTD { + int msgctl( + int msqid, + int cmd, + _Inout_opt_ struct msqid_ds *buf + ); + } +512 AUE_SHMCTL NOSTD { + int shmctl( + int shmid, + int cmd, + _Inout_opt_ struct shmid_ds *buf + ); + } +513 AUE_LPATHCONF STD { + int lpathconf( + _In_z_ char *path, + int name + ); + } 514 AUE_NULL OBSOL cap_new -515 AUE_CAP_RIGHTS_GET STD { int __cap_rights_get(int version, \ - int fd, _Out_ cap_rights_t *rightsp); } -516 AUE_CAP_ENTER STD { int cap_enter(void); } -517 AUE_CAP_GETMODE STD { int cap_getmode(_Out_ u_int *modep); } -518 AUE_PDFORK STD { int pdfork(_Out_ int *fdp, int flags); } -519 AUE_PDKILL STD { int pdkill(int fd, int signum); } -520 AUE_PDGETPID STD { int pdgetpid(int fd, _Out_ pid_t *pidp); } +515 AUE_CAP_RIGHTS_GET STD { + int __cap_rights_get( + int version, + int fd, + _Out_ cap_rights_t *rightsp + ); + } +516 AUE_CAP_ENTER STD { + int cap_enter(void); + } +517 AUE_CAP_GETMODE STD { + int cap_getmode( + _Out_ u_int *modep + ); + } +518 AUE_PDFORK STD { + int pdfork( + _Out_ int *fdp, + int flags + ); + } +519 AUE_PDKILL STD { + int pdkill( + int fd, + int signum + ); + } +520 AUE_PDGETPID STD { + int pdgetpid( + int fd, + _Out_ pid_t *pidp + ); + } 521 AUE_PDWAIT UNIMPL pdwait4 -522 AUE_SELECT STD { int pselect(int nd, \ - _Inout_opt_ fd_set *in, \ - _Inout_opt_ fd_set *ou, \ - _Inout_opt_ fd_set *ex, \ - _In_opt_ const struct timespec *ts, \ - _In_opt_ const sigset_t *sm); } -523 AUE_GETLOGINCLASS STD { int getloginclass( \ - _Out_writes_z_(namelen) char *namebuf, \ - size_t namelen); } -524 AUE_SETLOGINCLASS STD { int setloginclass( \ - _In_z_ const char *namebuf); } -525 AUE_NULL STD { int rctl_get_racct( \ - _In_reads_bytes_(inbuflen) \ - const void *inbufp, size_t inbuflen, \ - _Out_writes_bytes_(outbuflen) \ - void *outbufp, size_t outbuflen); } -526 AUE_NULL STD { int rctl_get_rules( \ - _In_reads_bytes_(inbuflen) \ - const void *inbufp, size_t inbuflen, \ - _Out_writes_bytes_(outbuflen) \ - void *outbufp, size_t outbuflen); } -527 AUE_NULL STD { int rctl_get_limits( \ - _In_reads_bytes_(inbuflen) \ - const void *inbufp, size_t inbuflen, \ - _Out_writes_bytes_(outbuflen) \ - void *outbufp, size_t outbuflen); } -528 AUE_NULL STD { int rctl_add_rule( \ - _In_reads_bytes_(inbuflen) \ - const void *inbufp, size_t inbuflen, \ - _Out_writes_bytes_(outbuflen) \ - void *outbufp, size_t outbuflen); } -529 AUE_NULL STD { int rctl_remove_rule( \ - _In_reads_bytes_(inbuflen) \ - const void *inbufp, size_t inbuflen, \ - _Out_writes_bytes_(outbuflen) \ - void *outbufp, size_t outbuflen); } -530 AUE_POSIX_FALLOCATE STD { int posix_fallocate(int fd, \ - off_t offset, off_t len); } -531 AUE_POSIX_FADVISE STD { int posix_fadvise(int fd, \ - off_t offset, \ - off_t len, int advice); } -532 AUE_WAIT6 STD { int wait6(idtype_t idtype, id_t id, \ - _Out_opt_ int *status, int options, \ - _Out_opt_ struct __wrusage *wrusage, \ - _Out_opt_ siginfo_t *info); } -533 AUE_CAP_RIGHTS_LIMIT STD { int cap_rights_limit(int fd, \ - _In_ cap_rights_t *rightsp); } -534 AUE_CAP_IOCTLS_LIMIT STD { int cap_ioctls_limit(int fd, \ - _In_reads_(ncmds) const u_long *cmds, \ - size_t ncmds); } -535 AUE_CAP_IOCTLS_GET STD { ssize_t cap_ioctls_get(int fd, \ - _Out_writes_(maxcmds) u_long *cmds, \ - size_t maxcmds); } -536 AUE_CAP_FCNTLS_LIMIT STD { int cap_fcntls_limit(int fd, \ - uint32_t fcntlrights); } -537 AUE_CAP_FCNTLS_GET STD { int cap_fcntls_get(int fd, \ - _Out_ uint32_t *fcntlrightsp); } -538 AUE_BINDAT STD { int bindat(int fd, int s, \ - _In_reads_bytes_(namelen) \ - caddr_t name, \ - int namelen); } -539 AUE_CONNECTAT STD { int connectat(int fd, int s, \ - _In_reads_bytes_(namelen) \ - caddr_t name, \ - int namelen); } -540 AUE_CHFLAGSAT STD { int chflagsat(int fd, \ - _In_z_ const char *path, \ - u_long flags, int atflag); } -541 AUE_ACCEPT STD { int accept4(int s, \ - _Out_writes_bytes_opt_(*anamelen) \ - struct sockaddr *name, \ - _Inout_opt_ \ - __socklen_t *anamelen, \ - int flags); } -542 AUE_PIPE STD { int pipe2(_Out_writes_(2) int *fildes, \ - int flags); } -543 AUE_AIO_MLOCK STD { int aio_mlock(_In_ struct aiocb *aiocbp); } -544 AUE_PROCCTL STD { int procctl(idtype_t idtype, id_t id, \ - int com, _In_opt_ void *data); } -545 AUE_POLL STD { int ppoll( \ - _Inout_updates_(nfds) struct pollfd *fds, \ - u_int nfds, \ - _In_opt_ const struct timespec *ts, \ - _In_opt_ const sigset_t *set); } -546 AUE_FUTIMES STD { int futimens(int fd, \ - _In_reads_(2) \ - struct timespec *times); } -547 AUE_FUTIMESAT STD { int utimensat(int fd, \ - _In_z_ char *path, \ - _In_reads_(2) \ - struct timespec *times, \ - int flag); } +522 AUE_SELECT STD { + int pselect( + int nd, + _Inout_opt_ fd_set *in, + _Inout_opt_ fd_set *ou, + _Inout_opt_ fd_set *ex, + _In_opt_ const struct timespec *ts, + _In_opt_ const sigset_t *sm + ); + } +523 AUE_GETLOGINCLASS STD { + int getloginclass( + _Out_writes_z_(namelen) char *namebuf, + size_t namelen + ); + } +524 AUE_SETLOGINCLASS STD { + int setloginclass( + _In_z_ const char *namebuf + ); + } +525 AUE_NULL STD { + int rctl_get_racct( + _In_reads_bytes_(inbuflen) const void *inbufp, + size_t inbuflen, + _Out_writes_bytes_(outbuflen) void *outbufp, + size_t outbuflen + ); + } +526 AUE_NULL STD { + int rctl_get_rules( + _In_reads_bytes_(inbuflen) const void *inbufp, + size_t inbuflen, + _Out_writes_bytes_(outbuflen) void *outbufp, + size_t outbuflen + ); + } +527 AUE_NULL STD { + int rctl_get_limits( + _In_reads_bytes_(inbuflen) const void *inbufp, + size_t inbuflen, + _Out_writes_bytes_(outbuflen) void *outbufp, + size_t outbuflen + ); + } +528 AUE_NULL STD { + int rctl_add_rule( + _In_reads_bytes_(inbuflen) const void *inbufp, + size_t inbuflen, + _Out_writes_bytes_(outbuflen) void *outbufp, + size_t outbuflen + ); + } +529 AUE_NULL STD { + int rctl_remove_rule( + _In_reads_bytes_(inbuflen) const void *inbufp, + size_t inbuflen, + _Out_writes_bytes_(outbuflen) void *outbufp, + size_t outbuflen + ); + } +530 AUE_POSIX_FALLOCATE STD { + int posix_fallocate( + int fd, + off_t offset, + off_t len + ); + } +531 AUE_POSIX_FADVISE STD { + int posix_fadvise( + int fd, + off_t offset, + off_t len, + int advice + ); + } +532 AUE_WAIT6 STD { + int wait6( + idtype_t idtype, + id_t id, + _Out_opt_ int *status, + int options, + _Out_opt_ struct __wrusage *wrusage, + _Out_opt_ siginfo_t *info + ); + } +533 AUE_CAP_RIGHTS_LIMIT STD { + int cap_rights_limit( + int fd, + _In_ cap_rights_t *rightsp + ); + } +534 AUE_CAP_IOCTLS_LIMIT STD { + int cap_ioctls_limit( + int fd, + _In_reads_(ncmds) const u_long *cmds, + size_t ncmds + ); + } +535 AUE_CAP_IOCTLS_GET STD { + ssize_t cap_ioctls_get( + int fd, + _Out_writes_(maxcmds) u_long *cmds, + size_t maxcmds + ); + } +536 AUE_CAP_FCNTLS_LIMIT STD { + int cap_fcntls_limit( + int fd, + uint32_t fcntlrights + ); + } +537 AUE_CAP_FCNTLS_GET STD { + int cap_fcntls_get( + int fd, + _Out_ uint32_t *fcntlrightsp + ); + } +538 AUE_BINDAT STD { + int bindat( + int fd, + int s, + _In_reads_bytes_(namelen) caddr_t name, + int namelen + ); + } +539 AUE_CONNECTAT STD { + int connectat( + int fd, + int s, + _In_reads_bytes_(namelen) caddr_t name, + int namelen + ); + } +540 AUE_CHFLAGSAT STD { + int chflagsat( + int fd, + _In_z_ const char *path, + u_long flags, + int atflag + ); + } +541 AUE_ACCEPT STD { + int accept4( + int s, + _Out_writes_bytes_opt_(*anamelen) struct sockaddr *name, + _Inout_opt_ __socklen_t *anamelen, + int flags + ); + } +542 AUE_PIPE STD { + int pipe2( + _Out_writes_(2) int *fildes, + int flags + ); + } +543 AUE_AIO_MLOCK STD { + int aio_mlock( + _In_ struct aiocb *aiocbp + ); + } +544 AUE_PROCCTL STD { + int procctl( + idtype_t idtype, + id_t id, + int com, + _In_opt_ void *data + ); + } +545 AUE_POLL STD { + int ppoll( + _Inout_updates_(nfds) struct pollfd *fds, + u_int nfds, + _In_opt_ const struct timespec *ts, + _In_opt_ const sigset_t *set + ); + } +546 AUE_FUTIMES STD { + int futimens( + int fd, + _In_reads_(2) struct timespec *times + ); + } +547 AUE_FUTIMESAT STD { + int utimensat( + int fd, + _In_z_ char *path, + _In_reads_(2) struct timespec *times, + int flag + ); + } 548 AUE_NULL OBSOL numa_getaffinity 549 AUE_NULL OBSOL numa_setaffinity -550 AUE_FSYNC STD { int fdatasync(int fd); } -551 AUE_FSTAT STD { int fstat(int fd, _Out_ struct stat *sb); } -552 AUE_FSTATAT STD { int fstatat(int fd, _In_z_ char *path, \ - _Out_ struct stat *buf, int flag); } -553 AUE_FHSTAT STD { int fhstat(_In_ const struct fhandle *u_fhp, \ - _Out_ struct stat *sb); } -554 AUE_GETDIRENTRIES STD { ssize_t getdirentries(int fd, \ - _Out_writes_bytes_(count) char *buf, \ - size_t count, _Out_ off_t *basep); } -555 AUE_STATFS STD { int statfs(_In_z_ char *path, \ - _Out_ struct statfs *buf); } -556 AUE_FSTATFS STD { int fstatfs(int fd, \ - _Out_ struct statfs *buf); } -557 AUE_GETFSSTAT STD { int getfsstat( \ - _Out_writes_bytes_opt_(bufsize) \ - struct statfs *buf, \ - long bufsize, int mode); } -558 AUE_FHSTATFS STD { int fhstatfs( \ - _In_ const struct fhandle *u_fhp, \ - _Out_ struct statfs *buf); } -559 AUE_MKNODAT STD { int mknodat(int fd, _In_z_ char *path, \ - mode_t mode, dev_t dev); } -560 AUE_KEVENT STD { int kevent(int fd, \ - _In_reads_opt_(nchanges) \ - struct kevent *changelist, \ - int nchanges, \ - _Out_writes_opt_(nevents) \ - struct kevent *eventlist, int nevents, \ - _In_opt_ const struct timespec *timeout); } -561 AUE_NULL STD { int cpuset_getdomain(cpulevel_t level, \ - cpuwhich_t which, id_t id, \ - size_t domainsetsize, \ - _Out_writes_bytes_(domainsetsize) \ - domainset_t *mask, \ - _Out_ int *policy); } -562 AUE_NULL STD { int cpuset_setdomain(cpulevel_t level, \ - cpuwhich_t which, id_t id, \ - size_t domainsetsize, \ - _In_ domainset_t *mask, \ - int policy); } -563 AUE_NULL STD { int getrandom( \ - _Out_writes_bytes_(buflen) void *buf, \ - size_t buflen, unsigned int flags); } +550 AUE_FSYNC STD { + int fdatasync( + int fd + ); + } +551 AUE_FSTAT STD { + int fstat( + int fd, + _Out_ struct stat *sb + ); + } +552 AUE_FSTATAT STD { + int fstatat( + int fd, + _In_z_ char *path, + _Out_ struct stat *buf, + int flag + ); + } +553 AUE_FHSTAT STD { + int fhstat( + _In_ const struct fhandle *u_fhp, + _Out_ struct stat *sb + ); + } +554 AUE_GETDIRENTRIES STD { + ssize_t getdirentries( + int fd, + _Out_writes_bytes_(count) char *buf, + size_t count, + _Out_ off_t *basep + ); + } +555 AUE_STATFS STD { + int statfs( + _In_z_ char *path, + _Out_ struct statfs *buf + ); + } +556 AUE_FSTATFS STD { + int fstatfs( + int fd, + _Out_ struct statfs *buf + ); + } +557 AUE_GETFSSTAT STD { + int getfsstat( + _Out_writes_bytes_opt_(bufsize) struct statfs *buf, + long bufsize, + int mode + ); + } +558 AUE_FHSTATFS STD { + int fhstatfs( + _In_ const struct fhandle *u_fhp, + _Out_ struct statfs *buf + ); + } +559 AUE_MKNODAT STD { + int mknodat( + int fd, + _In_z_ char *path, + mode_t mode, + dev_t dev + ); + } +560 AUE_KEVENT STD { + int kevent( + int fd, + _In_reads_opt_(nchanges) struct kevent *changelist, + int nchanges, + _Out_writes_opt_(nevents) struct kevent *eventlist, + int nevents, + _In_opt_ const struct timespec *timeout + ); + } +561 AUE_NULL STD { + int cpuset_getdomain( + cpulevel_t level, + cpuwhich_t which, + id_t id, + size_t domainsetsize, + _Out_writes_bytes_(domainsetsize) domainset_t *mask, + _Out_ int *policy + ); + } +562 AUE_NULL STD { + int cpuset_setdomain( + cpulevel_t level, + cpuwhich_t which, + id_t id, + size_t domainsetsize, + _In_ domainset_t *mask, + int policy + ); + } +563 AUE_NULL STD { + int getrandom( + _Out_writes_bytes_(buflen) void *buf, + size_t buflen, + unsigned int flags + ); + } ; Please copy any additions and changes to the following compatability tables: ; sys/compat/freebsd32/syscalls.master -- cgit v1.3 From 8c0e047668786d3b75b1d978052df0d42f525621 Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Wed, 31 Oct 2018 17:41:53 +0000 Subject: Always set the MP_QUIRK_CPULIST quirk under ACPI. This needs a run time check to only set it for emulators as the CPU list may be changed when the emulator starts. Until this is working just always set it. Sponsored by: DARPA, AFRL --- sys/arm64/arm64/mp_machdep.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sys') diff --git a/sys/arm64/arm64/mp_machdep.c b/sys/arm64/arm64/mp_machdep.c index d07fbdb72361..ef17ca422771 100644 --- a/sys/arm64/arm64/mp_machdep.c +++ b/sys/arm64/arm64/mp_machdep.c @@ -525,6 +525,7 @@ cpu_mp_start(void) switch(arm64_bus_method) { #ifdef DEV_ACPI case ARM64_BUS_ACPI: + mp_quirks = MP_QUIRK_CPULIST; KASSERT(cpu0 >= 0, ("Current CPU was not found")); cpu_init_acpi(); break; -- cgit v1.3 From 1272051e82111b521fd5d5c1e3a7fd9e63d44eeb Mon Sep 17 00:00:00 2001 From: Navdeep Parhar Date: Wed, 31 Oct 2018 18:30:17 +0000 Subject: cxgbe(4): Report a reasonable non-zero if_hw_tsomaxsegsize to the kernel. This reverts an accidental change that snuck in with r339628. Sponsored by: Chelsio Communications --- sys/dev/cxgbe/t4_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys') diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index d2746367251f..effc82ab0704 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -1543,7 +1543,7 @@ cxgbe_vi_attach(device_t dev, struct vi_info *vi) if (is_ethoffload(vi->pi->adapter) && vi->nofldtxq != 0) ifp->if_hw_tsomaxsegcount = TX_SGL_SEGS_EO_TSO; #endif - ifp->if_hw_tsomaxsegsize = 0; + ifp->if_hw_tsomaxsegsize = 65536; ether_ifattach(ifp, vi->hw_addr); #ifdef DEV_NETMAP -- cgit v1.3 From 6933902df40aa194776e69786a4c6dfeee250911 Mon Sep 17 00:00:00 2001 From: Navdeep Parhar Date: Wed, 31 Oct 2018 19:19:13 +0000 Subject: cxgbe(4): Add rate limiting support for UDP. MFC after: 1 month Sponsored by: Chelsio Communications --- sys/dev/cxgbe/t4_sge.c | 81 ++++++++++++++++++++++++++++---------------------- 1 file changed, 46 insertions(+), 35 deletions(-) (limited to 'sys') diff --git a/sys/dev/cxgbe/t4_sge.c b/sys/dev/cxgbe/t4_sge.c index b0fe1da43d95..9b0e2628b235 100644 --- a/sys/dev/cxgbe/t4_sge.c +++ b/sys/dev/cxgbe/t4_sge.c @@ -5610,10 +5610,6 @@ write_ethofld_wr(struct cxgbe_snd_tag *cst, struct fw_eth_tx_eo_wr *wr, m0->m_pkthdr.l4hlen > 0, ("%s: ethofld mbuf %p is missing header lengths", __func__, m0)); - if (needs_udp_csum(m0)) { - CXGBE_UNIMPLEMENTED("UDP ethofld"); - } - len16 = mbuf_eo_len16(m0); nsegs = mbuf_eo_nsegs(m0); pktlen = m0->m_pkthdr.len; @@ -5628,37 +5624,52 @@ write_ethofld_wr(struct cxgbe_snd_tag *cst, struct fw_eth_tx_eo_wr *wr, wr->equiq_to_len16 = htobe32(V_FW_WR_LEN16(len16) | V_FW_WR_FLOWID(cst->etid)); wr->r3 = 0; - wr->u.tcpseg.type = FW_ETH_TX_EO_TYPE_TCPSEG; - wr->u.tcpseg.ethlen = m0->m_pkthdr.l2hlen; - wr->u.tcpseg.iplen = htobe16(m0->m_pkthdr.l3hlen); - wr->u.tcpseg.tcplen = m0->m_pkthdr.l4hlen; - wr->u.tcpseg.tsclk_tsoff = mbuf_eo_tsclk_tsoff(m0); - wr->u.tcpseg.r4 = 0; - wr->u.tcpseg.r5 = 0; - wr->u.tcpseg.plen = htobe32(pktlen - immhdrs); - - if (needs_tso(m0)) { - struct cpl_tx_pkt_lso_core *lso = (void *)(wr + 1); - - wr->u.tcpseg.mss = htobe16(m0->m_pkthdr.tso_segsz); - - ctrl = V_LSO_OPCODE(CPL_TX_PKT_LSO) | F_LSO_FIRST_SLICE | - F_LSO_LAST_SLICE | V_LSO_IPHDR_LEN(m0->m_pkthdr.l3hlen >> 2) - | V_LSO_TCPHDR_LEN(m0->m_pkthdr.l4hlen >> 2); - if (m0->m_pkthdr.l2hlen == sizeof(struct ether_vlan_header)) - ctrl |= V_LSO_ETHHDR_LEN(1); - if (m0->m_pkthdr.l3hlen == sizeof(struct ip6_hdr)) - ctrl |= F_LSO_IPV6; - lso->lso_ctrl = htobe32(ctrl); - lso->ipid_ofst = htobe16(0); - lso->mss = htobe16(m0->m_pkthdr.tso_segsz); - lso->seqno_offset = htobe32(0); - lso->len = htobe32(pktlen); - - cpl = (void *)(lso + 1); - } else { - wr->u.tcpseg.mss = htobe16(0xffff); + if (needs_udp_csum(m0)) { + wr->u.udpseg.type = FW_ETH_TX_EO_TYPE_UDPSEG; + wr->u.udpseg.ethlen = m0->m_pkthdr.l2hlen; + wr->u.udpseg.iplen = htobe16(m0->m_pkthdr.l3hlen); + wr->u.udpseg.udplen = m0->m_pkthdr.l4hlen; + wr->u.udpseg.rtplen = 0; + wr->u.udpseg.r4 = 0; + wr->u.udpseg.mss = htobe16(pktlen - immhdrs); + wr->u.udpseg.schedpktsize = wr->u.udpseg.mss; + wr->u.udpseg.plen = htobe32(pktlen - immhdrs); cpl = (void *)(wr + 1); + } else { + MPASS(needs_tcp_csum(m0)); + wr->u.tcpseg.type = FW_ETH_TX_EO_TYPE_TCPSEG; + wr->u.tcpseg.ethlen = m0->m_pkthdr.l2hlen; + wr->u.tcpseg.iplen = htobe16(m0->m_pkthdr.l3hlen); + wr->u.tcpseg.tcplen = m0->m_pkthdr.l4hlen; + wr->u.tcpseg.tsclk_tsoff = mbuf_eo_tsclk_tsoff(m0); + wr->u.tcpseg.r4 = 0; + wr->u.tcpseg.r5 = 0; + wr->u.tcpseg.plen = htobe32(pktlen - immhdrs); + + if (needs_tso(m0)) { + struct cpl_tx_pkt_lso_core *lso = (void *)(wr + 1); + + wr->u.tcpseg.mss = htobe16(m0->m_pkthdr.tso_segsz); + + ctrl = V_LSO_OPCODE(CPL_TX_PKT_LSO) | + F_LSO_FIRST_SLICE | F_LSO_LAST_SLICE | + V_LSO_IPHDR_LEN(m0->m_pkthdr.l3hlen >> 2) | + V_LSO_TCPHDR_LEN(m0->m_pkthdr.l4hlen >> 2); + if (m0->m_pkthdr.l2hlen == sizeof(struct ether_vlan_header)) + ctrl |= V_LSO_ETHHDR_LEN(1); + if (m0->m_pkthdr.l3hlen == sizeof(struct ip6_hdr)) + ctrl |= F_LSO_IPV6; + lso->lso_ctrl = htobe32(ctrl); + lso->ipid_ofst = htobe16(0); + lso->mss = htobe16(m0->m_pkthdr.tso_segsz); + lso->seqno_offset = htobe32(0); + lso->len = htobe32(pktlen); + + cpl = (void *)(lso + 1); + } else { + wr->u.tcpseg.mss = htobe16(0xffff); + cpl = (void *)(wr + 1); + } } /* Checksum offload must be requested for ethofld. */ @@ -5677,7 +5688,7 @@ write_ethofld_wr(struct cxgbe_snd_tag *cst, struct fw_eth_tx_eo_wr *wr, cpl->len = htobe16(pktlen); cpl->ctrl1 = htobe64(ctrl1); - /* Copy Ethernet, IP & TCP hdrs as immediate data */ + /* Copy Ethernet, IP & TCP/UDP hdrs as immediate data */ p = (uintptr_t)(cpl + 1); m_copydata(m0, 0, immhdrs, (void *)p); -- cgit v1.3 From ee7e6f676e4862bcea2f74b3b41ceaf0b0a40040 Mon Sep 17 00:00:00 2001 From: Gleb Smirnoff Date: Wed, 31 Oct 2018 19:37:11 +0000 Subject: Define QMD_SAVELINK() only for QUEUE_MACRO_DEBUG_TRASH case. Otherwise with QUEUE_MACRO_DEBUG_TRACE compilation fails due to unused variable. --- sys/sys/queue.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'sys') diff --git a/sys/sys/queue.h b/sys/sys/queue.h index 2e961ddc7e08..94fd1ce7b66b 100644 --- a/sys/sys/queue.h +++ b/sys/sys/queue.h @@ -155,19 +155,15 @@ struct qm_trace { #endif /* QUEUE_MACRO_DEBUG_TRACE */ #ifdef QUEUE_MACRO_DEBUG_TRASH +#define QMD_SAVELINK(name, link) void **name = (void *)&(link) #define TRASHIT(x) do {(x) = (void *)-1;} while (0) #define QMD_IS_TRASHED(x) ((x) == (void *)(intptr_t)-1) #else /* !QUEUE_MACRO_DEBUG_TRASH */ +#define QMD_SAVELINK(name, link) #define TRASHIT(x) #define QMD_IS_TRASHED(x) 0 #endif /* QUEUE_MACRO_DEBUG_TRASH */ -#if defined(QUEUE_MACRO_DEBUG_TRACE) || defined(QUEUE_MACRO_DEBUG_TRASH) -#define QMD_SAVELINK(name, link) void **name = (void *)&(link) -#else /* !QUEUE_MACRO_DEBUG_TRACE && !QUEUE_MACRO_DEBUG_TRASH */ -#define QMD_SAVELINK(name, link) -#endif /* QUEUE_MACRO_DEBUG_TRACE || QUEUE_MACRO_DEBUG_TRASH */ - #ifdef __cplusplus /* * In C++ there can be structure lists and class lists: -- cgit v1.3 From be352d20d5198f55ed91c3805d5e7272b3f636a7 Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Wed, 31 Oct 2018 22:38:19 +0000 Subject: Compile in VERBOSE_SYSINIT support by default, remain silent by default The loader tunable 'debug.verbose_sysinit' may be used to toggle verbosity. This is added to the debugging section of these kernconfs to be turned off in stable branches for clarity of intent. MFC after: never --- sys/amd64/conf/GENERIC | 1 + sys/amd64/conf/MINIMAL | 1 + sys/arm/conf/std.arm | 2 +- sys/arm/conf/std.armv6 | 2 +- sys/arm/conf/std.armv7 | 2 +- sys/arm64/conf/GENERIC | 1 + sys/i386/conf/GENERIC | 1 + sys/powerpc/conf/GENERIC | 1 + sys/powerpc/conf/GENERIC64 | 1 + sys/riscv/conf/GENERIC | 2 +- sys/sparc64/conf/GENERIC | 1 + 11 files changed, 11 insertions(+), 4 deletions(-) (limited to 'sys') diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC index d3cdef23bbc9..f74db37a283e 100644 --- a/sys/amd64/conf/GENERIC +++ b/sys/amd64/conf/GENERIC @@ -99,6 +99,7 @@ options INVARIANT_SUPPORT # Extra sanity checks of internal structures, require options WITNESS # Enable checks to detect deadlocks and cycles options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones +options VERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off by default # Kernel dump features. options EKCD # Support for encrypted kernel dumps diff --git a/sys/amd64/conf/MINIMAL b/sys/amd64/conf/MINIMAL index 011400f3967f..4a2bb7a0920b 100644 --- a/sys/amd64/conf/MINIMAL +++ b/sys/amd64/conf/MINIMAL @@ -91,6 +91,7 @@ options INVARIANT_SUPPORT # Extra sanity checks of internal structures, require options WITNESS # Enable checks to detect deadlocks and cycles options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones +options VERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off by default # Make an SMP-capable kernel by default options SMP # Symmetric MultiProcessor Kernel diff --git a/sys/arm/conf/std.arm b/sys/arm/conf/std.arm index d69f06c579f4..7ce4823b486f 100644 --- a/sys/arm/conf/std.arm +++ b/sys/arm/conf/std.arm @@ -20,6 +20,7 @@ options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed #options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones options ALT_BREAK_TO_DEBUGGER # Enter debugger on keyboard escape sequence options USB_DEBUG # Enable usb debug support code +options VERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off by default # Optional extras, never enabled by default: #options BOOTVERBOSE @@ -31,7 +32,6 @@ options USB_DEBUG # Enable usb debug support code #options KTR_VERBOSE=0 #options USB_REQ_DEBUG #options USB_VERBOSE -#options VERBOSE_SYSINIT # Enable verbose sysinit messages diff --git a/sys/arm/conf/std.armv6 b/sys/arm/conf/std.armv6 index 52685a9b13bf..742dbc42bf49 100644 --- a/sys/arm/conf/std.armv6 +++ b/sys/arm/conf/std.armv6 @@ -70,6 +70,7 @@ options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones options ALT_BREAK_TO_DEBUGGER # Enter debugger on keyboard escape sequence options USB_DEBUG # Enable usb debug support code +options VERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off by default # Optional extras, never enabled by default: #options BOOTVERBOSE @@ -81,5 +82,4 @@ options USB_DEBUG # Enable usb debug support code #options KTR_VERBOSE=0 #options USB_REQ_DEBUG #options USB_VERBOSE -#options VERBOSE_SYSINIT # Enable verbose sysinit messages diff --git a/sys/arm/conf/std.armv7 b/sys/arm/conf/std.armv7 index c3ab6852e615..428b7b144006 100644 --- a/sys/arm/conf/std.armv7 +++ b/sys/arm/conf/std.armv7 @@ -70,6 +70,7 @@ options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones options ALT_BREAK_TO_DEBUGGER # Enter debugger on keyboard escape sequence options USB_DEBUG # Enable usb debug support code +options VERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off by default # Optional extras, never enabled by default: #options BOOTVERBOSE @@ -81,4 +82,3 @@ options USB_DEBUG # Enable usb debug support code #options KTR_VERBOSE=0 #options USB_REQ_DEBUG #options USB_VERBOSE -#options VERBOSE_SYSINIT # Enable verbose sysinit messages diff --git a/sys/arm64/conf/GENERIC b/sys/arm64/conf/GENERIC index 92e7c9347ac2..ee4ab292928f 100644 --- a/sys/arm64/conf/GENERIC +++ b/sys/arm64/conf/GENERIC @@ -91,6 +91,7 @@ options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones options ALT_BREAK_TO_DEBUGGER # Enter debugger on keyboard escape sequence options USB_DEBUG # enable debug msgs +options VERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off by default # Kernel dump features. options EKCD # Support for encrypted kernel dumps diff --git a/sys/i386/conf/GENERIC b/sys/i386/conf/GENERIC index dd0abcf9adaf..e3f0a62d7e00 100644 --- a/sys/i386/conf/GENERIC +++ b/sys/i386/conf/GENERIC @@ -93,6 +93,7 @@ options INVARIANT_SUPPORT # Extra sanity checks of internal structures, require options WITNESS # Enable checks to detect deadlocks and cycles options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones +options VERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off by default # Kernel dump features. options EKCD # Support for encrypted kernel dumps diff --git a/sys/powerpc/conf/GENERIC b/sys/powerpc/conf/GENERIC index 820bee6c32ee..7750e9ec910c 100644 --- a/sys/powerpc/conf/GENERIC +++ b/sys/powerpc/conf/GENERIC @@ -98,6 +98,7 @@ options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required options WITNESS #Enable checks to detect deadlocks and cycles options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones +options VERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off by default # Kernel dump features. options EKCD # Support for encrypted kernel dumps diff --git a/sys/powerpc/conf/GENERIC64 b/sys/powerpc/conf/GENERIC64 index 5411ac9acc1e..fd24daff91e4 100644 --- a/sys/powerpc/conf/GENERIC64 +++ b/sys/powerpc/conf/GENERIC64 @@ -95,6 +95,7 @@ options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required options WITNESS #Enable checks to detect deadlocks and cycles options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones +options VERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off by default # Kernel dump features. options EKCD # Support for encrypted kernel dumps diff --git a/sys/riscv/conf/GENERIC b/sys/riscv/conf/GENERIC index 389a0a13cb5e..20e12dacc42f 100644 --- a/sys/riscv/conf/GENERIC +++ b/sys/riscv/conf/GENERIC @@ -124,7 +124,7 @@ options INVARIANT_SUPPORT # Extra sanity checks of internal structures, require # options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones # options EARLY_PRINTF -# options VERBOSE_SYSINIT +options VERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off by default # Kernel dump features. options ZSTDIO # zstd-compressed kernel and user dumps diff --git a/sys/sparc64/conf/GENERIC b/sys/sparc64/conf/GENERIC index d3693acec65a..c1adc072c5a7 100644 --- a/sys/sparc64/conf/GENERIC +++ b/sys/sparc64/conf/GENERIC @@ -88,6 +88,7 @@ options INVARIANT_SUPPORT # Extra sanity checks of internal structures, require options WITNESS # Enable checks to detect deadlocks and cycles options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones +options VERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off by default # Kernel dump features. options EKCD # Support for encrypted kernel dumps -- cgit v1.3 From 90ba2725c1de34461d5f797d4cfc275f663a3d55 Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Wed, 31 Oct 2018 22:55:43 +0000 Subject: i386/MINIMAL: VERBOSE_SYSINIT=0 for consistency MFC after: never --- sys/i386/conf/MINIMAL | 1 + 1 file changed, 1 insertion(+) (limited to 'sys') diff --git a/sys/i386/conf/MINIMAL b/sys/i386/conf/MINIMAL index 1f5647798d9c..60869f93e804 100644 --- a/sys/i386/conf/MINIMAL +++ b/sys/i386/conf/MINIMAL @@ -91,6 +91,7 @@ options INVARIANT_SUPPORT # Extra sanity checks of internal structures, require options WITNESS # Enable checks to detect deadlocks and cycles options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones +options VERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off by default # Make an SMP-capable kernel by default options SMP # Symmetric MultiProcessor Kernel -- cgit v1.3 From 6bc6a5428038af19400f8eec7b7dc5c4aa00ddc5 Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Wed, 31 Oct 2018 23:17:00 +0000 Subject: Add pci_early function to detect Intel stolen memory. On some Intel devices BIOS does not properly reserve memory (called "stolen memory") for the GPU. If the stolen memory is claimed by the OS, functions that depend on stolen memory (like frame buffer compression) can't be used. A function called pci_early_quirks that is called before the virtual memory system is started was added. In Linux, this PCI early quirks function iterates through all PCI slots to check for any device that require quirks. While this more generic solution is preferable I only ported the Intel graphics specific parts because I think my implementation would be too similar to Linux GPL'd solution after looking at the Linux code too much. The code regarding Intel graphics stolen memory was ported from Linux. In the case of Intel graphics stolen memory this pci_early_quirks will read the stolen memory base and size from north bridge registers. The values are stored in global variables that is later read by linuxkpi_gplv2. Linuxkpi stores these values in a Linux-specific structure that is read by the drm driver. Relevant linuxkpi code is here: https://github.com/FreeBSDDesktop/kms-drm/blob/drm-v4.16/linuxkpi/gplv2/src/linux_compat.c#L37 For now, only amd64 arch is suppor ted since that is the only arch supported by the new drm drivers. I was told that Intel GPUs are always located on 0:2:0 so these values are hard coded for now. Note that the structure and early execution of the detection code is not required in its current form, but we expect that the code will be added shortly which fixes the potential BIOS bugs by reserving the stolen range in phys_avail[]. This must be done as early as possible to avoid conflicts with the potential usage of the memory in kernel. Submitted by: Johannes Lundberg Reviewed by: bwidawsk, imp MFC after: 1 week Differential revision: https://reviews.freebsd.org/D16719 Differential revision: https://reviews.freebsd.org/D17775 --- sys/amd64/amd64/machdep.c | 11 + sys/amd64/include/md_var.h | 4 + sys/conf/files.amd64 | 1 + sys/x86/pci/pci_early_quirks.c | 287 ++++++++++++++++++++++++ sys/x86/pci/pci_early_quirks.h | 479 +++++++++++++++++++++++++++++++++++++++++ 5 files changed, 782 insertions(+) create mode 100644 sys/x86/pci/pci_early_quirks.c create mode 100644 sys/x86/pci/pci_early_quirks.h (limited to 'sys') diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index a743d8c63e1b..6e36ae975239 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -317,6 +317,12 @@ cpu_startup(dummy) printf("avail memory = %ju (%ju MB)\n", ptoa((uintmax_t)vm_free_count()), ptoa((uintmax_t)vm_free_count()) / 1048576); +#ifdef DEV_PCI + if (bootverbose && intel_graphics_stolen_base != 0) + printf("intel stolen mem: base %#jx size %ju MB\n", + (uintmax_t)intel_graphics_stolen_base, + (uintmax_t)intel_graphics_stolen_size / 1024 / 1024); +#endif /* * Set up buffers, so they can be used to read disk labels. @@ -1792,6 +1798,11 @@ hammer_time(u_int64_t modulep, u_int64_t physfree) /* now running on new page tables, configured,and u/iom is accessible */ +#ifdef DEV_PCI + /* This call might adjust phys_avail[]. */ + pci_early_quirks(); +#endif + if (late_console) cninit(); diff --git a/sys/amd64/include/md_var.h b/sys/amd64/include/md_var.h index 5296517595f0..cd8036e25a29 100644 --- a/sys/amd64/include/md_var.h +++ b/sys/amd64/include/md_var.h @@ -43,6 +43,9 @@ extern int hw_ssb_disable; extern int nmi_flush_l1d_sw; extern int syscall_ret_l1d_flush_mode; +extern vm_paddr_t intel_graphics_stolen_base; +extern vm_paddr_t intel_graphics_stolen_size; + /* * The file "conf/ldscript.amd64" defines the symbol "kernphys". Its * value is the physical address at which the kernel is loaded. @@ -79,5 +82,6 @@ void setidt(int idx, alias_for_inthand_t *func, int typ, int dpl, int ist); void sse2_pagezero(void *addr); struct savefpu *get_pcb_user_save_td(struct thread *td); struct savefpu *get_pcb_user_save_pcb(struct pcb *pcb); +void pci_early_quirks(void); #endif /* !_MACHINE_MD_VAR_H_ */ diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64 index 097c3ff26eee..8c09cf6617a0 100644 --- a/sys/conf/files.amd64 +++ b/sys/conf/files.amd64 @@ -721,6 +721,7 @@ x86/isa/isa_dma.c standard x86/isa/nmi.c standard x86/isa/orm.c optional isa x86/pci/pci_bus.c optional pci +x86/pci/pci_early_quirks.c optional pci x86/pci/qpi.c optional pci x86/x86/autoconf.c standard x86/x86/bus_machdep.c standard diff --git a/sys/x86/pci/pci_early_quirks.c b/sys/x86/pci/pci_early_quirks.c new file mode 100644 index 000000000000..29788cdd19d4 --- /dev/null +++ b/sys/x86/pci/pci_early_quirks.c @@ -0,0 +1,287 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018 Johannes Lundberg + * + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +/* XXX: enable this once the KPI is available */ +/* #include */ +#include +#include +#include +#include + +#include + +#define MiB(v) ((unsigned long)(v) << 20) + +struct pci_device_id { + uint32_t vendor; + uint32_t device; + const struct intel_stolen_ops *data; +}; + +/* + * These global variables are read by LinuxKPI. + * LinuxKPI provide this information to the i915 driver. + */ +vm_paddr_t intel_graphics_stolen_base = 0; +vm_paddr_t intel_graphics_stolen_size = 0; + +/* + * Intel early quirks functions + */ +static vm_paddr_t +intel_stolen_base_gen3(int bus, int slot, int func) +{ + uint32_t ctrl; + vm_paddr_t val; + + ctrl = pci_cfgregread(bus, slot, func, INTEL_BSM, 4); + val = ctrl & INTEL_BSM_MASK; + return (val); +} + +static vm_paddr_t +intel_stolen_size_gen3(int bus, int slot, int func) +{ + uint32_t ctrl; + vm_paddr_t val; + + ctrl = pci_cfgregread(0, 0, 0, I830_GMCH_CTRL, 2); + val = ctrl & I855_GMCH_GMS_MASK; + + switch (val) { + case I855_GMCH_GMS_STOLEN_1M: + return (MiB(1)); + case I855_GMCH_GMS_STOLEN_4M: + return (MiB(4)); + case I855_GMCH_GMS_STOLEN_8M: + return (MiB(8)); + case I855_GMCH_GMS_STOLEN_16M: + return (MiB(16)); + case I855_GMCH_GMS_STOLEN_32M: + return (MiB(32)); + case I915_GMCH_GMS_STOLEN_48M: + return (MiB(48)); + case I915_GMCH_GMS_STOLEN_64M: + return (MiB(64)); + case G33_GMCH_GMS_STOLEN_128M: + return (MiB(128)); + case G33_GMCH_GMS_STOLEN_256M: + return (MiB(256)); + case INTEL_GMCH_GMS_STOLEN_96M: + return (MiB(96)); + case INTEL_GMCH_GMS_STOLEN_160M: + return (MiB(160)); + case INTEL_GMCH_GMS_STOLEN_224M: + return (MiB(224)); + case INTEL_GMCH_GMS_STOLEN_352M: + return (MiB(352)); + } + return (0); +} + +static vm_paddr_t +intel_stolen_size_gen6(int bus, int slot, int func) +{ + uint32_t ctrl; + vm_paddr_t val; + + ctrl = pci_cfgregread(bus, slot, func, SNB_GMCH_CTRL, 2); + val = (ctrl >> SNB_GMCH_GMS_SHIFT) & SNB_GMCH_GMS_MASK; + return (val * MiB(32)); +} + +static vm_paddr_t +intel_stolen_size_gen8(int bus, int slot, int func) +{ + uint32_t ctrl; + vm_paddr_t val; + + ctrl = pci_cfgregread(bus, slot, func, SNB_GMCH_CTRL, 2); + val = (ctrl >> BDW_GMCH_GMS_SHIFT) & BDW_GMCH_GMS_MASK; + return (val * MiB(32)); +} + +static vm_paddr_t +intel_stolen_size_chv(int bus, int slot, int func) +{ + uint32_t ctrl; + vm_paddr_t val; + + ctrl = pci_cfgregread(bus, slot, func, SNB_GMCH_CTRL, 2); + val = (ctrl >> SNB_GMCH_GMS_SHIFT) & SNB_GMCH_GMS_MASK; + + /* + * 0x0 to 0x10: 32MB increments starting at 0MB + * 0x11 to 0x16: 4MB increments starting at 8MB + * 0x17 to 0x1d: 4MB increments start at 36MB + */ + if (val < 0x11) + return (val * MiB(32)); + else if (val < 0x17) + return ((val - 0x11) * MiB(4) + MiB(8)); + else + return ((val - 0x17) * MiB(4) + MiB(36)); +} + +static vm_paddr_t +intel_stolen_size_gen9(int bus, int slot, int func) +{ + uint32_t ctrl; + vm_paddr_t val; + + ctrl = pci_cfgregread(bus, slot, func, SNB_GMCH_CTRL, 2); + val = (ctrl >> BDW_GMCH_GMS_SHIFT) & BDW_GMCH_GMS_MASK; + + /* 0x0 to 0xEF: 32MB increments starting at 0MB */ + /* 0xF0 to 0xFE: 4MB increments starting at 4MB */ + if (val < 0xF0) + return (val * MiB(32)); + return ((val - 0xF0) * MiB(4) + MiB(4)); +} + +struct intel_stolen_ops { + vm_paddr_t (*base)(int bus, int slot, int func); + vm_paddr_t (*size)(int bus, int slot, int func); +}; + +static const struct intel_stolen_ops intel_stolen_ops_gen3 = { + .base = intel_stolen_base_gen3, + .size = intel_stolen_size_gen3, +}; + +static const struct intel_stolen_ops intel_stolen_ops_gen6 = { + .base = intel_stolen_base_gen3, + .size = intel_stolen_size_gen6, +}; + +static const struct intel_stolen_ops intel_stolen_ops_gen8 = { + .base = intel_stolen_base_gen3, + .size = intel_stolen_size_gen8, +}; + +static const struct intel_stolen_ops intel_stolen_ops_gen9 = { + .base = intel_stolen_base_gen3, + .size = intel_stolen_size_gen9, +}; + +static const struct intel_stolen_ops intel_stolen_ops_chv = { + .base = intel_stolen_base_gen3, + .size = intel_stolen_size_chv, +}; + +static const struct pci_device_id intel_ids[] = { + INTEL_I915G_IDS(&intel_stolen_ops_gen3), + INTEL_I915GM_IDS(&intel_stolen_ops_gen3), + INTEL_I945G_IDS(&intel_stolen_ops_gen3), + INTEL_I945GM_IDS(&intel_stolen_ops_gen3), + INTEL_VLV_IDS(&intel_stolen_ops_gen6), + INTEL_PINEVIEW_IDS(&intel_stolen_ops_gen3), + INTEL_I965G_IDS(&intel_stolen_ops_gen3), + INTEL_G33_IDS(&intel_stolen_ops_gen3), + INTEL_I965GM_IDS(&intel_stolen_ops_gen3), + INTEL_GM45_IDS(&intel_stolen_ops_gen3), + INTEL_G45_IDS(&intel_stolen_ops_gen3), + INTEL_IRONLAKE_D_IDS(&intel_stolen_ops_gen3), + INTEL_IRONLAKE_M_IDS(&intel_stolen_ops_gen3), + INTEL_SNB_D_IDS(&intel_stolen_ops_gen6), + INTEL_SNB_M_IDS(&intel_stolen_ops_gen6), + INTEL_IVB_M_IDS(&intel_stolen_ops_gen6), + INTEL_IVB_D_IDS(&intel_stolen_ops_gen6), + INTEL_HSW_IDS(&intel_stolen_ops_gen6), + INTEL_BDW_IDS(&intel_stolen_ops_gen8), + INTEL_CHV_IDS(&intel_stolen_ops_chv), + INTEL_SKL_IDS(&intel_stolen_ops_gen9), + INTEL_BXT_IDS(&intel_stolen_ops_gen9), + INTEL_KBL_IDS(&intel_stolen_ops_gen9), + INTEL_CFL_IDS(&intel_stolen_ops_gen9), + INTEL_GLK_IDS(&intel_stolen_ops_gen9), + INTEL_CNL_IDS(&intel_stolen_ops_gen9), +}; + +/* + * Buggy BIOS don't reserve memory for the GPU properly and the OS + * can claim it before the GPU driver is loaded. This function will + * check the registers for base and size of this memory and reserve + * it for the GPU driver. + * gen3 (2004) and newer devices are supported. Support for older hw + * can be ported from Linux if needed. + */ +static void +intel_graphics_stolen(void) +{ + const struct intel_stolen_ops *ops; + uint32_t vendor, device, class; + int i; + + /* XXX: Scan bus instead of assuming 0:2:0? */ + const int bus = 0; + const int slot = 2; + const int func = 0; + + if (pci_cfgregopen() == 0) + return; + + vendor = pci_cfgregread(bus, slot, func, PCIR_VENDOR, 2); + if (vendor != PCI_VENDOR_INTEL) + return; + + class = pci_cfgregread(bus, slot, func, PCIR_SUBCLASS, 2); + if (class != PCI_CLASS_VGA) + return; + + device = pci_cfgregread(bus, slot, func, PCIR_DEVICE, 2); + if (device == 0xFFFF) + return; + + for (i = 0; i < nitems(intel_ids); i++) { + if (intel_ids[i].device != device) + continue; + ops = intel_ids[i].data; + intel_graphics_stolen_base = ops->base(bus, slot, func); + intel_graphics_stolen_size = ops->size(bus, slot, func); + break; + } + + /* XXX: enable this once the KPI is available */ + /* phys_avail_reserve(intel_graphics_stolen_base, */ + /* intel_graphics_stolen_base + intel_graphics_stolen_size); */ +} + +void +pci_early_quirks(void) +{ + + intel_graphics_stolen(); +} diff --git a/sys/x86/pci/pci_early_quirks.h b/sys/x86/pci/pci_early_quirks.h new file mode 100644 index 000000000000..ed5ae0767a48 --- /dev/null +++ b/sys/x86/pci/pci_early_quirks.h @@ -0,0 +1,479 @@ +/*- + * Copyright (c) 2018 Johannes Lundberg + * + * 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$ + */ + +#ifndef _PCI_EARLY_QUIRKS_H_ +#define _PCI_EARLY_QUIRKS_H_ + +/* + * TODO: + * Make a common drm/gpu header that both base and out of tree + * drm modules can use. + */ + +#define PCI_ANY_ID (-1) +#define PCI_VENDOR_INTEL 0x8086 +#define PCI_CLASS_VGA 0x0300 + +#define INTEL_BSM 0x5c +#define INTEL_BSM_MASK (-(1u << 20)) + +#define INTEL_GMCH_CTRL 0x52 +#define INTEL_GMCH_VGA_DISABLE (1 << 1) +#define SNB_GMCH_CTRL 0x50 +#define SNB_GMCH_GGMS_SHIFT 8 /* GTT Graphics Memory Size */ +#define SNB_GMCH_GGMS_MASK 0x3 +#define SNB_GMCH_GMS_SHIFT 3 /* Graphics Mode Select */ +#define SNB_GMCH_GMS_MASK 0x1f +#define BDW_GMCH_GGMS_SHIFT 6 +#define BDW_GMCH_GGMS_MASK 0x3 +#define BDW_GMCH_GMS_SHIFT 8 +#define BDW_GMCH_GMS_MASK 0xff + +#define I830_GMCH_CTRL 0x52 +#define I830_GMCH_GMS_MASK 0x70 +#define I830_GMCH_GMS_LOCAL 0x10 +#define I830_GMCH_GMS_STOLEN_512 0x20 +#define I830_GMCH_GMS_STOLEN_1024 0x30 +#define I830_GMCH_GMS_STOLEN_8192 0x40 + +#define I855_GMCH_GMS_MASK 0xF0 +#define I855_GMCH_GMS_STOLEN_0M 0x0 +#define I855_GMCH_GMS_STOLEN_1M (0x1 << 4) +#define I855_GMCH_GMS_STOLEN_4M (0x2 << 4) +#define I855_GMCH_GMS_STOLEN_8M (0x3 << 4) +#define I855_GMCH_GMS_STOLEN_16M (0x4 << 4) +#define I855_GMCH_GMS_STOLEN_32M (0x5 << 4) +#define I915_GMCH_GMS_STOLEN_48M (0x6 << 4) +#define I915_GMCH_GMS_STOLEN_64M (0x7 << 4) +#define G33_GMCH_GMS_STOLEN_128M (0x8 << 4) +#define G33_GMCH_GMS_STOLEN_256M (0x9 << 4) +#define INTEL_GMCH_GMS_STOLEN_96M (0xa << 4) +#define INTEL_GMCH_GMS_STOLEN_160M (0xb << 4) +#define INTEL_GMCH_GMS_STOLEN_224M (0xc << 4) +#define INTEL_GMCH_GMS_STOLEN_352M (0xd << 4) + +#define INTEL_VGA_DEVICE(id, info) { \ + 0x8086, id, \ + info } + +#define INTEL_I810_IDS(info) \ + INTEL_VGA_DEVICE(0x7121, info), /* I810 */ \ + INTEL_VGA_DEVICE(0x7123, info), /* I810_DC100 */ \ + INTEL_VGA_DEVICE(0x7125, info) /* I810_E */ + +#define INTEL_I815_IDS(info) \ + INTEL_VGA_DEVICE(0x1132, info) /* I815*/ + +#define INTEL_I830_IDS(info) \ + INTEL_VGA_DEVICE(0x3577, info) + +#define INTEL_I845G_IDS(info) \ + INTEL_VGA_DEVICE(0x2562, info) + +#define INTEL_I85X_IDS(info) \ + INTEL_VGA_DEVICE(0x3582, info), /* I855_GM */ \ + INTEL_VGA_DEVICE(0x358e, info) + +#define INTEL_I865G_IDS(info) \ + INTEL_VGA_DEVICE(0x2572, info) /* I865_G */ + +#define INTEL_I915G_IDS(info) \ + INTEL_VGA_DEVICE(0x2582, info), /* I915_G */ \ + INTEL_VGA_DEVICE(0x258a, info) /* E7221_G */ + +#define INTEL_I915GM_IDS(info) \ + INTEL_VGA_DEVICE(0x2592, info) /* I915_GM */ + +#define INTEL_I945G_IDS(info) \ + INTEL_VGA_DEVICE(0x2772, info) /* I945_G */ + +#define INTEL_I945GM_IDS(info) \ + INTEL_VGA_DEVICE(0x27a2, info), /* I945_GM */ \ + INTEL_VGA_DEVICE(0x27ae, info) /* I945_GME */ + +#define INTEL_I965G_IDS(info) \ + INTEL_VGA_DEVICE(0x2972, info), /* I946_GZ */ \ + INTEL_VGA_DEVICE(0x2982, info), /* G35_G */ \ + INTEL_VGA_DEVICE(0x2992, info), /* I965_Q */ \ + INTEL_VGA_DEVICE(0x29a2, info) /* I965_G */ + +#define INTEL_G33_IDS(info) \ + INTEL_VGA_DEVICE(0x29b2, info), /* Q35_G */ \ + INTEL_VGA_DEVICE(0x29c2, info), /* G33_G */ \ + INTEL_VGA_DEVICE(0x29d2, info) /* Q33_G */ + +#define INTEL_I965GM_IDS(info) \ + INTEL_VGA_DEVICE(0x2a02, info), /* I965_GM */ \ + INTEL_VGA_DEVICE(0x2a12, info) /* I965_GME */ + +#define INTEL_GM45_IDS(info) \ + INTEL_VGA_DEVICE(0x2a42, info) /* GM45_G */ + +#define INTEL_G45_IDS(info) \ + INTEL_VGA_DEVICE(0x2e02, info), /* IGD_E_G */ \ + INTEL_VGA_DEVICE(0x2e12, info), /* Q45_G */ \ + INTEL_VGA_DEVICE(0x2e22, info), /* G45_G */ \ + INTEL_VGA_DEVICE(0x2e32, info), /* G41_G */ \ + INTEL_VGA_DEVICE(0x2e42, info), /* B43_G */ \ + INTEL_VGA_DEVICE(0x2e92, info) /* B43_G.1 */ + +#define INTEL_PINEVIEW_IDS(info) \ + INTEL_VGA_DEVICE(0xa001, info), \ + INTEL_VGA_DEVICE(0xa011, info) + +#define INTEL_IRONLAKE_D_IDS(info) \ + INTEL_VGA_DEVICE(0x0042, info) + +#define INTEL_IRONLAKE_M_IDS(info) \ + INTEL_VGA_DEVICE(0x0046, info) + +#define INTEL_SNB_D_GT1_IDS(info) \ + INTEL_VGA_DEVICE(0x0102, info), \ + INTEL_VGA_DEVICE(0x010A, info) + +#define INTEL_SNB_D_GT2_IDS(info) \ + INTEL_VGA_DEVICE(0x0112, info), \ + INTEL_VGA_DEVICE(0x0122, info) + +#define INTEL_SNB_D_IDS(info) \ + INTEL_SNB_D_GT1_IDS(info), \ + INTEL_SNB_D_GT2_IDS(info) + +#define INTEL_SNB_M_GT1_IDS(info) \ + INTEL_VGA_DEVICE(0x0106, info) + +#define INTEL_SNB_M_GT2_IDS(info) \ + INTEL_VGA_DEVICE(0x0116, info), \ + INTEL_VGA_DEVICE(0x0126, info) + +#define INTEL_SNB_M_IDS(info) \ + INTEL_SNB_M_GT1_IDS(info), \ + INTEL_SNB_M_GT2_IDS(info) + +#define INTEL_IVB_M_GT1_IDS(info) \ + INTEL_VGA_DEVICE(0x0156, info) /* GT1 mobile */ + +#define INTEL_IVB_M_GT2_IDS(info) \ + INTEL_VGA_DEVICE(0x0166, info) /* GT2 mobile */ + +#define INTEL_IVB_M_IDS(info) \ + INTEL_IVB_M_GT1_IDS(info), \ + INTEL_IVB_M_GT2_IDS(info) + +#define INTEL_IVB_D_GT1_IDS(info) \ + INTEL_VGA_DEVICE(0x0152, info), /* GT1 desktop */ \ + INTEL_VGA_DEVICE(0x015a, info) /* GT1 server */ + +#define INTEL_IVB_D_GT2_IDS(info) \ + INTEL_VGA_DEVICE(0x0162, info), /* GT2 desktop */ \ + INTEL_VGA_DEVICE(0x016a, info) /* GT2 server */ + +#define INTEL_IVB_D_IDS(info) \ + INTEL_IVB_D_GT1_IDS(info), \ + INTEL_IVB_D_GT2_IDS(info) + +#define INTEL_IVB_Q_IDS(info) \ + INTEL_QUANTA_VGA_DEVICE(info) /* Quanta transcode */ + +#define INTEL_HSW_GT1_IDS(info) \ + INTEL_VGA_DEVICE(0x0402, info), /* GT1 desktop */ \ + INTEL_VGA_DEVICE(0x040a, info), /* GT1 server */ \ + INTEL_VGA_DEVICE(0x040B, info), /* GT1 reserved */ \ + INTEL_VGA_DEVICE(0x040E, info), /* GT1 reserved */ \ + INTEL_VGA_DEVICE(0x0C02, info), /* SDV GT1 desktop */ \ + INTEL_VGA_DEVICE(0x0C0A, info), /* SDV GT1 server */ \ + INTEL_VGA_DEVICE(0x0C0B, info), /* SDV GT1 reserved */ \ + INTEL_VGA_DEVICE(0x0C0E, info), /* SDV GT1 reserved */ \ + INTEL_VGA_DEVICE(0x0A02, info), /* ULT GT1 desktop */ \ + INTEL_VGA_DEVICE(0x0A0A, info), /* ULT GT1 server */ \ + INTEL_VGA_DEVICE(0x0A0B, info), /* ULT GT1 reserved */ \ + INTEL_VGA_DEVICE(0x0D02, info), /* CRW GT1 desktop */ \ + INTEL_VGA_DEVICE(0x0D0A, info), /* CRW GT1 server */ \ + INTEL_VGA_DEVICE(0x0D0B, info), /* CRW GT1 reserved */ \ + INTEL_VGA_DEVICE(0x0D0E, info), /* CRW GT1 reserved */ \ + INTEL_VGA_DEVICE(0x0406, info), /* GT1 mobile */ \ + INTEL_VGA_DEVICE(0x0C06, info), /* SDV GT1 mobile */ \ + INTEL_VGA_DEVICE(0x0A06, info), /* ULT GT1 mobile */ \ + INTEL_VGA_DEVICE(0x0A0E, info), /* ULX GT1 mobile */ \ + INTEL_VGA_DEVICE(0x0D06, info) /* CRW GT1 mobile */ + +#define INTEL_HSW_GT2_IDS(info) \ + INTEL_VGA_DEVICE(0x0412, info), /* GT2 desktop */ \ + INTEL_VGA_DEVICE(0x041a, info), /* GT2 server */ \ + INTEL_VGA_DEVICE(0x041B, info), /* GT2 reserved */ \ + INTEL_VGA_DEVICE(0x041E, info), /* GT2 reserved */ \ + INTEL_VGA_DEVICE(0x0C12, info), /* SDV GT2 desktop */ \ + INTEL_VGA_DEVICE(0x0C1A, info), /* SDV GT2 server */ \ + INTEL_VGA_DEVICE(0x0C1B, info), /* SDV GT2 reserved */ \ + INTEL_VGA_DEVICE(0x0C1E, info), /* SDV GT2 reserved */ \ + INTEL_VGA_DEVICE(0x0A12, info), /* ULT GT2 desktop */ \ + INTEL_VGA_DEVICE(0x0A1A, info), /* ULT GT2 server */ \ + INTEL_VGA_DEVICE(0x0A1B, info), /* ULT GT2 reserved */ \ + INTEL_VGA_DEVICE(0x0D12, info), /* CRW GT2 desktop */ \ + INTEL_VGA_DEVICE(0x0D1A, info), /* CRW GT2 server */ \ + INTEL_VGA_DEVICE(0x0D1B, info), /* CRW GT2 reserved */ \ + INTEL_VGA_DEVICE(0x0D1E, info), /* CRW GT2 reserved */ \ + INTEL_VGA_DEVICE(0x0416, info), /* GT2 mobile */ \ + INTEL_VGA_DEVICE(0x0426, info), /* GT2 mobile */ \ + INTEL_VGA_DEVICE(0x0C16, info), /* SDV GT2 mobile */ \ + INTEL_VGA_DEVICE(0x0A16, info), /* ULT GT2 mobile */ \ + INTEL_VGA_DEVICE(0x0A1E, info), /* ULX GT2 mobile */ \ + INTEL_VGA_DEVICE(0x0D16, info) /* CRW GT2 mobile */ + +#define INTEL_HSW_GT3_IDS(info) \ + INTEL_VGA_DEVICE(0x0422, info), /* GT3 desktop */ \ + INTEL_VGA_DEVICE(0x042a, info), /* GT3 server */ \ + INTEL_VGA_DEVICE(0x042B, info), /* GT3 reserved */ \ + INTEL_VGA_DEVICE(0x042E, info), /* GT3 reserved */ \ + INTEL_VGA_DEVICE(0x0C22, info), /* SDV GT3 desktop */ \ + INTEL_VGA_DEVICE(0x0C2A, info), /* SDV GT3 server */ \ + INTEL_VGA_DEVICE(0x0C2B, info), /* SDV GT3 reserved */ \ + INTEL_VGA_DEVICE(0x0C2E, info), /* SDV GT3 reserved */ \ + INTEL_VGA_DEVICE(0x0A22, info), /* ULT GT3 desktop */ \ + INTEL_VGA_DEVICE(0x0A2A, info), /* ULT GT3 server */ \ + INTEL_VGA_DEVICE(0x0A2B, info), /* ULT GT3 reserved */ \ + INTEL_VGA_DEVICE(0x0D22, info), /* CRW GT3 desktop */ \ + INTEL_VGA_DEVICE(0x0D2A, info), /* CRW GT3 server */ \ + INTEL_VGA_DEVICE(0x0D2B, info), /* CRW GT3 reserved */ \ + INTEL_VGA_DEVICE(0x0D2E, info), /* CRW GT3 reserved */ \ + INTEL_VGA_DEVICE(0x0C26, info), /* SDV GT3 mobile */ \ + INTEL_VGA_DEVICE(0x0A26, info), /* ULT GT3 mobile */ \ + INTEL_VGA_DEVICE(0x0A2E, info), /* ULT GT3 reserved */ \ + INTEL_VGA_DEVICE(0x0D26, info) /* CRW GT3 mobile */ + +#define INTEL_HSW_IDS(info) \ + INTEL_HSW_GT1_IDS(info), \ + INTEL_HSW_GT2_IDS(info), \ + INTEL_HSW_GT3_IDS(info) + +#define INTEL_VLV_IDS(info) \ + INTEL_VGA_DEVICE(0x0f30, info), \ + INTEL_VGA_DEVICE(0x0f31, info), \ + INTEL_VGA_DEVICE(0x0f32, info), \ + INTEL_VGA_DEVICE(0x0f33, info), \ + INTEL_VGA_DEVICE(0x0157, info), \ + INTEL_VGA_DEVICE(0x0155, info) + +#define INTEL_BDW_GT1_IDS(info) \ + INTEL_VGA_DEVICE(0x1602, info), /* GT1 ULT */ \ + INTEL_VGA_DEVICE(0x1606, info), /* GT1 ULT */ \ + INTEL_VGA_DEVICE(0x160B, info), /* GT1 Iris */ \ + INTEL_VGA_DEVICE(0x160E, info), /* GT1 ULX */ \ + INTEL_VGA_DEVICE(0x160A, info), /* GT1 Server */ \ + INTEL_VGA_DEVICE(0x160D, info) /* GT1 Workstation */ + +#define INTEL_BDW_GT2_IDS(info) \ + INTEL_VGA_DEVICE(0x1612, info), /* GT2 Halo */ \ + INTEL_VGA_DEVICE(0x1616, info), /* GT2 ULT */ \ + INTEL_VGA_DEVICE(0x161B, info), /* GT2 ULT */ \ + INTEL_VGA_DEVICE(0x161E, info), /* GT2 ULX */ \ + INTEL_VGA_DEVICE(0x161A, info), /* GT2 Server */ \ + INTEL_VGA_DEVICE(0x161D, info) /* GT2 Workstation */ + +#define INTEL_BDW_GT3_IDS(info) \ + INTEL_VGA_DEVICE(0x1622, info), /* ULT */ \ + INTEL_VGA_DEVICE(0x1626, info), /* ULT */ \ + INTEL_VGA_DEVICE(0x162B, info), /* Iris */ \ + INTEL_VGA_DEVICE(0x162E, info), /* ULX */\ + INTEL_VGA_DEVICE(0x162A, info), /* Server */ \ + INTEL_VGA_DEVICE(0x162D, info) /* Workstation */ + +#define INTEL_BDW_RSVD_IDS(info) \ + INTEL_VGA_DEVICE(0x1632, info), /* ULT */ \ + INTEL_VGA_DEVICE(0x1636, info), /* ULT */ \ + INTEL_VGA_DEVICE(0x163B, info), /* Iris */ \ + INTEL_VGA_DEVICE(0x163E, info), /* ULX */ \ + INTEL_VGA_DEVICE(0x163A, info), /* Server */ \ + INTEL_VGA_DEVICE(0x163D, info) /* Workstation */ + +#define INTEL_BDW_IDS(info) \ + INTEL_BDW_GT1_IDS(info), \ + INTEL_BDW_GT2_IDS(info), \ + INTEL_BDW_GT3_IDS(info), \ + INTEL_BDW_RSVD_IDS(info) + +#define INTEL_CHV_IDS(info) \ + INTEL_VGA_DEVICE(0x22b0, info), \ + INTEL_VGA_DEVICE(0x22b1, info), \ + INTEL_VGA_DEVICE(0x22b2, info), \ + INTEL_VGA_DEVICE(0x22b3, info) + +#define INTEL_SKL_GT1_IDS(info) \ + INTEL_VGA_DEVICE(0x1906, info), /* ULT GT1 */ \ + INTEL_VGA_DEVICE(0x190E, info), /* ULX GT1 */ \ + INTEL_VGA_DEVICE(0x1902, info), /* DT GT1 */ \ + INTEL_VGA_DEVICE(0x190B, info), /* Halo GT1 */ \ + INTEL_VGA_DEVICE(0x190A, info) /* SRV GT1 */ + +#define INTEL_SKL_GT2_IDS(info) \ + INTEL_VGA_DEVICE(0x1916, info), /* ULT GT2 */ \ + INTEL_VGA_DEVICE(0x1921, info), /* ULT GT2F */ \ + INTEL_VGA_DEVICE(0x191E, info), /* ULX GT2 */ \ + INTEL_VGA_DEVICE(0x1912, info), /* DT GT2 */ \ + INTEL_VGA_DEVICE(0x191B, info), /* Halo GT2 */ \ + INTEL_VGA_DEVICE(0x191A, info), /* SRV GT2 */ \ + INTEL_VGA_DEVICE(0x191D, info) /* WKS GT2 */ + +#define INTEL_SKL_GT3_IDS(info) \ + INTEL_VGA_DEVICE(0x1923, info), /* ULT GT3 */ \ + INTEL_VGA_DEVICE(0x1926, info), /* ULT GT3 */ \ + INTEL_VGA_DEVICE(0x1927, info), /* ULT GT3 */ \ + INTEL_VGA_DEVICE(0x192B, info), /* Halo GT3 */ \ + INTEL_VGA_DEVICE(0x192D, info) /* SRV GT3 */ + +#define INTEL_SKL_GT4_IDS(info) \ + INTEL_VGA_DEVICE(0x1932, info), /* DT GT4 */ \ + INTEL_VGA_DEVICE(0x193B, info), /* Halo GT4 */ \ + INTEL_VGA_DEVICE(0x193D, info), /* WKS GT4 */ \ + INTEL_VGA_DEVICE(0x192A, info), /* SRV GT4 */ \ + INTEL_VGA_DEVICE(0x193A, info) /* SRV GT4e */ + +#define INTEL_SKL_IDS(info) \ + INTEL_SKL_GT1_IDS(info), \ + INTEL_SKL_GT2_IDS(info), \ + INTEL_SKL_GT3_IDS(info), \ + INTEL_SKL_GT4_IDS(info) + +#define INTEL_BXT_IDS(info) \ + INTEL_VGA_DEVICE(0x0A84, info), \ + INTEL_VGA_DEVICE(0x1A84, info), \ + INTEL_VGA_DEVICE(0x1A85, info), \ + INTEL_VGA_DEVICE(0x5A84, info), /* APL HD Graphics 505 */ \ + INTEL_VGA_DEVICE(0x5A85, info) /* APL HD Graphics 500 */ + +#define INTEL_GLK_IDS(info) \ + INTEL_VGA_DEVICE(0x3184, info), \ + INTEL_VGA_DEVICE(0x3185, info) + +#define INTEL_KBL_GT1_IDS(info) \ + INTEL_VGA_DEVICE(0x5913, info), /* ULT GT1.5 */ \ + INTEL_VGA_DEVICE(0x5915, info), /* ULX GT1.5 */ \ + INTEL_VGA_DEVICE(0x5906, info), /* ULT GT1 */ \ + INTEL_VGA_DEVICE(0x590E, info), /* ULX GT1 */ \ + INTEL_VGA_DEVICE(0x5902, info), /* DT GT1 */ \ + INTEL_VGA_DEVICE(0x5908, info), /* Halo GT1 */ \ + INTEL_VGA_DEVICE(0x590B, info), /* Halo GT1 */ \ + INTEL_VGA_DEVICE(0x590A, info) /* SRV GT1 */ + +#define INTEL_KBL_GT2_IDS(info) \ + INTEL_VGA_DEVICE(0x5916, info), /* ULT GT2 */ \ + INTEL_VGA_DEVICE(0x5917, info), /* Mobile GT2 */ \ + INTEL_VGA_DEVICE(0x5921, info), /* ULT GT2F */ \ + INTEL_VGA_DEVICE(0x591E, info), /* ULX GT2 */ \ + INTEL_VGA_DEVICE(0x5912, info), /* DT GT2 */ \ + INTEL_VGA_DEVICE(0x591B, info), /* Halo GT2 */ \ + INTEL_VGA_DEVICE(0x591A, info), /* SRV GT2 */ \ + INTEL_VGA_DEVICE(0x591D, info) /* WKS GT2 */ + +#define INTEL_KBL_GT3_IDS(info) \ + INTEL_VGA_DEVICE(0x5923, info), /* ULT GT3 */ \ + INTEL_VGA_DEVICE(0x5926, info), /* ULT GT3 */ \ + INTEL_VGA_DEVICE(0x5927, info) /* ULT GT3 */ + +#define INTEL_KBL_GT4_IDS(info) \ + INTEL_VGA_DEVICE(0x593B, info) /* Halo GT4 */ + +#define INTEL_KBL_IDS(info) \ + INTEL_KBL_GT1_IDS(info), \ + INTEL_KBL_GT2_IDS(info), \ + INTEL_KBL_GT3_IDS(info), \ + INTEL_KBL_GT4_IDS(info) + +/* CFL S */ +#define INTEL_CFL_S_GT1_IDS(info) \ + INTEL_VGA_DEVICE(0x3E90, info), /* SRV GT1 */ \ + INTEL_VGA_DEVICE(0x3E93, info), /* SRV GT1 */ \ + INTEL_VGA_DEVICE(0x3E99, info) /* SRV GT1 */ + +#define INTEL_CFL_S_GT2_IDS(info) \ + INTEL_VGA_DEVICE(0x3E91, info), /* SRV GT2 */ \ + INTEL_VGA_DEVICE(0x3E92, info), /* SRV GT2 */ \ + INTEL_VGA_DEVICE(0x3E96, info), /* SRV GT2 */ \ + INTEL_VGA_DEVICE(0x3E9A, info) /* SRV GT2 */ + +/* CFL H */ +#define INTEL_CFL_H_GT2_IDS(info) \ + INTEL_VGA_DEVICE(0x3E9B, info), /* Halo GT2 */ \ + INTEL_VGA_DEVICE(0x3E94, info) /* Halo GT2 */ + +/* CFL U GT1 */ +#define INTEL_CFL_U_GT1_IDS(info) \ + INTEL_VGA_DEVICE(0x3EA1, info), \ + INTEL_VGA_DEVICE(0x3EA4, info) + +/* CFL U GT2 */ +#define INTEL_CFL_U_GT2_IDS(info) \ + INTEL_VGA_DEVICE(0x3EA0, info), \ + INTEL_VGA_DEVICE(0x3EA3, info), \ + INTEL_VGA_DEVICE(0x3EA9, info) + +/* CFL U GT3 */ +#define INTEL_CFL_U_GT3_IDS(info) \ + INTEL_VGA_DEVICE(0x3EA2, info), /* ULT GT3 */ \ + INTEL_VGA_DEVICE(0x3EA5, info), /* ULT GT3 */ \ + INTEL_VGA_DEVICE(0x3EA6, info), /* ULT GT3 */ \ + INTEL_VGA_DEVICE(0x3EA7, info), /* ULT GT3 */ \ + INTEL_VGA_DEVICE(0x3EA8, info) /* ULT GT3 */ + +#define INTEL_CFL_IDS(info) \ + INTEL_CFL_S_GT1_IDS(info), \ + INTEL_CFL_S_GT2_IDS(info), \ + INTEL_CFL_H_GT2_IDS(info), \ + INTEL_CFL_U_GT1_IDS(info), \ + INTEL_CFL_U_GT2_IDS(info), \ + INTEL_CFL_U_GT3_IDS(info) + +/* CNL */ +#define INTEL_CNL_IDS(info) \ + INTEL_VGA_DEVICE(0x5A51, info), \ + INTEL_VGA_DEVICE(0x5A59, info), \ + INTEL_VGA_DEVICE(0x5A41, info), \ + INTEL_VGA_DEVICE(0x5A49, info), \ + INTEL_VGA_DEVICE(0x5A52, info), \ + INTEL_VGA_DEVICE(0x5A5A, info), \ + INTEL_VGA_DEVICE(0x5A42, info), \ + INTEL_VGA_DEVICE(0x5A4A, info), \ + INTEL_VGA_DEVICE(0x5A50, info), \ + INTEL_VGA_DEVICE(0x5A40, info), \ + INTEL_VGA_DEVICE(0x5A54, info), \ + INTEL_VGA_DEVICE(0x5A5C, info), \ + INTEL_VGA_DEVICE(0x5A44, info), \ + INTEL_VGA_DEVICE(0x5A4C, info) + +/* ICL */ +#define INTEL_ICL_11_IDS(info) \ + INTEL_VGA_DEVICE(0x8A50, info), \ + INTEL_VGA_DEVICE(0x8A51, info), \ + INTEL_VGA_DEVICE(0x8A5C, info), \ + INTEL_VGA_DEVICE(0x8A5D, info), \ + INTEL_VGA_DEVICE(0x8A52, info), \ + INTEL_VGA_DEVICE(0x8A5A, info), \ + INTEL_VGA_DEVICE(0x8A5B, info), \ + INTEL_VGA_DEVICE(0x8A71, info), \ + INTEL_VGA_DEVICE(0x8A70, info) + +#endif /* _PCI_EARLY_QUIRKS_H_ */ -- cgit v1.3 From e403f9865d830fc7ef2509562872fb9dc6feb325 Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Thu, 1 Nov 2018 10:25:22 +0000 Subject: Use the correct offsets for the trap frame in fork_trampoline. Sponsored by: DARPA, AFRL --- sys/arm64/arm64/swtch.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys') diff --git a/sys/arm64/arm64/swtch.S b/sys/arm64/arm64/swtch.S index 4c2c3aca5833..d9921f7e9528 100644 --- a/sys/arm64/arm64/swtch.S +++ b/sys/arm64/arm64/swtch.S @@ -236,12 +236,12 @@ ENTRY(fork_trampoline) msr daifset, #2 /* Restore sp and lr */ - ldp x0, x1, [sp] + ldp x0, x1, [sp, #TF_SP] msr sp_el0, x0 mov lr, x1 /* Restore elr and spsr */ - ldp x0, x1, [sp, #16] + ldp x0, x1, [sp, #TF_ELR] msr elr_el1, x0 msr spsr_el1, x1 -- cgit v1.3 From 099ab39f440ba1a50052e701e10cec187816b0e3 Mon Sep 17 00:00:00 2001 From: Michael Tuexen Date: Thu, 1 Nov 2018 11:35:28 +0000 Subject: Improve a comment to refer to the actual sections in the TCP specification for the comparisons made. Thanks to lstewart@ for the suggestion. MFC after: 4 weeks Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D17595 --- sys/netinet/tcp_syncache.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'sys') diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index 4480ed43c238..8898c4b76961 100644 --- a/sys/netinet/tcp_syncache.c +++ b/sys/netinet/tcp_syncache.c @@ -581,15 +581,28 @@ syncache_chkrst(struct in_conninfo *inc, struct tcphdr *th, struct mbuf *m) /* * If the RST bit is set, check the sequence number to see * if this is a valid reset segment. + * * RFC 793 page 37: * In all states except SYN-SENT, all reset (RST) segments * are validated by checking their SEQ-fields. A reset is * valid if its sequence number is in the window. * - * The sequence number in the reset segment is normally an - * echo of our outgoing acknowlegement numbers, but some hosts - * send a reset with the sequence number at the rightmost edge - * of our receive window, and we have to handle this case. + * RFC 793 page 69: + * There are four cases for the acceptability test for an incoming + * segment: + * + * Segment Receive Test + * Length Window + * ------- ------- ------------------------------------------- + * 0 0 SEG.SEQ = RCV.NXT + * 0 >0 RCV.NXT =< SEG.SEQ < RCV.NXT+RCV.WND + * >0 0 not acceptable + * >0 >0 RCV.NXT =< SEG.SEQ < RCV.NXT+RCV.WND + * or RCV.NXT =< SEG.SEQ+SEG.LEN-1 < RCV.NXT+RCV.WND + * + * Note that when receiving a SYN segment in the LISTEN state, + * IRS is set to SEG.SEQ and RCV.NXT is set to SEG.SEQ+1, as + * described in RFC 793, page 66. */ if ((SEQ_GEQ(th->th_seq, sc->sc_irs + 1) && SEQ_LT(th->th_seq, sc->sc_irs + 1 + sc->sc_wnd)) || @@ -1731,6 +1744,7 @@ syncache_respond(struct syncache *sc, struct syncache_head *sch, th->th_seq = htonl(sc->sc_iss); else th->th_seq = htonl(sc->sc_iss + 1); +printf("SEG.SEQ=0x%x, ISS=0x%x.\n", ntohl(th->th_seq), sc->sc_iss); th->th_ack = htonl(sc->sc_irs + 1); th->th_off = sizeof(struct tcphdr) >> 2; th->th_x2 = 0; -- cgit v1.3 From 6999f6975ced6e706fede653528c9aa80e9ba514 Mon Sep 17 00:00:00 2001 From: Michael Tuexen Date: Thu, 1 Nov 2018 11:41:40 +0000 Subject: Remove debug code which slipped in accidently. MFC after: 4 weeks X-MFC with: r339989 Sponsored by: Netflix, Inc. --- sys/netinet/tcp_syncache.c | 1 - 1 file changed, 1 deletion(-) (limited to 'sys') diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index 8898c4b76961..100229a254e8 100644 --- a/sys/netinet/tcp_syncache.c +++ b/sys/netinet/tcp_syncache.c @@ -1744,7 +1744,6 @@ syncache_respond(struct syncache *sc, struct syncache_head *sch, th->th_seq = htonl(sc->sc_iss); else th->th_seq = htonl(sc->sc_iss + 1); -printf("SEG.SEQ=0x%x, ISS=0x%x.\n", ntohl(th->th_seq), sc->sc_iss); th->th_ack = htonl(sc->sc_irs + 1); th->th_off = sizeof(struct tcphdr) >> 2; th->th_x2 = 0; -- cgit v1.3 From 881a9516a2f7b50ea5cda69b23c4860b205396e7 Mon Sep 17 00:00:00 2001 From: Rick Macklem Date: Thu, 1 Nov 2018 15:27:22 +0000 Subject: Fix NFS client vnode locking to avoid a crash during forced dismount. A crash was reported where the crash occurred in nfs_advlock() when the NFS_ISV4(vp) macro was being executed. This was caused by the vnode being VI_DOOMED due to a forced dismount in progress. This patch fixes the problem by locking the vnode before executing the NFS_ISV4() macro. Tested by: rlibby PR: 232673 Reviewed by: kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D17757 --- sys/fs/nfsclient/nfs_clvnops.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'sys') diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c index 056eb271eea6..47fd735d3b9e 100644 --- a/sys/fs/nfsclient/nfs_clvnops.c +++ b/sys/fs/nfsclient/nfs_clvnops.c @@ -3033,14 +3033,19 @@ nfs_advlock(struct vop_advlock_args *ap) int ret, error = EOPNOTSUPP; u_quad_t size; + ret = NFSVOPLOCK(vp, LK_SHARED); + if (ret != 0) + return (EBADF); if (NFS_ISV4(vp) && (ap->a_flags & (F_POSIX | F_FLOCK)) != 0) { - if (vp->v_type != VREG) + if (vp->v_type != VREG) { + NFSVOPUNLOCK(vp, 0); return (EINVAL); + } if ((ap->a_flags & F_POSIX) != 0) cred = p->p_ucred; else cred = td->td_ucred; - NFSVOPLOCK(vp, LK_EXCLUSIVE | LK_RETRY); + NFSVOPLOCK(vp, LK_UPGRADE | LK_RETRY); if (vp->v_iflag & VI_DOOMED) { NFSVOPUNLOCK(vp, 0); return (EBADF); @@ -3119,9 +3124,6 @@ nfs_advlock(struct vop_advlock_args *ap) NFSVOPUNLOCK(vp, 0); return (0); } else if (!NFS_ISV4(vp)) { - error = NFSVOPLOCK(vp, LK_SHARED); - if (error) - return (error); if ((VFSTONFS(vp->v_mount)->nm_flag & NFSMNT_NOLOCKD) != 0) { size = VTONFS(vp)->n_size; NFSVOPUNLOCK(vp, 0); @@ -3144,7 +3146,8 @@ nfs_advlock(struct vop_advlock_args *ap) NFSVOPUNLOCK(vp, 0); } } - } + } else + NFSVOPUNLOCK(vp, 0); return (error); } -- cgit v1.3 From 3d40cdf0149a93ec3794531b46d1bb6b0051c268 Mon Sep 17 00:00:00 2001 From: Ben Widawsky Date: Thu, 1 Nov 2018 15:30:01 +0000 Subject: linuxkpi: Add GFP flags needed for ttm drivers Submitted by: Johannes Lundberg Requested by: bwidawsk MFC after: 3 days Approved by: emaste (mentor) --- sys/compat/linuxkpi/common/include/linux/gfp.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sys') diff --git a/sys/compat/linuxkpi/common/include/linux/gfp.h b/sys/compat/linuxkpi/common/include/linux/gfp.h index 5d6d4da3515a..a20e3606ca05 100644 --- a/sys/compat/linuxkpi/common/include/linux/gfp.h +++ b/sys/compat/linuxkpi/common/include/linux/gfp.h @@ -52,6 +52,7 @@ #define __GFP_RETRY_MAYFAIL 0 #define __GFP_MOVABLE 0 #define __GFP_COMP 0 +#define __GFP_KSWAPD_RECLAIM 0 #define __GFP_IO 0 #define __GFP_NO_KSWAPD 0 @@ -73,6 +74,7 @@ #define GFP_TEMPORARY M_NOWAIT #define GFP_NATIVE_MASK (M_NOWAIT | M_WAITOK | M_USE_RESERVE | M_ZERO) #define GFP_TRANSHUGE 0 +#define GFP_TRANSHUGE_LIGHT 0 CTASSERT((__GFP_DMA32 & GFP_NATIVE_MASK) == 0); CTASSERT((__GFP_BITS_MASK & GFP_NATIVE_MASK) == GFP_NATIVE_MASK); -- cgit v1.3 From 79ee680b657576e6aa94c0525210299f56ee2255 Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Thu, 1 Nov 2018 15:51:49 +0000 Subject: Improve style in in_pcbinslbgrouphash() and related subroutines. No functional change intended. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D17107 --- sys/netinet/in_pcb.c | 47 +++++++++++++++++------------------------------ 1 file changed, 17 insertions(+), 30 deletions(-) (limited to 'sys') diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index 671a9c7c7faf..d61e5da2a9b1 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -266,7 +266,7 @@ in_pcblbgroup_resize(struct inpcblbgrouphead *hdr, grp = in_pcblbgroup_alloc(hdr, old_grp->il_vflag, old_grp->il_lport, &old_grp->il_dependladdr, size); - if (!grp) + if (grp == NULL) return (NULL); KASSERT(old_grp->il_inpcnt < grp->il_inpsiz, @@ -288,21 +288,20 @@ static void in_pcblbgroup_reorder(struct inpcblbgrouphead *hdr, struct inpcblbgroup **grpp, int i) { - struct inpcblbgroup *grp = *grpp; + struct inpcblbgroup *grp, *new_grp; + grp = *grpp; for (; i + 1 < grp->il_inpcnt; ++i) grp->il_inp[i] = grp->il_inp[i + 1]; grp->il_inpcnt--; if (grp->il_inpsiz > INPCBLBGROUP_SIZMIN && - grp->il_inpcnt <= (grp->il_inpsiz / 4)) { + grp->il_inpcnt <= grp->il_inpsiz / 4) { /* Shrink this group. */ - struct inpcblbgroup *new_grp = - in_pcblbgroup_resize(hdr, grp, grp->il_inpsiz / 2); - if (new_grp) + new_grp = in_pcblbgroup_resize(hdr, grp, grp->il_inpsiz / 2); + if (new_grp != NULL) *grpp = new_grp; } - return; } /* @@ -316,9 +315,7 @@ in_pcbinslbgrouphash(struct inpcb *inp) struct inpcbinfo *pcbinfo; struct inpcblbgrouphead *hdr; struct inpcblbgroup *grp; - uint16_t hashmask, lport; - uint32_t group_index; - struct ucred *cred; + uint32_t idx; pcbinfo = inp->inp_pcbinfo; @@ -328,19 +325,10 @@ in_pcbinslbgrouphash(struct inpcb *inp) if (pcbinfo->ipi_lbgrouphashbase == NULL) return (0); - hashmask = pcbinfo->ipi_lbgrouphashmask; - lport = inp->inp_lport; - group_index = INP_PCBLBGROUP_PORTHASH(lport, hashmask); - hdr = &pcbinfo->ipi_lbgrouphashbase[group_index]; - /* * Don't allow jailed socket to join local group. */ - if (inp->inp_socket != NULL) - cred = inp->inp_socket->so_cred; - else - cred = NULL; - if (cred != NULL && jailed(cred)) + if (inp->inp_socket != NULL && jailed(inp->inp_socket->so_cred)) return (0); #ifdef INET6 @@ -354,24 +342,23 @@ in_pcbinslbgrouphash(struct inpcb *inp) } #endif - hdr = &pcbinfo->ipi_lbgrouphashbase[ - INP_PCBLBGROUP_PORTHASH(inp->inp_lport, - pcbinfo->ipi_lbgrouphashmask)]; + idx = INP_PCBLBGROUP_PORTHASH(inp->inp_lport, + pcbinfo->ipi_lbgrouphashmask); + hdr = &pcbinfo->ipi_lbgrouphashbase[idx]; CK_LIST_FOREACH(grp, hdr, il_list) { if (grp->il_vflag == inp->inp_vflag && grp->il_lport == inp->inp_lport && memcmp(&grp->il_dependladdr, - &inp->inp_inc.inc_ie.ie_dependladdr, - sizeof(grp->il_dependladdr)) == 0) { + &inp->inp_inc.inc_ie.ie_dependladdr, + sizeof(grp->il_dependladdr)) == 0) break; - } } if (grp == NULL) { /* Create new load balance group. */ grp = in_pcblbgroup_alloc(hdr, inp->inp_vflag, inp->inp_lport, &inp->inp_inc.inc_ie.ie_dependladdr, INPCBLBGROUP_SIZMIN); - if (!grp) + if (grp == NULL) return (ENOBUFS); } else if (grp->il_inpcnt == grp->il_inpsiz) { if (grp->il_inpsiz >= INPCBLBGROUP_SIZMAX) { @@ -383,13 +370,13 @@ in_pcbinslbgrouphash(struct inpcb *inp) /* Expand this local group. */ grp = in_pcblbgroup_resize(hdr, grp, grp->il_inpsiz * 2); - if (!grp) + if (grp == NULL) return (ENOBUFS); } KASSERT(grp->il_inpcnt < grp->il_inpsiz, - ("invalid local group size %d and count %d", - grp->il_inpsiz, grp->il_inpcnt)); + ("invalid local group size %d and count %d", grp->il_inpsiz, + grp->il_inpcnt)); grp->il_inp[grp->il_inpcnt] = inp; grp->il_inpcnt++; -- cgit v1.3 From d9ff5789be06f828e7c89625502f10f6b3ae5c31 Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Thu, 1 Nov 2018 15:52:49 +0000 Subject: Remove redundant checks for a NULL lbgroup table. No functional change intended. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D17108 --- sys/netinet/in_pcb.c | 12 ++---------- sys/netinet6/in6_pcb.c | 6 ++---- 2 files changed, 4 insertions(+), 14 deletions(-) (limited to 'sys') diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index d61e5da2a9b1..cd9ebec7a848 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -322,9 +322,6 @@ in_pcbinslbgrouphash(struct inpcb *inp) INP_WLOCK_ASSERT(inp); INP_HASH_WLOCK_ASSERT(pcbinfo); - if (pcbinfo->ipi_lbgrouphashbase == NULL) - return (0); - /* * Don't allow jailed socket to join local group. */ @@ -399,9 +396,6 @@ in_pcbremlbgrouphash(struct inpcb *inp) INP_WLOCK_ASSERT(inp); INP_HASH_WLOCK_ASSERT(pcbinfo); - if (pcbinfo->ipi_lbgrouphashbase == NULL) - return; - hdr = &pcbinfo->ipi_lbgrouphashbase[ INP_PCBLBGROUP_PORTHASH(inp->inp_lport, pcbinfo->ipi_lbgrouphashmask)]; @@ -2276,13 +2270,11 @@ in_pcblookup_hash_locked(struct inpcbinfo *pcbinfo, struct in_addr faddr, /* * Then look in lb group (for wildcard match). */ - if (pcbinfo->ipi_lbgrouphashbase != NULL && - (lookupflags & INPLOOKUP_WILDCARD)) { + if ((lookupflags & INPLOOKUP_WILDCARD) != 0) { inp = in_pcblookup_lbgroup(pcbinfo, &laddr, lport, &faddr, fport, lookupflags); - if (inp != NULL) { + if (inp != NULL) return (inp); - } } /* diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c index 7880fbd26336..e4f9d947511b 100644 --- a/sys/netinet6/in6_pcb.c +++ b/sys/netinet6/in6_pcb.c @@ -1161,13 +1161,11 @@ in6_pcblookup_hash_locked(struct inpcbinfo *pcbinfo, struct in6_addr *faddr, /* * Then look in lb group (for wildcard match). */ - if (pcbinfo->ipi_lbgrouphashbase != NULL && - (lookupflags & INPLOOKUP_WILDCARD)) { + if ((lookupflags & INPLOOKUP_WILDCARD) != 0) { inp = in6_pcblookup_lbgroup(pcbinfo, laddr, lport, faddr, fport, lookupflags); - if (inp != NULL) { + if (inp != NULL) return (inp); - } } /* -- cgit v1.3 From b4b90c1f4ca9374df88cdeb96f70c43217bb993d Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Thu, 1 Nov 2018 17:05:10 +0000 Subject: Add the ARMv8.3 HCR_EL2 register fields. MFC after: 1 month Sponsored by: DARPA, AFRL --- sys/arm64/include/hypervisor.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'sys') diff --git a/sys/arm64/include/hypervisor.h b/sys/arm64/include/hypervisor.h index 4e9980f9ba36..7ac0069af1be 100644 --- a/sys/arm64/include/hypervisor.h +++ b/sys/arm64/include/hypervisor.h @@ -80,6 +80,17 @@ #define HCR_RW 0x0000000080000000 #define HCR_CD 0x0000000100000000 #define HCR_ID 0x0000000200000000 +#define HCR_E2H 0x0000000400000000 +#define HCR_TLOR 0x0000000800000000 +#define HCR_TERR 0x0000001000000000 +#define HCR_TEA 0x0000002000000000 +#define HCR_MIOCNCE 0x0000004000000000 +/* Bit 39 is reserved */ +#define HCR_APK 0x0000010000000000 +#define HCR_API 0x0000020000000000 +#define HCR_NV 0x0000040000000000 +#define HCR_NV1 0x0000080000000000 +#define HCR_AT 0x0000100000000000 #endif -- cgit v1.3 From e2c532f15611d5f7d94be2d394f067eb094f0a7c Mon Sep 17 00:00:00 2001 From: "Bjoern A. Zeeb" Date: Thu, 1 Nov 2018 17:26:18 +0000 Subject: carpstats are the last virtualised variable in the file and end up at the end of the vnet_set. The generated code uses an absolute relocation at one byte beyond the end of the carpstats array. This means the relocation for the vnet does not happen for carpstats initialisation and as a result the kernel panics on module load. This problem has only been observed with carp and only on i386. We considered various possible solutions including using linker scripts to add padding to all kernel modules for pcpu and vnet sections. While the symbols (by chance) stay in the order of appearance in the file adding an unused non-file-local variable at the end of the file will extend the size of set_vnet and hence make the absolute relocation for carpstats work (think of this as a single-module set_vnet padding). This is a (tmporary) hack. It is the least intrusive one as we need a timely solution for the upcoming release. We will revisit the problem in HEAD. For a lot more information and the possible alternate solutions please see the PR and the references therein. PR: 230857 MFC after: 3 days --- sys/netinet/ip_carp.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'sys') diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c index 6c15629389f6..8d11f379cbdf 100644 --- a/sys/netinet/ip_carp.c +++ b/sys/netinet/ip_carp.c @@ -2176,6 +2176,21 @@ static struct protosw in6_carp_protosw = { }; #endif +#ifdef VIMAGE +#if defined(__i386__) +/* + * XXX This is a hack to work around an absolute relocation outside + * set_vnet by one (on the stop symbol) for carpstats. Add a dummy variable + * to the end of the file in the hope that the linker will just keep the + * order (as it seems to do at the moment). It is understood to be fragile. + * See PR 230857 for a longer discussion of the problem and the referenced + * review for possible alternate solutions. Each is a hack; we just need + * the least intrusive one for the next release. + */ +VNET_DEFINE(char, carp_zzz) = 0xde; +#endif +#endif + static void carp_mod_cleanup(void) { -- cgit v1.3 From 5e6652144dcd70c1a3870ae2507be48ace75f8e8 Mon Sep 17 00:00:00 2001 From: Eric Joyner Date: Thu, 1 Nov 2018 17:29:14 +0000 Subject: ixl/iavf(4): Update remaining references of "num_queues" to "num_rx_queues" This should fix a build issue when "options RSS" is set. Reported by: bz@ Sponsored by: Intel Corporation --- sys/dev/ixl/iavf_vc.c | 6 +----- sys/dev/ixl/if_iavf.c | 4 ++-- 2 files changed, 3 insertions(+), 7 deletions(-) (limited to 'sys') diff --git a/sys/dev/ixl/iavf_vc.c b/sys/dev/ixl/iavf_vc.c index 933c4214debe..2a77f390faaa 100644 --- a/sys/dev/ixl/iavf_vc.c +++ b/sys/dev/ixl/iavf_vc.c @@ -720,10 +720,6 @@ iavf_update_stats_counters(struct iavf_sc *sc, struct i40e_eth_stats *es) uint64_t tx_discards; tx_discards = es->tx_discards; -#if 0 - for (int i = 0; i < vsi->num_queues; i++) - tx_discards += sc->vsi.queues[i].txr.br->br_drops; -#endif /* Update ifnet stats */ IXL_SET_IPACKETS(vsi, es->rx_unicast + @@ -826,7 +822,7 @@ iavf_config_rss_lut(struct iavf_sc *sc) /* * Fetch the RSS bucket id for the given indirection entry. * Cap it at the number of configured buckets (which is - * num_queues.) + * num_rx_queues.) */ que_id = rss_get_indirection_to_bucket(i); que_id = que_id % sc->vsi.num_rx_queues; diff --git a/sys/dev/ixl/if_iavf.c b/sys/dev/ixl/if_iavf.c index 3120433a7d87..0d14c88a5bf4 100644 --- a/sys/dev/ixl/if_iavf.c +++ b/sys/dev/ixl/if_iavf.c @@ -1946,10 +1946,10 @@ iavf_config_rss_reg(struct iavf_sc *sc) /* * Fetch the RSS bucket id for the given indirection entry. * Cap it at the number of configured buckets (which is - * num_queues.) + * num_rx_queues.) */ que_id = rss_get_indirection_to_bucket(i); - que_id = que_id % vsi->num_queues; + que_id = que_id % vsi->num_rx_queues; #else que_id = j; #endif -- cgit v1.3 From a9725b6332be3242ea6601090f7f274354436fe6 Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Thu, 1 Nov 2018 17:43:28 +0000 Subject: Add the ARMv8.3 SCTLR_EL1 fields. While here tag which architecture release fields were added and remove a field that only existed in very early releases of the ARMv8 spec. Sponsored by: DARPA, AFRL --- sys/arm64/arm64/locore.S | 2 +- sys/arm64/include/armreg.h | 21 +++++++++++++++------ 2 files changed, 16 insertions(+), 7 deletions(-) (limited to 'sys') diff --git a/sys/arm64/arm64/locore.S b/sys/arm64/arm64/locore.S index 107d189618e4..f87a4d5bb59c 100644 --- a/sys/arm64/arm64/locore.S +++ b/sys/arm64/arm64/locore.S @@ -633,7 +633,7 @@ sctlr_set: sctlr_clear: /* Bits to clear */ .quad (SCTLR_EE | SCTLR_EOE | SCTLR_IESB | SCTLR_WXN | SCTLR_UMA | \ - SCTLR_ITD | SCTLR_THEE | SCTLR_A) + SCTLR_ITD | SCTLR_A) .globl abort abort: diff --git a/sys/arm64/include/armreg.h b/sys/arm64/include/armreg.h index 05d504ca71ce..1ef9fdb5aeb8 100644 --- a/sys/arm64/include/armreg.h +++ b/sys/arm64/include/armreg.h @@ -525,7 +525,7 @@ #define PAR_S_MASK (0x1 << PAR_S_SHIFT) /* SCTLR_EL1 - System Control Register */ -#define SCTLR_RES0 0xc8222400 /* Reserved ARMv8.0, write 0 */ +#define SCTLR_RES0 0xc8222440 /* Reserved ARMv8.0, write 0 */ #define SCTLR_RES1 0x30d00800 /* Reserved ARMv8.0, write 1 */ #define SCTLR_M 0x00000001 @@ -534,23 +534,32 @@ #define SCTLR_SA 0x00000008 #define SCTLR_SA0 0x00000010 #define SCTLR_CP15BEN 0x00000020 -#define SCTLR_THEE 0x00000040 +/* Bit 6 is reserved */ #define SCTLR_ITD 0x00000080 #define SCTLR_SED 0x00000100 #define SCTLR_UMA 0x00000200 +/* Bit 10 is reserved */ +/* Bit 11 is reserved */ #define SCTLR_I 0x00001000 +#define SCTLR_EnDB 0x00002000 /* ARMv8.3 */ #define SCTLR_DZE 0x00004000 #define SCTLR_UCT 0x00008000 #define SCTLR_nTWI 0x00010000 +/* Bit 17 is reserved */ #define SCTLR_nTWE 0x00040000 #define SCTLR_WXN 0x00080000 -#define SCTLR_IESB 0x00200000 -#define SCTLR_SPAN 0x00800000 +/* Bit 20 is reserved */ +#define SCTLR_IESB 0x00200000 /* ARMv8.2 */ +/* Bit 22 is reserved */ +#define SCTLR_SPAN 0x00800000 /* ARMv8.1 */ #define SCTLR_EOE 0x01000000 #define SCTLR_EE 0x02000000 #define SCTLR_UCI 0x04000000 -#define SCTLR_nTLSMD 0x10000000 -#define SCTLR_LSMAOE 0x20000000 +#define SCTLR_EnDA 0x08000000 /* ARMv8.3 */ +#define SCTLR_nTLSMD 0x10000000 /* ARMv8.2 */ +#define SCTLR_LSMAOE 0x20000000 /* ARMv8.2 */ +#define SCTLR_EnIB 0x40000000 /* ARMv8.3 */ +#define SCTLR_EnIA 0x80000000 /* ARMv8.3 */ /* SPSR_EL1 */ /* -- cgit v1.3 From b317cfd4c0d102045ef84dc045141de416f9d808 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Thu, 1 Nov 2018 21:34:17 +0000 Subject: Don't enter DDB for fatal traps before panic by default. Add a new 'debugger_on_trap' knob separate from 'debugger_on_panic' and make the calls to kdb_trap() in MD fatal trap handlers prior to calling panic() conditional on this new knob instead of 'debugger_on_panic'. Disable the new knob by default. Developers who wish to recover from a fatal fault by adjusting saved register state and retrying the faulting instruction can still do so by enabling the new knob. However, for the more common case this makes the user experience for panics due to a fatal fault match the user experience for other panics, e.g. 'c' in DDB will generate a crash dump and reboot the system rather than being stuck in an infinite loop of fatal fault messages and DDB prompts. Reviewed by: kib, avg MFC after: 2 months Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D17768 --- sys/amd64/amd64/trap.c | 2 +- sys/arm/arm/trap-v4.c | 2 +- sys/arm/arm/trap-v6.c | 2 +- sys/arm64/arm64/trap.c | 2 +- sys/i386/i386/trap.c | 2 +- sys/kern/kern_shutdown.c | 9 +++++++-- sys/mips/mips/trap.c | 2 +- sys/powerpc/powerpc/trap.c | 2 +- sys/sys/kdb.h | 2 +- 9 files changed, 15 insertions(+), 10 deletions(-) (limited to 'sys') diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c index 27faa7c14fac..7a0973025296 100644 --- a/sys/amd64/amd64/trap.c +++ b/sys/amd64/amd64/trap.c @@ -916,7 +916,7 @@ trap_fatal(frame, eva) curproc->p_pid, curthread->td_name); #ifdef KDB - if (debugger_on_panic) { + if (debugger_on_trap) { kdb_why = KDB_WHY_TRAP; handled = kdb_trap(type, 0, frame); kdb_why = KDB_WHY_UNSET; diff --git a/sys/arm/arm/trap-v4.c b/sys/arm/arm/trap-v4.c index cd701c95f6ab..d2690ba46d62 100644 --- a/sys/arm/arm/trap-v4.c +++ b/sys/arm/arm/trap-v4.c @@ -456,7 +456,7 @@ dab_fatal(struct trapframe *tf, u_int fsr, u_int far, struct thread *td, printf(", pc =%08x\n\n", tf->tf_pc); #ifdef KDB - if (debugger_on_panic) { + if (debugger_on_trap) { kdb_why = KDB_WHY_TRAP; handled = kdb_trap(fsr, 0, tf); kdb_why = KDB_WHY_UNSET; diff --git a/sys/arm/arm/trap-v6.c b/sys/arm/arm/trap-v6.c index ae78401e91a3..58941f06ae99 100644 --- a/sys/arm/arm/trap-v6.c +++ b/sys/arm/arm/trap-v6.c @@ -599,7 +599,7 @@ abort_fatal(struct trapframe *tf, u_int idx, u_int fsr, u_int far, printf(", pc =%08x\n\n", tf->tf_pc); #ifdef KDB - if (debugger_on_panic) { + if (debugger_on_trap) { kdb_why = KDB_WHY_TRAP; kdb_trap(fsr, 0, tf); kdb_why = KDB_WHY_UNSET; diff --git a/sys/arm64/arm64/trap.c b/sys/arm64/arm64/trap.c index 9de154798002..bb5924336b58 100644 --- a/sys/arm64/arm64/trap.c +++ b/sys/arm64/arm64/trap.c @@ -256,7 +256,7 @@ no_pmap_fault: printf(" esr: %.8lx\n", esr); #ifdef KDB - if (debugger_on_panic) { + if (debugger_on_trap) { kdb_why = KDB_WHY_TRAP; handled = kdb_trap(ESR_ELx_EXCEPTION(esr), 0, frame); diff --git a/sys/i386/i386/trap.c b/sys/i386/i386/trap.c index 4b62484533c4..a81ec6ee89d1 100644 --- a/sys/i386/i386/trap.c +++ b/sys/i386/i386/trap.c @@ -977,7 +977,7 @@ trap_fatal(frame, eva) curproc->p_pid, curthread->td_name); #ifdef KDB - if (debugger_on_panic) { + if (debugger_on_trap) { kdb_why = KDB_WHY_TRAP; frame->tf_err = eva; /* smuggle fault address to ddb */ handled = kdb_trap(type, 0, frame); diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c index c5a1780cb550..2ac99440e783 100644 --- a/sys/kern/kern_shutdown.c +++ b/sys/kern/kern_shutdown.c @@ -115,14 +115,19 @@ SYSCTL_INT(_kern, OID_AUTO, panic_reboot_wait_time, CTLFLAG_RWTUN, #ifdef KDB #ifdef KDB_UNATTENDED -int debugger_on_panic = 0; +static int debugger_on_panic = 0; #else -int debugger_on_panic = 1; +static int debugger_on_panic = 1; #endif SYSCTL_INT(_debug, OID_AUTO, debugger_on_panic, CTLFLAG_RWTUN | CTLFLAG_SECURE, &debugger_on_panic, 0, "Run debugger on kernel panic"); +int debugger_on_trap = 0; +SYSCTL_INT(_debug, OID_AUTO, debugger_on_trap, + CTLFLAG_RWTUN | CTLFLAG_SECURE, + &debugger_on_trap, 0, "Run debugger on kernel trap before panic"); + #ifdef KDB_TRACE static int trace_on_panic = 1; static bool trace_all_panics = true; diff --git a/sys/mips/mips/trap.c b/sys/mips/mips/trap.c index 746208e521fd..042b6450b2e1 100644 --- a/sys/mips/mips/trap.c +++ b/sys/mips/mips/trap.c @@ -1100,7 +1100,7 @@ err: #endif #ifdef KDB - if (debugger_on_panic) { + if (debugger_on_trap) { kdb_why = KDB_WHY_TRAP; kdb_trap(type, 0, trapframe); kdb_why = KDB_WHY_UNSET; diff --git a/sys/powerpc/powerpc/trap.c b/sys/powerpc/powerpc/trap.c index bf5b492ea29c..815ea21d4213 100644 --- a/sys/powerpc/powerpc/trap.c +++ b/sys/powerpc/powerpc/trap.c @@ -455,7 +455,7 @@ trap_fatal(struct trapframe *frame) printtrap(frame->exc, frame, 1, (frame->srr1 & PSL_PR)); #ifdef KDB - if (debugger_on_panic) { + if (debugger_on_trap) { kdb_why = KDB_WHY_TRAP; handled = kdb_trap(frame->exc, 0, frame); kdb_why = KDB_WHY_UNSET; diff --git a/sys/sys/kdb.h b/sys/sys/kdb.h index 8834b0fa8172..75f8343b8428 100644 --- a/sys/sys/kdb.h +++ b/sys/sys/kdb.h @@ -62,7 +62,7 @@ struct kdb_dbbe { DATA_SET(kdb_dbbe_set, name##_dbbe) extern u_char kdb_active; /* Non-zero while in debugger. */ -extern int debugger_on_panic; /* enter the debugger on panic. */ +extern int debugger_on_trap; /* enter the debugger on trap. */ extern struct kdb_dbbe *kdb_dbbe; /* Default debugger backend or NULL. */ extern struct trapframe *kdb_frame; /* Frame to kdb_trap(). */ extern struct pcb *kdb_thrctx; /* Current context. */ -- cgit v1.3 From dcd50a20b790cdf3b452d2d087b06305456e7efc Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Thu, 1 Nov 2018 21:39:33 +0000 Subject: Assert that reclaim_tx_descs() is always making forward progress. MFC after: 2 months Sponsored by: Chelsio Communications --- sys/dev/cxgbe/t4_sge.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sys') diff --git a/sys/dev/cxgbe/t4_sge.c b/sys/dev/cxgbe/t4_sge.c index 9b0e2628b235..a9120a036056 100644 --- a/sys/dev/cxgbe/t4_sge.c +++ b/sys/dev/cxgbe/t4_sge.c @@ -5079,6 +5079,9 @@ reclaim_tx_descs(struct sge_txq *txq, u_int n) KASSERT(can_reclaim >= ndesc, ("%s: unexpected number of credits: %d, %d", __func__, can_reclaim, ndesc)); + KASSERT(ndesc != 0, + ("%s: descriptor with no credits: cidx %d", + __func__, eq->cidx)); for (m = txsd->m; m != NULL; m = nextpkt) { nextpkt = m->m_nextpkt; -- cgit v1.3 From 1d8d91db74bf9ec3b308f434957a8e5f286f7e02 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Thu, 1 Nov 2018 21:46:37 +0000 Subject: Add support for port unit wiring to cxgbe(4). - Add a bus_child_location_str method to the nexus drivers that prints out 'port=N' as the location string exported via devinfo and the '%location' sysctl node. - We can't use a bus_hint_device_unit to wire the unit numbers of devices with a fixed devclass as the device gets assigned a unit in make_device() before the device creator can set softc, etc. Instead, when adding a child device, use a helper function much like a bus_hint_device_unit method to look for wiring hints or to return -1 to let the system choose a unit number. This function requires an "at" hint for the port pointing to the nexus device and a "port" hint listing the port number. For example: hint.cxl.4.at="t5nex0" hint.cxl.4.port="0" wires cxl4 to the first port on the t5nex0 adapter. Requested by: gallatin MFC after: 2 months --- sys/dev/cxgbe/t4_main.c | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) (limited to 'sys') diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index effc82ab0704..7593f9366f8f 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -92,6 +92,7 @@ __FBSDID("$FreeBSD$"); static int t4_probe(device_t); static int t4_attach(device_t); static int t4_detach(device_t); +static int t4_child_location_str(device_t, device_t, char *, size_t); static int t4_ready(device_t); static int t4_read_port_device(device_t, int, device_t *); static device_method_t t4_methods[] = { @@ -99,6 +100,8 @@ static device_method_t t4_methods[] = { DEVMETHOD(device_attach, t4_attach), DEVMETHOD(device_detach, t4_detach), + DEVMETHOD(bus_child_location_str, t4_child_location_str), + DEVMETHOD(t4_is_main_ready, t4_ready), DEVMETHOD(t4_read_port_device, t4_read_port_device), @@ -158,6 +161,8 @@ static device_method_t t5_methods[] = { DEVMETHOD(device_attach, t4_attach), DEVMETHOD(device_detach, t4_detach), + DEVMETHOD(bus_child_location_str, t4_child_location_str), + DEVMETHOD(t4_is_main_ready, t4_ready), DEVMETHOD(t4_read_port_device, t4_read_port_device), @@ -191,6 +196,8 @@ static device_method_t t6_methods[] = { DEVMETHOD(device_attach, t4_attach), DEVMETHOD(device_detach, t4_detach), + DEVMETHOD(bus_child_location_str, t4_child_location_str), + DEVMETHOD(t4_is_main_ready, t4_ready), DEVMETHOD(t4_read_port_device, t4_read_port_device), @@ -836,6 +843,24 @@ t4_init_devnames(struct adapter *sc) } } +static int +t4_ifnet_unit(struct adapter *sc, struct port_info *pi) +{ + const char *parent, *name; + long value; + int line, unit; + + line = 0; + parent = device_get_nameunit(sc->dev); + name = sc->names->ifnet_name; + while (resource_find_dev(&line, name, &unit, "at", parent) == 0) { + if (resource_long_value(name, unit, "port", &value) == 0 && + value == pi->port_id) + return (unit); + } + return (-1); +} + static int t4_attach(device_t dev) { @@ -1037,7 +1062,8 @@ t4_attach(device_t dev) pi->flags |= FIXED_IFMEDIA; PORT_UNLOCK(pi); - pi->dev = device_add_child(dev, sc->names->ifnet_name, -1); + pi->dev = device_add_child(dev, sc->names->ifnet_name, + t4_ifnet_unit(sc, pi)); if (pi->dev == NULL) { device_printf(dev, "failed to add device for port %d.\n", i); @@ -1252,6 +1278,16 @@ done: return (rc); } +static int +t4_child_location_str(device_t bus, device_t dev, char *buf, size_t buflen) +{ + struct port_info *pi; + + pi = device_get_softc(dev); + snprintf(buf, buflen, "port=%d", pi->port_id); + return (0); +} + static int t4_ready(device_t dev) { -- cgit v1.3 From 7890b5c14ea9732dfc2d6507e19b1d9d2e071127 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Thu, 1 Nov 2018 21:49:49 +0000 Subject: Check cannot_use_txpkts() rather than needs_tso() in add_to_txpkts(). Currently this is a no-op, but will matter in the future when cannot_use_txpkts() starts checking other conditions than just needs_tso(). Sponsored by: Chelsio Communications --- sys/dev/cxgbe/t4_sge.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sys') diff --git a/sys/dev/cxgbe/t4_sge.c b/sys/dev/cxgbe/t4_sge.c index a9120a036056..643eb29ffb9a 100644 --- a/sys/dev/cxgbe/t4_sge.c +++ b/sys/dev/cxgbe/t4_sge.c @@ -4725,8 +4725,11 @@ add_to_txpkts(struct mbuf *m, struct txpkts *txp, u_int available) MPASS(txp->wr_type == 0 || txp->wr_type == 1); + if (cannot_use_txpkts(m)) + return (1); + nsegs = mbuf_nsegs(m); - if (needs_tso(m) || (txp->wr_type == 1 && nsegs != 1)) + if (txp->wr_type == 1 && nsegs != 1) return (1); plen = txp->plen + m->m_pkthdr.len; -- cgit v1.3 From 9385e92b259bbb5e87c6a4be71c9602cb4d35d0f Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Thu, 1 Nov 2018 21:51:41 +0000 Subject: Add comments explaining what hold/unhold do They act as a simple one-deep semaphore to keep open/close/probe from running at the same time to avoid races that creates. --- sys/cam/cam_periph.c | 6 ++++++ sys/cam/scsi/scsi_da.c | 7 ++++--- 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'sys') diff --git a/sys/cam/cam_periph.c b/sys/cam/cam_periph.c index d814c0ef6d89..cc069325748c 100644 --- a/sys/cam/cam_periph.c +++ b/sys/cam/cam_periph.c @@ -470,6 +470,12 @@ cam_periph_release(struct cam_periph *periph) mtx_unlock(mtx); } +/* + * hold/unhold act as mutual exclusion for sections of the code that + * need to sleep and want to make sure that other sections that + * will interfere are held off. This only protects exclusive sections + * from each other. + */ int cam_periph_hold(struct cam_periph *periph, int priority) { diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c index 701d141ff61e..2483c5e7633e 100644 --- a/sys/cam/scsi/scsi_da.c +++ b/sys/cam/scsi/scsi_da.c @@ -2697,9 +2697,10 @@ daregister(struct cam_periph *periph, void *arg) TASK_INIT(&softc->sysctl_task, 0, dasysctlinit, periph); /* - * Take an exclusive refcount on the periph while dastart is called - * to finish the probe. The reference will be dropped in dadone at - * the end of probe. + * Take an exclusive section lock qon the periph while dastart is called + * to finish the probe. The lock will be dropped in dadone at the end + * of probe. This locks out daopen and daclose from racing with the + * probe. * * XXX if cam_periph_hold returns an error, we don't hold a refcount. */ -- cgit v1.3 From ada1ceef0bb238b6ae40a1a5e38f08066a46e3d5 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Thu, 1 Nov 2018 22:11:26 +0000 Subject: Implement ptrace_set_pc() and fail PT_*STEP requests explicitly. Reviewed by: markj Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D17769 --- sys/riscv/riscv/machdep.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys') diff --git a/sys/riscv/riscv/machdep.c b/sys/riscv/riscv/machdep.c index 430336408368..8edf6583f6c7 100644 --- a/sys/riscv/riscv/machdep.c +++ b/sys/riscv/riscv/machdep.c @@ -254,7 +254,7 @@ int ptrace_set_pc(struct thread *td, u_long addr) { - panic("ptrace_set_pc"); + td->td_frame->tf_sepc = addr; return (0); } @@ -263,7 +263,7 @@ ptrace_single_step(struct thread *td) { /* TODO; */ - return (0); + return (EOPNOTSUPP); } int @@ -271,7 +271,7 @@ ptrace_clear_single_step(struct thread *td) { /* TODO; */ - return (0); + return (EOPNOTSUPP); } void -- cgit v1.3 From 344adeab182818b47024a1faf0cdb4cb4e11ec53 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Thu, 1 Nov 2018 22:13:22 +0000 Subject: Don't allow debuggers to modify SSTATUS, only to read it. Reviewed by: markj Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D17771 --- sys/riscv/riscv/machdep.c | 1 - 1 file changed, 1 deletion(-) (limited to 'sys') diff --git a/sys/riscv/riscv/machdep.c b/sys/riscv/riscv/machdep.c index 8edf6583f6c7..0735ec034603 100644 --- a/sys/riscv/riscv/machdep.c +++ b/sys/riscv/riscv/machdep.c @@ -178,7 +178,6 @@ set_regs(struct thread *td, struct reg *regs) frame = td->td_frame; frame->tf_sepc = regs->sepc; - frame->tf_sstatus = regs->sstatus; frame->tf_ra = regs->ra; frame->tf_sp = regs->sp; frame->tf_gp = regs->gp; -- cgit v1.3 From a751b255460c9e44ca93b46362e1cfa54a5717fd Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Thu, 1 Nov 2018 22:15:25 +0000 Subject: SBI calls expect a pointer to a u_long rather than a pointer. This is just cosmetic. A weirder issue is that the SBI doc claims the hart mask pointer should be a physical address, not a virtual address. However, the implementation in bbl seems to just dereference the address directly. Reviewed by: markj Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D17781 --- sys/riscv/riscv/intr_machdep.c | 4 ++-- sys/riscv/riscv/mp_machdep.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'sys') diff --git a/sys/riscv/riscv/intr_machdep.c b/sys/riscv/riscv/intr_machdep.c index b57e122c0f81..030f073098fc 100644 --- a/sys/riscv/riscv/intr_machdep.c +++ b/sys/riscv/riscv/intr_machdep.c @@ -202,7 +202,7 @@ riscv_unmask_ipi(void) static void ipi_send(struct pcpu *pc, int ipi) { - uintptr_t mask; + u_long mask; CTR3(KTR_SMP, "%s: cpu=%d, ipi=%x", __func__, pc->pc_cpuid, ipi); @@ -242,7 +242,7 @@ void ipi_selected(cpuset_t cpus, u_int ipi) { struct pcpu *pc; - uintptr_t mask; + u_long mask; CTR1(KTR_SMP, "ipi_selected: ipi: %x", ipi); diff --git a/sys/riscv/riscv/mp_machdep.c b/sys/riscv/riscv/mp_machdep.c index 01d67e843918..e38aa64598a3 100644 --- a/sys/riscv/riscv/mp_machdep.c +++ b/sys/riscv/riscv/mp_machdep.c @@ -181,7 +181,7 @@ riscv64_cpu_attach(device_t dev) static void release_aps(void *dummy __unused) { - uintptr_t mask; + u_long mask; int cpu, i; if (mp_ncpus == 1) -- cgit v1.3 From 6f888020dfc047304fe18971584c0d9327cd8928 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Thu, 1 Nov 2018 22:17:51 +0000 Subject: Set PTE_A and PTE_D for user mappings in pmap_enter(). This assumes that an access according to the prot in 'flags' triggered a fault and is going to be retried after the fault returns, so the two flags are set preemptively to avoid refaulting on the retry. While here, only bother setting PTE_D for kernel mappings in pmap_enter for writable mappings. Reviewed by: markj Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D17782 --- sys/riscv/riscv/pmap.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'sys') diff --git a/sys/riscv/riscv/pmap.c b/sys/riscv/riscv/pmap.c index b951e411c34a..55dd1a2221c8 100644 --- a/sys/riscv/riscv/pmap.c +++ b/sys/riscv/riscv/pmap.c @@ -2088,13 +2088,15 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, pa = VM_PAGE_TO_PHYS(m); pn = (pa / PAGE_SIZE); - new_l3 = PTE_V | PTE_R | PTE_X; + new_l3 = PTE_V | PTE_R | PTE_X | PTE_A; + if (flags & VM_PROT_WRITE) + new_l3 |= PTE_D; if (prot & VM_PROT_WRITE) new_l3 |= PTE_W; if ((va >> 63) == 0) new_l3 |= PTE_U; - else - new_l3 |= PTE_A | PTE_D; + else if (prot & VM_PROT_WRITE) + new_l3 |= PTE_D; new_l3 |= (pn << PTE_PPN0_S); if ((flags & PMAP_ENTER_WIRED) != 0) -- cgit v1.3 From d198cb6d8376cd819ea5334d7c08c0afc7e06a4e Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Thu, 1 Nov 2018 22:23:15 +0000 Subject: Restrict setting PTE execute permissions on RISC-V. Previously, RISC-V was enabling execute permissions in PTEs for any readable page. Now, execute permissions are only enabled if they were explicitly specified (e.g. via PROT_EXEC to mmap). The one exception is that the initial kernel mapping in locore still maps all of the kernel RWX. While here, change the fault type passed to vm_fault and pmap_fault_fixup to only include a single VM_PROT_* value representing the faulting access to match other architectures rather than passing a bitmask. Reviewed by: markj Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D17783 --- sys/riscv/include/pte.h | 2 +- sys/riscv/riscv/locore.S | 2 +- sys/riscv/riscv/pmap.c | 17 +++++++++++------ sys/riscv/riscv/trap.c | 6 ++++-- 4 files changed, 17 insertions(+), 10 deletions(-) (limited to 'sys') diff --git a/sys/riscv/include/pte.h b/sys/riscv/include/pte.h index 87a7be2829fe..723c9cf26ffb 100644 --- a/sys/riscv/include/pte.h +++ b/sys/riscv/include/pte.h @@ -78,7 +78,7 @@ typedef uint64_t pn_t; /* page number */ #define PTE_V (1 << 0) /* Valid */ #define PTE_RWX (PTE_R | PTE_W | PTE_X) #define PTE_RX (PTE_R | PTE_X) -#define PTE_KERN (PTE_V | PTE_RWX | PTE_A | PTE_D) +#define PTE_KERN (PTE_V | PTE_R | PTE_W | PTE_A | PTE_D) #define PTE_PPN0_S 10 #define PTE_PPN1_S 19 diff --git a/sys/riscv/riscv/locore.S b/sys/riscv/riscv/locore.S index 7b2b1d5a2fd6..2a8710b11353 100644 --- a/sys/riscv/riscv/locore.S +++ b/sys/riscv/riscv/locore.S @@ -94,7 +94,7 @@ _start: add t3, t4, t2 li t5, 0 2: - li t0, (PTE_KERN) + li t0, (PTE_KERN | PTE_X) slli t2, t4, PTE_PPN1_S /* << PTE_PPN1_S */ or t5, t0, t2 sd t5, (s1) /* Store PTE entry to position */ diff --git a/sys/riscv/riscv/pmap.c b/sys/riscv/riscv/pmap.c index 55dd1a2221c8..22bec6355684 100644 --- a/sys/riscv/riscv/pmap.c +++ b/sys/riscv/riscv/pmap.c @@ -2010,7 +2010,7 @@ pmap_protect(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, vm_prot_t prot) } int -pmap_fault_fixup(pmap_t pmap, vm_offset_t va, vm_prot_t prot) +pmap_fault_fixup(pmap_t pmap, vm_offset_t va, vm_prot_t ftype) { pt_entry_t orig_l3; pt_entry_t new_l3; @@ -2027,12 +2027,13 @@ pmap_fault_fixup(pmap_t pmap, vm_offset_t va, vm_prot_t prot) orig_l3 = pmap_load(l3); if ((orig_l3 & PTE_V) == 0 || - ((prot & VM_PROT_WRITE) != 0 && (orig_l3 & PTE_W) == 0) || - ((prot & VM_PROT_READ) != 0 && (orig_l3 & PTE_R) == 0)) + (ftype == VM_PROT_WRITE && (orig_l3 & PTE_W) == 0) || + (ftype == VM_PROT_EXECUTE && (orig_l3 & PTE_X) == 0) || + (ftype == VM_PROT_READ && (orig_l3 & PTE_R) == 0)) goto done; new_l3 = orig_l3 | PTE_A; - if ((prot & VM_PROT_WRITE) != 0) + if (ftype == VM_PROT_WRITE) new_l3 |= PTE_D; if (orig_l3 != new_l3) { @@ -2088,7 +2089,9 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, pa = VM_PAGE_TO_PHYS(m); pn = (pa / PAGE_SIZE); - new_l3 = PTE_V | PTE_R | PTE_X | PTE_A; + new_l3 = PTE_V | PTE_R | PTE_A; + if (prot & VM_PROT_EXECUTE) + new_l3 |= PTE_X; if (flags & VM_PROT_WRITE) new_l3 |= PTE_D; if (prot & VM_PROT_WRITE) @@ -2464,7 +2467,9 @@ pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, pa = VM_PAGE_TO_PHYS(m); pn = (pa / PAGE_SIZE); - entry = (PTE_V | PTE_R | PTE_X); + entry = PTE_V | PTE_R; + if (prot & VM_PROT_EXECUTE) + entry |= PTE_X; entry |= (pn << PTE_PPN0_S); /* diff --git a/sys/riscv/riscv/trap.c b/sys/riscv/riscv/trap.c index d24fcd69671c..343f9f36dc0d 100644 --- a/sys/riscv/riscv/trap.c +++ b/sys/riscv/riscv/trap.c @@ -207,9 +207,11 @@ data_abort(struct trapframe *frame, int lower) if ((frame->tf_scause == EXCP_FAULT_STORE) || (frame->tf_scause == EXCP_STORE_PAGE_FAULT)) { - ftype = (VM_PROT_READ | VM_PROT_WRITE); + ftype = VM_PROT_WRITE; + } else if (frame->tf_scause == EXCP_INST_PAGE_FAULT) { + ftype = VM_PROT_EXECUTE; } else { - ftype = (VM_PROT_READ); + ftype = VM_PROT_READ; } if (pmap_fault_fixup(map->pmap, va, ftype)) -- cgit v1.3 From 2105ac07d78cd3e1db9dfb7737e886efadba8a9b Mon Sep 17 00:00:00 2001 From: Brooks Davis Date: Thu, 1 Nov 2018 23:06:50 +0000 Subject: Use mode_t when the documented signature does. This is more clear and produces better results when generating function stubs from syscalls.master. Reviewed by: kib, emaste Obtained from: CheribSD Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D17784 --- sys/compat/freebsd32/syscalls.master | 12 ++++++------ sys/kern/syscalls.master | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) (limited to 'sys') diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index 61877582c89a..0a3eb6f95278 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -73,7 +73,7 @@ 4 AUE_WRITE NOPROTO { ssize_t write(int fd, const void *buf, \ size_t nbyte); } 5 AUE_OPEN_RWTC NOPROTO { int open(char *path, int flags, \ - int mode); } + mode_t mode); } 6 AUE_CLOSE NOPROTO { int close(int fd); } 7 AUE_WAIT4 STD { int freebsd32_wait4(int pid, int *status, \ int options, struct rusage32 *rusage); } @@ -85,7 +85,7 @@ 13 AUE_FCHDIR NOPROTO { int fchdir(int fd); } 14 AUE_MKNOD COMPAT11 { int freebsd32_mknod(char *path, \ int mode, int dev); } -15 AUE_CHMOD NOPROTO { int chmod(char *path, int mode); } +15 AUE_CHMOD NOPROTO { int chmod(char *path, mode_t mode); } 16 AUE_CHOWN NOPROTO { int chown(char *path, int uid, int gid); } 17 AUE_NULL NOPROTO { caddr_t break(char *nsize); } 18 AUE_GETFSSTAT COMPAT4 { int freebsd32_getfsstat( \ @@ -155,7 +155,7 @@ size_t count); } 59 AUE_EXECVE STD { int freebsd32_execve(char *fname, \ uint32_t *argv, uint32_t *envv); } -60 AUE_UMASK NOPROTO { int umask(int newmask); } +60 AUE_UMASK NOPROTO { int umask(mode_t newmask); } 61 AUE_CHROOT NOPROTO { int chroot(char *path); } 62 AUE_FSTAT COMPAT { int freebsd32_fstat(int fd, \ struct ostat32 *ub); } @@ -253,7 +253,7 @@ struct timeval32 *tv, \ struct timezone *tzp); } 123 AUE_FCHOWN NOPROTO { int fchown(int fd, int uid, int gid); } -124 AUE_FCHMOD NOPROTO { int fchmod(int fd, int mode); } +124 AUE_FCHMOD NOPROTO { int fchmod(int fd, mode_t mode); } 125 AUE_RECVFROM OBSOL orecvfrom 126 AUE_SETREUID NOPROTO { int setreuid(int ruid, int euid); } 127 AUE_SETREGID NOPROTO { int setregid(int rgid, int egid); } @@ -262,14 +262,14 @@ int length); } 130 AUE_FTRUNCATE COMPAT|NOPROTO { int ftruncate(int fd, int length); } 131 AUE_FLOCK NOPROTO { int flock(int fd, int how); } -132 AUE_MKFIFO NOPROTO { int mkfifo(char *path, int mode); } +132 AUE_MKFIFO NOPROTO { int mkfifo(char *path, mode_t mode); } 133 AUE_SENDTO NOPROTO { int sendto(int s, caddr_t buf, \ size_t len, int flags, caddr_t to, \ int tolen); } 134 AUE_SHUTDOWN NOPROTO { int shutdown(int s, int how); } 135 AUE_SOCKETPAIR NOPROTO { int socketpair(int domain, int type, \ int protocol, int *rsv); } -136 AUE_MKDIR NOPROTO { int mkdir(char *path, int mode); } +136 AUE_MKDIR NOPROTO { int mkdir(char *path, mode_t mode); } 137 AUE_RMDIR NOPROTO { int rmdir(char *path); } 138 AUE_UTIMES STD { int freebsd32_utimes(char *path, \ struct timeval32 *tptr); } diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 7544390b9e2d..27c746fd1a68 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -113,7 +113,7 @@ int open( _In_z_ char *path, int flags, - int mode + mode_t mode ); } ; XXX should be { int open(const char *path, int flags, ...); } @@ -170,7 +170,7 @@ 15 AUE_CHMOD STD { int chmod( _In_z_ char *path, - int mode + mode_t mode ); } 16 AUE_CHOWN STD { @@ -433,7 +433,7 @@ } 60 AUE_UMASK STD { int umask( - int newmask + mode_t newmask ); } 61 AUE_CHROOT STD { @@ -788,7 +788,7 @@ 124 AUE_FCHMOD STD { int fchmod( int fd, - int mode + mode_t mode ); } 125 AUE_RECVFROM COMPAT|NOARGS { @@ -840,7 +840,7 @@ 132 AUE_MKFIFO STD { int mkfifo( _In_z_ char *path, - int mode + mode_t mode ); } 133 AUE_SENDTO STD { @@ -870,7 +870,7 @@ 136 AUE_MKDIR STD { int mkdir( _In_z_ char *path, - int mode + mode_t mode ); } 137 AUE_RMDIR STD { -- cgit v1.3 From f7e5ce325f1653eb5504ecf3202f7c406face8ae Mon Sep 17 00:00:00 2001 From: Brooks Davis Date: Thu, 1 Nov 2018 23:10:53 +0000 Subject: Regent after r340034: Use mode_t when the documented signature does. Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D17784 --- sys/compat/freebsd32/freebsd32_systrace_args.c | 24 ++++++++++++------------ sys/kern/systrace_args.c | 24 ++++++++++++------------ sys/sys/sysproto.h | 12 ++++++------ 3 files changed, 30 insertions(+), 30 deletions(-) (limited to 'sys') diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index c3ee144f07e2..9561e60753c1 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -54,7 +54,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) struct open_args *p = params; uarg[0] = (intptr_t) p->path; /* char * */ iarg[1] = p->flags; /* int */ - iarg[2] = p->mode; /* int */ + iarg[2] = p->mode; /* mode_t */ *n_args = 3; break; } @@ -108,7 +108,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 15: { struct chmod_args *p = params; uarg[0] = (intptr_t) p->path; /* char * */ - iarg[1] = p->mode; /* int */ + iarg[1] = p->mode; /* mode_t */ *n_args = 2; break; } @@ -396,7 +396,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* umask */ case 60: { struct umask_args *p = params; - iarg[0] = p->newmask; /* int */ + iarg[0] = p->newmask; /* mode_t */ *n_args = 1; break; } @@ -692,7 +692,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 124: { struct fchmod_args *p = params; iarg[0] = p->fd; /* int */ - iarg[1] = p->mode; /* int */ + iarg[1] = p->mode; /* mode_t */ *n_args = 2; break; } @@ -732,7 +732,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 132: { struct mkfifo_args *p = params; uarg[0] = (intptr_t) p->path; /* char * */ - iarg[1] = p->mode; /* int */ + iarg[1] = p->mode; /* mode_t */ *n_args = 2; break; } @@ -770,7 +770,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 136: { struct mkdir_args *p = params; uarg[0] = (intptr_t) p->path; /* char * */ - iarg[1] = p->mode; /* int */ + iarg[1] = p->mode; /* mode_t */ *n_args = 2; break; } @@ -3329,7 +3329,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 2: - p = "int"; + p = "mode_t"; break; default: break; @@ -3414,7 +3414,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland char *"; break; case 1: - p = "int"; + p = "mode_t"; break; default: break; @@ -3864,7 +3864,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 60: switch(ndx) { case 0: - p = "int"; + p = "mode_t"; break; default: break; @@ -4353,7 +4353,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "int"; + p = "mode_t"; break; default: break; @@ -4418,7 +4418,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland char *"; break; case 1: - p = "int"; + p = "mode_t"; break; default: break; @@ -4488,7 +4488,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland char *"; break; case 1: - p = "int"; + p = "mode_t"; break; default: break; diff --git a/sys/kern/systrace_args.c b/sys/kern/systrace_args.c index b1286261f56d..e5dde39aa3d5 100644 --- a/sys/kern/systrace_args.c +++ b/sys/kern/systrace_args.c @@ -51,7 +51,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) struct open_args *p = params; uarg[0] = (intptr_t) p->path; /* char * */ iarg[1] = p->flags; /* int */ - iarg[2] = p->mode; /* int */ + iarg[2] = p->mode; /* mode_t */ *n_args = 3; break; } @@ -105,7 +105,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 15: { struct chmod_args *p = params; uarg[0] = (intptr_t) p->path; /* char * */ - iarg[1] = p->mode; /* int */ + iarg[1] = p->mode; /* mode_t */ *n_args = 2; break; } @@ -393,7 +393,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* umask */ case 60: { struct umask_args *p = params; - iarg[0] = p->newmask; /* int */ + iarg[0] = p->newmask; /* mode_t */ *n_args = 1; break; } @@ -689,7 +689,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 124: { struct fchmod_args *p = params; iarg[0] = p->fd; /* int */ - iarg[1] = p->mode; /* int */ + iarg[1] = p->mode; /* mode_t */ *n_args = 2; break; } @@ -729,7 +729,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 132: { struct mkfifo_args *p = params; uarg[0] = (intptr_t) p->path; /* char * */ - iarg[1] = p->mode; /* int */ + iarg[1] = p->mode; /* mode_t */ *n_args = 2; break; } @@ -767,7 +767,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 136: { struct mkdir_args *p = params; uarg[0] = (intptr_t) p->path; /* char * */ - iarg[1] = p->mode; /* int */ + iarg[1] = p->mode; /* mode_t */ *n_args = 2; break; } @@ -3334,7 +3334,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 2: - p = "int"; + p = "mode_t"; break; default: break; @@ -3419,7 +3419,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland char *"; break; case 1: - p = "int"; + p = "mode_t"; break; default: break; @@ -3869,7 +3869,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 60: switch(ndx) { case 0: - p = "int"; + p = "mode_t"; break; default: break; @@ -4358,7 +4358,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "int"; + p = "mode_t"; break; default: break; @@ -4423,7 +4423,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland char *"; break; case 1: - p = "int"; + p = "mode_t"; break; default: break; @@ -4493,7 +4493,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "userland char *"; break; case 1: - p = "int"; + p = "mode_t"; break; default: break; diff --git a/sys/sys/sysproto.h b/sys/sys/sysproto.h index 936e5fd40332..914c91fce856 100644 --- a/sys/sys/sysproto.h +++ b/sys/sys/sysproto.h @@ -56,7 +56,7 @@ struct write_args { struct open_args { char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; - char mode_l_[PADL_(int)]; int mode; char mode_r_[PADR_(int)]; + char mode_l_[PADL_(mode_t)]; mode_t mode; char mode_r_[PADR_(mode_t)]; }; struct close_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; @@ -82,7 +82,7 @@ struct fchdir_args { }; struct chmod_args { char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; - char mode_l_[PADL_(int)]; int mode; char mode_r_[PADR_(int)]; + char mode_l_[PADL_(mode_t)]; mode_t mode; char mode_r_[PADR_(mode_t)]; }; struct chown_args { char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; @@ -242,7 +242,7 @@ struct execve_args { char envv_l_[PADL_(char **)]; char ** envv; char envv_r_[PADR_(char **)]; }; struct umask_args { - char newmask_l_[PADL_(int)]; int newmask; char newmask_r_[PADR_(int)]; + char newmask_l_[PADL_(mode_t)]; mode_t newmask; char newmask_r_[PADR_(mode_t)]; }; struct chroot_args { char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; @@ -406,7 +406,7 @@ struct fchown_args { }; struct fchmod_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char mode_l_[PADL_(int)]; int mode; char mode_r_[PADR_(int)]; + char mode_l_[PADL_(mode_t)]; mode_t mode; char mode_r_[PADR_(mode_t)]; }; struct setreuid_args { char ruid_l_[PADL_(int)]; int ruid; char ruid_r_[PADR_(int)]; @@ -426,7 +426,7 @@ struct flock_args { }; struct mkfifo_args { char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; - char mode_l_[PADL_(int)]; int mode; char mode_r_[PADR_(int)]; + char mode_l_[PADL_(mode_t)]; mode_t mode; char mode_r_[PADR_(mode_t)]; }; struct sendto_args { char s_l_[PADL_(int)]; int s; char s_r_[PADR_(int)]; @@ -448,7 +448,7 @@ struct socketpair_args { }; struct mkdir_args { char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; - char mode_l_[PADL_(int)]; int mode; char mode_r_[PADR_(int)]; + char mode_l_[PADL_(mode_t)]; mode_t mode; char mode_r_[PADR_(mode_t)]; }; struct rmdir_args { char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; -- cgit v1.3 From ea96b3de2b3e4492e6bba3ab35961e3531a006bd Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Thu, 1 Nov 2018 23:11:47 +0000 Subject: Retire CLANG_NO_IAS34 CLANG_NO_IAS34 was introduced in r276696 to allow then-HEAD kernels to be built with clang 3.4 in FreeBSD 10. As FreeBSD 11 and later includes a version of Clang with a sufficiently capable integrated assembler we do not need the workaround any longer. Sponsored by: The FreeBSD Foundation --- sys/conf/Makefile.amd64 | 3 --- sys/conf/Makefile.i386 | 3 --- sys/conf/kern.mk | 4 ---- sys/modules/bios/smapi/Makefile | 2 -- 4 files changed, 12 deletions(-) (limited to 'sys') diff --git a/sys/conf/Makefile.amd64 b/sys/conf/Makefile.amd64 index 696ef55a3fb0..d34359f1d30b 100644 --- a/sys/conf/Makefile.amd64 +++ b/sys/conf/Makefile.amd64 @@ -37,9 +37,6 @@ INCLUDES+= -I$S/contrib/libfdt CFLAGS+= -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer .endif -ASM_CFLAGS.acpi_wakecode.S= ${CLANG_NO_IAS34} -ASM_CFLAGS.mpboot.S= ${CLANG_NO_IAS34} - %BEFORE_DEPEND %OBJS diff --git a/sys/conf/Makefile.i386 b/sys/conf/Makefile.i386 index 6b1eca42f1bb..621ebff79e19 100644 --- a/sys/conf/Makefile.i386 +++ b/sys/conf/Makefile.i386 @@ -32,9 +32,6 @@ S= ../../.. INCLUDES+= -I$S/contrib/libfdt -ASM_CFLAGS.acpi_wakecode.S= ${CLANG_NO_IAS34} -ASM_CFLAGS.mpboot.s= ${CLANG_NO_IAS34} - %BEFORE_DEPEND %OBJS diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index 910992c3ef7b..398df66f66fd 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -39,10 +39,6 @@ CWARNEXTRA+= -Wno-address-of-packed-member .endif CLANG_NO_IAS= -no-integrated-as -.if ${COMPILER_VERSION} < 30500 -# XXX: clang < 3.5 integrated-as doesn't grok .codeNN directives -CLANG_NO_IAS34= -no-integrated-as -.endif .endif .if ${COMPILER_TYPE} == "gcc" diff --git a/sys/modules/bios/smapi/Makefile b/sys/modules/bios/smapi/Makefile index c488491bd525..90506d962dc6 100644 --- a/sys/modules/bios/smapi/Makefile +++ b/sys/modules/bios/smapi/Makefile @@ -8,5 +8,3 @@ SRCS= smapi.c smapi_bios.S \ bus_if.h device_if.h .include - -CFLAGS.smapi_bios.S= ${CLANG_NO_IAS34} -- cgit v1.3 From 78c2a9806ea5035f4ea005a877987feb3e365e7f Mon Sep 17 00:00:00 2001 From: Conrad Meyer Date: Thu, 1 Nov 2018 23:46:23 +0000 Subject: kern_poll: Restore explanatory comment removed in r177374 The comment isn't stale. The check is bogus in the sense that poll(2) does not require pollfd entries to be unique in fd space, so there is no reason there cannot be more pollfd entries than open or even allowed fds. The check is mostly a seatbelt against accidental misuse or abuse. FD_SETSIZE, while usually unrelated to poll, is used as an arbitrary floor for systems with very low kern.maxfilesperproc. Additionally, document this possible EINVAL condition in the poll.2 manual. No functional change. Reviewed by: markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D17671 --- lib/libc/sys/poll.2 | 12 ++++++++++-- sys/kern/sys_generic.c | 7 +++++++ 2 files changed, 17 insertions(+), 2 deletions(-) (limited to 'sys') diff --git a/lib/libc/sys/poll.2 b/lib/libc/sys/poll.2 index dbd641f50bf7..feed43151624 100644 --- a/lib/libc/sys/poll.2 +++ b/lib/libc/sys/poll.2 @@ -28,7 +28,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd November 13, 2014 +.Dd November 1, 2018 .Dt POLL 2 .Os .Sh NAME @@ -232,7 +232,15 @@ points outside the process's allocated address space. A signal was delivered before the time limit expired and before any of the selected events occurred. .It Bq Er EINVAL -The specified time limit is invalid. One of its components is negative or too large. +The specified time limit is invalid. +One of its components is negative or too large. +.It Bq Er EINVAL +The number of pollfd structures specified by +.Fa nfds +exceeds the system tunable +.Va kern.maxfilesperproc +and +.Dv FD_SETSIZE . .El .Sh SEE ALSO .Xr accept 2 , diff --git a/sys/kern/sys_generic.c b/sys/kern/sys_generic.c index 0e8e173654c5..300c80930ca5 100644 --- a/sys/kern/sys_generic.c +++ b/sys/kern/sys_generic.c @@ -1339,6 +1339,13 @@ kern_poll(struct thread *td, struct pollfd *ufds, u_int nfds, } else sbt = -1; + /* + * This is kinda bogus. We have fd limits, but that is not + * really related to the size of the pollfd array. Make sure + * we let the process use at least FD_SETSIZE entries and at + * least enough for the system-wide limits. We want to be reasonably + * safe, but not overly restrictive. + */ if (nfds > maxfilesperproc && nfds > FD_SETSIZE) return (EINVAL); if (nfds > nitems(stackfds)) -- cgit v1.3 From f5a7a8cd67f9a6385866dd19b614d53438aa363f Mon Sep 17 00:00:00 2001 From: Martin Wilke Date: Fri, 2 Nov 2018 07:48:23 +0000 Subject: - Add quirk for Samsung on Mac Mini 7,1 PR: 201676 Submitted by: Ruben Kerkhof Approved by: araujo (mentor) Obtained from: TrueOS Sponsored by: iXsystems Inc. Differential Revision: https://review.freebsd.org/D17815 --- sys/dev/ahci/ahci_pci.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sys') diff --git a/sys/dev/ahci/ahci_pci.c b/sys/dev/ahci/ahci_pci.c index 2bc2a243837b..135848baa7b6 100644 --- a/sys/dev/ahci/ahci_pci.c +++ b/sys/dev/ahci/ahci_pci.c @@ -350,6 +350,7 @@ static const struct { {0x01861039, 0x00, "SiS 968", 0}, {0xa01c177d, 0x00, "ThunderX", AHCI_Q_ABAR0|AHCI_Q_1MSI}, {0x00311c36, 0x00, "Annapurna", AHCI_Q_FORCE_PI|AHCI_Q_RESTORE_CAP|AHCI_Q_NOMSIX}, + {0x1600144d, 0x00, "Samsung", AHCI_Q_NOMSI}, {0x00000000, 0x00, NULL, 0} }; -- cgit v1.3 From 1493c2ee62b8cbd8dbe70670b9108b4b9c36e032 Mon Sep 17 00:00:00 2001 From: Brooks Davis Date: Fri, 2 Nov 2018 14:42:36 +0000 Subject: Make vop_symlink take a const target path. This will enable callers to take const paths as part of syscall decleration improvements. Where doing so is easy and non-distruptive carry the const through implementations. In UFS the value is passed to an interface that must take non-const values. In ZFS, const poisoning would touch code shared with upstream and it's not worth adding diffs. Bump __FreeBSD_version for external API consumers. Reviewed by: kib (prior version) Obtained from: CheriBSD Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D17805 --- share/man/man9/VOP_CREATE.9 | 4 ++-- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c | 2 +- sys/fs/ext2fs/ext2_vnops.c | 4 ++-- sys/fs/fuse/fuse_vnops.c | 2 +- sys/fs/nandfs/nandfs_vnops.c | 4 ++-- sys/fs/nfs/nfs_var.h | 2 +- sys/fs/nfsclient/nfs_clrpcops.c | 2 +- sys/fs/tmpfs/tmpfs.h | 4 ++-- sys/fs/tmpfs/tmpfs_subr.c | 4 ++-- sys/fs/tmpfs/tmpfs_vnops.c | 2 +- sys/kern/vnode_if.src | 2 +- sys/sys/param.h | 2 +- sys/ufs/ufs/ufs_vnops.c | 6 +++--- 13 files changed, 20 insertions(+), 20 deletions(-) (limited to 'sys') diff --git a/share/man/man9/VOP_CREATE.9 b/share/man/man9/VOP_CREATE.9 index b86a88dce119..7553ef015ffa 100644 --- a/share/man/man9/VOP_CREATE.9 +++ b/share/man/man9/VOP_CREATE.9 @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 24, 1996 +.Dd November 2, 2018 .Dt VOP_CREATE 9 .Os .Sh NAME @@ -48,7 +48,7 @@ .Ft int .Fn VOP_MKDIR "struct vnode *dvp" "struct vnode **vpp" "struct componentname *cnp" "struct vattr *vap" .Ft int -.Fn VOP_SYMLINK "struct vnode *dvp" "struct vnode **vpp" "struct componentname *cnp" "struct vattr *vap" "char *target" +.Fn VOP_SYMLINK "struct vnode *dvp" "struct vnode **vpp" "struct componentname *cnp" "struct vattr *vap" "const char *target" .Sh DESCRIPTION These entry points create a new file, socket, fifo, device, directory or symlink in a given directory. diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c index 9515ab8b2509..4f8dd84f4d3d 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c @@ -5314,7 +5314,7 @@ zfs_freebsd_symlink(ap) vattr_init_mask(vap); return (zfs_symlink(ap->a_dvp, ap->a_vpp, cnp->cn_nameptr, vap, - ap->a_target, cnp->cn_cred, cnp->cn_thread)); + __DECONST(char *, ap->a_target), cnp->cn_cred, cnp->cn_thread)); } static int diff --git a/sys/fs/ext2fs/ext2_vnops.c b/sys/fs/ext2fs/ext2_vnops.c index e55910aa0d7d..0286d90a9341 100644 --- a/sys/fs/ext2fs/ext2_vnops.c +++ b/sys/fs/ext2fs/ext2_vnops.c @@ -1521,8 +1521,8 @@ ext2_symlink(struct vop_symlink_args *ap) ip->i_size = len; ip->i_flag |= IN_CHANGE | IN_UPDATE; } else - error = vn_rdwr(UIO_WRITE, vp, ap->a_target, len, (off_t)0, - UIO_SYSSPACE, IO_NODELOCKED | IO_NOMACCHECK, + error = vn_rdwr(UIO_WRITE, vp, __DECONST(void *, ap->a_target), + len, (off_t)0, UIO_SYSSPACE, IO_NODELOCKED | IO_NOMACCHECK, ap->a_cnp->cn_cred, NOCRED, NULL, NULL); if (error) vput(vp); diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c index 88bb39dd8fc9..7d26166e5970 100644 --- a/sys/fs/fuse/fuse_vnops.c +++ b/sys/fs/fuse/fuse_vnops.c @@ -1708,7 +1708,7 @@ fuse_vnop_symlink(struct vop_symlink_args *ap) struct vnode *dvp = ap->a_dvp; struct vnode **vpp = ap->a_vpp; struct componentname *cnp = ap->a_cnp; - char *target = ap->a_target; + const char *target = ap->a_target; struct fuse_dispatcher fdi; diff --git a/sys/fs/nandfs/nandfs_vnops.c b/sys/fs/nandfs/nandfs_vnops.c index b7dbdcaa6f3b..80e98c368cd7 100644 --- a/sys/fs/nandfs/nandfs_vnops.c +++ b/sys/fs/nandfs/nandfs_vnops.c @@ -1939,8 +1939,8 @@ nandfs_symlink(struct vop_symlink_args *ap) len = strlen(ap->a_target); - error = vn_rdwr(UIO_WRITE, *vpp, ap->a_target, len, (off_t)0, - UIO_SYSSPACE, IO_NODELOCKED | IO_NOMACCHECK, + error = vn_rdwr(UIO_WRITE, *vpp, __DECONST(void *, ap->a_target), + len, (off_t)0, UIO_SYSSPACE, IO_NODELOCKED | IO_NOMACCHECK, cnp->cn_cred, NOCRED, NULL, NULL); if (error) vput(*vpp); diff --git a/sys/fs/nfs/nfs_var.h b/sys/fs/nfs/nfs_var.h index b9f5789ce016..9dad6591f234 100644 --- a/sys/fs/nfs/nfs_var.h +++ b/sys/fs/nfs/nfs_var.h @@ -474,7 +474,7 @@ int nfsrpc_rename(vnode_t, vnode_t, char *, int, vnode_t, vnode_t, char *, int, int nfsrpc_link(vnode_t, vnode_t, char *, int, struct ucred *, NFSPROC_T *, struct nfsvattr *, struct nfsvattr *, int *, int *, void *); -int nfsrpc_symlink(vnode_t, char *, int, char *, struct vattr *, +int nfsrpc_symlink(vnode_t, char *, int, const char *, struct vattr *, struct ucred *, NFSPROC_T *, struct nfsvattr *, struct nfsvattr *, struct nfsfh **, int *, int *, void *); int nfsrpc_mkdir(vnode_t, char *, int, struct vattr *, diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index efd26b5b88fc..0bc34e302ea2 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -2627,7 +2627,7 @@ nfsmout: * nfs symbolic link create rpc */ APPLESTATIC int -nfsrpc_symlink(vnode_t dvp, char *name, int namelen, char *target, +nfsrpc_symlink(vnode_t dvp, char *name, int namelen, const char *target, struct vattr *vap, struct ucred *cred, NFSPROC_T *p, struct nfsvattr *dnap, struct nfsvattr *nnap, struct nfsfh **nfhpp, int *attrflagp, int *dattrflagp, void *dstuff) diff --git a/sys/fs/tmpfs/tmpfs.h b/sys/fs/tmpfs/tmpfs.h index 1df8842d9734..2cedc3a32efc 100644 --- a/sys/fs/tmpfs/tmpfs.h +++ b/sys/fs/tmpfs/tmpfs.h @@ -411,7 +411,7 @@ void tmpfs_ref_node(struct tmpfs_node *node); void tmpfs_ref_node_locked(struct tmpfs_node *node); int tmpfs_alloc_node(struct mount *mp, struct tmpfs_mount *, enum vtype, uid_t uid, gid_t gid, mode_t mode, struct tmpfs_node *, - char *, dev_t, struct tmpfs_node **); + const char *, dev_t, struct tmpfs_node **); void tmpfs_free_node(struct tmpfs_mount *, struct tmpfs_node *); bool tmpfs_free_node_locked(struct tmpfs_mount *, struct tmpfs_node *, bool); void tmpfs_free_tmp(struct tmpfs_mount *); @@ -424,7 +424,7 @@ int tmpfs_alloc_vp(struct mount *, struct tmpfs_node *, int, struct vnode **); void tmpfs_free_vp(struct vnode *); int tmpfs_alloc_file(struct vnode *, struct vnode **, struct vattr *, - struct componentname *, char *); + struct componentname *, const char *); void tmpfs_check_mtime(struct vnode *); void tmpfs_dir_attach(struct vnode *, struct tmpfs_dirent *); void tmpfs_dir_detach(struct vnode *, struct tmpfs_dirent *); diff --git a/sys/fs/tmpfs/tmpfs_subr.c b/sys/fs/tmpfs/tmpfs_subr.c index 80711da58774..4f30f947e223 100644 --- a/sys/fs/tmpfs/tmpfs_subr.c +++ b/sys/fs/tmpfs/tmpfs_subr.c @@ -182,7 +182,7 @@ tmpfs_ref_node_locked(struct tmpfs_node *node) int tmpfs_alloc_node(struct mount *mp, struct tmpfs_mount *tmp, enum vtype type, uid_t uid, gid_t gid, mode_t mode, struct tmpfs_node *parent, - char *target, dev_t rdev, struct tmpfs_node **node) + const char *target, dev_t rdev, struct tmpfs_node **node) { struct tmpfs_node *nnode; vm_object_t obj; @@ -717,7 +717,7 @@ tmpfs_free_vp(struct vnode *vp) */ int tmpfs_alloc_file(struct vnode *dvp, struct vnode **vpp, struct vattr *vap, - struct componentname *cnp, char *target) + struct componentname *cnp, const char *target) { int error; struct tmpfs_dirent *de; diff --git a/sys/fs/tmpfs/tmpfs_vnops.c b/sys/fs/tmpfs/tmpfs_vnops.c index dbacfd7858ce..41f5a19efe2a 100644 --- a/sys/fs/tmpfs/tmpfs_vnops.c +++ b/sys/fs/tmpfs/tmpfs_vnops.c @@ -1176,7 +1176,7 @@ tmpfs_symlink(struct vop_symlink_args *v) struct vnode **vpp = v->a_vpp; struct componentname *cnp = v->a_cnp; struct vattr *vap = v->a_vap; - char *target = v->a_target; + const char *target = v->a_target; #ifdef notyet /* XXX FreeBSD BUG: kern_symlink is not setting VLNK */ MPASS(vap->va_type == VLNK); diff --git a/sys/kern/vnode_if.src b/sys/kern/vnode_if.src index 90cef879c4ed..5b21026b517b 100644 --- a/sys/kern/vnode_if.src +++ b/sys/kern/vnode_if.src @@ -325,7 +325,7 @@ vop_symlink { OUT struct vnode **vpp; IN struct componentname *cnp; IN struct vattr *vap; - IN char *target; + IN const char *target; }; diff --git a/sys/sys/param.h b/sys/sys/param.h index 769a3146e21d..f7a26d5e0d44 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1300002 /* Master, propagated to newvers */ +#define __FreeBSD_version 1300003 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index 9e8896866660..f0e3f2d23df5 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -2095,7 +2095,7 @@ ufs_symlink(ap) struct vnode **a_vpp; struct componentname *a_cnp; struct vattr *a_vap; - char *a_target; + const char *a_target; } */ *ap; { struct vnode *vp, **vpp = ap->a_vpp; @@ -2116,8 +2116,8 @@ ufs_symlink(ap) ip->i_flag |= IN_CHANGE | IN_UPDATE; error = UFS_UPDATE(vp, 0); } else - error = vn_rdwr(UIO_WRITE, vp, ap->a_target, len, (off_t)0, - UIO_SYSSPACE, IO_NODELOCKED | IO_NOMACCHECK, + error = vn_rdwr(UIO_WRITE, vp, __DECONST(void *, ap->a_target), + len, (off_t)0, UIO_SYSSPACE, IO_NODELOCKED | IO_NOMACCHECK, ap->a_cnp->cn_cred, NOCRED, NULL, NULL); if (error) vput(vp); -- cgit v1.3 From 19a22ae31328d9a960732a0904116c1b5566351b Mon Sep 17 00:00:00 2001 From: Kristof Provost Date: Fri, 2 Nov 2018 15:01:59 +0000 Subject: Revert "pf: Limit the maximum number of fragments per packet" This reverts commit r337969. We'll handle this the OpenBSD way, in upcoming commits. --- sys/netpfil/pf/pf_norm.c | 8 -------- 1 file changed, 8 deletions(-) (limited to 'sys') diff --git a/sys/netpfil/pf/pf_norm.c b/sys/netpfil/pf/pf_norm.c index f5ef31de06a2..5e8598e9758f 100644 --- a/sys/netpfil/pf/pf_norm.c +++ b/sys/netpfil/pf/pf_norm.c @@ -91,10 +91,8 @@ struct pf_fragment { TAILQ_ENTRY(pf_fragment) frag_next; uint32_t fr_timeout; uint16_t fr_maxlen; /* maximum length of single fragment */ - uint16_t fr_entries; /* Total number of pf_fragment entries */ TAILQ_HEAD(pf_fragq, pf_frent) fr_queue; }; -#define PF_MAX_FRENT_PER_FRAGMENT 64 struct pf_fragment_tag { uint16_t ft_hdrlen; /* header length of reassembled pkt */ @@ -386,7 +384,6 @@ pf_fillup_fragment(struct pf_fragment_cmp *key, struct pf_frent *frent, *(struct pf_fragment_cmp *)frag = *key; frag->fr_timeout = time_uptime; frag->fr_maxlen = frent->fe_len; - frag->fr_entries = 0; TAILQ_INIT(&frag->fr_queue); RB_INSERT(pf_frag_tree, &V_pf_frag_tree, frag); @@ -398,9 +395,6 @@ pf_fillup_fragment(struct pf_fragment_cmp *key, struct pf_frent *frent, return (frag); } - if (frag->fr_entries >= PF_MAX_FRENT_PER_FRAGMENT) - goto bad_fragment; - KASSERT(!TAILQ_EMPTY(&frag->fr_queue), ("!TAILQ_EMPTY()->fr_queue")); /* Remember maximum fragment len for refragmentation. */ @@ -473,8 +467,6 @@ pf_fillup_fragment(struct pf_fragment_cmp *key, struct pf_frent *frent, else TAILQ_INSERT_AFTER(&frag->fr_queue, prev, frent, fr_next); - frag->fr_entries++; - return (frag); bad_fragment: -- cgit v1.3 From 46b05e1923b90d3d1fb027f39b80648fc8f36ee7 Mon Sep 17 00:00:00 2001 From: Hans Petter Selasky Date: Fri, 2 Nov 2018 15:03:52 +0000 Subject: Add new USB v2.0 PCI ID. Submitted by: Dmitry Luhtionov Sponsored by: Mellanox Technologies --- sys/dev/usb/controller/ehci_pci.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sys') diff --git a/sys/dev/usb/controller/ehci_pci.c b/sys/dev/usb/controller/ehci_pci.c index 61efbee453c4..16db4e21ce66 100644 --- a/sys/dev/usb/controller/ehci_pci.c +++ b/sys/dev/usb/controller/ehci_pci.c @@ -210,6 +210,9 @@ ehci_pci_match(device_t self) case 0x15621131: return "Philips ISP156x USB 2.0 controller"; + case 0x70021039: + return "SiS 968 USB 2.0 controller"; + case 0x31041106: return ("VIA VT6202 USB 2.0 controller"); -- cgit v1.3 From 2b1c354ee6fb075953d2c3e81c8221f4115ce981 Mon Sep 17 00:00:00 2001 From: Kristof Provost Date: Fri, 2 Nov 2018 15:23:57 +0000 Subject: pf: Count holes rather than fragments for reassembly Avoid traversing the list of fragment entris to check whether the pf(4) reassembly is complete. Instead count the holes that are created when inserting a fragment. If there are no holes left, the fragments are continuous. Obtained from: OpenBSD Differential Revision: https://reviews.freebsd.org/D17732 --- sys/netpfil/pf/pf_norm.c | 83 ++++++++++++++++++++++++++---------------------- 1 file changed, 45 insertions(+), 38 deletions(-) (limited to 'sys') diff --git a/sys/netpfil/pf/pf_norm.c b/sys/netpfil/pf/pf_norm.c index 5e8598e9758f..e87d8eae240e 100644 --- a/sys/netpfil/pf/pf_norm.c +++ b/sys/netpfil/pf/pf_norm.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright 2001 Niels Provos - * Copyright 2011 Alexander Bluhm + * Copyright 2011-2018 Alexander Bluhm * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -91,6 +91,7 @@ struct pf_fragment { TAILQ_ENTRY(pf_fragment) frag_next; uint32_t fr_timeout; uint16_t fr_maxlen; /* maximum length of single fragment */ + u_int16_t fr_holes; /* number of holes in the queue */ TAILQ_HEAD(pf_fragq, pf_frent) fr_queue; }; @@ -132,11 +133,11 @@ static void pf_remove_fragment(struct pf_fragment *); static int pf_normalize_tcpopt(struct pf_rule *, struct mbuf *, struct tcphdr *, int, sa_family_t); static struct pf_frent *pf_create_fragment(u_short *); +static int pf_frent_holes(struct pf_frent *frent); static struct pf_fragment *pf_find_fragment(struct pf_fragment_cmp *key, struct pf_frag_tree *tree); static struct pf_fragment *pf_fillup_fragment(struct pf_fragment_cmp *, struct pf_frent *, u_short *); -static int pf_isfull_fragment(struct pf_fragment *); static struct mbuf *pf_join_fragment(struct pf_fragment *); #ifdef INET static void pf_scrub_ip(struct mbuf **, uint32_t, uint8_t, uint8_t); @@ -333,6 +334,39 @@ pf_create_fragment(u_short *reason) return (frent); } +/* + * Calculate the additional holes that were created in the fragment + * queue by inserting this fragment. A fragment in the middle + * creates one more hole by splitting. For each connected side, + * it loses one hole. + * Fragment entry must be in the queue when calling this function. + */ +static int +pf_frent_holes(struct pf_frent *frent) +{ + struct pf_frent *prev = TAILQ_PREV(frent, pf_fragq, fr_next); + struct pf_frent *next = TAILQ_NEXT(frent, fr_next); + int holes = 1; + + if (prev == NULL) { + if (frent->fe_off == 0) + holes--; + } else { + KASSERT(frent->fe_off != 0, ("frent->fe_off != 0")); + if (frent->fe_off == prev->fe_off + prev->fe_len) + holes--; + } + if (next == NULL) { + if (!frent->fe_mff) + holes--; + } else { + KASSERT(frent->fe_mff, ("frent->fe_mff")); + if (next->fe_off == frent->fe_off + frent->fe_len) + holes--; + } + return holes; +} + static struct pf_fragment * pf_fillup_fragment(struct pf_fragment_cmp *key, struct pf_frent *frent, u_short *reason) @@ -384,6 +418,7 @@ pf_fillup_fragment(struct pf_fragment_cmp *key, struct pf_frent *frent, *(struct pf_fragment_cmp *)frag = *key; frag->fr_timeout = time_uptime; frag->fr_maxlen = frent->fe_len; + frag->fr_holes = 1; TAILQ_INIT(&frag->fr_queue); RB_INSERT(pf_frag_tree, &V_pf_frag_tree, frag); @@ -391,6 +426,7 @@ pf_fillup_fragment(struct pf_fragment_cmp *key, struct pf_frent *frent, /* We do not have a previous fragment. */ TAILQ_INSERT_HEAD(&frag->fr_queue, frent, fr_next); + frag->fr_holes += pf_frent_holes(frent); return (frag); } @@ -457,6 +493,7 @@ pf_fillup_fragment(struct pf_fragment_cmp *key, struct pf_frent *frent, /* This fragment is completely overlapped, lose it. */ next = TAILQ_NEXT(after, fr_next); + frag->fr_holes -= pf_frent_holes(after); m_freem(after->fe_m); TAILQ_REMOVE(&frag->fr_queue, after, fr_next); uma_zfree(V_pf_frent_z, after); @@ -466,6 +503,7 @@ pf_fillup_fragment(struct pf_fragment_cmp *key, struct pf_frent *frent, TAILQ_INSERT_HEAD(&frag->fr_queue, frent, fr_next); else TAILQ_INSERT_AFTER(&frag->fr_queue, prev, frent, fr_next); + frag->fr_holes += pf_frent_holes(frent); return (frag); @@ -476,40 +514,6 @@ drop_fragment: return (NULL); } -static int -pf_isfull_fragment(struct pf_fragment *frag) -{ - struct pf_frent *frent, *next; - uint16_t off, total; - - /* Check if we are completely reassembled */ - if (TAILQ_LAST(&frag->fr_queue, pf_fragq)->fe_mff) - return (0); - - /* Maximum data we have seen already */ - total = TAILQ_LAST(&frag->fr_queue, pf_fragq)->fe_off + - TAILQ_LAST(&frag->fr_queue, pf_fragq)->fe_len; - - /* Check if we have all the data */ - off = 0; - for (frent = TAILQ_FIRST(&frag->fr_queue); frent; frent = next) { - next = TAILQ_NEXT(frent, fr_next); - - off += frent->fe_len; - if (off < total && (next == NULL || next->fe_off != off)) { - DPFPRINTF(("missing fragment at %d, next %d, total %d", - off, next == NULL ? -1 : next->fe_off, total)); - return (0); - } - } - DPFPRINTF(("%d < %d?", off, total)); - if (off < total) - return (0); - KASSERT(off == total, ("off == total")); - - return (1); -} - static struct mbuf * pf_join_fragment(struct pf_fragment *frag) { @@ -570,8 +574,10 @@ pf_reassemble(struct mbuf **m0, struct ip *ip, int dir, u_short *reason) /* The mbuf is part of the fragment entry, no direct free or access */ m = *m0 = NULL; - if (!pf_isfull_fragment(frag)) + if (frag->fr_holes) { + DPFPRINTF(("frag %d, holes %d", frag->fr_id, frag->fr_holes)); return (PF_PASS); /* drop because *m0 is NULL, no error */ + } /* We have all the data */ frent = TAILQ_FIRST(&frag->fr_queue); @@ -654,7 +660,8 @@ pf_reassemble6(struct mbuf **m0, struct ip6_hdr *ip6, struct ip6_frag *fraghdr, /* The mbuf is part of the fragment entry, no direct free or access. */ m = *m0 = NULL; - if (!pf_isfull_fragment(frag)) { + if (frag->fr_holes) { + DPFPRINTF(("frag %d, holes %d", frag->fr_id, frag->fr_holes)); PF_FRAG_UNLOCK(); return (PF_PASS); /* Drop because *m0 is NULL, no error. */ } -- cgit v1.3 From fd2ea405e601bd5e240153c5de0f7c264946ce6f Mon Sep 17 00:00:00 2001 From: Kristof Provost Date: Fri, 2 Nov 2018 15:26:51 +0000 Subject: pf: Split the fragment reassembly queue into smaller parts Remember 16 entry points based on the fragment offset. Instead of a worst case of 8196 list traversals we now check a maximum of 512 list entries or 16 array elements. Obtained from: OpenBSD Differential Revision: https://reviews.freebsd.org/D17733 --- sys/net/pfvar.h | 6 ++ sys/netpfil/pf/pf_norm.c | 181 ++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 168 insertions(+), 19 deletions(-) (limited to 'sys') diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index 5e80b66550de..0dab531400d9 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -1204,6 +1204,12 @@ struct pf_divert { #define PFFRAG_FRENT_HIWAT 5000 /* Number of fragment entries */ #define PFR_KENTRY_HIWAT 200000 /* Number of table entries */ +/* + * Limit the length of the fragment queue traversal. Remember + * search entry points based on the fragment offset. + */ +#define PF_FRAG_ENTRY_POINTS 16 + /* * ioctl parameter structures */ diff --git a/sys/netpfil/pf/pf_norm.c b/sys/netpfil/pf/pf_norm.c index e87d8eae240e..0706a230c910 100644 --- a/sys/netpfil/pf/pf_norm.c +++ b/sys/netpfil/pf/pf_norm.c @@ -87,6 +87,7 @@ struct pf_fragment { #define fr_af fr_key.frc_af #define fr_proto fr_key.frc_proto + struct pf_frent *fr_firstoff[PF_FRAG_ENTRY_POINTS]; RB_ENTRY(pf_fragment) fr_entry; TAILQ_ENTRY(pf_fragment) frag_next; uint32_t fr_timeout; @@ -136,6 +137,13 @@ static struct pf_frent *pf_create_fragment(u_short *); static int pf_frent_holes(struct pf_frent *frent); static struct pf_fragment *pf_find_fragment(struct pf_fragment_cmp *key, struct pf_frag_tree *tree); +static inline int pf_frent_index(struct pf_frent *); +static void pf_frent_insert(struct pf_fragment *, + struct pf_frent *, struct pf_frent *); +void pf_frent_remove(struct pf_fragment *, + struct pf_frent *); +struct pf_frent *pf_frent_previous(struct pf_fragment *, + struct pf_frent *); static struct pf_fragment *pf_fillup_fragment(struct pf_fragment_cmp *, struct pf_frent *, u_short *); static struct mbuf *pf_join_fragment(struct pf_fragment *); @@ -308,6 +316,7 @@ pf_remove_fragment(struct pf_fragment *frag) { PF_FRAG_ASSERT(); + KASSERT(frag, ("frag != NULL")); RB_REMOVE(pf_frag_tree, &V_pf_frag_tree, frag); TAILQ_REMOVE(&V_pf_fragqueue, frag, frag_next); @@ -367,9 +376,150 @@ pf_frent_holes(struct pf_frent *frent) return holes; } +static inline int +pf_frent_index(struct pf_frent *frent) +{ + /* + * We have an array of 16 entry points to the queue. A full size + * 65535 octet IP packet can have 8192 fragments. So the queue + * traversal length is at most 512 and at most 16 entry points are + * checked. We need 128 additional bytes on a 64 bit architecture. + */ + CTASSERT(((u_int16_t)0xffff &~ 7) / (0x10000 / PF_FRAG_ENTRY_POINTS) == + 16 - 1); + CTASSERT(((u_int16_t)0xffff >> 3) / PF_FRAG_ENTRY_POINTS == 512 - 1); + + return frent->fe_off / (0x10000 / PF_FRAG_ENTRY_POINTS); +} + +static void +pf_frent_insert(struct pf_fragment *frag, struct pf_frent *frent, + struct pf_frent *prev) +{ + int index; + + if (prev == NULL) { + TAILQ_INSERT_HEAD(&frag->fr_queue, frent, fr_next); + } else { + KASSERT(prev->fe_off + prev->fe_len <= frent->fe_off, + ("overlapping fragment")); + TAILQ_INSERT_AFTER(&frag->fr_queue, prev, frent, fr_next); + } + + index = pf_frent_index(frent); + if (frag->fr_firstoff[index] == NULL) { + KASSERT(prev == NULL || pf_frent_index(prev) < index, + ("prev == NULL || pf_frent_index(pref) < index")); + frag->fr_firstoff[index] = frent; + } else { + if (frent->fe_off < frag->fr_firstoff[index]->fe_off) { + KASSERT(prev == NULL || pf_frent_index(prev) < index, + ("prev == NULL || pf_frent_index(pref) < index")); + frag->fr_firstoff[index] = frent; + } else { + KASSERT(prev != NULL, ("prev != NULL")); + KASSERT(pf_frent_index(prev) == index, + ("pf_frent_index(prev) == index")); + } + } + + frag->fr_holes += pf_frent_holes(frent); +} + +void +pf_frent_remove(struct pf_fragment *frag, struct pf_frent *frent) +{ + struct pf_frent *prev = TAILQ_PREV(frent, pf_fragq, fr_next); + struct pf_frent *next = TAILQ_NEXT(frent, fr_next); + int index; + + frag->fr_holes -= pf_frent_holes(frent); + + index = pf_frent_index(frent); + KASSERT(frag->fr_firstoff[index] != NULL, ("frent not found")); + if (frag->fr_firstoff[index]->fe_off == frent->fe_off) { + if (next == NULL) { + frag->fr_firstoff[index] = NULL; + } else { + KASSERT(frent->fe_off + frent->fe_len <= next->fe_off, + ("overlapping fragment")); + if (pf_frent_index(next) == index) { + frag->fr_firstoff[index] = next; + } else { + frag->fr_firstoff[index] = NULL; + } + } + } else { + KASSERT(frag->fr_firstoff[index]->fe_off < frent->fe_off, + ("frag->fr_firstoff[index]->fe_off < frent->fe_off")); + KASSERT(prev != NULL, ("prev != NULL")); + KASSERT(prev->fe_off + prev->fe_len <= frent->fe_off, + ("overlapping fragment")); + KASSERT(pf_frent_index(prev) == index, + ("pf_frent_index(prev) == index")); + } + + TAILQ_REMOVE(&frag->fr_queue, frent, fr_next); +} + +struct pf_frent * +pf_frent_previous(struct pf_fragment *frag, struct pf_frent *frent) +{ + struct pf_frent *prev, *next; + int index; + + /* + * If there are no fragments after frag, take the final one. Assume + * that the global queue is not empty. + */ + prev = TAILQ_LAST(&frag->fr_queue, pf_fragq); + KASSERT(prev != NULL, ("prev != NULL")); + if (prev->fe_off <= frent->fe_off) + return prev; + /* + * We want to find a fragment entry that is before frag, but still + * close to it. Find the first fragment entry that is in the same + * entry point or in the first entry point after that. As we have + * already checked that there are entries behind frag, this will + * succeed. + */ + for (index = pf_frent_index(frent); index < PF_FRAG_ENTRY_POINTS; + index++) { + prev = frag->fr_firstoff[index]; + if (prev != NULL) + break; + } + KASSERT(prev != NULL, ("prev != NULL")); + /* + * In prev we may have a fragment from the same entry point that is + * before frent, or one that is just one position behind frent. + * In the latter case, we go back one step and have the predecessor. + * There may be none if the new fragment will be the first one. + */ + if (prev->fe_off > frent->fe_off) { + prev = TAILQ_PREV(prev, pf_fragq, fr_next); + if (prev == NULL) + return NULL; + KASSERT(prev->fe_off <= frent->fe_off, + ("prev->fe_off <= frent->fe_off")); + return prev; + } + /* + * In prev is the first fragment of the entry point. The offset + * of frag is behind it. Find the closest previous fragment. + */ + for (next = TAILQ_NEXT(prev, fr_next); next != NULL; + next = TAILQ_NEXT(next, fr_next)) { + if (next->fe_off > frent->fe_off) + break; + prev = next; + } + return prev; +} + static struct pf_fragment * pf_fillup_fragment(struct pf_fragment_cmp *key, struct pf_frent *frent, - u_short *reason) + u_short *reason) { struct pf_frent *after, *next, *prev; struct pf_fragment *frag; @@ -416,6 +566,7 @@ pf_fillup_fragment(struct pf_fragment_cmp *key, struct pf_frent *frent, } *(struct pf_fragment_cmp *)frag = *key; + memset(frag->fr_firstoff, 0, sizeof(frag->fr_firstoff)); frag->fr_timeout = time_uptime; frag->fr_maxlen = frent->fe_len; frag->fr_holes = 1; @@ -425,8 +576,7 @@ pf_fillup_fragment(struct pf_fragment_cmp *key, struct pf_frent *frent, TAILQ_INSERT_HEAD(&V_pf_fragqueue, frag, frag_next); /* We do not have a previous fragment. */ - TAILQ_INSERT_HEAD(&frag->fr_queue, frent, fr_next); - frag->fr_holes += pf_frent_holes(frent); + pf_frent_insert(frag, frent, NULL); return (frag); } @@ -455,17 +605,15 @@ pf_fillup_fragment(struct pf_fragment_cmp *key, struct pf_frent *frent, goto bad_fragment; } - /* Find a fragment after the current one. */ - prev = NULL; - TAILQ_FOREACH(after, &frag->fr_queue, fr_next) { - if (after->fe_off > frent->fe_off) - break; - prev = after; + /* Find neighbors for newly inserted fragment */ + prev = pf_frent_previous(frag, frent); + if (prev == NULL) { + after = TAILQ_FIRST(&frag->fr_queue); + KASSERT(after != NULL, ("after != NULL")); + } else { + after = TAILQ_NEXT(prev, fr_next); } - KASSERT(prev != NULL || after != NULL, - ("prev != NULL || after != NULL")); - if (prev != NULL && prev->fe_off + prev->fe_len > frent->fe_off) { uint16_t precut; @@ -493,17 +641,12 @@ pf_fillup_fragment(struct pf_fragment_cmp *key, struct pf_frent *frent, /* This fragment is completely overlapped, lose it. */ next = TAILQ_NEXT(after, fr_next); - frag->fr_holes -= pf_frent_holes(after); + pf_frent_remove(frag, after); m_freem(after->fe_m); - TAILQ_REMOVE(&frag->fr_queue, after, fr_next); uma_zfree(V_pf_frent_z, after); } - if (prev == NULL) - TAILQ_INSERT_HEAD(&frag->fr_queue, frent, fr_next); - else - TAILQ_INSERT_AFTER(&frag->fr_queue, prev, frent, fr_next); - frag->fr_holes += pf_frent_holes(frent); + pf_frent_insert(frag, frent, prev); return (frag); -- cgit v1.3 From 790194cd472b1d17e08940e9f839322abcf14ec9 Mon Sep 17 00:00:00 2001 From: Kristof Provost Date: Fri, 2 Nov 2018 15:32:04 +0000 Subject: pf: Limit the fragment entry queue length to 64 per bucket. So we have a global limit of 1024 fragments, but it is fine grained to the region of the packet. Smaller packets may have less fragments. This costs another 16 bytes of memory per reassembly and devides the worst case for searching by 8. Obtained from: OpenBSD Differential Revision: https://reviews.freebsd.org/D17734 --- sys/net/pfvar.h | 7 +++++++ sys/netpfil/pf/pf_norm.c | 34 +++++++++++++++++++++++++++++----- 2 files changed, 36 insertions(+), 5 deletions(-) (limited to 'sys') diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index 0dab531400d9..a7ed87af3c18 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -1210,6 +1210,13 @@ struct pf_divert { */ #define PF_FRAG_ENTRY_POINTS 16 +/* + * The number of entries in the fragment queue must be limited + * to avoid DoS by linear seaching. Instead of a global limit, + * use a limit per entry point. For large packets these sum up. + */ +#define PF_FRAG_ENTRY_LIMIT 64 + /* * ioctl parameter structures */ diff --git a/sys/netpfil/pf/pf_norm.c b/sys/netpfil/pf/pf_norm.c index 0706a230c910..5daf19a3f35d 100644 --- a/sys/netpfil/pf/pf_norm.c +++ b/sys/netpfil/pf/pf_norm.c @@ -87,7 +87,10 @@ struct pf_fragment { #define fr_af fr_key.frc_af #define fr_proto fr_key.frc_proto + /* pointers to queue element */ struct pf_frent *fr_firstoff[PF_FRAG_ENTRY_POINTS]; + /* count entries between pointers */ + uint8_t fr_entries[PF_FRAG_ENTRY_POINTS]; RB_ENTRY(pf_fragment) fr_entry; TAILQ_ENTRY(pf_fragment) frag_next; uint32_t fr_timeout; @@ -138,7 +141,7 @@ static int pf_frent_holes(struct pf_frent *frent); static struct pf_fragment *pf_find_fragment(struct pf_fragment_cmp *key, struct pf_frag_tree *tree); static inline int pf_frent_index(struct pf_frent *); -static void pf_frent_insert(struct pf_fragment *, +static int pf_frent_insert(struct pf_fragment *, struct pf_frent *, struct pf_frent *); void pf_frent_remove(struct pf_fragment *, struct pf_frent *); @@ -392,12 +395,24 @@ pf_frent_index(struct pf_frent *frent) return frent->fe_off / (0x10000 / PF_FRAG_ENTRY_POINTS); } -static void +static int pf_frent_insert(struct pf_fragment *frag, struct pf_frent *frent, struct pf_frent *prev) { int index; + CTASSERT(PF_FRAG_ENTRY_LIMIT <= 0xff); + + /* + * A packet has at most 65536 octets. With 16 entry points, each one + * spawns 4096 octets. We limit these to 64 fragments each, which + * means on average every fragment must have at least 64 octets. + */ + index = pf_frent_index(frent); + if (frag->fr_entries[index] >= PF_FRAG_ENTRY_LIMIT) + return ENOBUFS; + frag->fr_entries[index]++; + if (prev == NULL) { TAILQ_INSERT_HEAD(&frag->fr_queue, frent, fr_next); } else { @@ -406,7 +421,6 @@ pf_frent_insert(struct pf_fragment *frag, struct pf_frent *frent, TAILQ_INSERT_AFTER(&frag->fr_queue, prev, frent, fr_next); } - index = pf_frent_index(frent); if (frag->fr_firstoff[index] == NULL) { KASSERT(prev == NULL || pf_frent_index(prev) < index, ("prev == NULL || pf_frent_index(pref) < index")); @@ -424,6 +438,8 @@ pf_frent_insert(struct pf_fragment *frag, struct pf_frent *frent, } frag->fr_holes += pf_frent_holes(frent); + + return 0; } void @@ -460,6 +476,9 @@ pf_frent_remove(struct pf_fragment *frag, struct pf_frent *frent) } TAILQ_REMOVE(&frag->fr_queue, frent, fr_next); + + KASSERT(frag->fr_entries[index] > 0, ("No fragments remaining")); + frag->fr_entries[index]--; } struct pf_frent * @@ -567,6 +586,7 @@ pf_fillup_fragment(struct pf_fragment_cmp *key, struct pf_frent *frent, *(struct pf_fragment_cmp *)frag = *key; memset(frag->fr_firstoff, 0, sizeof(frag->fr_firstoff)); + memset(frag->fr_entries, 0, sizeof(frag->fr_entries)); frag->fr_timeout = time_uptime; frag->fr_maxlen = frent->fe_len; frag->fr_holes = 1; @@ -575,7 +595,7 @@ pf_fillup_fragment(struct pf_fragment_cmp *key, struct pf_frent *frent, RB_INSERT(pf_frag_tree, &V_pf_frag_tree, frag); TAILQ_INSERT_HEAD(&V_pf_fragqueue, frag, frag_next); - /* We do not have a previous fragment. */ + /* We do not have a previous fragment, cannot fail. */ pf_frent_insert(frag, frent, NULL); return (frag); @@ -646,7 +666,11 @@ pf_fillup_fragment(struct pf_fragment_cmp *key, struct pf_frent *frent, uma_zfree(V_pf_frent_z, after); } - pf_frent_insert(frag, frent, prev); + /* If part of the queue gets too long, there is not way to recover. */ + if (pf_frent_insert(frag, frent, prev)) { + DPFPRINTF(("fragment queue limit exceeded")); + goto bad_fragment; + } return (frag); -- cgit v1.3 From 5c239d80c07ae4955749f51f535f52583688c303 Mon Sep 17 00:00:00 2001 From: Navdeep Parhar Date: Fri, 2 Nov 2018 16:21:44 +0000 Subject: cxgbe/iw_cxgbe: Suppress spurious "Unexpected streaming data ..." messages. Submitted by: Krishnamraju Eraparaju @ Chelsio MFC after: 1 month Sponsored by: Chelsio Communications --- sys/dev/cxgbe/iw_cxgbe/cm.c | 35 ++++++++++++++++++++++++++++++----- sys/dev/cxgbe/iw_cxgbe/qp.c | 16 ++++++++++++++++ 2 files changed, 46 insertions(+), 5 deletions(-) (limited to 'sys') diff --git a/sys/dev/cxgbe/iw_cxgbe/cm.c b/sys/dev/cxgbe/iw_cxgbe/cm.c index f15ec321ad64..515a61d2417d 100644 --- a/sys/dev/cxgbe/iw_cxgbe/cm.c +++ b/sys/dev/cxgbe/iw_cxgbe/cm.c @@ -174,7 +174,6 @@ static void process_newconn(struct c4iw_listen_ep *master_lep, free(__a, M_SONAME); \ } while (0) -#ifdef KTR static char *states[] = { "idle", "listen", @@ -190,7 +189,6 @@ static char *states[] = { "dead", NULL, }; -#endif static void deref_cm_id(struct c4iw_ep_common *epc) { @@ -883,7 +881,9 @@ uninit_iwarp_socket(struct socket *so) static void process_data(struct c4iw_ep *ep) { + int ret = 0; int disconnect = 0; + struct c4iw_qp_attributes attrs = {0}; CTR5(KTR_IW_CXGBE, "%s: so %p, ep %p, state %s, sbused %d", __func__, ep->com.so, ep, states[ep->com.state], sbused(&ep->com.so->so_rcv)); @@ -898,9 +898,16 @@ process_data(struct c4iw_ep *ep) /* Refered in process_newconn() */ c4iw_put_ep(&ep->parent_ep->com); break; + case FPDU_MODE: + MPASS(ep->com.qp != NULL); + attrs.next_state = C4IW_QP_STATE_TERMINATE; + ret = c4iw_modify_qp(ep->com.dev, ep->com.qp, + C4IW_QP_ATTR_NEXT_STATE, &attrs, 1); + if (ret != -EINPROGRESS) + disconnect = 1; + break; default: - if (sbused(&ep->com.so->so_rcv)) - log(LOG_ERR, "%s: Unexpected streaming data. ep %p, " + log(LOG_ERR, "%s: Unexpected streaming data. ep %p, " "state %d, so %p, so_state 0x%x, sbused %u\n", __func__, ep, ep->com.state, ep->com.so, ep->com.so->so_state, sbused(&ep->com.so->so_rcv)); @@ -1180,7 +1187,24 @@ process_socket_event(struct c4iw_ep *ep) } /* rx data */ - process_data(ep); + if (sbused(&ep->com.so->so_rcv)) { + process_data(ep); + return; + } + + /* Socket events for 'MPA Request Received' and 'Close Complete' + * were already processed earlier in their previous events handlers. + * Hence, these socket events are skipped. + * And any other socket events must have handled above. + */ + MPASS((ep->com.state == MPA_REQ_RCVD) || (ep->com.state == MORIBUND)); + + if ((ep->com.state != MPA_REQ_RCVD) && (ep->com.state != MORIBUND)) + log(LOG_ERR, "%s: Unprocessed socket event so %p, " + "so_state 0x%x, so_err %d, sb_state 0x%x, ep %p, ep_state %s\n", + __func__, so, so->so_state, so->so_error, so->so_rcv.sb_state, + ep, states[state]); + } SYSCTL_NODE(_hw, OID_AUTO, iw_cxgbe, CTLFLAG_RD, 0, "iw_cxgbe driver parameters"); @@ -1633,6 +1657,7 @@ send_abort(struct c4iw_ep *ep) * handler(not yet implemented) of iw_cxgbe driver. */ release_ep_resources(ep); + ep->com.state = DEAD; return (0); } diff --git a/sys/dev/cxgbe/iw_cxgbe/qp.c b/sys/dev/cxgbe/iw_cxgbe/qp.c index f04a442879aa..eb00106da846 100644 --- a/sys/dev/cxgbe/iw_cxgbe/qp.c +++ b/sys/dev/cxgbe/iw_cxgbe/qp.c @@ -1475,6 +1475,22 @@ int c4iw_modify_qp(struct c4iw_dev *rhp, struct c4iw_qp *qhp, if (qhp->attr.state == attrs->next_state) goto out; + /* Return EINPROGRESS if QP is already in transition state. + * Eg: CLOSING->IDLE transition or *->ERROR transition. + * This can happen while connection is switching(due to rdma_fini) + * from iWARP/RDDP to TOE mode and any inflight RDMA RX data will + * reach TOE driver -> TCP stack -> iWARP driver. In this way + * iWARP driver keep receiving inflight RDMA RX data until socket + * is closed or aborted. And if iWARP CM is in FPDU sate, then + * it tries to put QP in TERM state and disconnects endpoint. + * But as QP is already in transition state, this event is ignored. + */ + if ((qhp->attr.state >= C4IW_QP_STATE_ERROR) && + (attrs->next_state == C4IW_QP_STATE_TERMINATE)) { + ret = -EINPROGRESS; + goto out; + } + switch (qhp->attr.state) { case C4IW_QP_STATE_IDLE: switch (attrs->next_state) { -- cgit v1.3 From 2203c46d8751ea0f2d669727f539cf19f90edb01 Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Fri, 2 Nov 2018 16:26:44 +0000 Subject: Initialize the eflags field of vm_map headers. Initializing the eflags field of the map->header entry to a value with a unique new bit set makes a few comparisons to &map->header unnecessary. Submitted by: Doug Moore Reviewed by: alc, kib Tested by: pho MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D14005 --- sys/kern/sys_process.c | 5 +++-- sys/vm/vm_map.c | 11 +++++------ sys/vm/vm_map.h | 19 +++++++++---------- 3 files changed, 17 insertions(+), 18 deletions(-) (limited to 'sys') diff --git a/sys/kern/sys_process.c b/sys/kern/sys_process.c index 886df3113737..2922b9f916fa 100644 --- a/sys/kern/sys_process.c +++ b/sys/kern/sys_process.c @@ -387,8 +387,9 @@ ptrace_vm_entry(struct thread *td, struct proc *p, struct ptrace_vm_entry *pve) error = EINVAL; break; } - while (entry != &map->header && - (entry->eflags & MAP_ENTRY_IS_SUB_MAP) != 0) { + KASSERT((map->header.eflags & MAP_ENTRY_IS_SUB_MAP) == 0, + ("Submap in map header")); + while ((entry->eflags & MAP_ENTRY_IS_SUB_MAP) != 0) { entry = entry->next; index++; } diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index e961dd9e4a25..c44c9ff7bce9 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -796,6 +796,7 @@ _vm_map_init(vm_map_t map, pmap_t pmap, vm_offset_t min, vm_offset_t max) { map->header.next = map->header.prev = &map->header; + map->header.eflags = MAP_ENTRY_HEADER; map->needs_wakeup = FALSE; map->system_map = 0; map->pmap = pmap; @@ -1277,8 +1278,8 @@ charged: if (object->ref_count > 1 || object->shadow_count != 0) vm_object_clear_flag(object, OBJ_ONEMAPPING); VM_OBJECT_WUNLOCK(object); - } else if (prev_entry != &map->header && - (prev_entry->eflags & ~MAP_ENTRY_USER_WIRED) == protoeflags && + } else if ((prev_entry->eflags & ~MAP_ENTRY_USER_WIRED) == + protoeflags && (cow & (MAP_STACK_GROWS_DOWN | MAP_STACK_GROWS_UP)) == 0 && prev_entry->end == start && (prev_entry->cred == cred || (prev_entry->object.vm_object != NULL && @@ -1708,8 +1709,7 @@ vm_map_simplify_entry(vm_map_t map, vm_map_entry_t entry) return; prev = entry->prev; - if (prev != &map->header && - vm_map_mergeable_neighbors(prev, entry)) { + if (vm_map_mergeable_neighbors(prev, entry)) { vm_map_entry_unlink(map, prev); entry->start = prev->start; entry->offset = prev->offset; @@ -1719,8 +1719,7 @@ vm_map_simplify_entry(vm_map_t map, vm_map_entry_t entry) } next = entry->next; - if (next != &map->header && - vm_map_mergeable_neighbors(entry, next)) { + if (vm_map_mergeable_neighbors(entry, next)) { vm_map_entry_unlink(map, next); entry->end = next->end; vm_map_entry_resize_free(map, entry); diff --git a/sys/vm/vm_map.h b/sys/vm/vm_map.h index 23548bf7d9b5..b1cf8dbc44fc 100644 --- a/sys/vm/vm_map.h +++ b/sys/vm/vm_map.h @@ -146,6 +146,7 @@ struct vm_map_entry { #define MAP_ENTRY_GUARD 0x10000 #define MAP_ENTRY_STACK_GAP_DN 0x20000 #define MAP_ENTRY_STACK_GAP_UP 0x40000 +#define MAP_ENTRY_HEADER 0x80000 #ifdef _KERNEL static __inline u_char @@ -175,24 +176,22 @@ vm_map_entry_system_wired_count(vm_map_entry_t entry) * list. Both structures are ordered based upon the start and * end addresses contained within each map entry. * - * Counterintuitively, the map's min offset value is stored in - * map->header.end, and its max offset value is stored in - * map->header.start. - * - * The list header has max start value and min end value to act - * as sentinels for sequential search of the doubly-linked list. * Sleator and Tarjan's top-down splay algorithm is employed to * control height imbalance in the binary search tree. * + * The map's min offset value is stored in map->header.end, and + * its max offset value is stored in map->header.start. These + * values act as sentinels for any forward or backward address + * scan of the list. The map header has a special value for the + * eflags field, MAP_ENTRY_HEADER, that is set initially, is + * never changed, and prevents an eflags match of the header + * with any other map entry. + * * List of locks * (c) const until freed */ struct vm_map { struct vm_map_entry header; /* List of entries */ -/* - map min_offset header.end (c) - map max_offset header.start (c) -*/ struct sx lock; /* Lock for map data */ struct mtx system_mtx; int nentries; /* Number of entries */ -- cgit v1.3 From 5f6cf24e2da6f22e5aeea2bc7ae83da5d01682c4 Mon Sep 17 00:00:00 2001 From: Kristof Provost Date: Fri, 2 Nov 2018 16:47:07 +0000 Subject: pfsync: Make pfsync callbacks per-vnet The callbacks are installed and removed depending on the state of the pfsync device, which is per-vnet. The callbacks must also be per-vnet. MFC after: 2 weeks Sponsored by: Orange Business Services Differential Revision: https://reviews.freebsd.org/D17499 --- sys/net/pfvar.h | 18 ++++++++++++------ sys/netpfil/pf/if_pfsync.c | 35 ++++++++++++++++++----------------- sys/netpfil/pf/pf.c | 42 +++++++++++++++++++++--------------------- sys/netpfil/pf/pf_ioctl.c | 21 +++++++++++---------- 4 files changed, 62 insertions(+), 54 deletions(-) (limited to 'sys') diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index a7ed87af3c18..9ace26e49d0c 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -825,12 +825,18 @@ typedef void pfsync_delete_state_t(struct pf_state *); typedef void pfsync_clear_states_t(u_int32_t, const char *); typedef int pfsync_defer_t(struct pf_state *, struct mbuf *); -extern pfsync_state_import_t *pfsync_state_import_ptr; -extern pfsync_insert_state_t *pfsync_insert_state_ptr; -extern pfsync_update_state_t *pfsync_update_state_ptr; -extern pfsync_delete_state_t *pfsync_delete_state_ptr; -extern pfsync_clear_states_t *pfsync_clear_states_ptr; -extern pfsync_defer_t *pfsync_defer_ptr; +VNET_DECLARE(pfsync_state_import_t *, pfsync_state_import_ptr); +#define V_pfsync_state_import_ptr VNET(pfsync_state_import_ptr) +VNET_DECLARE(pfsync_insert_state_t *, pfsync_insert_state_ptr); +#define V_pfsync_insert_state_ptr VNET(pfsync_insert_state_ptr) +VNET_DECLARE(pfsync_update_state_t *, pfsync_update_state_ptr); +#define V_pfsync_update_state_ptr VNET(pfsync_update_state_ptr) +VNET_DECLARE(pfsync_delete_state_t *, pfsync_delete_state_ptr); +#define V_pfsync_delete_state_ptr VNET(pfsync_delete_state_ptr) +VNET_DECLARE(pfsync_clear_states_t *, pfsync_clear_states_ptr); +#define V_pfsync_clear_states_ptr VNET(pfsync_clear_states_ptr) +VNET_DECLARE(pfsync_defer_t *, pfsync_defer_ptr); +#define V_pfsync_defer_ptr VNET(pfsync_defer_ptr) void pfsync_state_export(struct pfsync_state *, struct pf_state *); diff --git a/sys/netpfil/pf/if_pfsync.c b/sys/netpfil/pf/if_pfsync.c index 71d6696d4eff..58902c278647 100644 --- a/sys/netpfil/pf/if_pfsync.c +++ b/sys/netpfil/pf/if_pfsync.c @@ -1362,10 +1362,10 @@ pfsyncioctl(struct ifnet *ifp, u_long cmd, caddr_t data) sc->sc_maxupdates = pfsyncr.pfsyncr_maxupdates; if (pfsyncr.pfsyncr_defer) { sc->sc_flags |= PFSYNCF_DEFER; - pfsync_defer_ptr = pfsync_defer; + V_pfsync_defer_ptr = pfsync_defer; } else { sc->sc_flags &= ~PFSYNCF_DEFER; - pfsync_defer_ptr = NULL; + V_pfsync_defer_ptr = NULL; } if (sifp == NULL) { @@ -2311,12 +2311,12 @@ pfsync_pointers_init() { PF_RULES_WLOCK(); - pfsync_state_import_ptr = pfsync_state_import; - pfsync_insert_state_ptr = pfsync_insert_state; - pfsync_update_state_ptr = pfsync_update_state; - pfsync_delete_state_ptr = pfsync_delete_state; - pfsync_clear_states_ptr = pfsync_clear_states; - pfsync_defer_ptr = pfsync_defer; + V_pfsync_state_import_ptr = pfsync_state_import; + V_pfsync_insert_state_ptr = pfsync_insert_state; + V_pfsync_update_state_ptr = pfsync_update_state; + V_pfsync_delete_state_ptr = pfsync_delete_state; + V_pfsync_clear_states_ptr = pfsync_clear_states; + V_pfsync_defer_ptr = pfsync_defer; PF_RULES_WUNLOCK(); } @@ -2325,12 +2325,12 @@ pfsync_pointers_uninit() { PF_RULES_WLOCK(); - pfsync_state_import_ptr = NULL; - pfsync_insert_state_ptr = NULL; - pfsync_update_state_ptr = NULL; - pfsync_delete_state_ptr = NULL; - pfsync_clear_states_ptr = NULL; - pfsync_defer_ptr = NULL; + V_pfsync_state_import_ptr = NULL; + V_pfsync_insert_state_ptr = NULL; + V_pfsync_update_state_ptr = NULL; + V_pfsync_delete_state_ptr = NULL; + V_pfsync_clear_states_ptr = NULL; + V_pfsync_defer_ptr = NULL; PF_RULES_WUNLOCK(); } @@ -2347,6 +2347,8 @@ vnet_pfsync_init(const void *unused __unused) if_clone_detach(V_pfsync_cloner); log(LOG_INFO, "swi_add() failed in %s\n", __func__); } + + pfsync_pointers_init(); } VNET_SYSINIT(vnet_pfsync_init, SI_SUB_PROTO_FIREWALL, SI_ORDER_ANY, vnet_pfsync_init, NULL); @@ -2355,6 +2357,8 @@ static void vnet_pfsync_uninit(const void *unused __unused) { + pfsync_pointers_uninit(); + if_clone_detach(V_pfsync_cloner); swi_remove(V_pfsync_swi_cookie); } @@ -2380,7 +2384,6 @@ pfsync_init() return (error); } #endif - pfsync_pointers_init(); return (0); } @@ -2389,8 +2392,6 @@ static void pfsync_uninit() { - pfsync_pointers_uninit(); - #ifdef INET ipproto_unregister(IPPROTO_PFSYNC); pf_proto_unregister(PF_INET, IPPROTO_PFSYNC, SOCK_RAW); diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 1ec7df96b43f..4c8afca756e9 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -1268,8 +1268,8 @@ pf_state_insert(struct pfi_kif *kif, struct pf_state_key *skw, refcount_init(&s->refs, 2); counter_u64_add(V_pf_status.fcounters[FCNT_STATE_INSERT], 1); - if (pfsync_insert_state_ptr != NULL) - pfsync_insert_state_ptr(s); + if (V_pfsync_insert_state_ptr != NULL) + V_pfsync_insert_state_ptr(s); /* Returns locked. */ return (0); @@ -1672,8 +1672,8 @@ pf_unlink_state(struct pf_state *s, u_int flags) LIST_REMOVE(s, entry); pf_src_tree_remove_state(s); - if (pfsync_delete_state_ptr != NULL) - pfsync_delete_state_ptr(s); + if (V_pfsync_delete_state_ptr != NULL) + V_pfsync_delete_state_ptr(s); STATE_DEC_COUNTERS(s); @@ -3582,7 +3582,7 @@ pf_test_rule(struct pf_rule **rm, struct pf_state **sm, int direction, if (*sm != NULL && !((*sm)->state_flags & PFSTATE_NOSYNC) && direction == PF_OUT && - pfsync_defer_ptr != NULL && pfsync_defer_ptr(*sm, m)) + V_pfsync_defer_ptr != NULL && V_pfsync_defer_ptr(*sm, m)) /* * We want the state created, but we dont * want to send this in case a partner @@ -5996,8 +5996,8 @@ pf_test(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb * action = pf_test_state_tcp(&s, dir, kif, m, off, h, &pd, &reason); if (action == PF_PASS) { - if (pfsync_update_state_ptr != NULL) - pfsync_update_state_ptr(s); + if (V_pfsync_update_state_ptr != NULL) + V_pfsync_update_state_ptr(s); r = s->rule.ptr; a = s->anchor.ptr; log = s->log; @@ -6025,8 +6025,8 @@ pf_test(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb * } action = pf_test_state_udp(&s, dir, kif, m, off, h, &pd); if (action == PF_PASS) { - if (pfsync_update_state_ptr != NULL) - pfsync_update_state_ptr(s); + if (V_pfsync_update_state_ptr != NULL) + V_pfsync_update_state_ptr(s); r = s->rule.ptr; a = s->anchor.ptr; log = s->log; @@ -6048,8 +6048,8 @@ pf_test(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb * action = pf_test_state_icmp(&s, dir, kif, m, off, h, &pd, &reason); if (action == PF_PASS) { - if (pfsync_update_state_ptr != NULL) - pfsync_update_state_ptr(s); + if (V_pfsync_update_state_ptr != NULL) + V_pfsync_update_state_ptr(s); r = s->rule.ptr; a = s->anchor.ptr; log = s->log; @@ -6071,8 +6071,8 @@ pf_test(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb * default: action = pf_test_state_other(&s, dir, kif, m, &pd); if (action == PF_PASS) { - if (pfsync_update_state_ptr != NULL) - pfsync_update_state_ptr(s); + if (V_pfsync_update_state_ptr != NULL) + V_pfsync_update_state_ptr(s); r = s->rule.ptr; a = s->anchor.ptr; log = s->log; @@ -6435,8 +6435,8 @@ pf_test6(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb action = pf_test_state_tcp(&s, dir, kif, m, off, h, &pd, &reason); if (action == PF_PASS) { - if (pfsync_update_state_ptr != NULL) - pfsync_update_state_ptr(s); + if (V_pfsync_update_state_ptr != NULL) + V_pfsync_update_state_ptr(s); r = s->rule.ptr; a = s->anchor.ptr; log = s->log; @@ -6464,8 +6464,8 @@ pf_test6(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb } action = pf_test_state_udp(&s, dir, kif, m, off, h, &pd); if (action == PF_PASS) { - if (pfsync_update_state_ptr != NULL) - pfsync_update_state_ptr(s); + if (V_pfsync_update_state_ptr != NULL) + V_pfsync_update_state_ptr(s); r = s->rule.ptr; a = s->anchor.ptr; log = s->log; @@ -6494,8 +6494,8 @@ pf_test6(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb action = pf_test_state_icmp(&s, dir, kif, m, off, h, &pd, &reason); if (action == PF_PASS) { - if (pfsync_update_state_ptr != NULL) - pfsync_update_state_ptr(s); + if (V_pfsync_update_state_ptr != NULL) + V_pfsync_update_state_ptr(s); r = s->rule.ptr; a = s->anchor.ptr; log = s->log; @@ -6508,8 +6508,8 @@ pf_test6(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb default: action = pf_test_state_other(&s, dir, kif, m, &pd); if (action == PF_PASS) { - if (pfsync_update_state_ptr != NULL) - pfsync_update_state_ptr(s); + if (V_pfsync_update_state_ptr != NULL) + V_pfsync_update_state_ptr(s); r = s->rule.ptr; a = s->anchor.ptr; log = s->log; diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index ecc3b59edf49..670b8f7e8005 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -212,12 +212,13 @@ struct sx pf_ioctl_lock; struct sx pf_end_lock; /* pfsync */ -pfsync_state_import_t *pfsync_state_import_ptr = NULL; -pfsync_insert_state_t *pfsync_insert_state_ptr = NULL; -pfsync_update_state_t *pfsync_update_state_ptr = NULL; -pfsync_delete_state_t *pfsync_delete_state_ptr = NULL; -pfsync_clear_states_t *pfsync_clear_states_ptr = NULL; -pfsync_defer_t *pfsync_defer_ptr = NULL; +VNET_DEFINE(pfsync_state_import_t *, pfsync_state_import_ptr); +VNET_DEFINE(pfsync_insert_state_t *, pfsync_insert_state_ptr); +VNET_DEFINE(pfsync_update_state_t *, pfsync_update_state_ptr); +VNET_DEFINE(pfsync_delete_state_t *, pfsync_delete_state_ptr); +VNET_DEFINE(pfsync_clear_states_t *, pfsync_clear_states_ptr); +VNET_DEFINE(pfsync_defer_t *, pfsync_defer_ptr); + /* pflog */ pflog_packet_t *pflog_packet_ptr = NULL; @@ -1873,8 +1874,8 @@ relock_DIOCCLRSTATES: PF_HASHROW_UNLOCK(ih); } psk->psk_killed = killed; - if (pfsync_clear_states_ptr != NULL) - pfsync_clear_states_ptr(V_pf_status.hostid, psk->psk_ifname); + if (V_pfsync_clear_states_ptr != NULL) + V_pfsync_clear_states_ptr(V_pf_status.hostid, psk->psk_ifname); break; } @@ -1961,9 +1962,9 @@ relock_DIOCKILLSTATES: error = EINVAL; break; } - if (pfsync_state_import_ptr != NULL) { + if (V_pfsync_state_import_ptr != NULL) { PF_RULES_RLOCK(); - error = pfsync_state_import_ptr(sp, PFSYNC_SI_IOCTL); + error = V_pfsync_state_import_ptr(sp, PFSYNC_SI_IOCTL); PF_RULES_RUNLOCK(); } else error = EOPNOTSUPP; -- cgit v1.3 From 25c6ab1b78b5142503e5d03832fbe050d47a2dc5 Mon Sep 17 00:00:00 2001 From: Kristof Provost Date: Fri, 2 Nov 2018 16:50:17 +0000 Subject: Notify that the ifnet will go away, even on vnet shutdown pf subscribes to ifnet_departure_event events, so it can clean up the ifg_pf_kif and if_pf_kif pointers in the ifnet. During vnet shutdown interfaces could go away without sending the event, so pf ends up cleaning these up as part of its shutdown sequence, which happens after the ifnet has already been freed. Send the ifnet_departure_event during vnet shutdown, allowing pf to clean up correctly. MFC after: 2 weeks Sponsored by: Orange Business Services Differential Revision: https://reviews.freebsd.org/D17500 --- sys/net/if.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sys') diff --git a/sys/net/if.c b/sys/net/if.c index 9884cc6d9f43..4a89e37e5f53 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1122,6 +1122,9 @@ if_detach_internal(struct ifnet *ifp, int vmove, struct if_clone **ifcp) * the work top-down for us. */ if (shutdown) { + /* Give interface users the chance to clean up. */ + EVENTHANDLER_INVOKE(ifnet_departure_event, ifp); + /* * In case of a vmove we are done here without error. * If we would signal an error it would lead to the same -- cgit v1.3 From 26549dfcad9a017dbab72bb306c65ce99bace946 Mon Sep 17 00:00:00 2001 From: Kristof Provost Date: Fri, 2 Nov 2018 16:53:15 +0000 Subject: pfsync: Ensure uninit is done before pf pfsync touches pf memory (for pf_state and the pfsync callback pointers), not the other way around. We need to ensure that pfsync is torn down before pf. MFC after: 2 weeks Sponsored by: Orange Business Services Differential Revision: https://reviews.freebsd.org/D17501 --- sys/netpfil/pf/if_pfsync.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'sys') diff --git a/sys/netpfil/pf/if_pfsync.c b/sys/netpfil/pf/if_pfsync.c index 58902c278647..27862df53b6f 100644 --- a/sys/netpfil/pf/if_pfsync.c +++ b/sys/netpfil/pf/if_pfsync.c @@ -2362,11 +2362,8 @@ vnet_pfsync_uninit(const void *unused __unused) if_clone_detach(V_pfsync_cloner); swi_remove(V_pfsync_swi_cookie); } -/* - * Detach after pf is gone; otherwise we might touch pfsync memory - * from within pf after freeing pfsync. - */ -VNET_SYSUNINIT(vnet_pfsync_uninit, SI_SUB_INIT_IF, SI_ORDER_SECOND, + +VNET_SYSUNINIT(vnet_pfsync_uninit, SI_SUB_PROTO_FIREWALL, SI_ORDER_FOURTH, vnet_pfsync_uninit, NULL); static int -- cgit v1.3 From fbbf436d56a307944c0cd0097492ddcb70b57490 Mon Sep 17 00:00:00 2001 From: Kristof Provost Date: Fri, 2 Nov 2018 16:57:23 +0000 Subject: pfsync: Handle syncdev going away If the syncdev is removed we no longer need to clean up the multicast entry we've got set up for that device. Pass the ifnet detach event through pf to pfsync, and remove our multicast handle, and mark us as no longer having a syncdev. Note that this callback is always installed, even if the pfsync interface is disabled (and thus it's not a per-vnet callback pointer). MFC after: 2 weeks Sponsored by: Orange Business Services Differential Revision: https://reviews.freebsd.org/D17502 --- sys/net/pfvar.h | 2 ++ sys/netpfil/pf/if_pfsync.c | 27 +++++++++++++++++++++++++++ sys/netpfil/pf/pf_if.c | 4 ++++ sys/netpfil/pf/pf_ioctl.c | 1 + 4 files changed, 34 insertions(+) (limited to 'sys') diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index 9ace26e49d0c..2924c06dbc43 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -824,6 +824,7 @@ typedef void pfsync_update_state_t(struct pf_state *); typedef void pfsync_delete_state_t(struct pf_state *); typedef void pfsync_clear_states_t(u_int32_t, const char *); typedef int pfsync_defer_t(struct pf_state *, struct mbuf *); +typedef void pfsync_detach_ifnet_t(struct ifnet *); VNET_DECLARE(pfsync_state_import_t *, pfsync_state_import_ptr); #define V_pfsync_state_import_ptr VNET(pfsync_state_import_ptr) @@ -837,6 +838,7 @@ VNET_DECLARE(pfsync_clear_states_t *, pfsync_clear_states_ptr); #define V_pfsync_clear_states_ptr VNET(pfsync_clear_states_ptr) VNET_DECLARE(pfsync_defer_t *, pfsync_defer_ptr); #define V_pfsync_defer_ptr VNET(pfsync_defer_ptr) +extern pfsync_detach_ifnet_t *pfsync_detach_ifnet_ptr; void pfsync_state_export(struct pfsync_state *, struct pf_state *); diff --git a/sys/netpfil/pf/if_pfsync.c b/sys/netpfil/pf/if_pfsync.c index 27862df53b6f..25c5715c714a 100644 --- a/sys/netpfil/pf/if_pfsync.c +++ b/sys/netpfil/pf/if_pfsync.c @@ -281,6 +281,7 @@ static void pfsync_bulk_status(u_int8_t); static void pfsync_bulk_update(void *); static void pfsync_bulk_fail(void *); +static void pfsync_detach_ifnet(struct ifnet *); #ifdef IPSEC static void pfsync_update_net_tdb(struct pfsync_tdb *); #endif @@ -2292,6 +2293,29 @@ pfsync_multicast_cleanup(struct pfsync_softc *sc) imo->imo_multicast_ifp = NULL; } +void +pfsync_detach_ifnet(struct ifnet *ifp) +{ + struct pfsync_softc *sc = V_pfsyncif; + + if (sc == NULL) + return; + + PFSYNC_LOCK(sc); + + if (sc->sc_sync_if == ifp) { + /* We don't need mutlicast cleanup here, because the interface + * is going away. We do need to ensure we don't try to do + * cleanup later. + */ + sc->sc_imo.imo_membership = NULL; + sc->sc_imo.imo_multicast_ifp = NULL; + sc->sc_sync_if = NULL; + } + + PFSYNC_UNLOCK(sc); +} + #ifdef INET extern struct domain inetdomain; static struct protosw in_pfsync_protosw = { @@ -2372,6 +2396,8 @@ pfsync_init() #ifdef INET int error; + pfsync_detach_ifnet_ptr = pfsync_detach_ifnet; + error = pf_proto_register(PF_INET, &in_pfsync_protosw); if (error) return (error); @@ -2388,6 +2414,7 @@ pfsync_init() static void pfsync_uninit() { + pfsync_detach_ifnet_ptr = NULL; #ifdef INET ipproto_unregister(IPPROTO_PFSYNC); diff --git a/sys/netpfil/pf/pf_if.c b/sys/netpfil/pf/pf_if.c index 599f80cf7f13..8e1b0e83792b 100644 --- a/sys/netpfil/pf/pf_if.c +++ b/sys/netpfil/pf/pf_if.c @@ -834,6 +834,9 @@ pfi_detach_ifnet_event(void *arg __unused, struct ifnet *ifp) { struct pfi_kif *kif = (struct pfi_kif *)ifp->if_pf_kif; + if (pfsync_detach_ifnet_ptr) + pfsync_detach_ifnet_ptr(ifp); + if (kif == NULL) return; @@ -841,6 +844,7 @@ pfi_detach_ifnet_event(void *arg __unused, struct ifnet *ifp) /* Avoid teardown race in the least expensive way. */ return; } + PF_RULES_WLOCK(); V_pfi_update++; pfi_kif_update(kif); diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 670b8f7e8005..3bb65ddbb2de 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -218,6 +218,7 @@ VNET_DEFINE(pfsync_update_state_t *, pfsync_update_state_ptr); VNET_DEFINE(pfsync_delete_state_t *, pfsync_delete_state_ptr); VNET_DEFINE(pfsync_clear_states_t *, pfsync_clear_states_ptr); VNET_DEFINE(pfsync_defer_t *, pfsync_defer_ptr); +pfsync_detach_ifnet_t *pfsync_detach_ifnet_ptr; /* pflog */ pflog_packet_t *pflog_packet_ptr = NULL; -- cgit v1.3 From 04fe85f06867cc660d711625b6805d06b7ec7f8a Mon Sep 17 00:00:00 2001 From: Kristof Provost Date: Fri, 2 Nov 2018 17:01:18 +0000 Subject: pfsync: Allow module to be unloaded MFC after: 2 weeks Sponsored by: Orange Business Services Differential Revision: https://reviews.freebsd.org/D17505 --- sys/netpfil/pf/if_pfsync.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'sys') diff --git a/sys/netpfil/pf/if_pfsync.c b/sys/netpfil/pf/if_pfsync.c index 25c5715c714a..b73f012e0629 100644 --- a/sys/netpfil/pf/if_pfsync.c +++ b/sys/netpfil/pf/if_pfsync.c @@ -2431,12 +2431,6 @@ pfsync_modevent(module_t mod, int type, void *data) case MOD_LOAD: error = pfsync_init(); break; - case MOD_QUIESCE: - /* - * Module should not be unloaded due to race conditions. - */ - error = EBUSY; - break; case MOD_UNLOAD: pfsync_uninit(); break; -- cgit v1.3 From af6a86eb9a874cb1bb60d99958d87dc66e878227 Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Fri, 2 Nov 2018 17:02:10 +0000 Subject: Adjust SiS 966/968 HDA controller naming. Submitted by: Dmitry Luhtionov --- sys/dev/sound/pci/hda/hdac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys') diff --git a/sys/dev/sound/pci/hda/hdac.c b/sys/dev/sound/pci/hda/hdac.c index a850fc08eced..7e471ae84397 100644 --- a/sys/dev/sound/pci/hda/hdac.c +++ b/sys/dev/sound/pci/hda/hdac.c @@ -171,7 +171,7 @@ static const struct { { HDA_AMD_HUDSON2, "AMD Hudson-2", 0, 0 }, { HDA_RDC_M3010, "RDC M3010", 0, 0 }, { HDA_VIA_VT82XX, "VIA VT8251/8237A",0, 0 }, - { HDA_SIS_966, "SiS 966", 0, 0 }, + { HDA_SIS_966, "SiS 966/968", 0, 0 }, { HDA_ULI_M5461, "ULI M5461", 0, 0 }, /* Unknown */ { HDA_INTEL_ALL, "Intel", 0, 0 }, -- cgit v1.3 From dde6e1fecb6cafe1b23cccb519cf9c2cd48276cd Mon Sep 17 00:00:00 2001 From: Kristof Provost Date: Fri, 2 Nov 2018 17:03:53 +0000 Subject: pfsync: Add missing unlock If we fail to set up the multicast entry for pfsync and return an error we must release the pfsync lock first. MFC after: 2 weeks Sponsored by: Orange Business Services Differential Revision: https://reviews.freebsd.org/D17506 --- sys/netpfil/pf/if_pfsync.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sys') diff --git a/sys/netpfil/pf/if_pfsync.c b/sys/netpfil/pf/if_pfsync.c index b73f012e0629..5d36793b032e 100644 --- a/sys/netpfil/pf/if_pfsync.c +++ b/sys/netpfil/pf/if_pfsync.c @@ -1394,6 +1394,7 @@ pfsyncioctl(struct ifnet *ifp, u_long cmd, caddr_t data) if (error) { if_rele(sifp); free(mship, M_PFSYNC); + PFSYNC_UNLOCK(sc); return (error); } } -- cgit v1.3 From 14624ab5822fc0ae5734ea4cbeda44683cacb481 Mon Sep 17 00:00:00 2001 From: Kristof Provost Date: Fri, 2 Nov 2018 17:05:40 +0000 Subject: pf: Keep a reference to struct ifnets we're using Ensure that the struct ifnet we use can't go away until we're done with it. --- sys/netpfil/pf/pf_if.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'sys') diff --git a/sys/netpfil/pf/pf_if.c b/sys/netpfil/pf/pf_if.c index 8e1b0e83792b..76b8d4abd5af 100644 --- a/sys/netpfil/pf/pf_if.c +++ b/sys/netpfil/pf/pf_if.c @@ -165,8 +165,10 @@ pfi_cleanup_vnet(void) RB_REMOVE(pfi_ifhead, &V_pfi_ifs, kif); if (kif->pfik_group) kif->pfik_group->ifg_pf_kif = NULL; - if (kif->pfik_ifp) + if (kif->pfik_ifp) { + if_rele(kif->pfik_ifp); kif->pfik_ifp->if_pf_kif = NULL; + } free(kif, PFI_MTYPE); } @@ -322,6 +324,8 @@ pfi_attach_ifnet(struct ifnet *ifp) V_pfi_update++; kif = pfi_kif_attach(kif, ifp->if_xname); + if_ref(ifp); + kif->pfik_ifp = ifp; ifp->if_pf_kif = kif; @@ -849,6 +853,8 @@ pfi_detach_ifnet_event(void *arg __unused, struct ifnet *ifp) V_pfi_update++; pfi_kif_update(kif); + if_rele(kif->pfik_ifp); + kif->pfik_ifp = NULL; ifp->if_pf_kif = NULL; #ifdef ALTQ -- cgit v1.3 From 003ffd57fee17c333e34630c69ecda239328fd3e Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Fri, 2 Nov 2018 17:50:57 +0000 Subject: Add sysctl_usec_to_sbintime and sysctl_msec_to_sbintime. These functions are used to present a sbintime_t as either a number of microseconds or a number of milliseconds respectively. Sponsored by: Netflix --- sys/kern/kern_sysctl.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ sys/sys/sysctl.h | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+) (limited to 'sys') diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index 13d05189d52d..879e4d652a5e 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -1691,6 +1691,53 @@ retry: return (error); } +/* + * Based on on sysctl_handle_int() convert microseconds to a sbintime. + */ +int +sysctl_usec_to_sbintime(SYSCTL_HANDLER_ARGS) +{ + int error; + int64_t tt; + sbintime_t sb; + + tt = *(int64_t *)arg1; + sb = ustosbt(tt); + + error = sysctl_handle_64(oidp, &sb, 0, req); + if (error || !req->newptr) + return (error); + + tt = sbttous(sb); + *(int64_t *)arg1 = tt; + + return (0); +} + +/* + * Based on on sysctl_handle_int() convert milliseconds to a sbintime. + */ +int +sysctl_msec_to_sbintime(SYSCTL_HANDLER_ARGS) +{ + int error; + int64_t tt; + sbintime_t sb; + + tt = *(int64_t *)arg1; + sb = mstosbt(tt); + + error = sysctl_handle_64(oidp, &sb, 0, req); + if (error || !req->newptr) + return (error); + + tt = sbttoms(sb); + *(int64_t *)arg1 = tt; + + return (0); +} + + /* * Transfer functions to/from kernel space. * XXX: rather untested at this point diff --git a/sys/sys/sysctl.h b/sys/sys/sysctl.h index 8264f681bcc0..843b6e623cc6 100644 --- a/sys/sys/sysctl.h +++ b/sys/sys/sysctl.h @@ -216,6 +216,9 @@ int sysctl_handle_counter_u64_array(SYSCTL_HANDLER_ARGS); int sysctl_handle_uma_zone_max(SYSCTL_HANDLER_ARGS); int sysctl_handle_uma_zone_cur(SYSCTL_HANDLER_ARGS); +int sysctl_msec_to_sbintime(SYSCTL_HANDLER_ARGS); +int sysctl_usec_to_sbintime(SYSCTL_HANDLER_ARGS); + int sysctl_dpcpu_int(SYSCTL_HANDLER_ARGS); int sysctl_dpcpu_long(SYSCTL_HANDLER_ARGS); int sysctl_dpcpu_quad(SYSCTL_HANDLER_ARGS); @@ -799,6 +802,42 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry); NULL); \ }) +/* OID expressing a sbintime_t as microseconds */ +#define SYSCTL_SBINTIME_USEC(parent, nbr, name, access, ptr, descr) \ + SYSCTL_OID(parent, nbr, name, \ + CTLTYPE_INT | CTLFLAG_MPSAFE | CTLFLAG_RD | (access), \ + (ptr), 0, sysctl_usec_to_sbintime, "Q", descr); \ + CTASSERT(((access) & CTLTYPE) == 0 || \ + ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_S64) +#define SYSCTL_ADD_SBINTIME_USEC(ctx, parent, nbr, name, access, ptr, descr) \ +({ \ + sbintime_t *__ptr = (ptr); \ + CTASSERT(((access) & CTLTYPE) == 0 || \ + ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_S64); \ + sysctl_add_oid(ctx, parent, nbr, name, \ + CTLTYPE_INT | CTLFLAG_MPSAFE | CTLFLAG_RD | (access), \ + __ptr, 0, sysctl_usec_to_sbintime, "Q", __DESCR(descr), \ + NULL); \ +}) + +/* OID expressing a sbintime_t as milliseconds */ +#define SYSCTL_SBINTIME_MSEC(parent, nbr, name, access, ptr, descr) \ + SYSCTL_OID(parent, nbr, name, \ + CTLTYPE_INT | CTLFLAG_MPSAFE | CTLFLAG_RD | (access), \ + (ptr), 0, sysctl_msec_to_sbintime, "Q", descr); \ + CTASSERT(((access) & CTLTYPE) == 0 || \ + ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_S64) +#define SYSCTL_ADD_SBINTIME_MSEC(ctx, parent, nbr, name, access, ptr, descr) \ +({ \ + sbintime_t *__ptr = (ptr); \ + CTASSERT(((access) & CTLTYPE) == 0 || \ + ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_S64); \ + sysctl_add_oid(ctx, parent, nbr, name, \ + CTLTYPE_INT | CTLFLAG_MPSAFE | CTLFLAG_RD | (access), \ + __ptr, 0, sysctl_msec_to_sbintime, "Q", __DESCR(descr), \ + NULL); \ +}) + /* * A macro to generate a read-only sysctl to indicate the presence of optional * kernel features. -- cgit v1.3 From e74f411d4758abd27a1e1299e1920cbf82cac06c Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Fri, 2 Nov 2018 19:02:03 +0000 Subject: Define NT_FREEBSD_FEATURE_CTL ELF note type This ELF note will be used to allow binaries to opt out of, or in to, upcoming vulnerability mitigation and other features. Committing the definition and readelf change separately to allow independent MFC. MFC after: 3 days Sponsored by: The FreeBSD Foundation --- contrib/elftoolchain/readelf/readelf.c | 1 + sys/sys/elf_common.h | 1 + 2 files changed, 2 insertions(+) (limited to 'sys') diff --git a/contrib/elftoolchain/readelf/readelf.c b/contrib/elftoolchain/readelf/readelf.c index 6db564a32366..c509e591fcba 100644 --- a/contrib/elftoolchain/readelf/readelf.c +++ b/contrib/elftoolchain/readelf/readelf.c @@ -1121,6 +1121,7 @@ note_type_freebsd(unsigned int nt) case 1: return "NT_FREEBSD_ABI_TAG"; case 2: return "NT_FREEBSD_NOINIT_TAG"; case 3: return "NT_FREEBSD_ARCH_TAG"; + case 4: return "NT_FREEBSD_FEATURE_CTL"; default: return (note_type_unknown(nt)); } } diff --git a/sys/sys/elf_common.h b/sys/sys/elf_common.h index 5aa10ad1c802..3a1607815a74 100644 --- a/sys/sys/elf_common.h +++ b/sys/sys/elf_common.h @@ -759,6 +759,7 @@ typedef struct { #define NT_FREEBSD_ABI_TAG 1 #define NT_FREEBSD_NOINIT_TAG 2 #define NT_FREEBSD_ARCH_TAG 3 +#define NT_FREEBSD_FEATURE_CTL 4 /* Values for n_type. Used in core files. */ #define NT_PRSTATUS 1 /* Process status. */ -- cgit v1.3 From 54e675342b5d05b49928ab95e10fcbbd794206d2 Mon Sep 17 00:00:00 2001 From: "Jonathan T. Looney" Date: Fri, 2 Nov 2018 19:14:15 +0000 Subject: m_pulldown() may reallocate n. Update the oip pointer after the m_pulldown() call. MFC after: 2 weeks Sponsored by: Netflix --- sys/netinet/ip_icmp.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sys') diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c index 123cf7e44fdb..5dd66dab24da 100644 --- a/sys/netinet/ip_icmp.c +++ b/sys/netinet/ip_icmp.c @@ -264,6 +264,7 @@ icmp_error(struct mbuf *n, int type, int code, uint32_t dest, int mtu) if (n->m_len < oiphlen + tcphlen && (n = m_pullup(n, oiphlen + tcphlen)) == NULL) goto freeit; + oip = mtod(n, struct ip *); icmpelen = max(tcphlen, min(V_icmp_quotelen, ntohs(oip->ip_len) - oiphlen)); } else if (oip->ip_p == IPPROTO_SCTP) { -- cgit v1.3 From 58ef854f8b05508f41aff3bdaf1564c8dd4c1d4f Mon Sep 17 00:00:00 2001 From: Kristof Provost Date: Fri, 2 Nov 2018 19:23:50 +0000 Subject: pf: Fix build if INVARIANTS is not set r340061 included a number of assertions pf_frent_remove(), but these assertions were the only use of the 'prev' variable. As a result builds without INVARIANTS had an unused variable, and failed. Reported by: vangyzen@ --- sys/netpfil/pf/pf_norm.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sys') diff --git a/sys/netpfil/pf/pf_norm.c b/sys/netpfil/pf/pf_norm.c index 5daf19a3f35d..f10a87a895d6 100644 --- a/sys/netpfil/pf/pf_norm.c +++ b/sys/netpfil/pf/pf_norm.c @@ -445,7 +445,9 @@ pf_frent_insert(struct pf_fragment *frag, struct pf_frent *frent, void pf_frent_remove(struct pf_fragment *frag, struct pf_frent *frent) { +#ifdef INVARIANTS struct pf_frent *prev = TAILQ_PREV(frent, pf_fragq, fr_next); +#endif struct pf_frent *next = TAILQ_NEXT(frent, fr_next); int index; -- cgit v1.3 From 09f4e462fb1d9401834dbd2a0176973aa5a9491e Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Fri, 2 Nov 2018 20:48:29 +0000 Subject: sys/types.h: avoid using terse macro _M Although _M is reserved for use by the implemenation it is rather non- descriptive and conflicted with a libc++ test. Just rename to _Major and _Minor to avoid conflicts. Reviewed by: dim Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D16734 --- sys/sys/types.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys') diff --git a/sys/sys/types.h b/sys/sys/types.h index 021a3cbe24f4..8d702db4a523 100644 --- a/sys/sys/types.h +++ b/sys/sys/types.h @@ -400,10 +400,10 @@ __minor(dev_t _d) } #define makedev(M, m) __makedev((M), (m)) static __inline dev_t -__makedev(int _M, int _m) +__makedev(int _Major, int _Minor) { - return (((dev_t)(_M & 0xffffff00) << 32) | ((_M & 0xff) << 8) | - ((dev_t)(_m & 0xff00) << 24) | (_m & 0xffff00ff)); + return (((dev_t)(_Major & 0xffffff00) << 32) | ((_Major & 0xff) << 8) | + ((dev_t)(_Minor & 0xff00) << 24) | (_Minor & 0xffff00ff)); } /* -- cgit v1.3 From 12e69f96a2a352f64e7854efcc4152c4c990f045 Mon Sep 17 00:00:00 2001 From: Brooks Davis Date: Fri, 2 Nov 2018 20:50:22 +0000 Subject: Add const to input-only char * arguments. These arguments are mostly paths handled by NAMEI*() macros which already take const char * arguments. This change improves the match between syscalls.master and the public declerations of system calls. Reviewed by: kib (prior version) Obtained from: CheriBSD Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D17812 --- sys/compat/freebsd32/freebsd32_misc.c | 2 +- sys/compat/freebsd32/freebsd32_util.h | 2 +- sys/compat/freebsd32/syscalls.master | 154 ++++++++++++++++++---------------- sys/dev/filemon/filemon_wrapper.c | 6 +- sys/kern/kern_exec.c | 2 +- sys/kern/syscalls.master | 146 ++++++++++++++++---------------- sys/kern/vfs_syscalls.c | 78 +++++++++-------- sys/security/audit/audit.h | 2 +- sys/security/audit/audit_arg.c | 2 +- sys/sys/imgact.h | 2 +- sys/sys/syscallsubr.h | 52 ++++++------ 11 files changed, 232 insertions(+), 216 deletions(-) (limited to 'sys') diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index 070a9bcd8a76..71b8a4e992b2 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -332,7 +332,7 @@ freebsd32_sigaltstack(struct thread *td, * the pointers. */ int -freebsd32_exec_copyin_args(struct image_args *args, char *fname, +freebsd32_exec_copyin_args(struct image_args *args, const char *fname, enum uio_seg segflg, u_int32_t *argv, u_int32_t *envv) { char *argp, *envp; diff --git a/sys/compat/freebsd32/freebsd32_util.h b/sys/compat/freebsd32/freebsd32_util.h index ffbe0d57d799..cf6ff0d5a3ce 100644 --- a/sys/compat/freebsd32/freebsd32_util.h +++ b/sys/compat/freebsd32/freebsd32_util.h @@ -118,7 +118,7 @@ int freebsd32_copyiniov(struct iovec32 *iovp, u_int iovcnt, void freebsd32_rusage_out(const struct rusage *s, struct rusage32 *s32); struct image_args; -int freebsd32_exec_copyin_args(struct image_args *args, char *fname, +int freebsd32_exec_copyin_args(struct image_args *args, const char *fname, enum uio_seg segflg, u_int32_t *argv, u_int32_t *envv); #endif /* !_COMPAT_FREEBSD32_FREEBSD32_UTIL_H_ */ diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index 0a3eb6f95278..36d2d65fa3ce 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -72,21 +72,22 @@ size_t nbyte); } 4 AUE_WRITE NOPROTO { ssize_t write(int fd, const void *buf, \ size_t nbyte); } -5 AUE_OPEN_RWTC NOPROTO { int open(char *path, int flags, \ +5 AUE_OPEN_RWTC NOPROTO { int open(const char *path, int flags, \ mode_t mode); } 6 AUE_CLOSE NOPROTO { int close(int fd); } 7 AUE_WAIT4 STD { int freebsd32_wait4(int pid, int *status, \ int options, struct rusage32 *rusage); } 8 AUE_CREAT OBSOL old creat -9 AUE_LINK NOPROTO { int link(char *path, char *link); } -10 AUE_UNLINK NOPROTO { int unlink(char *path); } +9 AUE_LINK NOPROTO { int link(const char *path, \ + const char *link); } +10 AUE_UNLINK NOPROTO { int unlink(const char *path); } 11 AUE_NULL OBSOL execv -12 AUE_CHDIR NOPROTO { int chdir(char *path); } +12 AUE_CHDIR NOPROTO { int chdir(const char *path); } 13 AUE_FCHDIR NOPROTO { int fchdir(int fd); } -14 AUE_MKNOD COMPAT11 { int freebsd32_mknod(char *path, \ +14 AUE_MKNOD COMPAT11 { int freebsd32_mknod(const char *path, \ int mode, int dev); } -15 AUE_CHMOD NOPROTO { int chmod(char *path, mode_t mode); } -16 AUE_CHOWN NOPROTO { int chown(char *path, int uid, int gid); } +15 AUE_CHMOD NOPROTO { int chmod(const char *path, mode_t mode); } +16 AUE_CHOWN NOPROTO { int chown(const char *path, int uid, int gid); } 17 AUE_NULL NOPROTO { caddr_t break(char *nsize); } 18 AUE_GETFSSTAT COMPAT4 { int freebsd32_getfsstat( \ struct statfs32 *buf, long bufsize, \ @@ -94,9 +95,10 @@ 19 AUE_LSEEK COMPAT { int freebsd32_lseek(int fd, int offset, \ int whence); } 20 AUE_GETPID NOPROTO { pid_t getpid(void); } -21 AUE_MOUNT NOPROTO { int mount(char *type, char *path, \ +21 AUE_MOUNT NOPROTO { int mount(const char *type, \ + const char *path, \ int flags, caddr_t data); } -22 AUE_UMOUNT NOPROTO { int unmount(char *path, int flags); } +22 AUE_UMOUNT NOPROTO { int unmount(const char *path, int flags); } 23 AUE_SETUID NOPROTO { int setuid(uid_t uid); } 24 AUE_GETUID NOPROTO { uid_t getuid(void); } 25 AUE_GETEUID NOPROTO { uid_t geteuid(void); } @@ -115,15 +117,15 @@ int *alen); } 32 AUE_GETSOCKNAME NOPROTO { int getsockname(int fdes, caddr_t asa, \ int *alen); } -33 AUE_ACCESS NOPROTO { int access(char *path, int amode); } +33 AUE_ACCESS NOPROTO { int access(const char *path, int amode); } 34 AUE_CHFLAGS NOPROTO { int chflags(const char *path, u_long flags); } 35 AUE_FCHFLAGS NOPROTO { int fchflags(int fd, u_long flags); } 36 AUE_SYNC NOPROTO { int sync(void); } 37 AUE_KILL NOPROTO { int kill(int pid, int signum); } -38 AUE_STAT COMPAT { int freebsd32_stat(char *path, \ +38 AUE_STAT COMPAT { int freebsd32_stat(const char *path, \ struct ostat32 *ub); } 39 AUE_GETPPID NOPROTO { pid_t getppid(void); } -40 AUE_LSTAT COMPAT { int freebsd32_lstat(char *path, \ +40 AUE_LSTAT COMPAT { int freebsd32_lstat(const char *path, \ struct ostat *ub); } 41 AUE_DUP NOPROTO { int dup(u_int fd); } 42 AUE_PIPE COMPAT10 { int freebsd32_pipe(void); } @@ -140,8 +142,8 @@ osigset_t mask); } 49 AUE_GETLOGIN NOPROTO { int getlogin(char *namebuf, \ u_int namelen); } -50 AUE_SETLOGIN NOPROTO { int setlogin(char *namebuf); } -51 AUE_ACCT NOPROTO { int acct(char *path); } +50 AUE_SETLOGIN NOPROTO { int setlogin(const char *namebuf); } +51 AUE_ACCT NOPROTO { int acct(const char *path); } 52 AUE_SIGPENDING COMPAT { int freebsd32_sigpending(void); } 53 AUE_SIGALTSTACK STD { int freebsd32_sigaltstack( \ struct sigaltstack32 *ss, \ @@ -149,14 +151,15 @@ 54 AUE_IOCTL STD { int freebsd32_ioctl(int fd, uint32_t com, \ struct md_ioctl32 *data); } 55 AUE_REBOOT NOPROTO { int reboot(int opt); } -56 AUE_REVOKE NOPROTO { int revoke(char *path); } -57 AUE_SYMLINK NOPROTO { int symlink(char *path, char *link); } -58 AUE_READLINK NOPROTO { ssize_t readlink(char *path, char *buf, \ +56 AUE_REVOKE NOPROTO { int revoke(const char *path); } +57 AUE_SYMLINK NOPROTO { int symlink(const char *path, \ + const char *link); } +58 AUE_READLINK NOPROTO { ssize_t readlink(const char *path, char *buf, \ size_t count); } -59 AUE_EXECVE STD { int freebsd32_execve(char *fname, \ +59 AUE_EXECVE STD { int freebsd32_execve(const char *fname, \ uint32_t *argv, uint32_t *envv); } 60 AUE_UMASK NOPROTO { int umask(mode_t newmask); } -61 AUE_CHROOT NOPROTO { int chroot(char *path); } +61 AUE_CHROOT NOPROTO { int chroot(const char *path); } 62 AUE_FSTAT COMPAT { int freebsd32_fstat(int fd, \ struct ostat32 *ub); } 63 AUE_NULL OBSOL ogetkerninfo @@ -192,7 +195,7 @@ struct itimerval32 *oitv); } 84 AUE_NULL OBSOL owait ; XXX implement -85 AUE_SWAPON NOPROTO { int swapon(char *name); } +85 AUE_SWAPON NOPROTO { int swapon(const char *name); } 86 AUE_GETITIMER STD { int freebsd32_getitimer(u_int which, \ struct itimerval32 *itv); } 87 AUE_O_GETHOSTNAME OBSOL ogethostname @@ -257,21 +260,22 @@ 125 AUE_RECVFROM OBSOL orecvfrom 126 AUE_SETREUID NOPROTO { int setreuid(int ruid, int euid); } 127 AUE_SETREGID NOPROTO { int setregid(int rgid, int egid); } -128 AUE_RENAME NOPROTO { int rename(char *from, char *to); } -129 AUE_TRUNCATE COMPAT|NOPROTO { int truncate(char *path, \ +128 AUE_RENAME NOPROTO { int rename(const char *from, \ + const char *to); } +129 AUE_TRUNCATE COMPAT|NOPROTO { int truncate(const char *path, \ int length); } 130 AUE_FTRUNCATE COMPAT|NOPROTO { int ftruncate(int fd, int length); } 131 AUE_FLOCK NOPROTO { int flock(int fd, int how); } -132 AUE_MKFIFO NOPROTO { int mkfifo(char *path, mode_t mode); } +132 AUE_MKFIFO NOPROTO { int mkfifo(const char *path, mode_t mode); } 133 AUE_SENDTO NOPROTO { int sendto(int s, caddr_t buf, \ size_t len, int flags, caddr_t to, \ int tolen); } 134 AUE_SHUTDOWN NOPROTO { int shutdown(int s, int how); } 135 AUE_SOCKETPAIR NOPROTO { int socketpair(int domain, int type, \ int protocol, int *rsv); } -136 AUE_MKDIR NOPROTO { int mkdir(char *path, mode_t mode); } -137 AUE_RMDIR NOPROTO { int rmdir(char *path); } -138 AUE_UTIMES STD { int freebsd32_utimes(char *path, \ +136 AUE_MKDIR NOPROTO { int mkdir(const char *path, mode_t mode); } +137 AUE_RMDIR NOPROTO { int rmdir(const char *path); } +138 AUE_UTIMES STD { int freebsd32_utimes(const char *path, \ struct timeval32 *tptr); } 139 AUE_NULL OBSOL 4.2 sigreturn 140 AUE_ADJTIME STD { int freebsd32_adjtime( \ @@ -284,8 +288,8 @@ 145 AUE_SETRLIMIT OBSOL setrlimit 146 AUE_KILLPG OBSOL killpg 147 AUE_SETSID NOPROTO { int setsid(void); } -148 AUE_QUOTACTL NOPROTO { int quotactl(char *path, int cmd, int uid, \ - caddr_t arg); } +148 AUE_QUOTACTL NOPROTO { int quotactl(const char *path, int cmd, \ + int uid, caddr_t arg); } 149 AUE_O_QUOTA OBSOL oquota 150 AUE_GETSOCKNAME OBSOL ogetsockname @@ -303,13 +307,13 @@ 155 AUE_NFS_SVC UNIMPL nfssvc 156 AUE_GETDIRENTRIES COMPAT { int freebsd32_getdirentries(int fd, \ char *buf, u_int count, uint32_t *basep); } -157 AUE_STATFS COMPAT4 { int freebsd32_statfs(char *path, \ +157 AUE_STATFS COMPAT4 { int freebsd32_statfs(const char *path, \ struct statfs32 *buf); } 158 AUE_FSTATFS COMPAT4 { int freebsd32_fstatfs(int fd, \ struct statfs32 *buf); } 159 AUE_NULL UNIMPL nosys 160 AUE_LGETFH UNIMPL lgetfh -161 AUE_NFS_GETFH NOPROTO { int getfh(char *fname, \ +161 AUE_NFS_GETFH NOPROTO { int getfh(const char *fname, \ struct fhandle *fhp); } 162 AUE_SYSCTL OBSOL getdomainname 163 AUE_SYSCTL OBSOL setdomainname @@ -347,13 +351,13 @@ 185 AUE_NULL OBSOL lfs_markv 186 AUE_NULL OBSOL lfs_segclean 187 AUE_NULL OBSOL lfs_segwait -188 AUE_STAT COMPAT11 { int freebsd32_stat(char *path, \ +188 AUE_STAT COMPAT11 { int freebsd32_stat(const char *path, \ struct freebsd11_stat32 *ub); } 189 AUE_FSTAT COMPAT11 { int freebsd32_fstat(int fd, \ struct freebsd11_stat32 *ub); } -190 AUE_LSTAT COMPAT11 { int freebsd32_lstat(char *path, \ +190 AUE_LSTAT COMPAT11 { int freebsd32_lstat(const char *path, \ struct freebsd11_stat32 *ub); } -191 AUE_PATHCONF NOPROTO { int pathconf(char *path, int name); } +191 AUE_PATHCONF NOPROTO { int pathconf(const char *path, int name); } 192 AUE_FPATHCONF NOPROTO { int fpathconf(int fd, int name); } 193 AUE_NULL UNIMPL nosys 194 AUE_GETRLIMIT NOPROTO { int getrlimit(u_int which, \ @@ -372,7 +376,7 @@ 199 AUE_LSEEK COMPAT6 { off_t freebsd32_lseek(int fd, int pad, \ uint32_t offset1, uint32_t offset2, \ int whence); } -200 AUE_TRUNCATE COMPAT6 { int freebsd32_truncate(char *path, \ +200 AUE_TRUNCATE COMPAT6 { int freebsd32_truncate(const char *path, \ int pad, uint32_t length1, \ uint32_t length2); } 201 AUE_FTRUNCATE COMPAT6 { int freebsd32_ftruncate(int fd, int pad, \ @@ -385,7 +389,7 @@ size_t len); } 204 AUE_MUNLOCK NOPROTO { int munlock(const void *addr, \ size_t len); } -205 AUE_UNDELETE NOPROTO { int undelete(char *path); } +205 AUE_UNDELETE NOPROTO { int undelete(const char *path); } 206 AUE_FUTIMES STD { int freebsd32_futimes(int fd, \ struct timeval32 *tptr); } 207 AUE_GETPGID NOPROTO { int getpgid(pid_t pid); } @@ -473,7 +477,8 @@ 251 AUE_RFORK NOPROTO { int rfork(int flags); } 252 AUE_POLL OBSOL openbsd_poll 253 AUE_ISSETUGID NOPROTO { int issetugid(void); } -254 AUE_LCHOWN NOPROTO { int lchown(char *path, int uid, int gid); } +254 AUE_LCHOWN NOPROTO { int lchown(const char *path, int uid, \ + int gid); } 255 AUE_AIO_READ STD { int freebsd32_aio_read( \ struct aiocb32 *aiocbp); } 256 AUE_AIO_WRITE STD { int freebsd32_aio_write( \ @@ -498,14 +503,16 @@ 272 AUE_O_GETDENTS COMPAT11 { int freebsd32_getdents(int fd, char *buf, \ int count); } 273 AUE_NULL UNIMPL nosys -274 AUE_LCHMOD NOPROTO { int lchmod(char *path, mode_t mode); } +274 AUE_LCHMOD NOPROTO { int lchmod(const char *path, mode_t mode); } 275 AUE_NULL OBSOL netbsd_lchown -276 AUE_LUTIMES STD { int freebsd32_lutimes(char *path, \ +276 AUE_LUTIMES STD { int freebsd32_lutimes(const char *path, \ struct timeval32 *tptr); } 277 AUE_NULL OBSOL netbsd_msync -278 AUE_STAT COMPAT11|NOPROTO { int nstat(char *path, struct nstat *ub); } +278 AUE_STAT COMPAT11|NOPROTO { int nstat(const char *path, \ + struct nstat *ub); } 279 AUE_FSTAT COMPAT11|NOPROTO { int nfstat(int fd, struct nstat *sb); } -280 AUE_LSTAT COMPAT11|NOPROTO { int nlstat(char *path, struct nstat *ub); } +280 AUE_LSTAT COMPAT11|NOPROTO { int nlstat(const char *path, \ + struct nstat *ub); } 281 AUE_NULL UNIMPL nosys 282 AUE_NULL UNIMPL nosys 283 AUE_NULL UNIMPL nosys @@ -680,7 +687,7 @@ const char *attrname); } 374 AUE_SETUGID NOPROTO { int __setugid(int flag); } 375 AUE_NULL OBSOL nfsclnt -376 AUE_EACCESS NOPROTO { int eaccess(char *path, int amode); } +376 AUE_EACCESS NOPROTO { int eaccess(const char *path, int amode); } 377 AUE_NULL UNIMPL afs_syscall 378 AUE_NMOUNT STD { int freebsd32_nmount(struct iovec32 *iovp, \ unsigned int iovcnt, int flags); } @@ -709,7 +716,7 @@ 395 AUE_GETFSSTAT COMPAT11|NOPROTO { int getfsstat( \ struct freebsd11_statfs *buf, \ long bufsize, int mode); } -396 AUE_STATFS COMPAT11|NOPROTO { int statfs(char *path, \ +396 AUE_STATFS COMPAT11|NOPROTO { int statfs(const char *path, \ struct statfs *buf); } 397 AUE_FSTATFS COMPAT11|NOPROTO { int fstatfs(int fd, \ struct freebsd11_statfs *buf); } @@ -808,7 +815,7 @@ 452 AUE_SETAUDIT_ADDR NOPROTO { int setaudit_addr( \ struct auditinfo_addr *auditinfo_addr, \ u_int length); } -453 AUE_AUDITCTL NOPROTO { int auditctl(char *path); } +453 AUE_AUDITCTL NOPROTO { int auditctl(const char *path); } 454 AUE_NULL STD { int freebsd32_umtx_op(void *obj, int op,\ u_long val, void *uaddr, \ void *uaddr2); } @@ -871,7 +878,7 @@ int pad, \ uint32_t offset1, uint32_t offset2, \ int whence); } -479 AUE_TRUNCATE STD { int freebsd32_truncate(char *path, \ +479 AUE_TRUNCATE STD { int freebsd32_truncate(const char *path, \ int pad, \ uint32_t length1, uint32_t length2); } 480 AUE_FTRUNCATE STD { int freebsd32_ftruncate(int fd, \ @@ -890,7 +897,7 @@ 478 AUE_LSEEK STD { off_t freebsd32_lseek(int fd, \ uint32_t offset1, uint32_t offset2, \ int whence); } -479 AUE_TRUNCATE STD { int freebsd32_truncate(char *path, \ +479 AUE_TRUNCATE STD { int freebsd32_truncate(const char *path, \ uint32_t length1, uint32_t length2); } 480 AUE_FTRUNCATE STD { int freebsd32_ftruncate(int fd, \ uint32_t length1, uint32_t length2); } @@ -924,36 +931,39 @@ uint32_t id1, uint32_t id2, \ size_t cpusetsize, \ const cpuset_t *mask); } -489 AUE_FACCESSAT NOPROTO { int faccessat(int fd, char *path, int amode, \ - int flag); } +489 AUE_FACCESSAT NOPROTO { int faccessat(int fd, const char *path, \ + int amode, int flag); } 490 AUE_FCHMODAT NOPROTO { int fchmodat(int fd, const char *path, \ mode_t mode, int flag); } -491 AUE_FCHOWNAT NOPROTO { int fchownat(int fd, char *path, uid_t uid, \ - gid_t gid, int flag); } +491 AUE_FCHOWNAT NOPROTO { int fchownat(int fd, const char *path, \ + uid_t uid, gid_t gid, int flag); } 492 AUE_FEXECVE STD { int freebsd32_fexecve(int fd, \ uint32_t *argv, uint32_t *envv); } 493 AUE_FSTATAT COMPAT11 { int freebsd32_fstatat(int fd, \ - char *path, struct freebsd11_stat32 *buf, \ + const char *path, \ + struct freebsd11_stat32 *buf, \ int flag); } -494 AUE_FUTIMESAT STD { int freebsd32_futimesat(int fd, char *path, \ +494 AUE_FUTIMESAT STD { int freebsd32_futimesat(int fd, \ + const char *path, \ struct timeval *times); } -495 AUE_LINKAT NOPROTO { int linkat(int fd1, char *path1, int fd2, \ - char *path2, int flag); } -496 AUE_MKDIRAT NOPROTO { int mkdirat(int fd, char *path, \ - mode_t mode); } -497 AUE_MKFIFOAT NOPROTO { int mkfifoat(int fd, char *path, \ +495 AUE_LINKAT NOPROTO { int linkat(int fd1, const char *path1, \ + int fd2, const char *path2, int flag); } +496 AUE_MKDIRAT NOPROTO { int mkdirat(int fd, const char *path, \ mode_t mode); } -498 AUE_MKNODAT COMPAT11 { int freebsd32_mknodat(int fd, char *path, \ - mode_t mode, uint32_t dev); } -499 AUE_OPENAT_RWTC NOPROTO { int openat(int fd, char *path, int flag, \ +497 AUE_MKFIFOAT NOPROTO { int mkfifoat(int fd, const char *path, \ mode_t mode); } -500 AUE_READLINKAT NOPROTO { int readlinkat(int fd, char *path, char *buf, \ - size_t bufsize); } -501 AUE_RENAMEAT NOPROTO { int renameat(int oldfd, char *old, int newfd, \ - const char *new); } -502 AUE_SYMLINKAT NOPROTO { int symlinkat(char *path1, int fd, \ - char *path2); } -503 AUE_UNLINKAT NOPROTO { int unlinkat(int fd, char *path, \ +498 AUE_MKNODAT COMPAT11 { int freebsd32_mknodat(int fd, \ + const char *path, mode_t mode, \ + uint32_t dev); } +499 AUE_OPENAT_RWTC NOPROTO { int openat(int fd, const char *path, \ + int flag, mode_t mode); } +500 AUE_READLINKAT NOPROTO { int readlinkat(int fd, const char *path, \ + char *buf, size_t bufsize); } +501 AUE_RENAMEAT NOPROTO { int renameat(int oldfd, const char *old, \ + int newfd, const char *new); } +502 AUE_SYMLINKAT NOPROTO { int symlinkat(const char *path1, int fd, \ + const char *path2); } +503 AUE_UNLINKAT NOPROTO { int unlinkat(int fd, const char *path, \ int flag); } 504 AUE_POSIX_OPENPT NOPROTO { int posix_openpt(int flags); } ; 505 is initialised by the kgssapi code, if present. @@ -970,7 +980,7 @@ struct msqid_ds32 *buf); } 512 AUE_SHMCTL NOSTD { int freebsd32_shmctl(int shmid, int cmd, \ struct shmid_ds32 *buf); } -513 AUE_LPATHCONF NOPROTO { int lpathconf(char *path, int name); } +513 AUE_LPATHCONF NOPROTO { int lpathconf(const char *path, int name); } 514 AUE_NULL OBSOL cap_new 515 AUE_CAP_RIGHTS_GET NOPROTO { int __cap_rights_get(int version, \ int fd, cap_rights_t *rightsp); } @@ -1072,7 +1082,7 @@ 546 AUE_FUTIMES STD { int freebsd32_futimens(int fd, \ struct timespec *times); } 547 AUE_FUTIMESAT STD { int freebsd32_utimensat(int fd, \ - char *path, \ + const char *path, \ struct timespec *times, int flag); } 548 AUE_NULL OBSOL numa_getaffinity 549 AUE_NULL OBSOL numa_setaffinity @@ -1080,7 +1090,7 @@ 551 AUE_FSTAT STD { int freebsd32_fstat(int fd, \ struct stat32 *ub); } 552 AUE_FSTATAT STD { int freebsd32_fstatat(int fd, \ - char *path, struct stat32 *buf, \ + const char *path, struct stat32 *buf, \ int flag); } 553 AUE_FHSTAT STD { int freebsd32_fhstat( \ const struct fhandle *u_fhp, \ @@ -1088,15 +1098,15 @@ 554 AUE_GETDIRENTRIES NOPROTO { ssize_t getdirentries( \ int fd, char *buf, size_t count, \ off_t *basep); } -555 AUE_STATFS NOPROTO { int statfs(char *path, \ +555 AUE_STATFS NOPROTO { int statfs(const char *path, \ struct statfs32 *buf); } 556 AUE_FSTATFS NOPROTO { int fstatfs(int fd, struct statfs32 *buf); } 557 AUE_GETFSSTAT NOPROTO { int getfsstat(struct statfs32 *buf, \ long bufsize, int mode); } 558 AUE_FHSTATFS NOPROTO { int fhstatfs(const struct fhandle *u_fhp, \ struct statfs32 *buf); } -559 AUE_MKNODAT NOPROTO { int mknodat(int fd, char *path, mode_t mode, \ - dev_t dev); } +559 AUE_MKNODAT NOPROTO { int mknodat(int fd, const char *path, \ + mode_t mode, dev_t dev); } 560 AUE_KEVENT STD { int freebsd32_kevent(int fd, \ const struct kevent32 *changelist, \ int nchanges, \ diff --git a/sys/dev/filemon/filemon_wrapper.c b/sys/dev/filemon/filemon_wrapper.c index 54150777ed9f..cd4f7b2932e7 100644 --- a/sys/dev/filemon/filemon_wrapper.c +++ b/sys/dev/filemon/filemon_wrapper.c @@ -149,7 +149,8 @@ filemon_event_process_exec(void *arg __unused, struct proc *p, } static void -_filemon_wrapper_openat(struct thread *td, char *upath, int flags, int fd) +_filemon_wrapper_openat(struct thread *td, const char *upath, int flags, + int fd) { int error; struct file *fp; @@ -262,7 +263,8 @@ copyfail: } static void -_filemon_wrapper_link(struct thread *td, char *upath1, char *upath2) +_filemon_wrapper_link(struct thread *td, const char *upath1, + const char *upath2) { struct filemon *filemon; int error; diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 23c398fc43b3..ee57ac82e694 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -1167,7 +1167,7 @@ exec_new_vmspace(struct image_params *imgp, struct sysentvec *sv) * space into the temporary string buffer. */ int -exec_copyin_args(struct image_args *args, char *fname, +exec_copyin_args(struct image_args *args, const char *fname, enum uio_seg segflg, char **argv, char **envv) { u_long argp, envp; diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 27c746fd1a68..dfe6677de120 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -111,7 +111,7 @@ } 5 AUE_OPEN_RWTC STD { int open( - _In_z_ char *path, + _In_z_ const char *path, int flags, mode_t mode ); @@ -134,25 +134,25 @@ } 8 AUE_CREAT COMPAT { int creat( - _In_z_ char *path, + _In_z_ const char *path, int mode ); } 9 AUE_LINK STD { int link( - _In_z_ char *path, - _In_z_ char *link + _In_z_ const char *path, + _In_z_ const char *link ); } 10 AUE_UNLINK STD { int unlink( - _In_z_ char *path + _In_z_ const char *path ); } 11 AUE_NULL OBSOL execv 12 AUE_CHDIR STD { int chdir( - _In_z_ char *path + _In_z_ const char *path ); } 13 AUE_FCHDIR STD { @@ -162,20 +162,20 @@ } 14 AUE_MKNOD COMPAT11 { int mknod( - _In_z_ char *path, + _In_z_ const char *path, int mode, int dev ); } 15 AUE_CHMOD STD { int chmod( - _In_z_ char *path, + _In_z_ const char *path, mode_t mode ); } 16 AUE_CHOWN STD { int chown( - _In_z_ char *path, + _In_z_ const char *path, int uid, int gid ); @@ -204,8 +204,8 @@ } 21 AUE_MOUNT STD { int mount( - _In_z_ char *type, - _In_z_ char *path, + _In_z_ const char *type, + _In_z_ const char *path, int flags, _In_opt_ caddr_t data ); @@ -213,7 +213,7 @@ ; XXX `path' should have type `const char *' but we're not ready for that. 22 AUE_UMOUNT STD { int unmount( - _In_z_ char *path, + _In_z_ const char *path, int flags ); } @@ -283,7 +283,7 @@ } 33 AUE_ACCESS STD { int access( - _In_z_ char *path, + _In_z_ const char *path, int amode ); } @@ -310,7 +310,7 @@ } 38 AUE_STAT COMPAT { int stat( - _In_z_ char *path, + _In_z_ const char *path, _Out_ struct ostat *ub ); } @@ -319,7 +319,7 @@ } 40 AUE_LSTAT COMPAT { int lstat( - _In_z_ char *path, + _In_z_ const char *path, _Out_ struct ostat *ub ); } @@ -377,12 +377,12 @@ } 50 AUE_SETLOGIN STD { int setlogin( - _In_z_ char *namebuf + _In_z_ const char *namebuf ); } 51 AUE_ACCT STD { int acct( - _In_z_ char *path + _In_z_ const char *path ); } 52 AUE_SIGPENDING COMPAT { @@ -408,25 +408,25 @@ } 56 AUE_REVOKE STD { int revoke( - _In_z_ char *path + _In_z_ const char *path ); } 57 AUE_SYMLINK STD { int symlink( - _In_z_ char *path, - _In_z_ char *link + _In_z_ const char *path, + _In_z_ const char *link ); } 58 AUE_READLINK STD { ssize_t readlink( - _In_z_ char *path, + _In_z_ const char *path, _Out_writes_z_(count) char *buf, size_t count ); } 59 AUE_EXECVE STD { int execve( - _In_z_ char *fname, + _In_z_ const char *fname, _In_z_ char **argv, _In_z_ char **envv ); @@ -438,7 +438,7 @@ } 61 AUE_CHROOT STD { int chroot( - _In_z_ char *path + _In_z_ const char *path ); } 62 AUE_FSTAT COMPAT { @@ -558,7 +558,7 @@ } 85 AUE_SWAPON STD { int swapon( - _In_z_ char *name + _In_z_ const char *name ); } 86 AUE_GETITIMER STD { @@ -815,13 +815,13 @@ } 128 AUE_RENAME STD { int rename( - _In_z_ char *from, - _In_z_ char *to + _In_z_ const char *from, + _In_z_ const char *to ); } 129 AUE_TRUNCATE COMPAT { int truncate( - _In_z_ char *path, + _In_z_ const char *path, long length ); } @@ -839,7 +839,7 @@ } 132 AUE_MKFIFO STD { int mkfifo( - _In_z_ char *path, + _In_z_ const char *path, mode_t mode ); } @@ -869,18 +869,18 @@ } 136 AUE_MKDIR STD { int mkdir( - _In_z_ char *path, + _In_z_ const char *path, mode_t mode ); } 137 AUE_RMDIR STD { int rmdir( - _In_z_ char *path + _In_z_ const char *path ); } 138 AUE_UTIMES STD { int utimes( - _In_z_ char *path, + _In_z_ const char *path, _In_ struct timeval *tptr ); } @@ -929,7 +929,7 @@ } 148 AUE_QUOTACTL STD { int quotactl( - _In_z_ char *path, + _In_z_ const char *path, int cmd, int uid, _In_ caddr_t arg @@ -979,7 +979,7 @@ } 157 AUE_STATFS COMPAT4 { int statfs( - _In_z_ char *path, + _In_z_ const char *path, _Out_ struct ostatfs *buf ); } @@ -992,13 +992,13 @@ 159 AUE_NULL UNIMPL nosys 160 AUE_LGETFH STD { int lgetfh( - _In_z_ char *fname, + _In_z_ const char *fname, _Out_ struct fhandle *fhp ); } 161 AUE_NFS_GETFH STD { int getfh( - _In_z_ char *fname, + _In_z_ const char *fname, _Out_ struct fhandle *fhp ); } @@ -1120,7 +1120,7 @@ 187 AUE_NULL OBSOL lfs_segwait 188 AUE_STAT COMPAT11 { int stat( - _In_z_ char *path, + _In_z_ const char *path, _Out_ struct freebsd11_stat *ub ); } @@ -1132,13 +1132,13 @@ } 190 AUE_LSTAT COMPAT11 { int lstat( - _In_z_ char *path, + _In_z_ const char *path, _Out_ struct freebsd11_stat *ub ); } 191 AUE_PATHCONF STD { int pathconf( - _In_z_ char *path, + _In_z_ const char *path, int name ); } @@ -1193,7 +1193,7 @@ } 200 AUE_TRUNCATE COMPAT6 { int truncate( - _In_z_ char *path, + _In_z_ const char *path, int pad, off_t length ); @@ -1229,7 +1229,7 @@ } 205 AUE_UNDELETE STD { int undelete( - _In_z_ char *path + _In_z_ const char *path ); } 206 AUE_FUTIMES STD { @@ -1455,7 +1455,7 @@ } 254 AUE_LCHOWN STD { int lchown( - _In_z_ char *path, + _In_z_ const char *path, int uid, int gid ); @@ -1489,21 +1489,21 @@ 273 AUE_NULL UNIMPL nosys 274 AUE_LCHMOD STD { int lchmod( - _In_z_ char *path, + _In_z_ const char *path, mode_t mode ); } 275 AUE_NULL OBSOL netbsd_lchown 276 AUE_LUTIMES STD { int lutimes( - _In_z_ char *path, + _In_z_ const char *path, _In_ struct timeval *tptr ); } 277 AUE_NULL OBSOL netbsd_msync 278 AUE_STAT COMPAT11 { int nstat( - _In_z_ char *path, + _In_z_ const char *path, _Out_ struct nstat *ub ); } @@ -1515,7 +1515,7 @@ } 280 AUE_LSTAT COMPAT11 { int nlstat( - _In_z_ char *path, + _In_z_ const char *path, _Out_ struct nstat *ub ); } @@ -1970,7 +1970,7 @@ 375 AUE_NULL OBSOL nfsclnt 376 AUE_EACCESS STD { int eaccess( - _In_z_ char *path, + _In_z_ const char *path, int amode ); } @@ -2078,7 +2078,7 @@ } 396 AUE_STATFS COMPAT11 { int statfs( - _In_z_ char *path, + _In_z_ const char *path, _Out_ struct freebsd11_statfs *buf ); } @@ -2191,7 +2191,7 @@ } 415 AUE_NULL STD { int __mac_execve( - _In_z_ char *fname, + _In_z_ const char *fname, _In_ char **argv, _In_ char **envv, _In_ struct mac *mac_p @@ -2390,7 +2390,7 @@ } 453 AUE_AUDITCTL STD { int auditctl( - _In_z_ char *path + _In_z_ const char *path ); } 454 AUE_NULL STD { @@ -2563,7 +2563,7 @@ } 479 AUE_TRUNCATE STD { int truncate( - _In_z_ char *path, + _In_z_ const char *path, off_t length ); } @@ -2633,7 +2633,7 @@ 489 AUE_FACCESSAT STD { int faccessat( int fd, - _In_z_ char *path, + _In_z_ const char *path, int amode, int flag ); @@ -2641,7 +2641,7 @@ 490 AUE_FCHMODAT STD { int fchmodat( int fd, - _In_z_ char *path, + _In_z_ const char *path, mode_t mode, int flag ); @@ -2649,7 +2649,7 @@ 491 AUE_FCHOWNAT STD { int fchownat( int fd, - _In_z_ char *path, + _In_z_ const char *path, uid_t uid, gid_t gid, int flag @@ -2665,7 +2665,7 @@ 493 AUE_FSTATAT COMPAT11 { int fstatat( int fd, - _In_z_ char *path, + _In_z_ const char *path, _Out_ struct freebsd11_stat *buf, int flag ); @@ -2673,37 +2673,37 @@ 494 AUE_FUTIMESAT STD { int futimesat( int fd, - _In_z_ char *path, + _In_z_ const char *path, _In_reads_(2) struct timeval *times ); } 495 AUE_LINKAT STD { int linkat( int fd1, - _In_z_ char *path1, + _In_z_ const char *path1, int fd2, - _In_z_ char *path2, + _In_z_ const char *path2, int flag ); } 496 AUE_MKDIRAT STD { int mkdirat( int fd, - _In_z_ char *path, + _In_z_ const char *path, mode_t mode ); } 497 AUE_MKFIFOAT STD { int mkfifoat( int fd, - _In_z_ char *path, + _In_z_ const char *path, mode_t mode ); } 498 AUE_MKNODAT COMPAT11 { int mknodat( int fd, - _In_z_ char *path, + _In_z_ const char *path, mode_t mode, uint32_t dev ); @@ -2712,7 +2712,7 @@ 499 AUE_OPENAT_RWTC STD { int openat( int fd, - _In_z_ char *path, + _In_z_ const char *path, int flag, mode_t mode ); @@ -2720,7 +2720,7 @@ 500 AUE_READLINKAT STD { int readlinkat( int fd, - _In_z_ char *path, + _In_z_ const char *path, _Out_writes_bytes_(bufsize) char *buf, size_t bufsize ); @@ -2728,22 +2728,22 @@ 501 AUE_RENAMEAT STD { int renameat( int oldfd, - _In_z_ char *old, + _In_z_ const char *old, int newfd, - _In_z_ char *new + _In_z_ const char *new ); } 502 AUE_SYMLINKAT STD { int symlinkat( - _In_z_ char *path1, + _In_z_ const char *path1, int fd, - _In_z_ char *path2 + _In_z_ const char *path2 ); } 503 AUE_UNLINKAT STD { int unlinkat( int fd, - _In_z_ char *path, + _In_z_ const char *path, int flag ); } @@ -2755,7 +2755,7 @@ ; 505 is initialised by the kgssapi code, if present. 505 AUE_NULL NOSTD { int gssd_syscall( - _In_z_ char *path + _In_z_ const char *path ); } 506 AUE_JAIL_GET STD { @@ -2806,7 +2806,7 @@ } 513 AUE_LPATHCONF STD { int lpathconf( - _In_z_ char *path, + _In_z_ const char *path, int name ); } @@ -3031,7 +3031,7 @@ 547 AUE_FUTIMESAT STD { int utimensat( int fd, - _In_z_ char *path, + _In_z_ const char *path, _In_reads_(2) struct timespec *times, int flag ); @@ -3052,7 +3052,7 @@ 552 AUE_FSTATAT STD { int fstatat( int fd, - _In_z_ char *path, + _In_z_ const char *path, _Out_ struct stat *buf, int flag ); @@ -3073,7 +3073,7 @@ } 555 AUE_STATFS STD { int statfs( - _In_z_ char *path, + _In_z_ const char *path, _Out_ struct statfs *buf ); } @@ -3099,7 +3099,7 @@ 559 AUE_MKNODAT STD { int mknodat( int fd, - _In_z_ char *path, + _In_z_ const char *path, mode_t mode, dev_t dev ); diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index a54e8bc1b2cc..9ef0eb554461 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -298,7 +298,7 @@ sys_statfs(struct thread *td, struct statfs_args *uap) } int -kern_statfs(struct thread *td, char *path, enum uio_seg pathseg, +kern_statfs(struct thread *td, const char *path, enum uio_seg pathseg, struct statfs *buf) { struct mount *mp; @@ -876,7 +876,7 @@ sys_chdir(struct thread *td, struct chdir_args *uap) } int -kern_chdir(struct thread *td, char *path, enum uio_seg pathseg) +kern_chdir(struct thread *td, const char *path, enum uio_seg pathseg) { struct nameidata nd; int error; @@ -1032,7 +1032,7 @@ sys_openat(struct thread *td, struct openat_args *uap) } int -kern_openat(struct thread *td, int fd, char *path, enum uio_seg pathseg, +kern_openat(struct thread *td, int fd, const char *path, enum uio_seg pathseg, int flags, int mode) { struct proc *p = td->td_proc; @@ -1229,7 +1229,7 @@ freebsd11_mknodat(struct thread *td, #endif /* COMPAT_FREEBSD11 */ int -kern_mknodat(struct thread *td, int fd, char *path, enum uio_seg pathseg, +kern_mknodat(struct thread *td, int fd, const char *path, enum uio_seg pathseg, int mode, dev_t dev) { struct vnode *vp; @@ -1358,8 +1358,8 @@ sys_mkfifoat(struct thread *td, struct mkfifoat_args *uap) } int -kern_mkfifoat(struct thread *td, int fd, char *path, enum uio_seg pathseg, - int mode) +kern_mkfifoat(struct thread *td, int fd, const char *path, + enum uio_seg pathseg, int mode) { struct mount *mp; struct vattr vattr; @@ -1491,8 +1491,8 @@ can_hardlink(struct vnode *vp, struct ucred *cred) } int -kern_linkat(struct thread *td, int fd1, int fd2, char *path1, char *path2, - enum uio_seg segflg, int follow) +kern_linkat(struct thread *td, int fd1, int fd2, const char *path1, + const char *path2, enum uio_seg segflg, int follow) { struct vnode *vp; struct mount *mp; @@ -1608,21 +1608,23 @@ sys_symlinkat(struct thread *td, struct symlinkat_args *uap) } int -kern_symlinkat(struct thread *td, char *path1, int fd, char *path2, +kern_symlinkat(struct thread *td, const char *path1, int fd, const char *path2, enum uio_seg segflg) { struct mount *mp; struct vattr vattr; - char *syspath; + const char *syspath; + char *tmppath; struct nameidata nd; int error; if (segflg == UIO_SYSSPACE) { syspath = path1; } else { - syspath = uma_zalloc(namei_zone, M_WAITOK); - if ((error = copyinstr(path1, syspath, MAXPATHLEN, NULL)) != 0) + tmppath = uma_zalloc(namei_zone, M_WAITOK); + if ((error = copyinstr(path1, tmppath, MAXPATHLEN, NULL)) != 0) goto out; + syspath = tmppath; } AUDIT_ARG_TEXT(syspath); restart: @@ -1669,7 +1671,7 @@ out2: vn_finished_write(mp); out: if (segflg != UIO_SYSSPACE) - uma_zfree(namei_zone, syspath); + uma_zfree(namei_zone, tmppath); return (error); } @@ -1746,7 +1748,7 @@ int sys_unlinkat(struct thread *td, struct unlinkat_args *uap) { int fd, flag; - char *path; + const char *path; flag = uap->flag; fd = uap->fd; @@ -1762,8 +1764,8 @@ sys_unlinkat(struct thread *td, struct unlinkat_args *uap) } int -kern_unlinkat(struct thread *td, int fd, char *path, enum uio_seg pathseg, - int flag, ino_t oldinum) +kern_unlinkat(struct thread *td, int fd, const char *path, + enum uio_seg pathseg, int flag, ino_t oldinum) { struct mount *mp; struct vnode *vp; @@ -1957,8 +1959,8 @@ sys_faccessat(struct thread *td, struct faccessat_args *uap) } int -kern_accessat(struct thread *td, int fd, char *path, enum uio_seg pathseg, - int flag, int amode) +kern_accessat(struct thread *td, int fd, const char *path, + enum uio_seg pathseg, int flag, int amode) { struct ucred *cred, *usecred; struct vnode *vp; @@ -2270,7 +2272,7 @@ sys_fstatat(struct thread *td, struct fstatat_args *uap) } int -kern_statat(struct thread *td, int flag, int fd, char *path, +kern_statat(struct thread *td, int flag, int fd, const char *path, enum uio_seg pathseg, struct stat *sbp, void (*hook)(struct vnode *vp, struct stat *sbp)) { @@ -2429,8 +2431,8 @@ sys_lpathconf(struct thread *td, struct lpathconf_args *uap) } int -kern_pathconf(struct thread *td, char *path, enum uio_seg pathseg, int name, - u_long flags, long *valuep) +kern_pathconf(struct thread *td, const char *path, enum uio_seg pathseg, + int name, u_long flags, long *valuep) { struct nameidata nd; int error; @@ -2480,8 +2482,8 @@ sys_readlinkat(struct thread *td, struct readlinkat_args *uap) } int -kern_readlinkat(struct thread *td, int fd, char *path, enum uio_seg pathseg, - char *buf, enum uio_seg bufseg, size_t count) +kern_readlinkat(struct thread *td, int fd, const char *path, + enum uio_seg pathseg, char *buf, enum uio_seg bufseg, size_t count) { struct vnode *vp; struct iovec aiov; @@ -2749,8 +2751,8 @@ sys_lchmod(struct thread *td, struct lchmod_args *uap) } int -kern_fchmodat(struct thread *td, int fd, char *path, enum uio_seg pathseg, - mode_t mode, int flag) +kern_fchmodat(struct thread *td, int fd, const char *path, + enum uio_seg pathseg, mode_t mode, int flag) { struct nameidata nd; int error, follow; @@ -2861,8 +2863,8 @@ sys_fchownat(struct thread *td, struct fchownat_args *uap) } int -kern_fchownat(struct thread *td, int fd, char *path, enum uio_seg pathseg, - int uid, int gid, int flag) +kern_fchownat(struct thread *td, int fd, const char *path, + enum uio_seg pathseg, int uid, int gid, int flag) { struct nameidata nd; int error, follow; @@ -3074,8 +3076,8 @@ sys_futimesat(struct thread *td, struct futimesat_args *uap) } int -kern_utimesat(struct thread *td, int fd, char *path, enum uio_seg pathseg, - struct timeval *tptr, enum uio_seg tptrseg) +kern_utimesat(struct thread *td, int fd, const char *path, + enum uio_seg pathseg, struct timeval *tptr, enum uio_seg tptrseg) { struct nameidata nd; struct timespec ts[2]; @@ -3112,7 +3114,7 @@ sys_lutimes(struct thread *td, struct lutimes_args *uap) } int -kern_lutimes(struct thread *td, char *path, enum uio_seg pathseg, +kern_lutimes(struct thread *td, const char *path, enum uio_seg pathseg, struct timeval *tptr, enum uio_seg tptrseg) { struct timespec ts[2]; @@ -3214,8 +3216,9 @@ sys_utimensat(struct thread *td, struct utimensat_args *uap) } int -kern_utimensat(struct thread *td, int fd, char *path, enum uio_seg pathseg, - struct timespec *tptr, enum uio_seg tptrseg, int flag) +kern_utimensat(struct thread *td, int fd, const char *path, + enum uio_seg pathseg, struct timespec *tptr, enum uio_seg tptrseg, + int flag) { struct nameidata nd; struct timespec ts[2]; @@ -3262,7 +3265,8 @@ sys_truncate(struct thread *td, struct truncate_args *uap) } int -kern_truncate(struct thread *td, char *path, enum uio_seg pathseg, off_t length) +kern_truncate(struct thread *td, const char *path, enum uio_seg pathseg, + off_t length) { struct mount *mp; struct vnode *vp; @@ -3437,8 +3441,8 @@ sys_renameat(struct thread *td, struct renameat_args *uap) } int -kern_renameat(struct thread *td, int oldfd, char *old, int newfd, char *new, - enum uio_seg pathseg) +kern_renameat(struct thread *td, int oldfd, const char *old, int newfd, + const char *new, enum uio_seg pathseg) { struct mount *mp = NULL; struct vnode *tvp, *fvp, *tdvp; @@ -3599,7 +3603,7 @@ sys_mkdirat(struct thread *td, struct mkdirat_args *uap) } int -kern_mkdirat(struct thread *td, int fd, char *path, enum uio_seg segflg, +kern_mkdirat(struct thread *td, int fd, const char *path, enum uio_seg segflg, int mode) { struct mount *mp; @@ -3676,7 +3680,7 @@ sys_rmdir(struct thread *td, struct rmdir_args *uap) } int -kern_rmdirat(struct thread *td, int fd, char *path, enum uio_seg pathseg, +kern_rmdirat(struct thread *td, int fd, const char *path, enum uio_seg pathseg, int flag) { struct mount *mp; diff --git a/sys/security/audit/audit.h b/sys/security/audit/audit.h index f24bc1e503b2..2e47b8c4bf48 100644 --- a/sys/security/audit/audit.h +++ b/sys/security/audit/audit.h @@ -122,7 +122,7 @@ void audit_arg_upath2(struct thread *td, int dirfd, char *upath); void audit_arg_upath2_canon(char *upath); void audit_arg_vnode1(struct vnode *vp); void audit_arg_vnode2(struct vnode *vp); -void audit_arg_text(char *text); +void audit_arg_text(const char *text); void audit_arg_cmd(int cmd); void audit_arg_svipc_cmd(int cmd); void audit_arg_svipc_perm(struct ipc_perm *perm); diff --git a/sys/security/audit/audit_arg.c b/sys/security/audit/audit_arg.c index de3ca87ac3a2..13fd16f2ea38 100644 --- a/sys/security/audit/audit_arg.c +++ b/sys/security/audit/audit_arg.c @@ -536,7 +536,7 @@ audit_arg_auditinfo_addr(struct auditinfo_addr *au_info) } void -audit_arg_text(char *text) +audit_arg_text(const char *text) { struct kaudit_record *ar; diff --git a/sys/sys/imgact.h b/sys/sys/imgact.h index d3355ce42169..4aebcee8c283 100644 --- a/sys/sys/imgact.h +++ b/sys/sys/imgact.h @@ -102,7 +102,7 @@ void exec_free_args(struct image_args *); int exec_new_vmspace(struct image_params *, struct sysentvec *); void exec_setregs(struct thread *, struct image_params *, u_long); int exec_shell_imgact(struct image_params *); -int exec_copyin_args(struct image_args *, char *, enum uio_seg, +int exec_copyin_args(struct image_args *, const char *, enum uio_seg, char **, char **); int exec_copyin_data_fds(struct thread *, struct image_args *, const void *, size_t, const int *, size_t); diff --git a/sys/sys/syscallsubr.h b/sys/sys/syscallsubr.h index 20e4cb39770e..2c5652c7b552 100644 --- a/sys/sys/syscallsubr.h +++ b/sys/sys/syscallsubr.h @@ -69,7 +69,7 @@ int kern_accept(struct thread *td, int s, struct sockaddr **name, socklen_t *namelen, struct file **fp); int kern_accept4(struct thread *td, int s, struct sockaddr **name, socklen_t *namelen, int flags, struct file **fp); -int kern_accessat(struct thread *td, int fd, char *path, +int kern_accessat(struct thread *td, int fd, const char *path, enum uio_seg pathseg, int flags, int mode); int kern_adjtime(struct thread *td, struct timeval *delta, struct timeval *olddelta); @@ -80,7 +80,7 @@ int kern_break(struct thread *td, uintptr_t *addr); int kern_cap_ioctls_limit(struct thread *td, int fd, u_long *cmds, size_t ncmds); int kern_cap_rights_limit(struct thread *td, int fd, cap_rights_t *rights); -int kern_chdir(struct thread *td, char *path, enum uio_seg pathseg); +int kern_chdir(struct thread *td, const char *path, enum uio_seg pathseg); int kern_clock_getcpuclockid2(struct thread *td, id_t id, int which, clockid_t *clk_id); int kern_clock_getres(struct thread *td, clockid_t clock_id, @@ -112,9 +112,9 @@ int kern_cpuset_setid(struct thread *td, cpuwhich_t which, int kern_dup(struct thread *td, u_int mode, int flags, int old, int new); int kern_execve(struct thread *td, struct image_args *args, struct mac *mac_p); -int kern_fchmodat(struct thread *td, int fd, char *path, +int kern_fchmodat(struct thread *td, int fd, const char *path, enum uio_seg pathseg, mode_t mode, int flag); -int kern_fchownat(struct thread *td, int fd, char *path, +int kern_fchownat(struct thread *td, int fd, const char *path, enum uio_seg pathseg, int uid, int gid, int flag); int kern_fcntl(struct thread *td, int fd, int cmd, intptr_t arg); int kern_fcntl_freebsd(struct thread *td, int fd, int cmd, long arg); @@ -157,19 +157,19 @@ int kern_kqueue(struct thread *td, int flags, struct filecaps *fcaps); int kern_kldload(struct thread *td, const char *file, int *fileid); int kern_kldstat(struct thread *td, int fileid, struct kld_file_stat *stat); int kern_kldunload(struct thread *td, int fileid, int flags); -int kern_linkat(struct thread *td, int fd1, int fd2, char *path1, - char *path2, enum uio_seg segflg, int follow); +int kern_linkat(struct thread *td, int fd1, int fd2, const char *path1, + const char *path2, enum uio_seg segflg, int follow); int kern_listen(struct thread *td, int s, int backlog); int kern_lseek(struct thread *td, int fd, off_t offset, int whence); -int kern_lutimes(struct thread *td, char *path, enum uio_seg pathseg, +int kern_lutimes(struct thread *td, const char *path, enum uio_seg pathseg, struct timeval *tptr, enum uio_seg tptrseg); int kern_madvise(struct thread *td, uintptr_t addr, size_t len, int behav); int kern_mincore(struct thread *td, uintptr_t addr, size_t len, char *vec); -int kern_mkdirat(struct thread *td, int fd, char *path, +int kern_mkdirat(struct thread *td, int fd, const char *path, enum uio_seg segflg, int mode); -int kern_mkfifoat(struct thread *td, int fd, char *path, +int kern_mkfifoat(struct thread *td, int fd, const char *path, enum uio_seg pathseg, int mode); -int kern_mknodat(struct thread *td, int fd, char *path, +int kern_mknodat(struct thread *td, int fd, const char *path, enum uio_seg pathseg, int mode, dev_t dev); int kern_mlock(struct proc *proc, struct ucred *cred, uintptr_t addr, size_t len); @@ -186,10 +186,10 @@ int kern_nanosleep(struct thread *td, struct timespec *rqt, struct timespec *rmt); int kern_ogetdirentries(struct thread *td, struct ogetdirentries_args *uap, long *ploff); -int kern_openat(struct thread *td, int fd, char *path, +int kern_openat(struct thread *td, int fd, const char *path, enum uio_seg pathseg, int flags, int mode); -int kern_pathconf(struct thread *td, char *path, enum uio_seg pathseg, - int name, u_long flags, long *valuep); +int kern_pathconf(struct thread *td, const char *path, + enum uio_seg pathseg, int name, u_long flags, long *valuep); int kern_pipe(struct thread *td, int fildes[2], int flags, struct filecaps *fcaps1, struct filecaps *fcaps2); int kern_poll(struct thread *td, struct pollfd *fds, u_int nfds, @@ -211,14 +211,14 @@ int kern_ptrace(struct thread *td, int req, pid_t pid, void *addr, int kern_pwrite(struct thread *td, int fd, const void *buf, size_t nbyte, off_t offset); int kern_pwritev(struct thread *td, int fd, struct uio *auio, off_t offset); -int kern_readlinkat(struct thread *td, int fd, char *path, +int kern_readlinkat(struct thread *td, int fd, const char *path, enum uio_seg pathseg, char *buf, enum uio_seg bufseg, size_t count); int kern_readv(struct thread *td, int fd, struct uio *auio); int kern_recvit(struct thread *td, int s, struct msghdr *mp, enum uio_seg fromseg, struct mbuf **controlp); -int kern_renameat(struct thread *td, int oldfd, char *old, int newfd, - char *new, enum uio_seg pathseg); -int kern_rmdirat(struct thread *td, int fd, char *path, +int kern_renameat(struct thread *td, int oldfd, const char *old, int newfd, + const char *new, enum uio_seg pathseg); +int kern_rmdirat(struct thread *td, int fd, const char *path, enum uio_seg pathseg, int flag); int kern_sched_getparam(struct thread *td, struct thread *targettd, struct sched_param *param); @@ -264,13 +264,13 @@ int kern_sigtimedwait(struct thread *td, sigset_t waitset, int kern_sigqueue(struct thread *td, pid_t pid, int signum, union sigval *value); int kern_socket(struct thread *td, int domain, int type, int protocol); -int kern_statat(struct thread *td, int flag, int fd, char *path, +int kern_statat(struct thread *td, int flag, int fd, const char *path, enum uio_seg pathseg, struct stat *sbp, void (*hook)(struct vnode *vp, struct stat *sbp)); -int kern_statfs(struct thread *td, char *path, enum uio_seg pathseg, +int kern_statfs(struct thread *td, const char *path, enum uio_seg pathseg, struct statfs *buf); -int kern_symlinkat(struct thread *td, char *path1, int fd, char *path2, - enum uio_seg segflg); +int kern_symlinkat(struct thread *td, const char *path1, int fd, + const char *path2, enum uio_seg segflg); int kern_ktimer_create(struct thread *td, clockid_t clock_id, struct sigevent *evp, int *timerid, int preset_id); int kern_ktimer_delete(struct thread *, int); @@ -283,13 +283,13 @@ int kern_thr_alloc(struct proc *, int pages, struct thread **); int kern_thr_exit(struct thread *td); int kern_thr_new(struct thread *td, struct thr_param *param); int kern_thr_suspend(struct thread *td, struct timespec *tsp); -int kern_truncate(struct thread *td, char *path, enum uio_seg pathseg, - off_t length); -int kern_unlinkat(struct thread *td, int fd, char *path, +int kern_truncate(struct thread *td, const char *path, + enum uio_seg pathseg, off_t length); +int kern_unlinkat(struct thread *td, int fd, const char *path, enum uio_seg pathseg, int flag, ino_t oldinum); -int kern_utimesat(struct thread *td, int fd, char *path, +int kern_utimesat(struct thread *td, int fd, const char *path, enum uio_seg pathseg, struct timeval *tptr, enum uio_seg tptrseg); -int kern_utimensat(struct thread *td, int fd, char *path, +int kern_utimensat(struct thread *td, int fd, const char *path, enum uio_seg pathseg, struct timespec *tptr, enum uio_seg tptrseg, int follow); int kern_wait(struct thread *td, pid_t pid, int *status, int options, -- cgit v1.3 From 4e8c73eb20d192be2bcf9f264a53183af3f95fdb Mon Sep 17 00:00:00 2001 From: Brooks Davis Date: Fri, 2 Nov 2018 20:56:19 +0000 Subject: Regen after r340080: Add const to input-only char * arguments. Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D17812 --- sys/compat/freebsd32/freebsd32_proto.h | 34 ++-- sys/compat/freebsd32/freebsd32_systrace_args.c | 220 +++++++++++------------ sys/kern/systrace_args.c | 236 ++++++++++++------------- sys/sys/sysproto.h | 146 +++++++-------- 4 files changed, 318 insertions(+), 318 deletions(-) (limited to 'sys') diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h index b7c0cdddc321..ed48baf7295f 100644 --- a/sys/compat/freebsd32/freebsd32_proto.h +++ b/sys/compat/freebsd32/freebsd32_proto.h @@ -77,7 +77,7 @@ struct freebsd32_ioctl_args { char data_l_[PADL_(struct md_ioctl32 *)]; struct md_ioctl32 * data; char data_r_[PADR_(struct md_ioctl32 *)]; }; struct freebsd32_execve_args { - char fname_l_[PADL_(char *)]; char * fname; char fname_r_[PADR_(char *)]; + char fname_l_[PADL_(const char *)]; const char * fname; char fname_r_[PADR_(const char *)]; char argv_l_[PADL_(uint32_t *)]; uint32_t * argv; char argv_r_[PADR_(uint32_t *)]; char envv_l_[PADL_(uint32_t *)]; uint32_t * envv; char envv_r_[PADR_(uint32_t *)]; }; @@ -130,7 +130,7 @@ struct freebsd32_settimeofday_args { char tzp_l_[PADL_(struct timezone *)]; struct timezone * tzp; char tzp_r_[PADR_(struct timezone *)]; }; struct freebsd32_utimes_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char tptr_l_[PADL_(struct timeval32 *)]; struct timeval32 * tptr; char tptr_r_[PADR_(struct timeval32 *)]; }; struct freebsd32_adjtime_args { @@ -243,7 +243,7 @@ struct freebsd32_lio_listio_args { char sig_l_[PADL_(struct sigevent32 *)]; struct sigevent32 * sig; char sig_r_[PADR_(struct sigevent32 *)]; }; struct freebsd32_lutimes_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char tptr_l_[PADL_(struct timeval32 *)]; struct timeval32 * tptr; char tptr_r_[PADR_(struct timeval32 *)]; }; struct freebsd32_preadv_args { @@ -434,7 +434,7 @@ struct freebsd32_lseek_args { char whence_l_[PADL_(int)]; int whence; char whence_r_[PADR_(int)]; }; struct freebsd32_truncate_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)]; char length1_l_[PADL_(uint32_t)]; uint32_t length1; char length1_r_[PADR_(uint32_t)]; char length2_l_[PADL_(uint32_t)]; uint32_t length2; char length2_r_[PADR_(uint32_t)]; @@ -476,7 +476,7 @@ struct freebsd32_lseek_args { char whence_l_[PADL_(int)]; int whence; char whence_r_[PADR_(int)]; }; struct freebsd32_truncate_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char length1_l_[PADL_(uint32_t)]; uint32_t length1; char length1_r_[PADR_(uint32_t)]; char length2_l_[PADL_(uint32_t)]; uint32_t length2; char length2_r_[PADR_(uint32_t)]; }; @@ -532,7 +532,7 @@ struct freebsd32_fexecve_args { }; struct freebsd32_futimesat_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char times_l_[PADL_(struct timeval *)]; struct timeval * times; char times_r_[PADR_(struct timeval *)]; }; struct freebsd32_jail_get_args { @@ -666,7 +666,7 @@ struct freebsd32_futimens_args { }; struct freebsd32_utimensat_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char times_l_[PADL_(struct timespec *)]; struct timespec * times; char times_r_[PADR_(struct timespec *)]; char flag_l_[PADL_(int)]; int flag; char flag_r_[PADR_(int)]; }; @@ -676,7 +676,7 @@ struct freebsd32_fstat_args { }; struct freebsd32_fstatat_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char buf_l_[PADL_(struct stat32 *)]; struct stat32 * buf; char buf_r_[PADR_(struct stat32 *)]; char flag_l_[PADL_(int)]; int flag; char flag_r_[PADR_(int)]; }; @@ -854,11 +854,11 @@ struct ofreebsd32_lseek_args { char whence_l_[PADL_(int)]; int whence; char whence_r_[PADR_(int)]; }; struct ofreebsd32_stat_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char ub_l_[PADL_(struct ostat32 *)]; struct ostat32 * ub; char ub_r_[PADR_(struct ostat32 *)]; }; struct ofreebsd32_lstat_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char ub_l_[PADL_(struct ostat *)]; struct ostat * ub; char ub_r_[PADR_(struct ostat *)]; }; struct ofreebsd32_sigaction_args { @@ -946,7 +946,7 @@ struct freebsd4_freebsd32_getfsstat_args { char mode_l_[PADL_(int)]; int mode; char mode_r_[PADR_(int)]; }; struct freebsd4_freebsd32_statfs_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char buf_l_[PADL_(struct statfs32 *)]; struct statfs32 * buf; char buf_r_[PADR_(struct statfs32 *)]; }; struct freebsd4_freebsd32_fstatfs_args { @@ -1037,7 +1037,7 @@ struct freebsd6_freebsd32_lseek_args { char whence_l_[PADL_(int)]; int whence; char whence_r_[PADR_(int)]; }; struct freebsd6_freebsd32_truncate_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)]; char length1_l_[PADL_(uint32_t)]; uint32_t length1; char length1_r_[PADR_(uint32_t)]; char length2_l_[PADL_(uint32_t)]; uint32_t length2; char length2_r_[PADR_(uint32_t)]; @@ -1153,12 +1153,12 @@ int freebsd10_freebsd32_pipe(struct thread *, struct freebsd10_freebsd32_pipe_ar #define PAD64_REQUIRED #endif struct freebsd11_freebsd32_mknod_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char mode_l_[PADL_(int)]; int mode; char mode_r_[PADR_(int)]; char dev_l_[PADL_(int)]; int dev; char dev_r_[PADR_(int)]; }; struct freebsd11_freebsd32_stat_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char ub_l_[PADL_(struct freebsd11_stat32 *)]; struct freebsd11_stat32 * ub; char ub_r_[PADR_(struct freebsd11_stat32 *)]; }; struct freebsd11_freebsd32_fstat_args { @@ -1166,7 +1166,7 @@ struct freebsd11_freebsd32_fstat_args { char ub_l_[PADL_(struct freebsd11_stat32 *)]; struct freebsd11_stat32 * ub; char ub_r_[PADR_(struct freebsd11_stat32 *)]; }; struct freebsd11_freebsd32_lstat_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char ub_l_[PADL_(struct freebsd11_stat32 *)]; struct freebsd11_stat32 * ub; char ub_r_[PADR_(struct freebsd11_stat32 *)]; }; struct freebsd11_freebsd32_getdirentries_args { @@ -1200,13 +1200,13 @@ struct freebsd11_freebsd32_kevent_args { #endif struct freebsd11_freebsd32_fstatat_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char buf_l_[PADL_(struct freebsd11_stat32 *)]; struct freebsd11_stat32 * buf; char buf_r_[PADR_(struct freebsd11_stat32 *)]; char flag_l_[PADL_(int)]; int flag; char flag_r_[PADR_(int)]; }; struct freebsd11_freebsd32_mknodat_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char mode_l_[PADL_(mode_t)]; mode_t mode; char mode_r_[PADR_(mode_t)]; char dev_l_[PADL_(uint32_t)]; uint32_t dev; char dev_r_[PADR_(uint32_t)]; }; diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index 9561e60753c1..59d97c7a74ce 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -52,7 +52,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* open */ case 5: { struct open_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ iarg[1] = p->flags; /* int */ iarg[2] = p->mode; /* mode_t */ *n_args = 3; @@ -78,22 +78,22 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* link */ case 9: { struct link_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ - uarg[1] = (intptr_t) p->link; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ + uarg[1] = (intptr_t) p->link; /* const char * */ *n_args = 2; break; } /* unlink */ case 10: { struct unlink_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ *n_args = 1; break; } /* chdir */ case 12: { struct chdir_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ *n_args = 1; break; } @@ -107,7 +107,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* chmod */ case 15: { struct chmod_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ iarg[1] = p->mode; /* mode_t */ *n_args = 2; break; @@ -115,7 +115,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* chown */ case 16: { struct chown_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ iarg[1] = p->uid; /* int */ iarg[2] = p->gid; /* int */ *n_args = 3; @@ -136,8 +136,8 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* mount */ case 21: { struct mount_args *p = params; - uarg[0] = (intptr_t) p->type; /* char * */ - uarg[1] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->type; /* const char * */ + uarg[1] = (intptr_t) p->path; /* const char * */ iarg[2] = p->flags; /* int */ uarg[3] = (intptr_t) p->data; /* caddr_t */ *n_args = 4; @@ -146,7 +146,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* unmount */ case 22: { struct unmount_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ iarg[1] = p->flags; /* int */ *n_args = 2; break; @@ -238,7 +238,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* access */ case 33: { struct access_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ iarg[1] = p->amode; /* int */ *n_args = 2; break; @@ -325,14 +325,14 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* setlogin */ case 50: { struct setlogin_args *p = params; - uarg[0] = (intptr_t) p->namebuf; /* char * */ + uarg[0] = (intptr_t) p->namebuf; /* const char * */ *n_args = 1; break; } /* acct */ case 51: { struct acct_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ *n_args = 1; break; } @@ -363,22 +363,22 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* revoke */ case 56: { struct revoke_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ *n_args = 1; break; } /* symlink */ case 57: { struct symlink_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ - uarg[1] = (intptr_t) p->link; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ + uarg[1] = (intptr_t) p->link; /* const char * */ *n_args = 2; break; } /* readlink */ case 58: { struct readlink_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ uarg[1] = (intptr_t) p->buf; /* char * */ uarg[2] = p->count; /* size_t */ *n_args = 3; @@ -387,7 +387,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* freebsd32_execve */ case 59: { struct freebsd32_execve_args *p = params; - uarg[0] = (intptr_t) p->fname; /* char * */ + uarg[0] = (intptr_t) p->fname; /* const char * */ uarg[1] = (intptr_t) p->argv; /* uint32_t * */ uarg[2] = (intptr_t) p->envv; /* uint32_t * */ *n_args = 3; @@ -403,7 +403,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* chroot */ case 61: { struct chroot_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ *n_args = 1; break; } @@ -511,7 +511,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* swapon */ case 85: { struct swapon_args *p = params; - uarg[0] = (intptr_t) p->name; /* char * */ + uarg[0] = (intptr_t) p->name; /* const char * */ *n_args = 1; break; } @@ -715,8 +715,8 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* rename */ case 128: { struct rename_args *p = params; - uarg[0] = (intptr_t) p->from; /* char * */ - uarg[1] = (intptr_t) p->to; /* char * */ + uarg[0] = (intptr_t) p->from; /* const char * */ + uarg[1] = (intptr_t) p->to; /* const char * */ *n_args = 2; break; } @@ -731,7 +731,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* mkfifo */ case 132: { struct mkfifo_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ iarg[1] = p->mode; /* mode_t */ *n_args = 2; break; @@ -769,7 +769,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* mkdir */ case 136: { struct mkdir_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ iarg[1] = p->mode; /* mode_t */ *n_args = 2; break; @@ -777,14 +777,14 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* rmdir */ case 137: { struct rmdir_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ *n_args = 1; break; } /* freebsd32_utimes */ case 138: { struct freebsd32_utimes_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ uarg[1] = (intptr_t) p->tptr; /* struct timeval32 * */ *n_args = 2; break; @@ -805,7 +805,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* quotactl */ case 148: { struct quotactl_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ iarg[1] = p->cmd; /* int */ iarg[2] = p->uid; /* int */ uarg[3] = (intptr_t) p->arg; /* caddr_t */ @@ -815,7 +815,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* getfh */ case 161: { struct getfh_args *p = params; - uarg[0] = (intptr_t) p->fname; /* char * */ + uarg[0] = (intptr_t) p->fname; /* const char * */ uarg[1] = (intptr_t) p->fhp; /* struct fhandle * */ *n_args = 2; break; @@ -901,7 +901,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* pathconf */ case 191: { struct pathconf_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ iarg[1] = p->name; /* int */ *n_args = 2; break; @@ -966,7 +966,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* undelete */ case 205: { struct undelete_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ *n_args = 1; break; } @@ -1254,7 +1254,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* lchown */ case 254: { struct lchown_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ iarg[1] = p->uid; /* int */ iarg[2] = p->gid; /* int */ *n_args = 3; @@ -1287,7 +1287,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* lchmod */ case 274: { struct lchmod_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ iarg[1] = p->mode; /* mode_t */ *n_args = 2; break; @@ -1295,7 +1295,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* freebsd32_lutimes */ case 276: { struct freebsd32_lutimes_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ uarg[1] = (intptr_t) p->tptr; /* struct timeval32 * */ *n_args = 2; break; @@ -1790,7 +1790,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* eaccess */ case 376: { struct eaccess_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ iarg[1] = p->amode; /* int */ *n_args = 2; break; @@ -2178,7 +2178,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* auditctl */ case 453: { struct auditctl_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ *n_args = 1; break; } @@ -2400,7 +2400,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* freebsd32_truncate */ case 479: { struct freebsd32_truncate_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ iarg[1] = p->pad; /* int */ uarg[2] = p->length1; /* uint32_t */ uarg[3] = p->length2; /* uint32_t */ @@ -2466,7 +2466,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* freebsd32_truncate */ case 479: { struct freebsd32_truncate_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ uarg[1] = p->length1; /* uint32_t */ uarg[2] = p->length2; /* uint32_t */ *n_args = 3; @@ -2577,7 +2577,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 489: { struct faccessat_args *p = params; iarg[0] = p->fd; /* int */ - uarg[1] = (intptr_t) p->path; /* char * */ + uarg[1] = (intptr_t) p->path; /* const char * */ iarg[2] = p->amode; /* int */ iarg[3] = p->flag; /* int */ *n_args = 4; @@ -2597,7 +2597,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 491: { struct fchownat_args *p = params; iarg[0] = p->fd; /* int */ - uarg[1] = (intptr_t) p->path; /* char * */ + uarg[1] = (intptr_t) p->path; /* const char * */ uarg[2] = p->uid; /* uid_t */ iarg[3] = p->gid; /* gid_t */ iarg[4] = p->flag; /* int */ @@ -2617,7 +2617,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 494: { struct freebsd32_futimesat_args *p = params; iarg[0] = p->fd; /* int */ - uarg[1] = (intptr_t) p->path; /* char * */ + uarg[1] = (intptr_t) p->path; /* const char * */ uarg[2] = (intptr_t) p->times; /* struct timeval * */ *n_args = 3; break; @@ -2626,9 +2626,9 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 495: { struct linkat_args *p = params; iarg[0] = p->fd1; /* int */ - uarg[1] = (intptr_t) p->path1; /* char * */ + uarg[1] = (intptr_t) p->path1; /* const char * */ iarg[2] = p->fd2; /* int */ - uarg[3] = (intptr_t) p->path2; /* char * */ + uarg[3] = (intptr_t) p->path2; /* const char * */ iarg[4] = p->flag; /* int */ *n_args = 5; break; @@ -2637,7 +2637,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 496: { struct mkdirat_args *p = params; iarg[0] = p->fd; /* int */ - uarg[1] = (intptr_t) p->path; /* char * */ + uarg[1] = (intptr_t) p->path; /* const char * */ iarg[2] = p->mode; /* mode_t */ *n_args = 3; break; @@ -2646,7 +2646,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 497: { struct mkfifoat_args *p = params; iarg[0] = p->fd; /* int */ - uarg[1] = (intptr_t) p->path; /* char * */ + uarg[1] = (intptr_t) p->path; /* const char * */ iarg[2] = p->mode; /* mode_t */ *n_args = 3; break; @@ -2655,7 +2655,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 499: { struct openat_args *p = params; iarg[0] = p->fd; /* int */ - uarg[1] = (intptr_t) p->path; /* char * */ + uarg[1] = (intptr_t) p->path; /* const char * */ iarg[2] = p->flag; /* int */ iarg[3] = p->mode; /* mode_t */ *n_args = 4; @@ -2665,7 +2665,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 500: { struct readlinkat_args *p = params; iarg[0] = p->fd; /* int */ - uarg[1] = (intptr_t) p->path; /* char * */ + uarg[1] = (intptr_t) p->path; /* const char * */ uarg[2] = (intptr_t) p->buf; /* char * */ uarg[3] = p->bufsize; /* size_t */ *n_args = 4; @@ -2675,7 +2675,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 501: { struct renameat_args *p = params; iarg[0] = p->oldfd; /* int */ - uarg[1] = (intptr_t) p->old; /* char * */ + uarg[1] = (intptr_t) p->old; /* const char * */ iarg[2] = p->newfd; /* int */ uarg[3] = (intptr_t) p->new; /* const char * */ *n_args = 4; @@ -2684,9 +2684,9 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* symlinkat */ case 502: { struct symlinkat_args *p = params; - uarg[0] = (intptr_t) p->path1; /* char * */ + uarg[0] = (intptr_t) p->path1; /* const char * */ iarg[1] = p->fd; /* int */ - uarg[2] = (intptr_t) p->path2; /* char * */ + uarg[2] = (intptr_t) p->path2; /* const char * */ *n_args = 3; break; } @@ -2694,7 +2694,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 503: { struct unlinkat_args *p = params; iarg[0] = p->fd; /* int */ - uarg[1] = (intptr_t) p->path; /* char * */ + uarg[1] = (intptr_t) p->path; /* const char * */ iarg[2] = p->flag; /* int */ *n_args = 3; break; @@ -2769,7 +2769,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* lpathconf */ case 513: { struct lpathconf_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ iarg[1] = p->name; /* int */ *n_args = 2; break; @@ -3119,7 +3119,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 547: { struct freebsd32_utimensat_args *p = params; iarg[0] = p->fd; /* int */ - uarg[1] = (intptr_t) p->path; /* char * */ + uarg[1] = (intptr_t) p->path; /* const char * */ uarg[2] = (intptr_t) p->times; /* struct timespec * */ iarg[3] = p->flag; /* int */ *n_args = 4; @@ -3144,7 +3144,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 552: { struct freebsd32_fstatat_args *p = params; iarg[0] = p->fd; /* int */ - uarg[1] = (intptr_t) p->path; /* char * */ + uarg[1] = (intptr_t) p->path; /* const char * */ uarg[2] = (intptr_t) p->buf; /* struct stat32 * */ iarg[3] = p->flag; /* int */ *n_args = 4; @@ -3171,7 +3171,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* statfs */ case 555: { struct statfs_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ uarg[1] = (intptr_t) p->buf; /* struct statfs32 * */ *n_args = 2; break; @@ -3205,7 +3205,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 559: { struct mknodat_args *p = params; iarg[0] = p->fd; /* int */ - uarg[1] = (intptr_t) p->path; /* char * */ + uarg[1] = (intptr_t) p->path; /* const char * */ iarg[2] = p->mode; /* mode_t */ iarg[3] = p->dev; /* dev_t */ *n_args = 4; @@ -3323,7 +3323,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 5: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: p = "int"; @@ -3368,10 +3368,10 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 9: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: - p = "userland char *"; + p = "userland const char *"; break; default: break; @@ -3381,7 +3381,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 10: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; default: break; @@ -3391,7 +3391,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 12: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; default: break; @@ -3411,7 +3411,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 15: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: p = "mode_t"; @@ -3424,7 +3424,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 16: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: p = "int"; @@ -3453,10 +3453,10 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 21: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: - p = "userland char *"; + p = "userland const char *"; break; case 2: p = "int"; @@ -3472,7 +3472,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 22: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: p = "int"; @@ -3625,7 +3625,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 33: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: p = "int"; @@ -3750,7 +3750,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 50: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; default: break; @@ -3760,7 +3760,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 51: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; default: break; @@ -3809,7 +3809,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 56: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; default: break; @@ -3819,10 +3819,10 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 57: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: - p = "userland char *"; + p = "userland const char *"; break; default: break; @@ -3832,7 +3832,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 58: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: p = "userland char *"; @@ -3848,7 +3848,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 59: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: p = "userland uint32_t *"; @@ -3874,7 +3874,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 61: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; default: break; @@ -4042,7 +4042,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 85: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; default: break; @@ -4389,10 +4389,10 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 128: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: - p = "userland char *"; + p = "userland const char *"; break; default: break; @@ -4415,7 +4415,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 132: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: p = "mode_t"; @@ -4485,7 +4485,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 136: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: p = "mode_t"; @@ -4498,7 +4498,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 137: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; default: break; @@ -4508,7 +4508,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 138: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: p = "userland struct timeval32 *"; @@ -4537,7 +4537,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 148: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: p = "int"; @@ -4556,7 +4556,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 161: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: p = "userland struct fhandle *"; @@ -4704,7 +4704,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 191: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: p = "int"; @@ -4810,7 +4810,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 205: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; default: break; @@ -5234,7 +5234,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 254: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: p = "int"; @@ -5289,7 +5289,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 274: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: p = "mode_t"; @@ -5302,7 +5302,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 276: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: p = "userland struct timeval32 *"; @@ -6112,7 +6112,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 376: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: p = "int"; @@ -6759,7 +6759,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 453: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; default: break; @@ -7181,7 +7181,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 479: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: p = "int"; @@ -7311,7 +7311,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 479: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: p = "uint32_t"; @@ -7515,7 +7515,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "userland char *"; + p = "userland const char *"; break; case 2: p = "int"; @@ -7553,7 +7553,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "userland char *"; + p = "userland const char *"; break; case 2: p = "uid_t"; @@ -7591,7 +7591,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "userland char *"; + p = "userland const char *"; break; case 2: p = "userland struct timeval *"; @@ -7607,13 +7607,13 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "userland char *"; + p = "userland const char *"; break; case 2: p = "int"; break; case 3: - p = "userland char *"; + p = "userland const char *"; break; case 4: p = "int"; @@ -7629,7 +7629,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "userland char *"; + p = "userland const char *"; break; case 2: p = "mode_t"; @@ -7645,7 +7645,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "userland char *"; + p = "userland const char *"; break; case 2: p = "mode_t"; @@ -7661,7 +7661,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "userland char *"; + p = "userland const char *"; break; case 2: p = "int"; @@ -7680,7 +7680,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "userland char *"; + p = "userland const char *"; break; case 2: p = "userland char *"; @@ -7699,7 +7699,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "userland char *"; + p = "userland const char *"; break; case 2: p = "int"; @@ -7715,13 +7715,13 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 502: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: p = "int"; break; case 2: - p = "userland char *"; + p = "userland const char *"; break; default: break; @@ -7734,7 +7734,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "userland char *"; + p = "userland const char *"; break; case 2: p = "int"; @@ -7860,7 +7860,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 513: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: p = "int"; @@ -8501,7 +8501,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "userland char *"; + p = "userland const char *"; break; case 2: p = "userland struct timespec *"; @@ -8543,7 +8543,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "userland char *"; + p = "userland const char *"; break; case 2: p = "userland struct stat32 *"; @@ -8591,7 +8591,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 555: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: p = "userland struct statfs32 *"; @@ -8649,7 +8649,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "userland char *"; + p = "userland const char *"; break; case 2: p = "mode_t"; diff --git a/sys/kern/systrace_args.c b/sys/kern/systrace_args.c index e5dde39aa3d5..31283b9df1f0 100644 --- a/sys/kern/systrace_args.c +++ b/sys/kern/systrace_args.c @@ -49,7 +49,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* open */ case 5: { struct open_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ iarg[1] = p->flags; /* int */ iarg[2] = p->mode; /* mode_t */ *n_args = 3; @@ -75,22 +75,22 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* link */ case 9: { struct link_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ - uarg[1] = (intptr_t) p->link; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ + uarg[1] = (intptr_t) p->link; /* const char * */ *n_args = 2; break; } /* unlink */ case 10: { struct unlink_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ *n_args = 1; break; } /* chdir */ case 12: { struct chdir_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ *n_args = 1; break; } @@ -104,7 +104,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* chmod */ case 15: { struct chmod_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ iarg[1] = p->mode; /* mode_t */ *n_args = 2; break; @@ -112,7 +112,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* chown */ case 16: { struct chown_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ iarg[1] = p->uid; /* int */ iarg[2] = p->gid; /* int */ *n_args = 3; @@ -133,8 +133,8 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* mount */ case 21: { struct mount_args *p = params; - uarg[0] = (intptr_t) p->type; /* char * */ - uarg[1] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->type; /* const char * */ + uarg[1] = (intptr_t) p->path; /* const char * */ iarg[2] = p->flags; /* int */ uarg[3] = (intptr_t) p->data; /* caddr_t */ *n_args = 4; @@ -143,7 +143,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* unmount */ case 22: { struct unmount_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ iarg[1] = p->flags; /* int */ *n_args = 2; break; @@ -235,7 +235,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* access */ case 33: { struct access_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ iarg[1] = p->amode; /* int */ *n_args = 2; break; @@ -322,14 +322,14 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* setlogin */ case 50: { struct setlogin_args *p = params; - uarg[0] = (intptr_t) p->namebuf; /* char * */ + uarg[0] = (intptr_t) p->namebuf; /* const char * */ *n_args = 1; break; } /* acct */ case 51: { struct acct_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ *n_args = 1; break; } @@ -360,22 +360,22 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* revoke */ case 56: { struct revoke_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ *n_args = 1; break; } /* symlink */ case 57: { struct symlink_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ - uarg[1] = (intptr_t) p->link; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ + uarg[1] = (intptr_t) p->link; /* const char * */ *n_args = 2; break; } /* readlink */ case 58: { struct readlink_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ uarg[1] = (intptr_t) p->buf; /* char * */ uarg[2] = p->count; /* size_t */ *n_args = 3; @@ -384,7 +384,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* execve */ case 59: { struct execve_args *p = params; - uarg[0] = (intptr_t) p->fname; /* char * */ + uarg[0] = (intptr_t) p->fname; /* const char * */ uarg[1] = (intptr_t) p->argv; /* char ** */ uarg[2] = (intptr_t) p->envv; /* char ** */ *n_args = 3; @@ -400,7 +400,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* chroot */ case 61: { struct chroot_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ *n_args = 1; break; } @@ -508,7 +508,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* swapon */ case 85: { struct swapon_args *p = params; - uarg[0] = (intptr_t) p->name; /* char * */ + uarg[0] = (intptr_t) p->name; /* const char * */ *n_args = 1; break; } @@ -712,8 +712,8 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* rename */ case 128: { struct rename_args *p = params; - uarg[0] = (intptr_t) p->from; /* char * */ - uarg[1] = (intptr_t) p->to; /* char * */ + uarg[0] = (intptr_t) p->from; /* const char * */ + uarg[1] = (intptr_t) p->to; /* const char * */ *n_args = 2; break; } @@ -728,7 +728,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* mkfifo */ case 132: { struct mkfifo_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ iarg[1] = p->mode; /* mode_t */ *n_args = 2; break; @@ -766,7 +766,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* mkdir */ case 136: { struct mkdir_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ iarg[1] = p->mode; /* mode_t */ *n_args = 2; break; @@ -774,14 +774,14 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* rmdir */ case 137: { struct rmdir_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ *n_args = 1; break; } /* utimes */ case 138: { struct utimes_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ uarg[1] = (intptr_t) p->tptr; /* struct timeval * */ *n_args = 2; break; @@ -802,7 +802,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* quotactl */ case 148: { struct quotactl_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ iarg[1] = p->cmd; /* int */ iarg[2] = p->uid; /* int */ uarg[3] = (intptr_t) p->arg; /* caddr_t */ @@ -830,7 +830,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* lgetfh */ case 160: { struct lgetfh_args *p = params; - uarg[0] = (intptr_t) p->fname; /* char * */ + uarg[0] = (intptr_t) p->fname; /* const char * */ uarg[1] = (intptr_t) p->fhp; /* struct fhandle * */ *n_args = 2; break; @@ -838,7 +838,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* getfh */ case 161: { struct getfh_args *p = params; - uarg[0] = (intptr_t) p->fname; /* char * */ + uarg[0] = (intptr_t) p->fname; /* const char * */ uarg[1] = (intptr_t) p->fhp; /* struct fhandle * */ *n_args = 2; break; @@ -931,7 +931,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* pathconf */ case 191: { struct pathconf_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ iarg[1] = p->name; /* int */ *n_args = 2; break; @@ -996,7 +996,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* undelete */ case 205: { struct undelete_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ *n_args = 1; break; } @@ -1290,7 +1290,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* lchown */ case 254: { struct lchown_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ iarg[1] = p->uid; /* int */ iarg[2] = p->gid; /* int */ *n_args = 3; @@ -1323,7 +1323,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* lchmod */ case 274: { struct lchmod_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ iarg[1] = p->mode; /* mode_t */ *n_args = 2; break; @@ -1331,7 +1331,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* lutimes */ case 276: { struct lutimes_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ uarg[1] = (intptr_t) p->tptr; /* struct timeval * */ *n_args = 2; break; @@ -1835,7 +1835,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* eaccess */ case 376: { struct eaccess_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ iarg[1] = p->amode; /* int */ *n_args = 2; break; @@ -2083,7 +2083,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* __mac_execve */ case 415: { struct __mac_execve_args *p = params; - uarg[0] = (intptr_t) p->fname; /* char * */ + uarg[0] = (intptr_t) p->fname; /* const char * */ uarg[1] = (intptr_t) p->argv; /* char ** */ uarg[2] = (intptr_t) p->envv; /* char ** */ uarg[3] = (intptr_t) p->mac_p; /* struct mac * */ @@ -2340,7 +2340,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* auditctl */ case 453: { struct auditctl_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ *n_args = 1; break; } @@ -2553,7 +2553,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* truncate */ case 479: { struct truncate_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ iarg[1] = p->length; /* off_t */ *n_args = 2; break; @@ -2643,7 +2643,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 489: { struct faccessat_args *p = params; iarg[0] = p->fd; /* int */ - uarg[1] = (intptr_t) p->path; /* char * */ + uarg[1] = (intptr_t) p->path; /* const char * */ iarg[2] = p->amode; /* int */ iarg[3] = p->flag; /* int */ *n_args = 4; @@ -2653,7 +2653,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 490: { struct fchmodat_args *p = params; iarg[0] = p->fd; /* int */ - uarg[1] = (intptr_t) p->path; /* char * */ + uarg[1] = (intptr_t) p->path; /* const char * */ iarg[2] = p->mode; /* mode_t */ iarg[3] = p->flag; /* int */ *n_args = 4; @@ -2663,7 +2663,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 491: { struct fchownat_args *p = params; iarg[0] = p->fd; /* int */ - uarg[1] = (intptr_t) p->path; /* char * */ + uarg[1] = (intptr_t) p->path; /* const char * */ uarg[2] = p->uid; /* uid_t */ iarg[3] = p->gid; /* gid_t */ iarg[4] = p->flag; /* int */ @@ -2683,7 +2683,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 494: { struct futimesat_args *p = params; iarg[0] = p->fd; /* int */ - uarg[1] = (intptr_t) p->path; /* char * */ + uarg[1] = (intptr_t) p->path; /* const char * */ uarg[2] = (intptr_t) p->times; /* struct timeval * */ *n_args = 3; break; @@ -2692,9 +2692,9 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 495: { struct linkat_args *p = params; iarg[0] = p->fd1; /* int */ - uarg[1] = (intptr_t) p->path1; /* char * */ + uarg[1] = (intptr_t) p->path1; /* const char * */ iarg[2] = p->fd2; /* int */ - uarg[3] = (intptr_t) p->path2; /* char * */ + uarg[3] = (intptr_t) p->path2; /* const char * */ iarg[4] = p->flag; /* int */ *n_args = 5; break; @@ -2703,7 +2703,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 496: { struct mkdirat_args *p = params; iarg[0] = p->fd; /* int */ - uarg[1] = (intptr_t) p->path; /* char * */ + uarg[1] = (intptr_t) p->path; /* const char * */ iarg[2] = p->mode; /* mode_t */ *n_args = 3; break; @@ -2712,7 +2712,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 497: { struct mkfifoat_args *p = params; iarg[0] = p->fd; /* int */ - uarg[1] = (intptr_t) p->path; /* char * */ + uarg[1] = (intptr_t) p->path; /* const char * */ iarg[2] = p->mode; /* mode_t */ *n_args = 3; break; @@ -2721,7 +2721,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 499: { struct openat_args *p = params; iarg[0] = p->fd; /* int */ - uarg[1] = (intptr_t) p->path; /* char * */ + uarg[1] = (intptr_t) p->path; /* const char * */ iarg[2] = p->flag; /* int */ iarg[3] = p->mode; /* mode_t */ *n_args = 4; @@ -2731,7 +2731,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 500: { struct readlinkat_args *p = params; iarg[0] = p->fd; /* int */ - uarg[1] = (intptr_t) p->path; /* char * */ + uarg[1] = (intptr_t) p->path; /* const char * */ uarg[2] = (intptr_t) p->buf; /* char * */ uarg[3] = p->bufsize; /* size_t */ *n_args = 4; @@ -2741,18 +2741,18 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 501: { struct renameat_args *p = params; iarg[0] = p->oldfd; /* int */ - uarg[1] = (intptr_t) p->old; /* char * */ + uarg[1] = (intptr_t) p->old; /* const char * */ iarg[2] = p->newfd; /* int */ - uarg[3] = (intptr_t) p->new; /* char * */ + uarg[3] = (intptr_t) p->new; /* const char * */ *n_args = 4; break; } /* symlinkat */ case 502: { struct symlinkat_args *p = params; - uarg[0] = (intptr_t) p->path1; /* char * */ + uarg[0] = (intptr_t) p->path1; /* const char * */ iarg[1] = p->fd; /* int */ - uarg[2] = (intptr_t) p->path2; /* char * */ + uarg[2] = (intptr_t) p->path2; /* const char * */ *n_args = 3; break; } @@ -2760,7 +2760,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 503: { struct unlinkat_args *p = params; iarg[0] = p->fd; /* int */ - uarg[1] = (intptr_t) p->path; /* char * */ + uarg[1] = (intptr_t) p->path; /* const char * */ iarg[2] = p->flag; /* int */ *n_args = 3; break; @@ -2775,7 +2775,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* gssd_syscall */ case 505: { struct gssd_syscall_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ *n_args = 1; break; } @@ -2842,7 +2842,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* lpathconf */ case 513: { struct lpathconf_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ iarg[1] = p->name; /* int */ *n_args = 2; break; @@ -3129,7 +3129,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 547: { struct utimensat_args *p = params; iarg[0] = p->fd; /* int */ - uarg[1] = (intptr_t) p->path; /* char * */ + uarg[1] = (intptr_t) p->path; /* const char * */ uarg[2] = (intptr_t) p->times; /* struct timespec * */ iarg[3] = p->flag; /* int */ *n_args = 4; @@ -3154,7 +3154,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 552: { struct fstatat_args *p = params; iarg[0] = p->fd; /* int */ - uarg[1] = (intptr_t) p->path; /* char * */ + uarg[1] = (intptr_t) p->path; /* const char * */ uarg[2] = (intptr_t) p->buf; /* struct stat * */ iarg[3] = p->flag; /* int */ *n_args = 4; @@ -3181,7 +3181,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) /* statfs */ case 555: { struct statfs_args *p = params; - uarg[0] = (intptr_t) p->path; /* char * */ + uarg[0] = (intptr_t) p->path; /* const char * */ uarg[1] = (intptr_t) p->buf; /* struct statfs * */ *n_args = 2; break; @@ -3215,7 +3215,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 559: { struct mknodat_args *p = params; iarg[0] = p->fd; /* int */ - uarg[1] = (intptr_t) p->path; /* char * */ + uarg[1] = (intptr_t) p->path; /* const char * */ iarg[2] = p->mode; /* mode_t */ iarg[3] = p->dev; /* dev_t */ *n_args = 4; @@ -3328,7 +3328,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 5: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: p = "int"; @@ -3373,10 +3373,10 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 9: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: - p = "userland char *"; + p = "userland const char *"; break; default: break; @@ -3386,7 +3386,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 10: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; default: break; @@ -3396,7 +3396,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 12: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; default: break; @@ -3416,7 +3416,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 15: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: p = "mode_t"; @@ -3429,7 +3429,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 16: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: p = "int"; @@ -3458,10 +3458,10 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 21: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: - p = "userland char *"; + p = "userland const char *"; break; case 2: p = "int"; @@ -3477,7 +3477,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 22: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: p = "int"; @@ -3630,7 +3630,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 33: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: p = "int"; @@ -3755,7 +3755,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 50: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; default: break; @@ -3765,7 +3765,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 51: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; default: break; @@ -3814,7 +3814,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 56: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; default: break; @@ -3824,10 +3824,10 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 57: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: - p = "userland char *"; + p = "userland const char *"; break; default: break; @@ -3837,7 +3837,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 58: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: p = "userland char *"; @@ -3853,7 +3853,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 59: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: p = "userland char **"; @@ -3879,7 +3879,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 61: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; default: break; @@ -4047,7 +4047,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 85: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; default: break; @@ -4394,10 +4394,10 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 128: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: - p = "userland char *"; + p = "userland const char *"; break; default: break; @@ -4420,7 +4420,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 132: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: p = "mode_t"; @@ -4490,7 +4490,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 136: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: p = "mode_t"; @@ -4503,7 +4503,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 137: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; default: break; @@ -4513,7 +4513,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 138: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: p = "userland struct timeval *"; @@ -4542,7 +4542,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 148: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: p = "int"; @@ -4593,7 +4593,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 160: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: p = "userland struct fhandle *"; @@ -4606,7 +4606,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 161: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: p = "userland struct fhandle *"; @@ -4764,7 +4764,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 191: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: p = "int"; @@ -4870,7 +4870,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 205: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; default: break; @@ -5301,7 +5301,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 254: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: p = "int"; @@ -5356,7 +5356,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 274: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: p = "mode_t"; @@ -5369,7 +5369,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 276: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: p = "userland struct timeval *"; @@ -6195,7 +6195,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 376: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: p = "int"; @@ -6620,7 +6620,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 415: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: p = "userland char **"; @@ -7039,7 +7039,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 453: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; default: break; @@ -7436,7 +7436,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 479: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: p = "off_t"; @@ -7596,7 +7596,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "userland char *"; + p = "userland const char *"; break; case 2: p = "int"; @@ -7615,7 +7615,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "userland char *"; + p = "userland const char *"; break; case 2: p = "mode_t"; @@ -7634,7 +7634,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "userland char *"; + p = "userland const char *"; break; case 2: p = "uid_t"; @@ -7672,7 +7672,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "userland char *"; + p = "userland const char *"; break; case 2: p = "userland struct timeval *"; @@ -7688,13 +7688,13 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "userland char *"; + p = "userland const char *"; break; case 2: p = "int"; break; case 3: - p = "userland char *"; + p = "userland const char *"; break; case 4: p = "int"; @@ -7710,7 +7710,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "userland char *"; + p = "userland const char *"; break; case 2: p = "mode_t"; @@ -7726,7 +7726,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "userland char *"; + p = "userland const char *"; break; case 2: p = "mode_t"; @@ -7742,7 +7742,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "userland char *"; + p = "userland const char *"; break; case 2: p = "int"; @@ -7761,7 +7761,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "userland char *"; + p = "userland const char *"; break; case 2: p = "userland char *"; @@ -7780,13 +7780,13 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "userland char *"; + p = "userland const char *"; break; case 2: p = "int"; break; case 3: - p = "userland char *"; + p = "userland const char *"; break; default: break; @@ -7796,13 +7796,13 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 502: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: p = "int"; break; case 2: - p = "userland char *"; + p = "userland const char *"; break; default: break; @@ -7815,7 +7815,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "userland char *"; + p = "userland const char *"; break; case 2: p = "int"; @@ -7838,7 +7838,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 505: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; default: break; @@ -7951,7 +7951,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 513: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: p = "int"; @@ -8459,7 +8459,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "userland char *"; + p = "userland const char *"; break; case 2: p = "userland struct timespec *"; @@ -8501,7 +8501,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "userland char *"; + p = "userland const char *"; break; case 2: p = "userland struct stat *"; @@ -8549,7 +8549,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) case 555: switch(ndx) { case 0: - p = "userland char *"; + p = "userland const char *"; break; case 1: p = "userland struct statfs *"; @@ -8607,7 +8607,7 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) p = "int"; break; case 1: - p = "userland char *"; + p = "userland const char *"; break; case 2: p = "mode_t"; diff --git a/sys/sys/sysproto.h b/sys/sys/sysproto.h index 914c91fce856..fa54d1234201 100644 --- a/sys/sys/sysproto.h +++ b/sys/sys/sysproto.h @@ -54,7 +54,7 @@ struct write_args { char nbyte_l_[PADL_(size_t)]; size_t nbyte; char nbyte_r_[PADR_(size_t)]; }; struct open_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; char mode_l_[PADL_(mode_t)]; mode_t mode; char mode_r_[PADR_(mode_t)]; }; @@ -68,24 +68,24 @@ struct wait4_args { char rusage_l_[PADL_(struct rusage *)]; struct rusage * rusage; char rusage_r_[PADR_(struct rusage *)]; }; struct link_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; - char link_l_[PADL_(char *)]; char * link; char link_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; + char link_l_[PADL_(const char *)]; const char * link; char link_r_[PADR_(const char *)]; }; struct unlink_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; }; struct chdir_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; }; struct fchdir_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; }; struct chmod_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char mode_l_[PADL_(mode_t)]; mode_t mode; char mode_r_[PADR_(mode_t)]; }; struct chown_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char uid_l_[PADL_(int)]; int uid; char uid_r_[PADR_(int)]; char gid_l_[PADL_(int)]; int gid; char gid_r_[PADR_(int)]; }; @@ -96,13 +96,13 @@ struct getpid_args { register_t dummy; }; struct mount_args { - char type_l_[PADL_(char *)]; char * type; char type_r_[PADR_(char *)]; - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char type_l_[PADL_(const char *)]; const char * type; char type_r_[PADR_(const char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; char data_l_[PADL_(caddr_t)]; caddr_t data; char data_r_[PADR_(caddr_t)]; }; struct unmount_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; }; struct setuid_args { @@ -154,7 +154,7 @@ struct getsockname_args { char alen_l_[PADL_(__socklen_t *)]; __socklen_t * alen; char alen_r_[PADR_(__socklen_t *)]; }; struct access_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char amode_l_[PADL_(int)]; int amode; char amode_r_[PADR_(int)]; }; struct chflags_args { @@ -204,10 +204,10 @@ struct getlogin_args { char namelen_l_[PADL_(u_int)]; u_int namelen; char namelen_r_[PADR_(u_int)]; }; struct setlogin_args { - char namebuf_l_[PADL_(char *)]; char * namebuf; char namebuf_r_[PADR_(char *)]; + char namebuf_l_[PADL_(const char *)]; const char * namebuf; char namebuf_r_[PADR_(const char *)]; }; struct acct_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; }; struct osigpending_args { register_t dummy; @@ -225,19 +225,19 @@ struct reboot_args { char opt_l_[PADL_(int)]; int opt; char opt_r_[PADR_(int)]; }; struct revoke_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; }; struct symlink_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; - char link_l_[PADL_(char *)]; char * link; char link_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; + char link_l_[PADL_(const char *)]; const char * link; char link_r_[PADR_(const char *)]; }; struct readlink_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char buf_l_[PADL_(char *)]; char * buf; char buf_r_[PADR_(char *)]; char count_l_[PADL_(size_t)]; size_t count; char count_r_[PADR_(size_t)]; }; struct execve_args { - char fname_l_[PADL_(char *)]; char * fname; char fname_r_[PADR_(char *)]; + char fname_l_[PADL_(const char *)]; const char * fname; char fname_r_[PADR_(const char *)]; char argv_l_[PADL_(char **)]; char ** argv; char argv_r_[PADR_(char **)]; char envv_l_[PADL_(char **)]; char ** envv; char envv_r_[PADR_(char **)]; }; @@ -245,7 +245,7 @@ struct umask_args { char newmask_l_[PADL_(mode_t)]; mode_t newmask; char newmask_r_[PADR_(mode_t)]; }; struct chroot_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; }; struct getpagesize_args { register_t dummy; @@ -307,7 +307,7 @@ struct owait_args { register_t dummy; }; struct swapon_args { - char name_l_[PADL_(char *)]; char * name; char name_r_[PADR_(char *)]; + char name_l_[PADL_(const char *)]; const char * name; char name_r_[PADR_(const char *)]; }; struct getitimer_args { char which_l_[PADL_(u_int)]; u_int which; char which_r_[PADR_(u_int)]; @@ -417,15 +417,15 @@ struct setregid_args { char egid_l_[PADL_(int)]; int egid; char egid_r_[PADR_(int)]; }; struct rename_args { - char from_l_[PADL_(char *)]; char * from; char from_r_[PADR_(char *)]; - char to_l_[PADL_(char *)]; char * to; char to_r_[PADR_(char *)]; + char from_l_[PADL_(const char *)]; const char * from; char from_r_[PADR_(const char *)]; + char to_l_[PADL_(const char *)]; const char * to; char to_r_[PADR_(const char *)]; }; struct flock_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char how_l_[PADL_(int)]; int how; char how_r_[PADR_(int)]; }; struct mkfifo_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char mode_l_[PADL_(mode_t)]; mode_t mode; char mode_r_[PADR_(mode_t)]; }; struct sendto_args { @@ -447,14 +447,14 @@ struct socketpair_args { char rsv_l_[PADL_(int *)]; int * rsv; char rsv_r_[PADR_(int *)]; }; struct mkdir_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char mode_l_[PADL_(mode_t)]; mode_t mode; char mode_r_[PADR_(mode_t)]; }; struct rmdir_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; }; struct utimes_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char tptr_l_[PADL_(struct timeval *)]; struct timeval * tptr; char tptr_r_[PADR_(struct timeval *)]; }; struct adjtime_args { @@ -468,7 +468,7 @@ struct setsid_args { register_t dummy; }; struct quotactl_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char cmd_l_[PADL_(int)]; int cmd; char cmd_r_[PADR_(int)]; char uid_l_[PADL_(int)]; int uid; char uid_r_[PADR_(int)]; char arg_l_[PADL_(caddr_t)]; caddr_t arg; char arg_r_[PADR_(caddr_t)]; @@ -487,11 +487,11 @@ struct nfssvc_args { char argp_l_[PADL_(caddr_t)]; caddr_t argp; char argp_r_[PADR_(caddr_t)]; }; struct lgetfh_args { - char fname_l_[PADL_(char *)]; char * fname; char fname_r_[PADR_(char *)]; + char fname_l_[PADL_(const char *)]; const char * fname; char fname_r_[PADR_(const char *)]; char fhp_l_[PADL_(struct fhandle *)]; struct fhandle * fhp; char fhp_r_[PADR_(struct fhandle *)]; }; struct getfh_args { - char fname_l_[PADL_(char *)]; char * fname; char fname_r_[PADR_(char *)]; + char fname_l_[PADL_(const char *)]; const char * fname; char fname_r_[PADR_(const char *)]; char fhp_l_[PADL_(struct fhandle *)]; struct fhandle * fhp; char fhp_r_[PADR_(struct fhandle *)]; }; struct sysarch_args { @@ -540,7 +540,7 @@ struct seteuid_args { char euid_l_[PADL_(uid_t)]; uid_t euid; char euid_r_[PADR_(uid_t)]; }; struct pathconf_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char name_l_[PADL_(int)]; int name; char name_r_[PADR_(int)]; }; struct fpathconf_args { @@ -572,7 +572,7 @@ struct munlock_args { char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; }; struct undelete_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; }; struct futimes_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; @@ -698,7 +698,7 @@ struct issetugid_args { register_t dummy; }; struct lchown_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char uid_l_[PADL_(int)]; int uid; char uid_r_[PADR_(int)]; char gid_l_[PADL_(int)]; int gid; char gid_r_[PADR_(int)]; }; @@ -715,11 +715,11 @@ struct lio_listio_args { char sig_l_[PADL_(struct sigevent *)]; struct sigevent * sig; char sig_r_[PADR_(struct sigevent *)]; }; struct lchmod_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char mode_l_[PADL_(mode_t)]; mode_t mode; char mode_r_[PADR_(mode_t)]; }; struct lutimes_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char tptr_l_[PADL_(struct timeval *)]; struct timeval * tptr; char tptr_r_[PADR_(struct timeval *)]; }; struct preadv_args { @@ -983,7 +983,7 @@ struct __setugid_args { char flag_l_[PADL_(int)]; int flag; char flag_r_[PADR_(int)]; }; struct eaccess_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char amode_l_[PADL_(int)]; int amode; char amode_r_[PADR_(int)]; }; struct afs3_syscall_args { @@ -1115,7 +1115,7 @@ struct extattr_delete_link_args { char attrname_l_[PADL_(const char *)]; const char * attrname; char attrname_r_[PADR_(const char *)]; }; struct __mac_execve_args { - char fname_l_[PADL_(char *)]; char * fname; char fname_r_[PADR_(char *)]; + char fname_l_[PADL_(const char *)]; const char * fname; char fname_r_[PADR_(const char *)]; char argv_l_[PADL_(char **)]; char ** argv; char argv_r_[PADR_(char **)]; char envv_l_[PADL_(char **)]; char ** envv; char envv_r_[PADR_(char **)]; char mac_p_l_[PADL_(struct mac *)]; struct mac * mac_p; char mac_p_r_[PADR_(struct mac *)]; @@ -1244,7 +1244,7 @@ struct setaudit_addr_args { char length_l_[PADL_(u_int)]; u_int length; char length_r_[PADR_(u_int)]; }; struct auditctl_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; }; struct _umtx_op_args { char obj_l_[PADL_(void *)]; void * obj; char obj_r_[PADR_(void *)]; @@ -1369,7 +1369,7 @@ struct lseek_args { char whence_l_[PADL_(int)]; int whence; char whence_r_[PADR_(int)]; }; struct truncate_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char length_l_[PADL_(off_t)]; off_t length; char length_r_[PADR_(off_t)]; }; struct ftruncate_args { @@ -1419,19 +1419,19 @@ struct cpuset_setaffinity_args { }; struct faccessat_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char amode_l_[PADL_(int)]; int amode; char amode_r_[PADR_(int)]; char flag_l_[PADL_(int)]; int flag; char flag_r_[PADR_(int)]; }; struct fchmodat_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char mode_l_[PADL_(mode_t)]; mode_t mode; char mode_r_[PADR_(mode_t)]; char flag_l_[PADL_(int)]; int flag; char flag_r_[PADR_(int)]; }; struct fchownat_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char uid_l_[PADL_(uid_t)]; uid_t uid; char uid_r_[PADR_(uid_t)]; char gid_l_[PADL_(gid_t)]; gid_t gid; char gid_r_[PADR_(gid_t)]; char flag_l_[PADL_(int)]; int flag; char flag_r_[PADR_(int)]; @@ -1443,59 +1443,59 @@ struct fexecve_args { }; struct futimesat_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char times_l_[PADL_(struct timeval *)]; struct timeval * times; char times_r_[PADR_(struct timeval *)]; }; struct linkat_args { char fd1_l_[PADL_(int)]; int fd1; char fd1_r_[PADR_(int)]; - char path1_l_[PADL_(char *)]; char * path1; char path1_r_[PADR_(char *)]; + char path1_l_[PADL_(const char *)]; const char * path1; char path1_r_[PADR_(const char *)]; char fd2_l_[PADL_(int)]; int fd2; char fd2_r_[PADR_(int)]; - char path2_l_[PADL_(char *)]; char * path2; char path2_r_[PADR_(char *)]; + char path2_l_[PADL_(const char *)]; const char * path2; char path2_r_[PADR_(const char *)]; char flag_l_[PADL_(int)]; int flag; char flag_r_[PADR_(int)]; }; struct mkdirat_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char mode_l_[PADL_(mode_t)]; mode_t mode; char mode_r_[PADR_(mode_t)]; }; struct mkfifoat_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char mode_l_[PADL_(mode_t)]; mode_t mode; char mode_r_[PADR_(mode_t)]; }; struct openat_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char flag_l_[PADL_(int)]; int flag; char flag_r_[PADR_(int)]; char mode_l_[PADL_(mode_t)]; mode_t mode; char mode_r_[PADR_(mode_t)]; }; struct readlinkat_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char buf_l_[PADL_(char *)]; char * buf; char buf_r_[PADR_(char *)]; char bufsize_l_[PADL_(size_t)]; size_t bufsize; char bufsize_r_[PADR_(size_t)]; }; struct renameat_args { char oldfd_l_[PADL_(int)]; int oldfd; char oldfd_r_[PADR_(int)]; - char old_l_[PADL_(char *)]; char * old; char old_r_[PADR_(char *)]; + char old_l_[PADL_(const char *)]; const char * old; char old_r_[PADR_(const char *)]; char newfd_l_[PADL_(int)]; int newfd; char newfd_r_[PADR_(int)]; - char new_l_[PADL_(char *)]; char * new; char new_r_[PADR_(char *)]; + char new_l_[PADL_(const char *)]; const char * new; char new_r_[PADR_(const char *)]; }; struct symlinkat_args { - char path1_l_[PADL_(char *)]; char * path1; char path1_r_[PADR_(char *)]; + char path1_l_[PADL_(const char *)]; const char * path1; char path1_r_[PADR_(const char *)]; char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char path2_l_[PADL_(char *)]; char * path2; char path2_r_[PADR_(char *)]; + char path2_l_[PADL_(const char *)]; const char * path2; char path2_r_[PADR_(const char *)]; }; struct unlinkat_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char flag_l_[PADL_(int)]; int flag; char flag_r_[PADR_(int)]; }; struct posix_openpt_args { char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; }; struct gssd_syscall_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; }; struct jail_get_args { char iovp_l_[PADL_(struct iovec *)]; struct iovec * iovp; char iovp_r_[PADR_(struct iovec *)]; @@ -1530,7 +1530,7 @@ struct shmctl_args { char buf_l_[PADL_(struct shmid_ds *)]; struct shmid_ds * buf; char buf_r_[PADR_(struct shmid_ds *)]; }; struct lpathconf_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char name_l_[PADL_(int)]; int name; char name_r_[PADR_(int)]; }; struct __cap_rights_get_args { @@ -1691,7 +1691,7 @@ struct futimens_args { }; struct utimensat_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char times_l_[PADL_(struct timespec *)]; struct timespec * times; char times_r_[PADR_(struct timespec *)]; char flag_l_[PADL_(int)]; int flag; char flag_r_[PADR_(int)]; }; @@ -1704,7 +1704,7 @@ struct fstat_args { }; struct fstatat_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char buf_l_[PADL_(struct stat *)]; struct stat * buf; char buf_r_[PADR_(struct stat *)]; char flag_l_[PADL_(int)]; int flag; char flag_r_[PADR_(int)]; }; @@ -1719,7 +1719,7 @@ struct getdirentries_args { char basep_l_[PADL_(off_t *)]; off_t * basep; char basep_r_[PADR_(off_t *)]; }; struct statfs_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char buf_l_[PADL_(struct statfs *)]; struct statfs * buf; char buf_r_[PADR_(struct statfs *)]; }; struct fstatfs_args { @@ -1737,7 +1737,7 @@ struct fhstatfs_args { }; struct mknodat_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char mode_l_[PADL_(mode_t)]; mode_t mode; char mode_r_[PADR_(mode_t)]; char dev_l_[PADL_(dev_t)]; dev_t dev; char dev_r_[PADR_(dev_t)]; }; @@ -2154,7 +2154,7 @@ int sys_getrandom(struct thread *, struct getrandom_args *); #ifdef COMPAT_43 struct ocreat_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char mode_l_[PADL_(int)]; int mode; char mode_r_[PADR_(int)]; }; struct olseek_args { @@ -2163,11 +2163,11 @@ struct olseek_args { char whence_l_[PADL_(int)]; int whence; char whence_r_[PADR_(int)]; }; struct ostat_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char ub_l_[PADL_(struct ostat *)]; struct ostat * ub; char ub_r_[PADR_(struct ostat *)]; }; struct olstat_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char ub_l_[PADL_(struct ostat *)]; struct ostat * ub; char ub_r_[PADR_(struct ostat *)]; }; struct osigaction_args { @@ -2249,7 +2249,7 @@ struct osendmsg_args { char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; }; struct otruncate_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char length_l_[PADL_(long)]; long length; char length_r_[PADR_(long)]; }; struct oftruncate_args { @@ -2331,7 +2331,7 @@ struct freebsd4_getfsstat_args { char mode_l_[PADL_(int)]; int mode; char mode_r_[PADR_(int)]; }; struct freebsd4_statfs_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char buf_l_[PADL_(struct ostatfs *)]; struct ostatfs * buf; char buf_r_[PADR_(struct ostatfs *)]; }; struct freebsd4_fstatfs_args { @@ -2416,7 +2416,7 @@ struct freebsd6_lseek_args { char whence_l_[PADL_(int)]; int whence; char whence_r_[PADR_(int)]; }; struct freebsd6_truncate_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)]; char length_l_[PADL_(off_t)]; off_t length; char length_r_[PADR_(off_t)]; }; @@ -2485,7 +2485,7 @@ int freebsd10_pipe(struct thread *, struct freebsd10_pipe_args *); #ifdef COMPAT_FREEBSD11 struct freebsd11_mknod_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char mode_l_[PADL_(int)]; int mode; char mode_r_[PADR_(int)]; char dev_l_[PADL_(int)]; int dev; char dev_r_[PADR_(int)]; }; @@ -2493,7 +2493,7 @@ struct freebsd11_vadvise_args { char anom_l_[PADL_(int)]; int anom; char anom_r_[PADR_(int)]; }; struct freebsd11_stat_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char ub_l_[PADL_(struct freebsd11_stat *)]; struct freebsd11_stat * ub; char ub_r_[PADR_(struct freebsd11_stat *)]; }; struct freebsd11_fstat_args { @@ -2501,7 +2501,7 @@ struct freebsd11_fstat_args { char sb_l_[PADL_(struct freebsd11_stat *)]; struct freebsd11_stat * sb; char sb_r_[PADR_(struct freebsd11_stat *)]; }; struct freebsd11_lstat_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char ub_l_[PADL_(struct freebsd11_stat *)]; struct freebsd11_stat * ub; char ub_r_[PADR_(struct freebsd11_stat *)]; }; struct freebsd11_getdirentries_args { @@ -2516,7 +2516,7 @@ struct freebsd11_getdents_args { char count_l_[PADL_(size_t)]; size_t count; char count_r_[PADR_(size_t)]; }; struct freebsd11_nstat_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char ub_l_[PADL_(struct nstat *)]; struct nstat * ub; char ub_r_[PADR_(struct nstat *)]; }; struct freebsd11_nfstat_args { @@ -2524,7 +2524,7 @@ struct freebsd11_nfstat_args { char sb_l_[PADL_(struct nstat *)]; struct nstat * sb; char sb_r_[PADR_(struct nstat *)]; }; struct freebsd11_nlstat_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char ub_l_[PADL_(struct nstat *)]; struct nstat * ub; char ub_r_[PADR_(struct nstat *)]; }; struct freebsd11_fhstat_args { @@ -2545,7 +2545,7 @@ struct freebsd11_getfsstat_args { char mode_l_[PADL_(int)]; int mode; char mode_r_[PADR_(int)]; }; struct freebsd11_statfs_args { - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char buf_l_[PADL_(struct freebsd11_statfs *)]; struct freebsd11_statfs * buf; char buf_r_[PADR_(struct freebsd11_statfs *)]; }; struct freebsd11_fstatfs_args { @@ -2558,13 +2558,13 @@ struct freebsd11_fhstatfs_args { }; struct freebsd11_fstatat_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char buf_l_[PADL_(struct freebsd11_stat *)]; struct freebsd11_stat * buf; char buf_r_[PADR_(struct freebsd11_stat *)]; char flag_l_[PADL_(int)]; int flag; char flag_r_[PADR_(int)]; }; struct freebsd11_mknodat_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char mode_l_[PADL_(mode_t)]; mode_t mode; char mode_r_[PADR_(mode_t)]; char dev_l_[PADL_(uint32_t)]; uint32_t dev; char dev_r_[PADR_(uint32_t)]; }; -- cgit v1.3 From 97a7bf30707a9b0075034d5bae89acc6cfad92a6 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Fri, 2 Nov 2018 21:07:06 +0000 Subject: embed_mfs.sh: replace some compound statements with conventional ifs Use the more readable form - there's no need to try being clever. --- sys/tools/embed_mfs.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'sys') diff --git a/sys/tools/embed_mfs.sh b/sys/tools/embed_mfs.sh index 012466230884..072f7818906e 100644 --- a/sys/tools/embed_mfs.sh +++ b/sys/tools/embed_mfs.sh @@ -45,7 +45,10 @@ fi mfs_size=`stat -f '%z' $2 2> /dev/null` # If we can't determine MFS image size - bail. -[ -z ${mfs_size} ] && echo "Can't determine MFS image size" && exit 1 +if [ -z ${mfs_size} ]; then + echo "Can't determine MFS image size" + exit 1 +fi err_no_mfs="Can't locate mfs section within " @@ -53,7 +56,10 @@ if file -b $1 | grep -q '^ELF ..-bit .SB executable'; then sec_info=`elfdump -c $1 2> /dev/null | grep -A 5 -E "sh_name: oldmfs$"` # If we can't find the mfs section within the given kernel - bail. - [ -z "${sec_info}" ] && echo "${err_no_mfs} $1" && exit 1 + if [ -z "${sec_info}" ]; then + echo "${err_no_mfs} $1" + exit 1 + fi sec_size=`echo "${sec_info}" | awk '/sh_size/ {print $2}' 2>/dev/null` sec_start=`echo "${sec_info}" | \ @@ -78,7 +84,10 @@ else fi # If the mfs section size is smaller than the mfs image - bail. -[ ${sec_size} -lt ${mfs_size} ] && echo "MFS image too large" && exit 1 +if [ ${sec_size} -lt ${mfs_size} ]; then + echo "MFS image too large" + exit 1 +fi # Dump the mfs image into the mfs section dd if=$2 ibs=8192 of=$1 obs=${sec_start} oseek=1 conv=notrunc 2> /dev/null && \ -- cgit v1.3 From 50b53a8dc35f38ab6920dd83409541e875d01551 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Fri, 2 Nov 2018 21:20:46 +0000 Subject: newvers.sh: fix git false positive -dirty tag Assuming that any output from `git diff-index --name-only` implies changes in the working tree results in false positives: files with metadata, but not content, changes are also listed. Check that content differences exist before adding the -dirty tag to the git hash. PR: 229230 Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D15968 --- sys/conf/newvers.sh | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) (limited to 'sys') diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 120b96473166..8c1937fcc166 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -76,6 +76,35 @@ findvcs() return 1 } +git_tree_modified() +{ + # git diff-index lists both files that are known to have changes as + # well as those with metadata that does not match what is recorded in + # git's internal state. The latter case is indicated by an all-zero + # destination file hash. + + local fifo vcstop_abs + + fifo=$(mktemp -u) + mkfifo -m 600 $fifo + vcstop_abs=$(realpath $VCSTOP) + $git_cmd --work-tree=${VCSTOP} diff-index HEAD > $fifo & + while read smode dmode ssha dsha status file; do + if ! expr $dsha : '^00*$' >/dev/null; then + rm $fifo + return 0 + fi + if ! $git_cmd diff --quiet -- "${vcstop_abs}/${file}"; then + rm $fifo + return 0 + fi + done < $fifo + # No files with content differences. + rm $fifo + return 1 +} + + if [ -z "${SYSDIR}" ]; then SYSDIR=$(dirname $0)/.. fi @@ -240,8 +269,7 @@ if [ -n "$git_cmd" ] ; then if [ -n "$git_b" ] ; then git="${git}(${git_b})" fi - if $git_cmd --work-tree=${VCSTOP} diff-index \ - --name-only HEAD | read dummy; then + if git_tree_modified; then git="${git}-dirty" modified=true fi -- cgit v1.3 From 4668666fe45eb16dd8151ac94be6fe4a0426bf9b Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Sat, 3 Nov 2018 00:37:51 +0000 Subject: Implement ability to turn on/off PHYs for AHCI devices. As part of Chuck's work on fixing kernel crashes caused by disk I/O errors, it is useful to be able to trigger various kinds of errors. This patch allows causing an AHCI-attached disk to disappear, by having the driver keep the PHY disabled when the driver would otherwise enable the PHY. It also allows making the disk reappear by having the driver go back to setting the PHY enable/disable state as it normal would and simulating the hardware event that causes a bus rescan. Submitted by: Chuck Silvers Sponsored by: Netflix, Inc Differential Revision: https://reviews.freebsd.org/D16043 --- sys/dev/ahci/ahci.c | 50 +++++++++++++++++++++++++++++++++++++++++++++++--- sys/dev/ahci/ahci.h | 2 ++ 2 files changed, 49 insertions(+), 3 deletions(-) (limited to 'sys') diff --git a/sys/dev/ahci/ahci.c b/sys/dev/ahci/ahci.c index a12d3c1ab392..c6f0293863db 100644 --- a/sys/dev/ahci/ahci.c +++ b/sys/dev/ahci/ahci.c @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -80,6 +81,8 @@ static void ahci_stop(struct ahci_channel *ch); static void ahci_clo(struct ahci_channel *ch); static void ahci_start_fr(struct ahci_channel *ch); static void ahci_stop_fr(struct ahci_channel *ch); +static int ahci_phy_check_events(struct ahci_channel *ch, u_int32_t serr); +static uint32_t ahci_ch_detval(struct ahci_channel *ch, uint32_t val); static int ahci_sata_connect(struct ahci_channel *ch); static int ahci_sata_phy_reset(struct ahci_channel *ch); @@ -100,6 +103,13 @@ static MALLOC_DEFINE(M_AHCI, "AHCI driver", "AHCI driver data buffers"); #define RECOVERY_REQUEST_SENSE 2 #define recovery_slot spriv_field1 +static uint32_t +ahci_ch_detval(struct ahci_channel *ch, uint32_t val) +{ + + return ch->disablephy ? ATA_SC_DET_DISABLE : val; +} + int ahci_ctlr_setup(device_t dev) { @@ -664,12 +674,39 @@ ahci_ch_probe(device_t dev) return (BUS_PROBE_DEFAULT); } +static int +ahci_ch_disablephy_proc(SYSCTL_HANDLER_ARGS) +{ + struct ahci_channel *ch; + int error, value; + + ch = arg1; + value = ch->disablephy; + error = sysctl_handle_int(oidp, &value, 0, req); + if (error != 0 || req->newptr == NULL || (value != 0 && value != 1)) + return (error); + + mtx_lock(&ch->mtx); + ch->disablephy = value; + if (value) { + ahci_ch_deinit(ch->dev); + } else { + ahci_ch_init(ch->dev); + ahci_phy_check_events(ch, ATA_SE_PHY_CHANGED | ATA_SE_EXCHANGED); + } + mtx_unlock(&ch->mtx); + + return (0); +} + static int ahci_ch_attach(device_t dev) { struct ahci_controller *ctlr = device_get_softc(device_get_parent(dev)); struct ahci_channel *ch = device_get_softc(dev); struct cam_devq *devq; + struct sysctl_ctx_list *ctx; + struct sysctl_oid *tree; int rid, error, i, sata_rev = 0; u_int32_t version; @@ -787,6 +824,11 @@ ahci_ch_attach(device_t dev) ahci_ch_pm, ch); } mtx_unlock(&ch->mtx); + ctx = device_get_sysctl_ctx(dev); + tree = device_get_sysctl_tree(dev); + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "disable_phy", + CTLFLAG_RW | CTLTYPE_UINT, ch, 0, ahci_ch_disablephy_proc, "IU", + "Disable PHY"); return (0); err3: @@ -2497,7 +2539,7 @@ static int ahci_sata_phy_reset(struct ahci_channel *ch) { int sata_rev; - uint32_t val; + uint32_t val, detval; if (ch->listening) { val = ATA_INL(ch->r_mem, AHCI_P_CMD); @@ -2514,12 +2556,14 @@ ahci_sata_phy_reset(struct ahci_channel *ch) val = ATA_SC_SPD_SPEED_GEN3; else val = 0; + detval = ahci_ch_detval(ch, ATA_SC_DET_RESET); ATA_OUTL(ch->r_mem, AHCI_P_SCTL, - ATA_SC_DET_RESET | val | + detval | val | ATA_SC_IPM_DIS_PARTIAL | ATA_SC_IPM_DIS_SLUMBER); DELAY(1000); + detval = ahci_ch_detval(ch, ATA_SC_DET_IDLE); ATA_OUTL(ch->r_mem, AHCI_P_SCTL, - ATA_SC_DET_IDLE | val | ((ch->pm_level > 0) ? 0 : + detval | val | ((ch->pm_level > 0) ? 0 : (ATA_SC_IPM_DIS_PARTIAL | ATA_SC_IPM_DIS_SLUMBER))); if (!ahci_sata_connect(ch)) { if (ch->caps & AHCI_CAP_SSS) { diff --git a/sys/dev/ahci/ahci.h b/sys/dev/ahci/ahci.h index 7cd8da838a3f..fc53d346f17f 100644 --- a/sys/dev/ahci/ahci.h +++ b/sys/dev/ahci/ahci.h @@ -461,6 +461,8 @@ struct ahci_channel { struct mtx_padalign mtx; /* state lock */ STAILQ_HEAD(, ccb_hdr) doneq; /* queue of completed CCBs */ int batch; /* doneq is in use */ + + int disablephy; /* keep PHY disabled */ }; struct ahci_enclosure { -- cgit v1.3 From b4d66a17391cbd014151407e59a9058c167268b7 Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Sat, 3 Nov 2018 03:10:06 +0000 Subject: 9952 Block size change during zfs receive drops spill block Replication code in receive_object() falsely assumes that if received object block size is different from local, then it must be a new object and calls dmu_object_reclaim() to wipe it out. In most cases it is not a problem, since all dnode, bonus buffer and data block(s) are immediately rewritten any way, but the problem is that spill block (if used) is not. This means loss of ACLs, extended attributes, etc. This issue can be triggered in very simple way: 1. create 4KB file with 10+ ACL entries; 2. take snapshot and send it to different dataset; 3. append another 4KB to the file; 4. take another snapshot and send incrementally; 5. witness ACL loss on receive side. PR: 198457 Discussed with: mahrens MFC after: 2 weeks Sponsored by: iXsystems, Inc. --- .../opensolaris/uts/common/fs/zfs/dmu_send.c | 36 +++++++++++++++++----- 1 file changed, 29 insertions(+), 7 deletions(-) (limited to 'sys') diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c index 8d78d1d5ec18..9646c396efc0 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c @@ -2143,6 +2143,7 @@ receive_object(struct receive_writer_arg *rwa, struct drr_object *drro, { dmu_object_info_t doi; dmu_tx_t *tx; + dmu_buf_t *db; uint64_t object; int err; @@ -2190,12 +2191,14 @@ receive_object(struct receive_writer_arg *rwa, struct drr_object *drro, tx = dmu_tx_create(rwa->os); dmu_tx_hold_bonus(tx, object); + dmu_tx_hold_write(tx, object, 0, 0); err = dmu_tx_assign(tx, TXG_WAIT); if (err != 0) { dmu_tx_abort(tx); return (err); } + db = NULL; if (object == DMU_NEW_OBJECT) { /* currently free, want to be allocated */ err = dmu_object_claim_dnsize(rwa->os, drro->drr_object, @@ -2203,15 +2206,33 @@ receive_object(struct receive_writer_arg *rwa, struct drr_object *drro, drro->drr_bonustype, drro->drr_bonuslen, drro->drr_dn_slots << DNODE_SHIFT, tx); } else if (drro->drr_type != doi.doi_type || - drro->drr_blksz != doi.doi_data_block_size || - drro->drr_bonustype != doi.doi_bonus_type || - drro->drr_bonuslen != doi.doi_bonus_size) { + (drro->drr_blksz != doi.doi_data_block_size && + doi.doi_max_offset > doi.doi_data_block_size)) { /* currently allocated, but with different properties */ err = dmu_object_reclaim(rwa->os, drro->drr_object, drro->drr_type, drro->drr_blksz, drro->drr_bonustype, drro->drr_bonuslen, tx); + } else { + /* + * Currently allocated, but with slightly different properties, + * that may change live, like block size or bonus buffer. + * Change those specifically to not loose the spill block, etc. + */ + if (drro->drr_bonustype != doi.doi_bonus_type || + drro->drr_bonuslen != doi.doi_bonus_size) + VERIFY0(dmu_bonus_hold(rwa->os, drro->drr_object, FTAG, + &db)); + if (drro->drr_bonustype != doi.doi_bonus_type) + VERIFY0(dmu_set_bonustype(db, drro->drr_bonustype, tx)); + if (drro->drr_bonuslen != doi.doi_bonus_size) + VERIFY0(dmu_set_bonus(db, drro->drr_bonuslen, tx)); + if (drro->drr_blksz != doi.doi_data_block_size) + err = dmu_object_set_blocksize(rwa->os, drro->drr_object, + drro->drr_blksz, 0, tx); } if (err != 0) { + if (db != NULL) + dmu_buf_rele(db, FTAG); dmu_tx_commit(tx); return (SET_ERROR(EINVAL)); } @@ -2222,9 +2243,9 @@ receive_object(struct receive_writer_arg *rwa, struct drr_object *drro, drro->drr_compress, tx); if (data != NULL) { - dmu_buf_t *db; - - VERIFY0(dmu_bonus_hold(rwa->os, drro->drr_object, FTAG, &db)); + if (db == NULL) + VERIFY0(dmu_bonus_hold(rwa->os, drro->drr_object, FTAG, + &db)); dmu_buf_will_dirty(db, tx); ASSERT3U(db->db_size, >=, drro->drr_bonuslen); @@ -2235,8 +2256,9 @@ receive_object(struct receive_writer_arg *rwa, struct drr_object *drro, dmu_ot_byteswap[byteswap].ob_func(db->db_data, drro->drr_bonuslen); } - dmu_buf_rele(db, FTAG); } + if (db != NULL) + dmu_buf_rele(db, FTAG); dmu_tx_commit(tx); return (0); -- cgit v1.3 From 10f42d244b4ae621c786ab5d1da9bbd47bb3ad42 Mon Sep 17 00:00:00 2001 From: Matt Macy Date: Sat, 3 Nov 2018 03:43:32 +0000 Subject: Convert epoch to read / write records per cpu In discussing D17503 "Run epoch calls sooner and more reliably" with sbahra@ we came to the conclusion that epoch is currently misusing the ck_epoch API. It isn't safe to do a "write side" operation (ck_epoch_call or ck_epoch_poll) in the middle of a "read side" section. Since, by definition, it's possible to be preempted during the middle of an EPOCH_PREEMPT epoch the GC task might call ck_epoch_poll or another thread might call ck_epoch_call on the same section. The right solution is ultimately to change the way that ck_epoch works for this use case. However, as a stopgap for 12 we agreed to simply have separate records for each use case. Tested by: pho@ MFC after: 3 days --- sys/kern/subr_epoch.c | 9 +++++---- sys/sys/epoch_private.h | 11 ++++++----- 2 files changed, 11 insertions(+), 9 deletions(-) (limited to 'sys') diff --git a/sys/kern/subr_epoch.c b/sys/kern/subr_epoch.c index 3dcc3c197efc..a63f669fea75 100644 --- a/sys/kern/subr_epoch.c +++ b/sys/kern/subr_epoch.c @@ -150,7 +150,8 @@ epoch_ctor(epoch_t epoch) CPU_FOREACH(cpu) { er = zpcpu_get_cpu(epoch->e_pcpu_record, cpu); bzero(er, sizeof(*er)); - ck_epoch_register(&epoch->e_epoch, &er->er_record, NULL); + ck_epoch_register(&epoch->e_epoch, &er->er_read_record, NULL); + ck_epoch_register(&epoch->e_epoch, &er->er_write_record, NULL); TAILQ_INIT((struct threadlist *)(uintptr_t)&er->er_tdlist); er->er_cpuid = cpu; } @@ -235,7 +236,7 @@ epoch_block_handler_preempt(struct ck_epoch *global __unused, ck_epoch_record_t int spincount, gen; int locksheld __unused; - record = __containerof(cr, struct epoch_record, er_record); + record = __containerof(cr, struct epoch_record, er_read_record); td = curthread; locksheld = td->td_locks; spincount = 0; @@ -461,7 +462,7 @@ epoch_call(epoch_t epoch, epoch_context_t ctx, void (*callback) (epoch_context_t critical_enter(); *DPCPU_PTR(epoch_cb_count) += 1; er = epoch_currecord(epoch); - ck_epoch_call(&er->er_record, cb, (ck_epoch_cb_t *)callback); + ck_epoch_call(&er->er_write_record, cb, (ck_epoch_cb_t *)callback); critical_exit(); return; boottime: @@ -485,7 +486,7 @@ epoch_call_task(void *arg __unused) if (__predict_false((epoch = allepochs[i]) == NULL)) continue; er = epoch_currecord(epoch); - record = &er->er_record; + record = &er->er_write_record; if ((npending = record->n_pending) == 0) continue; ck_epoch_poll_deferred(record, &cb_stack); diff --git a/sys/sys/epoch_private.h b/sys/sys/epoch_private.h index ff16fe7a4983..f475ca3aa200 100644 --- a/sys/sys/epoch_private.h +++ b/sys/sys/epoch_private.h @@ -89,7 +89,8 @@ typedef struct epoch_thread { TAILQ_HEAD (epoch_tdlist, epoch_thread); typedef struct epoch_record { - ck_epoch_record_t er_record; + ck_epoch_record_t er_read_record; + ck_epoch_record_t er_write_record; volatile struct epoch_tdlist er_tdlist; volatile uint32_t er_gen; uint32_t er_cpuid; @@ -138,7 +139,7 @@ epoch_enter_preempt(epoch_t epoch, epoch_tracker_t et) td->td_pre_epoch_prio = td->td_priority; er = epoch_currecord(epoch); TAILQ_INSERT_TAIL(&er->er_tdlist, etd, et_link); - ck_epoch_begin(&er->er_record, (ck_epoch_section_t *)&etd->et_section); + ck_epoch_begin(&er->er_read_record, (ck_epoch_section_t *)&etd->et_section); critical_exit_sa(td); } @@ -155,7 +156,7 @@ epoch_enter(epoch_t epoch) td->td_epochnest++; critical_enter_sa(td); er = epoch_currecord(epoch); - ck_epoch_begin(&er->er_record, NULL); + ck_epoch_begin(&er->er_read_record, NULL); } static __inline void @@ -183,7 +184,7 @@ epoch_exit_preempt(epoch_t epoch, epoch_tracker_t et) etd->et_magic_post = 0; #endif etd->et_td = (void*)0xDEADBEEF; - ck_epoch_end(&er->er_record, + ck_epoch_end(&er->er_read_record, (ck_epoch_section_t *)&etd->et_section); TAILQ_REMOVE(&er->er_tdlist, etd, et_link); er->er_gen++; @@ -203,7 +204,7 @@ epoch_exit(epoch_t epoch) MPASS(td->td_epochnest); td->td_epochnest--; er = epoch_currecord(epoch); - ck_epoch_end(&er->er_record, NULL); + ck_epoch_end(&er->er_read_record, NULL); critical_exit_sa(td); } #endif /* _KERNEL */ -- cgit v1.3 From dacc43df34a7da82747af82be62cb645eb36f6ca Mon Sep 17 00:00:00 2001 From: Matt Macy Date: Sun, 4 Nov 2018 06:24:27 +0000 Subject: Add aditional counter descriptions to AMD 0x17 Submitted by: Somalapuram Amaranath MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D17401 --- lib/libpmc/libpmc_pmu_util.c | 55 +- .../pmu-events/arch/x86/amdfam17h/data-fabric.json | 2668 ++++++++++ .../pmu-events/arch/x86/amdfam17h/l3cache.json | 5411 ++++++++++++++++++++ lib/libpmc/pmu-events/jevents.c | 2 + sys/dev/hwpmc/hwpmc_amd.c | 151 +- sys/dev/hwpmc/hwpmc_amd.h | 50 +- 6 files changed, 8311 insertions(+), 26 deletions(-) create mode 100644 lib/libpmc/pmu-events/arch/x86/amdfam17h/data-fabric.json create mode 100644 lib/libpmc/pmu-events/arch/x86/amdfam17h/l3cache.json (limited to 'sys') diff --git a/lib/libpmc/libpmc_pmu_util.c b/lib/libpmc/libpmc_pmu_util.c index 583a2d36bc74..6921965c85ee 100644 --- a/lib/libpmc/libpmc_pmu_util.c +++ b/lib/libpmc/libpmc_pmu_util.c @@ -146,6 +146,8 @@ pmu_alias_get(const char *name) struct pmu_event_desc { uint64_t ped_period; uint64_t ped_offcore_rsp; + uint64_t ped_l3_thread; + uint64_t ped_l3_slice; uint32_t ped_event; uint32_t ped_frontend; uint32_t ped_ldlat; @@ -270,6 +272,10 @@ pmu_parse_event(struct pmu_event_desc *ped, const char *eventin) ped->ped_ch_mask = strtol(value, NULL, 16); else if (strcmp(key, "config1") == 0) ped->ped_config1 = strtol(value, NULL, 16); + else if (strcmp(key, "l3_thread_mask") == 0) + ped->ped_l3_thread = strtol(value, NULL, 16); + else if (strcmp(key, "l3_slice_mask") == 0) + ped->ped_l3_slice = strtol(value, NULL, 16); else { debug = getenv("PMUDEBUG"); if (debug != NULL && strcmp(debug, "true") == 0 && value != NULL) @@ -407,33 +413,50 @@ pmc_pmu_print_counter_full(const char *ev) } static int -pmc_pmu_amd_pmcallocate(const char *event_name __unused, struct pmc_op_pmcallocate *pm, +pmc_pmu_amd_pmcallocate(const char *event_name, struct pmc_op_pmcallocate *pm, struct pmu_event_desc *ped) { struct pmc_md_amd_op_pmcallocate *amd; + const struct pmu_event *pe; + int idx = -1; amd = &pm->pm_md.pm_amd; - amd->pm_amd_config = AMD_PMC_TO_EVENTMASK(ped->ped_event); if (ped->ped_umask > 0) { pm->pm_caps |= PMC_CAP_QUALIFIER; amd->pm_amd_config |= AMD_PMC_TO_UNITMASK(ped->ped_umask); } pm->pm_class = PMC_CLASS_K8; + pe = pmu_event_get(NULL, event_name, &idx); - if ((pm->pm_caps & (PMC_CAP_USER|PMC_CAP_SYSTEM)) == 0 || - (pm->pm_caps & (PMC_CAP_USER|PMC_CAP_SYSTEM)) == - (PMC_CAP_USER|PMC_CAP_SYSTEM)) - amd->pm_amd_config |= (AMD_PMC_USR | AMD_PMC_OS); - else if (pm->pm_caps & PMC_CAP_USER) - amd->pm_amd_config |= AMD_PMC_USR; - else if (pm->pm_caps & PMC_CAP_SYSTEM) - amd->pm_amd_config |= AMD_PMC_OS; - if (ped->ped_edge) - amd->pm_amd_config |= AMD_PMC_EDGE; - if (ped->ped_inv) - amd->pm_amd_config |= AMD_PMC_EDGE; - if (pm->pm_caps & PMC_CAP_INTERRUPT) - amd->pm_amd_config |= AMD_PMC_INT; + if (strcmp("l3cache", pe->topic) == 0){ + amd->pm_amd_config |= AMD_PMC_TO_EVENTMASK(ped->ped_event); + amd->pm_amd_sub_class = PMC_AMD_SUB_CLASS_L3_CACHE; + amd->pm_amd_config |= AMD_PMC_TO_L3SLICE(ped->ped_l3_slice); + amd->pm_amd_config |= AMD_PMC_TO_L3CORE(ped->ped_l3_thread); + } + else if (strcmp("data fabric", pe->topic) == 0){ + + amd->pm_amd_config |= AMD_PMC_TO_EVENTMASK_DF(ped->ped_event); + amd->pm_amd_sub_class = PMC_AMD_SUB_CLASS_DATA_FABRIC; + } + else{ + amd->pm_amd_config |= AMD_PMC_TO_EVENTMASK(ped->ped_event); + amd->pm_amd_sub_class = PMC_AMD_SUB_CLASS_CORE; + if ((pm->pm_caps & (PMC_CAP_USER|PMC_CAP_SYSTEM)) == 0 || + (pm->pm_caps & (PMC_CAP_USER|PMC_CAP_SYSTEM)) == + (PMC_CAP_USER|PMC_CAP_SYSTEM)) + amd->pm_amd_config |= (AMD_PMC_USR | AMD_PMC_OS); + else if (pm->pm_caps & PMC_CAP_USER) + amd->pm_amd_config |= AMD_PMC_USR; + else if (pm->pm_caps & PMC_CAP_SYSTEM) + amd->pm_amd_config |= AMD_PMC_OS; + if (ped->ped_edge) + amd->pm_amd_config |= AMD_PMC_EDGE; + if (ped->ped_inv) + amd->pm_amd_config |= AMD_PMC_EDGE; + if (pm->pm_caps & PMC_CAP_INTERRUPT) + amd->pm_amd_config |= AMD_PMC_INT; + } return (0); } diff --git a/lib/libpmc/pmu-events/arch/x86/amdfam17h/data-fabric.json b/lib/libpmc/pmu-events/arch/x86/amdfam17h/data-fabric.json new file mode 100644 index 000000000000..6f138730df4f --- /dev/null +++ b/lib/libpmc/pmu-events/arch/x86/amdfam17h/data-fabric.json @@ -0,0 +1,2668 @@ +[ + { + "EventName": "df_ccm_reqa.Node0.anydram", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Any DRAM transaction", + "UMask": "0x0F" + }, + { + "EventName": "df_ccm_reqa.Node1.anydram", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Any DRAM transaction", + "UMask": "0x2F" + }, + { + "EventName": "df_ccm_reqa.Node2.anydram", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Any DRAM transaction", + "UMask": "0x4F" + }, + { + "EventName": "df_ccm_reqa.Node3.anydram", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Any DRAM transaction", + "UMask": "0x6F" + }, + { + "EventName": "df_ccm_reqa.Node4.anydram", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Any DRAM transaction", + "UMask": "0x8F" + }, + { + "EventName": "df_ccm_reqa.Node5.anydram", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Any DRAM transaction", + "UMask": "0xAF" + }, + { + "EventName": "df_ccm_reqa.Node6.anydram", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Any DRAM transaction", + "UMask": "0xCF" + }, + { + "EventName": "df_ccm_reqa.Node7.anydram", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Any DRAM transaction", + "UMask": "0xEF" + }, + { + "EventName": "df_ccm_reqa.Node0.wrsizedfullzero", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered WrSizedFullZero", + "UMask": "0x0E" + }, + { + "EventName": "df_ccm_reqa.Node1.wrsizedfullzero", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered WrSizedFullZero", + "UMask": "0x2E" + }, + { + "EventName": "df_ccm_reqa.Node2.wrsizedfullzero", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered WrSizedFullZero", + "UMask": "0x4E" + }, + { + "EventName": "df_ccm_reqa.Node3.wrsizedfullzero", + "EventCode": "0x8E", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered WrSizedFullZero", + "UMask": "0x6E" + }, + { + "EventName": "df_ccm_reqa.Node4.wrsizedfullzero", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered WrSizedFullZero", + "UMask": "0x8E" + }, + { + "EventName": "df_ccm_reqa.Node5.wrsizedfullzero", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered WrSizedFullZero", + "UMask": "0xAE" + }, + { + "EventName": "df_ccm_reqa.Node6.wrsizedfullzero", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered WrSizedFullZero", + "UMask": "0xCE" + }, + { + "EventName": "df_ccm_reqa.Node7.wrsizedfullzero", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered WrSizedFullZero", + "UMask": "0xEE" + }, + { + "EventName": "df_ccm_reqa.Node0.wrsizedfullnc", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullnc", + "UMask": "0x0D" + }, + { + "EventName": "df_ccm_reqa.Node1.wrsizedfullnc", + "EventCode": "0x8A", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullnc", + "UMask": "0x2D" + }, + { + "EventName": "df_ccm_reqa.Node2.wrsizedfullnc", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullnc", + "UMask": "0x4D" + }, + { + "EventName": "df_ccm_reqa.Node3.wrsizedfullnc", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullnc", + "UMask": "0x6D" + }, + { + "EventName": "df_ccm_reqa.Node4.wrsizedfullnc", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullnc", + "UMask": "0x8D" + }, + { + "EventName": "df_ccm_reqa.Node5.wrsizedfullnc", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullnc", + "UMask": "0xAD" + }, + { + "EventName": "df_ccm_reqa.Node6.wrsizedfullnc", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullnc", + "UMask": "0xCD" + }, + { + "EventName": "df_ccm_reqa.Node7.wrsizedfullnc", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullnc", + "UMask": "0xED" + }, + { + "EventName": "df_ccm_reqa.Node0.wrsized", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsized", + "UMask": "0x0C" + }, + { + "EventName": "df_ccm_reqa.Node1.wrsized", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsized", + "UMask": "0x2C" + }, + { + "EventName": "df_ccm_reqa.Node2.wrsized", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsized", + "UMask": "0x4C" + }, + { + "EventName": "df_ccm_reqa.Node3.wrsized", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsized", + "UMask": "0x6C" + }, + { + "EventName": "df_ccm_reqa.Node4.wrsized", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsized", + "UMask": "0x8C" + }, + { + "EventName": "df_ccm_reqa.Node5.wrsized", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsized", + "UMask": "0xAC" + }, + { + "EventName": "df_ccm_reqa.Node6.wrsized", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsized", + "UMask": "0xCC" + }, + { + "EventName": "df_ccm_reqa.Node7.wrsized", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsized", + "UMask": "0xEC" + }, + { + "EventName": "df_ccm_reqa.Node0.wrsizedfullzero", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullzero", + "UMask": "0x0B" + }, + { + "EventName": "df_ccm_reqa.Node1.wrsizedfullzero", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullzero", + "UMask": "0x2B" + }, + { + "EventName": "df_ccm_reqa.Node2.wrsizedfullzero", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullzero", + "UMask": "0x4B" + }, + { + "EventName": "df_ccm_reqa.Node3.wrsizedfullzero", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullzero", + "UMask": "0x6B" + }, + { + "EventName": "df_ccm_reqa.Node4.wrsizedfullzero", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullzero", + "UMask": "0x8B" + }, + { + "EventName": "df_ccm_reqa.Node5.wrsizedfullzero", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullzero", + "UMask": "0xAB" + }, + { + "EventName": "df_ccm_reqa.Node6.wrsizedfullzero", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullzero", + "UMask": "0xCB" + }, + { + "EventName": "df_ccm_reqa.Node7.wrsizedfullzero", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullzero", + "UMask": "0xEB" + }, + { + "EventName": "df_ccm_reqa.Node0.wrsizedfullnc", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullnc", + "UMask": "0x0A" + }, + { + "EventName": "df_ccm_reqa.Node1.wrsizedfullnc", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullnc", + "UMask": "0x2A" + }, + { + "EventName": "df_ccm_reqa.Node2.wrsizedfullnc", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullnc", + "UMask": "0x4A" + }, + { + "EventName": "df_ccm_reqa.Node3.wrsizedfullnc", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullnc", + "UMask": "0x6A" + }, + { + "EventName": "df_ccm_reqa.Node4.wrsizedfullnc", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullnc", + "UMask": "0x8A" + }, + { + "EventName": "df_ccm_reqa.Node5.wrsizedfullnc", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullnc", + "UMask": "0xAA" + }, + { + "EventName": "df_ccm_reqa.Node6.wrsizedfullnc", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullnc", + "UMask": "0xCA" + }, + { + "EventName": "df_ccm_reqa.Node7.wrsizedfullnc", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullnc", + "UMask": "0xEA" + }, + { + "EventName": "df_ccm_reqa.Node0.wrsized", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsized", + "UMask": "0x09" + }, + { + "EventName": "df_ccm_reqa.Node1.wrsized", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsized", + "UMask": "0x29" + }, + { + "EventName": "df_ccm_reqa.Node2.wrsized", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsized", + "UMask": "0x49" + }, + { + "EventName": "df_ccm_reqa.Node3.wrsized", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsized", + "UMask": "0x69" + }, + { + "EventName": "df_ccm_reqa.Node4.wrsized", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsized", + "UMask": "0x89" + }, + { + "EventName": "df_ccm_reqa.Node5.wrsized", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsized", + "UMask": "0xA9" + }, + { + "EventName": "df_ccm_reqa.Node6.wrsized", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsized", + "UMask": "0xC9" + }, + { + "EventName": "df_ccm_reqa.Node7.wrsized", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsized", + "UMask": "0xE9" + }, + { + "EventName": "df_ccm_reqa.Node0.rdsizednc", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdsizednc", + "UMask": "0x08" + }, + { + "EventName": "df_ccm_reqa.Node1.rdsizednc", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdsizednc", + "UMask": "0x28" + }, + { + "EventName": "df_ccm_reqa.Node2.rdsizednc", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdsizednc", + "UMask": "0x48" + }, + { + "EventName": "df_ccm_reqa.Node3.rdsizednc", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdsizednc", + "UMask": "0x68" + }, + { + "EventName": "df_ccm_reqa.Node4.rdsizednc", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdsizednc", + "UMask": "0x88" + }, + { + "EventName": "df_ccm_reqa.Node5.rdsizednc", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdsizednc", + "UMask": "0xA8" + }, + { + "EventName": "df_ccm_reqa.Node6.rdsizednc", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdsizednc", + "UMask": "0xC8" + }, + { + "EventName": "df_ccm_reqa.Node7.rdsizednc", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdsizednc", + "UMask": "0xE8" + }, + { + "EventName": "df_ccm_reqa.Node0.rdsized", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdsized", + "UMask": "0x07" + }, + { + "EventName": "df_ccm_reqa.Node1.rdsized", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdsized", + "UMask": "0x27" + }, + { + "EventName": "df_ccm_reqa.Node2.rdsized", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdsized", + "UMask": "0x47" + }, + { + "EventName": "df_ccm_reqa.Node3.rdsized", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdsized", + "UMask": "0x67" + }, + { + "EventName": "df_ccm_reqa.Node4.rdsized", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdsized", + "UMask": "0x87" + }, + { + "EventName": "df_ccm_reqa.Node5.rdsized", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdsized", + "UMask": "0xA7" + }, + { + "EventName": "df_ccm_reqa.Node6.rdsized", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdsized", + "UMask": "0xC7" + }, + { + "EventName": "df_ccm_reqa.Node7.rdsized", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdsized", + "UMask": "0xE7" + }, + { + "EventName": "df_ccm_reqa.Node0.specdramrd", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered specdramrd", + "UMask": "0x06" + }, + { + "EventName": "df_ccm_reqa.Node1.specdramrd", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered specdramrd", + "UMask": "0x26" + }, + { + "EventName": "df_ccm_reqa.Node2.specdramrd", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered specdramrd", + "UMask": "0x46" + }, + { + "EventName": "df_ccm_reqa.Node3.specdramrd", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered specdramrd", + "UMask": "0x66" + }, + { + "EventName": "df_ccm_reqa.Node4.specdramrd", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered specdramrd", + "UMask": "0x86" + }, + { + "EventName": "df_ccm_reqa.Node5.specdramrd", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered specdramrd", + "UMask": "0xA6" + }, + { + "EventName": "df_ccm_reqa.Node6.specdramrd", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered specdramrd", + "UMask": "0xC6" + }, + { + "EventName": "df_ccm_reqa.Node7.specdramrd", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered specdramrd", + "UMask": "0xE6" + }, + { + "EventName": "df_ccm_reqa.Node0.anyrdblk", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered anyrdblk", + "UMask": "0x05" + }, + { + "EventName": "df_ccm_reqa.Node1.anyrdblk", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered anyrdblk", + "UMask": "0x25" + }, + { + "EventName": "df_ccm_reqa.Node2.anyrdblk", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered anyrdblk", + "UMask": "0x45" + }, + { + "EventName": "df_ccm_reqa.Node3.anyrdblk", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered anyrdblk", + "UMask": "0x65" + }, + { + "EventName": "df_ccm_reqa.Node4.anyrdblk", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered anyrdblk", + "UMask": "0x85" + }, + { + "EventName": "df_ccm_reqa.Node5.anyrdblk", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered anyrdblk", + "UMask": "0xA5" + }, + { + "EventName": "df_ccm_reqa.Node6.anyrdblk", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered anyrdblk", + "UMask": "0xC5" + }, + { + "EventName": "df_ccm_reqa.Node7.anyrdblk", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered anyrdblk", + "UMask": "0xE5" + }, + { + "EventName": "df_ccm_reqa.Node0.rdvlkc", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdvlkc", + "UMask": "0x04" + }, + { + "EventName": "df_ccm_reqa.Node1.rdvlkc", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdvlkc", + "UMask": "0x24" + }, + { + "EventName": "df_ccm_reqa.Node2.rdvlkc", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdvlkc", + "UMask": "0x44" + }, + { + "EventName": "df_ccm_reqa.Node3.rdvlkc", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdvlkc", + "UMask": "0x64" + }, + { + "EventName": "df_ccm_reqa.Node4.rdvlkc", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdvlkc", + "UMask": "0x84" + }, + { + "EventName": "df_ccm_reqa.Node5.rdvlkc", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdvlkc", + "UMask": "0xA4" + }, + { + "EventName": "df_ccm_reqa.Node6.rdvlkc", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdvlkc", + "UMask": "0xC4" + }, + { + "EventName": "df_ccm_reqa.Node7.rdvlkc", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdvlkc", + "UMask": "0xE4" + }, + { + "EventName": "df_ccm_reqa.Node0.rdvlkx", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdvlkx", + "UMask": "0x03" + }, + { + "EventName": "df_ccm_reqa.Node1.rdvlkx", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdvlkx", + "UMask": "0x23" + }, + { + "EventName": "df_ccm_reqa.Node2.rdvlkx", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdvlkx", + "UMask": "0x43" + }, + { + "EventName": "df_ccm_reqa.Node3.rdvlkx", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdvlkx", + "UMask": "0x63" + }, + { + "EventName": "df_ccm_reqa.Node4.rdvlkx", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdvlkx", + "UMask": "0x83" + }, + { + "EventName": "df_ccm_reqa.Node5.rdvlkx", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdvlkx", + "UMask": "0xA3" + }, + { + "EventName": "df_ccm_reqa.Node6.rdvlkx", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdvlkx", + "UMask": "0xC3" + }, + { + "EventName": "df_ccm_reqa.Node7.rdvlkx", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdvlkx", + "UMask": "0xE3" + }, + { + "EventName": "df_ccm_reqa.Node0.rdvlks", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdvlks", + "UMask": "0x02" + }, + { + "EventName": "df_ccm_reqa.Node1.rdvlks", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdvlks", + "UMask": "0x22" + }, + { + "EventName": "df_ccm_reqa.Node2.rdvlks", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdvlks", + "UMask": "0x42" + }, + { + "EventName": "df_ccm_reqa.Node3.rdvlks", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdvlks", + "UMask": "0x62" + }, + { + "EventName": "df_ccm_reqa.Node4.rdvlks", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdvlks", + "UMask": "0x82" + }, + { + "EventName": "df_ccm_reqa.Node5.rdvlks", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdvlks", + "UMask": "0xA2" + }, + { + "EventName": "df_ccm_reqa.Node6.rdvlks", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdvlks", + "UMask": "0xC2" + }, + { + "EventName": "df_ccm_reqa.Node7.rdvlks", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdvlks", + "UMask": "0xE2" + }, + { + "EventName": "df_ccm_reqa.Node0.rdvlkl", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdvlkl", + "UMask": "0x01" + }, + { + "EventName": "df_ccm_reqa.Node1.rdvlkl", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdvlkl", + "UMask": "0x21" + }, + { + "EventName": "df_ccm_reqa.Node2.rdvlkl", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdvlkl", + "UMask": "0x41" + }, + { + "EventName": "df_ccm_reqa.Node3.rdvlkl", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdvlkl", + "UMask": "0x61" + }, + { + "EventName": "df_ccm_reqa.Node4.rdvlkl", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdvlkl", + "UMask": "0x81" + }, + { + "EventName": "df_ccm_reqa.Node5.rdvlkl", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdvlkl", + "UMask": "0xA1" + }, + { + "EventName": "df_ccm_reqa.Node6.rdvlkl", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdvlkl", + "UMask": "0xC1" + }, + { + "EventName": "df_ccm_reqa.Node7.rdvlkl", + "EventCode": "0x8B", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdvlkl", + "UMask": "0xE1" + }, + { + "EventName": "df_ccm_reqb.Node0.chgtox", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered chgtox", + "UMask": "0x0E" + }, + { + "EventName": "df_ccm_reqb.Node1.chgtox", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered chgtox", + "UMask": "0x2E" + }, + { + "EventName": "df_ccm_reqb.Node2.chgtox", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered chgtox", + "UMask": "0x4E" + }, + { + "EventName": "df_ccm_reqb.Node3.chgtox", + "EventCode": "0x8E", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered chgtox", + "UMask": "0x6E" + }, + { + "EventName": "df_ccm_reqb.Node4.chgtox", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered chgtox", + "UMask": "0x8E" + }, + { + "EventName": "df_ccm_reqb.Node5.chgtox", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered chgtox", + "UMask": "0xAE" + }, + { + "EventName": "df_ccm_reqb.Node6.chgtox", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered chgtox", + "UMask": "0xCE" + }, + { + "EventName": "df_ccm_reqb.Node7.chgtox", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered chgtox", + "UMask": "0xEE" + }, + { + "EventName": "df_ccm_reqb.Node0.vicblkfull.", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered vicblkfull.", + "UMask": "0x0D" + }, + { + "EventName": "df_ccm_reqb.Node1.vicblkfull.", + "EventCode": "0x8A", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered vicblkfull.", + "UMask": "0x2D" + }, + { + "EventName": "df_ccm_reqb.Node2.vicblkfull.", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered vicblkfull.", + "UMask": "0x4D" + }, + { + "EventName": "df_ccm_reqb.Node3.vicblkfull.", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered vicblkfull.", + "UMask": "0x6D" + }, + { + "EventName": "df_ccm_reqb.Node4.vicblkfull.", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered vicblkfull.", + "UMask": "0x8D" + }, + { + "EventName": "df_ccm_reqb.Node5.vicblkfull.", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered vicblkfull.", + "UMask": "0xAD" + }, + { + "EventName": "df_ccm_reqb.Node6.vicblkfull.", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered vicblkfull.", + "UMask": "0xCD" + }, + { + "EventName": "df_ccm_reqb.Node7.vicblkfull.", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered vicblkfull.", + "UMask": "0xED" + }, + { + "EventName": "df_ccm_reqb.Node0.wbinvblkall", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wbinvblkall", + "UMask": "0x0C" + }, + { + "EventName": "df_ccm_reqb.Node1.wbinvblkall", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wbinvblkall", + "UMask": "0x2C" + }, + { + "EventName": "df_ccm_reqb.Node2.wbinvblkall", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wbinvblkall", + "UMask": "0x4C" + }, + { + "EventName": "df_ccm_reqb.Node3.wbinvblkall", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wbinvblkall", + "UMask": "0x6C" + }, + { + "EventName": "df_ccm_reqb.Node4.wbinvblkall", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wbinvblkall", + "UMask": "0x8C" + }, + { + "EventName": "df_ccm_reqb.Node5.wbinvblkall", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wbinvblkall", + "UMask": "0xAC" + }, + { + "EventName": "df_ccm_reqb.Node6.wbinvblkall", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wbinvblkall", + "UMask": "0xCC" + }, + { + "EventName": "df_ccm_reqb.Node7.wbinvblkall", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wbinvblkall", + "UMask": "0xEC" + }, + { + "EventName": "df_ccm_reqb.Node0.vicblkfullzero", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered vicblkfullzero", + "UMask": "0x0B" + }, + { + "EventName": "df_ccm_reqb.Node1.vicblkfullzero", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered vicblkfullzero", + "UMask": "0x2B" + }, + { + "EventName": "df_ccm_reqb.Node2.vicblkfullzero", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered vicblkfullzero", + "UMask": "0x4B" + }, + { + "EventName": "df_ccm_reqb.Node3.vicblkfullzero", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered vicblkfullzero", + "UMask": "0x6B" + }, + { + "EventName": "df_ccm_reqb.Node4.vicblkfullzero", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered vicblkfullzero", + "UMask": "0x8B" + }, + { + "EventName": "df_ccm_reqb.Node5.vicblkfullzero", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered vicblkfullzero", + "UMask": "0xAB" + }, + { + "EventName": "df_ccm_reqb.Node6.vicblkfullzero", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered vicblkfullzero", + "UMask": "0xCB" + }, + { + "EventName": "df_ccm_reqb.Node7.vicblkfullzero", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered vicblkfullzero", + "UMask": "0xEB" + }, + { + "EventName": "df_ccm_reqb.Node0.vicblkfull.", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered vicblkfull.", + "UMask": "0x0A" + }, + { + "EventName": "df_ccm_reqb.Node1.vicblkfull.", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered vicblkfull.", + "UMask": "0x2A" + }, + { + "EventName": "df_ccm_reqb.Node2.vicblkfull.", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered vicblkfull.", + "UMask": "0x4A" + }, + { + "EventName": "df_ccm_reqb.Node3.vicblkfull.", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered vicblkfull.", + "UMask": "0x6A" + }, + { + "EventName": "df_ccm_reqb.Node4.vicblkfull.", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered vicblkfull.", + "UMask": "0x8A" + }, + { + "EventName": "df_ccm_reqb.Node5.vicblkfull.", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered vicblkfull.", + "UMask": "0xAA" + }, + { + "EventName": "df_ccm_reqb.Node6.vicblkfull.", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered vicblkfull.", + "UMask": "0xCA" + }, + { + "EventName": "df_ccm_reqb.Node7.vicblkfull.", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered vicblkfull.", + "UMask": "0xEA" + }, + { + "EventName": "df_ccm_reqb.Node0.vicblkcln", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered vicblkcln", + "UMask": "0x09" + }, + { + "EventName": "df_ccm_reqb.Node1.vicblkcln", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered vicblkcln", + "UMask": "0x29" + }, + { + "EventName": "df_ccm_reqb.Node2.vicblkcln", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered vicblkcln", + "UMask": "0x49" + }, + { + "EventName": "df_ccm_reqb.Node3.vicblkcln", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered vicblkcln", + "UMask": "0x69" + }, + { + "EventName": "df_ccm_reqb.Node4.vicblkcln", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered vicblkcln", + "UMask": "0x89" + }, + { + "EventName": "df_ccm_reqb.Node5.vicblkcln", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered vicblkcln", + "UMask": "0xA9" + }, + { + "EventName": "df_ccm_reqb.Node6.vicblkcln", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered vicblkcln", + "UMask": "0xC9" + }, + { + "EventName": "df_ccm_reqb.Node7.vicblkcln", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered vicblkcln", + "UMask": "0xE9" + }, + { + "EventName": "df_ccm_reqb.Node0.anyiorequest.", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered anyiorequest.", + "UMask": "0x07" + }, + { + "EventName": "df_ccm_reqb.Node1.anyiorequest.", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered anyiorequest.", + "UMask": "0x27" + }, + { + "EventName": "df_ccm_reqb.Node2.anyiorequest.", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered anyiorequest.", + "UMask": "0x47" + }, + { + "EventName": "df_ccm_reqb.Node3.anyiorequest.", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered anyiorequest.", + "UMask": "0x67" + }, + { + "EventName": "df_ccm_reqb.Node4.anyiorequest.", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered anyiorequest.", + "UMask": "0x87" + }, + { + "EventName": "df_ccm_reqb.Node5.anyiorequest.", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered anyiorequest.", + "UMask": "0xA7" + }, + { + "EventName": "df_ccm_reqb.Node6.anyiorequest.", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered anyiorequest.", + "UMask": "0xC7" + }, + { + "EventName": "df_ccm_reqb.Node7.anyiorequest.", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered anyiorequest.", + "UMask": "0xE7" + }, + { + "EventName": "df_ccm_reqb.Node0.anywrsized", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered anywrsized", + "UMask": "0x06" + }, + { + "EventName": "df_ccm_reqb.Node1.anywrsized", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered anywrsized", + "UMask": "0x26" + }, + { + "EventName": "df_ccm_reqb.Node2.anywrsized", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered anywrsized", + "UMask": "0x46" + }, + { + "EventName": "df_ccm_reqb.Node3.anywrsized", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered anywrsized", + "UMask": "0x66" + }, + { + "EventName": "df_ccm_reqb.Node4.anywrsized", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered anywrsized", + "UMask": "0x86" + }, + { + "EventName": "df_ccm_reqb.Node5.anywrsized", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered anywrsized", + "UMask": "0xA6" + }, + { + "EventName": "df_ccm_reqb.Node6.anywrsized", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered anywrsized", + "UMask": "0xC6" + }, + { + "EventName": "df_ccm_reqb.Node7.anywrsized", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered anywrsized", + "UMask": "0xE6" + }, + { + "EventName": "df_ccm_reqb.Node0.wrsizedfullnc", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullnc", + "UMask": "0x05" + }, + { + "EventName": "df_ccm_reqb.Node1.wrsizedfullnc", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullnc", + "UMask": "0x25" + }, + { + "EventName": "df_ccm_reqb.Node2.wrsizedfullnc", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullnc", + "UMask": "0x45" + }, + { + "EventName": "df_ccm_reqb.Node3.wrsizedfullnc", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullnc", + "UMask": "0x65" + }, + { + "EventName": "df_ccm_reqb.Node4.wrsizedfullnc", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullnc", + "UMask": "0x85" + }, + { + "EventName": "df_ccm_reqb.Node5.wrsizedfullnc", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullnc", + "UMask": "0xA5" + }, + { + "EventName": "df_ccm_reqb.Node6.wrsizedfullnc", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullnc", + "UMask": "0xC5" + }, + { + "EventName": "df_ccm_reqb.Node7.wrsizedfullnc", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullnc", + "UMask": "0xE5" + }, + { + "EventName": "df_ccm_reqb.Node0.wrsizednc", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizednc", + "UMask": "0x04" + }, + { + "EventName": "df_ccm_reqb.Node1.wrsizednc", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizednc", + "UMask": "0x24" + }, + { + "EventName": "df_ccm_reqb.Node2.wrsizednc", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizednc", + "UMask": "0x44" + }, + { + "EventName": "df_ccm_reqb.Node3.wrsizednc", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizednc", + "UMask": "0x64" + }, + { + "EventName": "df_ccm_reqb.Node4.wrsizednc", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizednc", + "UMask": "0x84" + }, + { + "EventName": "df_ccm_reqb.Node5.wrsizednc", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizednc", + "UMask": "0xA4" + }, + { + "EventName": "df_ccm_reqb.Node6.wrsizednc", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizednc", + "UMask": "0xC4" + }, + { + "EventName": "df_ccm_reqb.Node7.wrsizednc", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizednc", + "UMask": "0xE4" + }, + { + "EventName": "df_ccm_reqb.Node0.wrsizedfullncposted", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullncposted", + "UMask": "0x03" + }, + { + "EventName": "df_ccm_reqb.Node1.wrsizedfullncposted", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullncposted", + "UMask": "0x23" + }, + { + "EventName": "df_ccm_reqb.Node2.wrsizedfullncposted", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullncposted", + "UMask": "0x43" + }, + { + "EventName": "df_ccm_reqb.Node3.wrsizedfullncposted", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullncposted", + "UMask": "0x63" + }, + { + "EventName": "df_ccm_reqb.Node4.wrsizedfullncposted", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullncposted", + "UMask": "0x83" + }, + { + "EventName": "df_ccm_reqb.Node5.wrsizedfullncposted", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullncposted", + "UMask": "0xA3" + }, + { + "EventName": "df_ccm_reqb.Node6.wrsizedfullncposted", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullncposted", + "UMask": "0xC3" + }, + { + "EventName": "df_ccm_reqb.Node7.wrsizedfullncposted", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedfullncposted", + "UMask": "0xE3" + }, + { + "EventName": "df_ccm_reqb.Node0.wrsizedncposted", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedncposted", + "UMask": "0x02" + }, + { + "EventName": "df_ccm_reqb.Node1.wrsizedncposted", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedncposted", + "UMask": "0x22" + }, + { + "EventName": "df_ccm_reqb.Node2.wrsizedncposted", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedncposted", + "UMask": "0x42" + }, + { + "EventName": "df_ccm_reqb.Node3.wrsizedncposted", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedncposted", + "UMask": "0x62" + }, + { + "EventName": "df_ccm_reqb.Node4.wrsizedncposted", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedncposted", + "UMask": "0x82" + }, + { + "EventName": "df_ccm_reqb.Node5.wrsizedncposted", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedncposted", + "UMask": "0xA2" + }, + { + "EventName": "df_ccm_reqb.Node6.wrsizedncposted", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedncposted", + "UMask": "0xC2" + }, + { + "EventName": "df_ccm_reqb.Node7.wrsizedncposted", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered wrsizedncposted", + "UMask": "0xE2" + }, + { + "EventName": "df_ccm_reqb.Node0.rdsized", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdsized", + "UMask": "0x01" + }, + { + "EventName": "df_ccm_reqb.Node1.rdsized", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdsized", + "UMask": "0x21" + }, + { + "EventName": "df_ccm_reqb.Node2.rdsized", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdsized", + "UMask": "0x41" + }, + { + "EventName": "df_ccm_reqb.Node3.rdsized", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdsized", + "UMask": "0x61" + }, + { + "EventName": "df_ccm_reqb.Node4.rdsized", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdsized", + "UMask": "0x81" + }, + { + "EventName": "df_ccm_reqb.Node5.rdsized", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdsized", + "UMask": "0xA1" + }, + { + "EventName": "df_ccm_reqb.Node6.rdsized", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdsized", + "UMask": "0xC1" + }, + { + "EventName": "df_ccm_reqb.Node7.rdsized", + "EventCode": "0x8c", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Ordered rdsized", + "UMask": "0xE1" + }, + { + "EventName": "df_ccm_reqc.apicaccess", + "EventCode": "0x08D", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Type C (PIE Requests)APIC access", + "UMask": "0x01" + }, + { + "EventName": "df_ccm_reqc.apicucodeaccess", + "EventCode": "0x08D", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Type C (PIE Requests)APIC ucode access", + "UMask": "0x02" + }, + { + "EventName": "df_ccm_reqc.fasttprwrite", + "EventCode": "0x08D", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Type C (PIE Requests)Fast TPR write", + "UMask": "0x03" + }, + { + "EventName": "df_ccm_reqc.anybuslockrequest", + "EventCode": "0x08D", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF CCM Request Type C (PIE Requests)APIC access Any Bus Lock request", + "UMask": "0x04" + }, + { + "EventName": "df_ioms_reqa.Node0.masterabort", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) masterabort", + "UMask": "0x0C" + }, + { + "EventName": "df_ioms_reqa.Node1.masterabort", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) masterabort", + "UMask": "0x2C" + }, + { + "EventName": "df_ioms_reqa.Node2.masterabort", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) masterabort", + "UMask": "0x4C" + }, + { + "EventName": "df_ioms_reqa.Node3.masterabort", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) masterabort", + "UMask": "0x6C" + }, + { + "EventName": "df_ioms_reqa.Node4.masterabort", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) masterabort", + "UMask": "0x8C" + }, + { + "EventName": "df_ioms_reqa.Node5.masterabort", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) masterabort", + "UMask": "0xAC" + }, + { + "EventName": "df_ioms_reqa.Node6.masterabort", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) masterabort", + "UMask": "0xCC" + }, + { + "EventName": "df_ioms_reqa.Node7.masterabort", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) masterabort", + "UMask": "0xEC" + }, + { + "EventName": "df_ioms_reqa.Node0.ios_resp", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) ios_resp", + "UMask": "0x0B" + }, + { + "EventName": "df_ioms_reqa.Node1.ios_resp", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) ios_resp", + "UMask": "0x2B" + }, + { + "EventName": "df_ioms_reqa.Node2.ios_resp", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) ios_resp", + "UMask": "0x4B" + }, + { + "EventName": "df_ioms_reqa.Node3.ios_resp", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) ios_resp", + "UMask": "0x6B" + }, + { + "EventName": "df_ioms_reqa.Node4.ios_resp", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) ios_resp", + "UMask": "0x8B" + }, + { + "EventName": "df_ioms_reqa.Node5.ios_resp", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) ios_resp", + "UMask": "0xAB" + }, + { + "EventName": "df_ioms_reqa.Node6.ios_resp", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) ios_resp", + "UMask": "0xCB" + }, + { + "EventName": "df_ioms_reqa.Node7.ios_resp", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) ios_resp", + "UMask": "0xEB" + }, + { + "EventName": "df_ioms_reqa.Node0.flush", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) flush", + "UMask": "0x0A" + }, + { + "EventName": "df_ioms_reqa.Node1.flush", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) flush", + "UMask": "0x2A" + }, + { + "EventName": "df_ioms_reqa.Node2.flush", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) flush", + "UMask": "0x4A" + }, + { + "EventName": "df_ioms_reqa.Node3.flush", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) flush", + "UMask": "0x6A" + }, + { + "EventName": "df_ioms_reqa.Node4.flush", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) flush", + "UMask": "0x8A" + }, + { + "EventName": "df_ioms_reqa.Node5.flush", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) flush", + "UMask": "0xAA" + }, + { + "EventName": "df_ioms_reqa.Node6.flush", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) flush", + "UMask": "0xCA" + }, + { + "EventName": "df_ioms_reqa.Node7.flush", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) flush", + "UMask": "0xEA" + }, + { + "EventName": "df_ioms_reqa.Node0.fence", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) fence", + "UMask": "0x09" + }, + { + "EventName": "df_ioms_reqa.Node1.fence", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) fence", + "UMask": "0x29" + }, + { + "EventName": "df_ioms_reqa.Node2.fence", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) fence", + "UMask": "0x49" + }, + { + "EventName": "df_ioms_reqa.Node3.fence", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) fence", + "UMask": "0x69" + }, + { + "EventName": "df_ioms_reqa.Node4.fence", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) fence", + "UMask": "0x89" + }, + { + "EventName": "df_ioms_reqa.Node5.fence", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) fence", + "UMask": "0xA9" + }, + { + "EventName": "df_ioms_reqa.Node6.fence", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) fence", + "UMask": "0xC9" + }, + { + "EventName": "df_ioms_reqa.Node7.fence", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) fence", + "UMask": "0xE9" + }, + { + "EventName": "df_ioms_reqa.Node0.anydramtransaction", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anydramtransaction", + "UMask": "0x08" + }, + { + "EventName": "df_ioms_reqa.Node1.anydramtransaction", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anydramtransaction", + "UMask": "0x28" + }, + { + "EventName": "df_ioms_reqa.Node2.anydramtransaction", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anydramtransaction", + "UMask": "0x48" + }, + { + "EventName": "df_ioms_reqa.Node3.anydramtransaction", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anydramtransaction", + "UMask": "0x68" + }, + { + "EventName": "df_ioms_reqa.Node4.anydramtransaction", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anydramtransaction", + "UMask": "0x88" + }, + { + "EventName": "df_ioms_reqa.Node5.anydramtransaction", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anydramtransaction", + "UMask": "0xA8" + }, + { + "EventName": "df_ioms_reqa.Node6.anydramtransaction", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anydramtransaction", + "UMask": "0xC8" + }, + { + "EventName": "df_ioms_reqa.Node7.anydramtransaction", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anydramtransaction", + "UMask": "0xE8" + }, + { + "EventName": "df_ioms_reqa.Node0.anyatomic", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anyatomic", + "UMask": "0x07" + }, + { + "EventName": "df_ioms_reqa.Node1.anyatomic", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anyatomic", + "UMask": "0x27" + }, + { + "EventName": "df_ioms_reqa.Node2.anyatomic", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anyatomic", + "UMask": "0x47" + }, + { + "EventName": "df_ioms_reqa.Node3.anyatomic", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anyatomic", + "UMask": "0x67" + }, + { + "EventName": "df_ioms_reqa.Node4.anyatomic", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anyatomic", + "UMask": "0x87" + }, + { + "EventName": "df_ioms_reqa.Node5.anyatomic", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anyatomic", + "UMask": "0xA7" + }, + { + "EventName": "df_ioms_reqa.Node6.anyatomic", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anyatomic", + "UMask": "0xC7" + }, + { + "EventName": "df_ioms_reqa.Node7.anyatomic", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anyatomic", + "UMask": "0xE7" + }, + { + "EventName": "df_ioms_reqa.Node0.anywrsized=64b", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anywrsized=64b", + "UMask": "0x06" + }, + { + "EventName": "df_ioms_reqa.Node1.anywrsized=64b", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anywrsized=64b", + "UMask": "0x26" + }, + { + "EventName": "df_ioms_reqa.Node2.anywrsized=64b", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anywrsized=64b", + "UMask": "0x46" + }, + { + "EventName": "df_ioms_reqa.Node3.anywrsized=64b", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anywrsized=64b", + "UMask": "0x66" + }, + { + "EventName": "df_ioms_reqa.Node4.anywrsized=64b", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anywrsized=64b", + "UMask": "0x86" + }, + { + "EventName": "df_ioms_reqa.Node5.anywrsized=64b", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anywrsized=64b", + "UMask": "0xA6" + }, + { + "EventName": "df_ioms_reqa.Node6.anywrsized=64b", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anywrsized=64b", + "UMask": "0xC6" + }, + { + "EventName": "df_ioms_reqa.Node7.anywrsized=64b", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anywrsized=64b", + "UMask": "0xE6" + }, + { + "EventName": "df_ioms_reqa.Node0.anywrsized>32band<64b", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anywrsized>32band<64b", + "UMask": "0x05" + }, + { + "EventName": "df_ioms_reqa.Node1.anywrsized>32band<64b", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anywrsized>32band<64b", + "UMask": "0x25" + }, + { + "EventName": "df_ioms_reqa.Node2.anywrsized>32band<64b", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anywrsized>32band<64b", + "UMask": "0x45" + }, + { + "EventName": "df_ioms_reqa.Node3.anywrsized>32band<64b", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anywrsized>32band<64b", + "UMask": "0x65" + }, + { + "EventName": "df_ioms_reqa.Node4.anywrsized>32band<64b", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anywrsized>32band<64b", + "UMask": "0x85" + }, + { + "EventName": "df_ioms_reqa.Node5.anywrsized>32band<64b", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anywrsized>32band<64b", + "UMask": "0xA5" + }, + { + "EventName": "df_ioms_reqa.Node6.anywrsized>32band<64b", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anywrsized>32band<64b", + "UMask": "0xC5" + }, + { + "EventName": "df_ioms_reqa.Node7.anywrsized>32band<64b", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anywrsized>32band<64b", + "UMask": "0xE5" + }, + { + "EventName": "df_ioms_reqa.Node0.anywrsized=32b", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anywrsized=32b", + "UMask": "0x04" + }, + { + "EventName": "df_ioms_reqa.Node1.anywrsized=32b", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anywrsized=32b", + "UMask": "0x24" + }, + { + "EventName": "df_ioms_reqa.Node2.anywrsized=32b", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anywrsized=32b", + "UMask": "0x44" + }, + { + "EventName": "df_ioms_reqa.Node3.anywrsized=32b", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anywrsized=32b", + "UMask": "0x64" + }, + { + "EventName": "df_ioms_reqa.Node4.anywrsized=32b", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anywrsized=32b", + "UMask": "0x84" + }, + { + "EventName": "df_ioms_reqa.Node5.anywrsized=32b", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anywrsized=32b", + "UMask": "0xA4" + }, + { + "EventName": "df_ioms_reqa.Node6.anywrsized=32b", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anywrsized=32b", + "UMask": "0xC4" + }, + { + "EventName": "df_ioms_reqa.Node7.anywrsized=32b", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anywrsized=32b", + "UMask": "0xE4" + }, + { + "EventName": "df_ioms_reqa.Node0.anywrsized<32b", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anywrsized<32b", + "UMask": "0x03" + }, + { + "EventName": "df_ioms_reqa.Node1.anywrsized<32b", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anywrsized<32b", + "UMask": "0x23" + }, + { + "EventName": "df_ioms_reqa.Node2.anywrsized<32b", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anywrsized<32b", + "UMask": "0x43" + }, + { + "EventName": "df_ioms_reqa.Node3.anywrsized<32b", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anywrsized<32b", + "UMask": "0x63" + }, + { + "EventName": "df_ioms_reqa.Node4.anywrsized<32b", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anywrsized<32b", + "UMask": "0x83" + }, + { + "EventName": "df_ioms_reqa.Node5.anywrsized<32b", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anywrsized<32b", + "UMask": "0xA3" + }, + { + "EventName": "df_ioms_reqa.Node6.anywrsized<32b", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anywrsized<32b", + "UMask": "0xC3" + }, + { + "EventName": "df_ioms_reqa.Node7.anywrsized<32b", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anywrsized<32b", + "UMask": "0xE3" + }, + { + "EventName": "df_ioms_reqa.Node0.anyrdsized", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anyrdsized", + "UMask": "0x02" + }, + { + "EventName": "df_ioms_reqa.Node1.anyrdsized", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anyrdsized", + "UMask": "0x22" + }, + { + "EventName": "df_ioms_reqa.Node2.anyrdsized", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anyrdsized", + "UMask": "0x42" + }, + { + "EventName": "df_ioms_reqa.Node3.anyrdsized", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anyrdsized", + "UMask": "0x62" + }, + { + "EventName": "df_ioms_reqa.Node4.anyrdsized", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anyrdsized", + "UMask": "0x82" + }, + { + "EventName": "df_ioms_reqa.Node5.anyrdsized", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anyrdsized", + "UMask": "0xA2" + }, + { + "EventName": "df_ioms_reqa.Node6.anyrdsized", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anyrdsized", + "UMask": "0xC2" + }, + { + "EventName": "df_ioms_reqa.Node7.anyrdsized", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) anyrdsized", + "UMask": "0xE2" + }, + { + "EventName": "df_ioms_reqa.Node0.largeread", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) largeread", + "UMask": "0x01" + }, + { + "EventName": "df_ioms_reqa.Node1.largeread", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) largeread", + "UMask": "0x21" + }, + { + "EventName": "df_ioms_reqa.Node2.largeread", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) largeread", + "UMask": "0x41" + }, + { + "EventName": "df_ioms_reqa.Node3.largeread", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) largeread", + "UMask": "0x61" + }, + { + "EventName": "df_ioms_reqa.Node4.largeread", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) largeread", + "UMask": "0x81" + }, + { + "EventName": "df_ioms_reqa.Node5.largeread", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) largeread", + "UMask": "0xA1" + }, + { + "EventName": "df_ioms_reqa.Node6.largeread", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) largeread", + "UMask": "0xC1" + }, + { + "EventName": "df_ioms_reqa.Node7.largeread", + "EventCode": "0x108", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type A (DRAM) largeread", + "UMask": "0xE1" + }, + { + "EventName": "df_ioms_reqb.Node0.pieiorequest", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Any DRAM transaction", + "UMask": "0x0F" + }, + { + "EventName": "df_ioms_reqb.Node1.pieiorequest", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Any DRAM transaction", + "UMask": "0x2F" + }, + { + "EventName": "df_ioms_reqb.Node2.pieiorequest", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Any DRAM transaction", + "UMask": "0x4F" + }, + { + "EventName": "df_ioms_reqb.Node3.pieiorequest", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Any DRAM transaction", + "UMask": "0x6F" + }, + { + "EventName": "df_ioms_reqb.Node4.pieiorequest", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Any DRAM transaction", + "UMask": "0x8F" + }, + { + "EventName": "df_ioms_reqb.Node5.pieiorequest", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Any DRAM transaction", + "UMask": "0xAF" + }, + { + "EventName": "df_ioms_reqb.Node6.pieiorequest", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Any DRAM transaction", + "UMask": "0xCF" + }, + { + "EventName": "df_ioms_reqb.Node7.pieiorequest", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Any DRAM transaction", + "UMask": "0xEF" + }, + { + "EventName": "df_ioms_reqb.Node0.piesystemmanagement", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered piesystemmanagement", + "UMask": "0x0E" + }, + { + "EventName": "df_ioms_reqb.Node1.piesystemmanagement", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered piesystemmanagement", + "UMask": "0x2E" + }, + { + "EventName": "df_ioms_reqb.Node2.piesystemmanagement", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered piesystemmanagement", + "UMask": "0x4E" + }, + { + "EventName": "df_ioms_reqb.Node3.piesystemmanagement", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered piesystemmanagement", + "UMask": "0x6E" + }, + { + "EventName": "df_ioms_reqb.Node4.piesystemmanagement", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered piesystemmanagement", + "UMask": "0x8E" + }, + { + "EventName": "df_ioms_reqb.Node5.piesystemmanagement", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered piesystemmanagement", + "UMask": "0xAE" + }, + { + "EventName": "df_ioms_reqb.Node6.piesystemmanagement", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered piesystemmanagement", + "UMask": "0xCE" + }, + { + "EventName": "df_ioms_reqb.Node7.piesystemmanagement", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered piesystemmanagement", + "UMask": "0xEE" + }, + { + "EventName": "df_ioms_reqb.Node0.pieinterrupt", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered pieinterrupt", + "UMask": "0x0D" + }, + { + "EventName": "df_ioms_reqb.Node1.pieinterrupt", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered pieinterrupt", + "UMask": "0x2D" + }, + { + "EventName": "df_ioms_reqb.Node2.pieinterrupt", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered pieinterrupt", + "UMask": "0x4D" + }, + { + "EventName": "df_ioms_reqb.Node3.pieinterrupt", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered pieinterrupt", + "UMask": "0x6D" + }, + { + "EventName": "df_ioms_reqb.Node4.pieinterrupt", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered pieinterrupt", + "UMask": "0x8D" + }, + { + "EventName": "df_ioms_reqb.Node5.pieinterrupt", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered pieinterrupt", + "UMask": "0xAD" + }, + { + "EventName": "df_ioms_reqb.Node6.pieinterrupt", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered pieinterrupt", + "UMask": "0xCD" + }, + { + "EventName": "df_ioms_reqb.Node7.pieinterrupt", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered pieinterrupt", + "UMask": "0xED" + }, + { + "EventName": "df_ioms_reqb.Node0.anyiotransaction", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered anyiotransaction", + "UMask": "0x0C" + }, + { + "EventName": "df_ioms_reqb.Node1.anyiotransaction", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered anyiotransaction", + "UMask": "0x2C" + }, + { + "EventName": "df_ioms_reqb.Node2.anyiotransaction", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered anyiotransaction", + "UMask": "0x4C" + }, + { + "EventName": "df_ioms_reqb.Node3.anyiotransaction", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered anyiotransaction", + "UMask": "0x6C" + }, + { + "EventName": "df_ioms_reqb.Node4.anyiotransaction", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered anyiotransaction", + "UMask": "0x8C" + }, + { + "EventName": "df_ioms_reqb.Node5.anyiotransaction", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered anyiotransaction", + "UMask": "0xAC" + }, + { + "EventName": "df_ioms_reqb.Node6.anyiotransaction", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered anyiotransaction", + "UMask": "0xCC" + }, + { + "EventName": "df_ioms_reqb.Node7.anyiotransaction", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered anyiotransaction", + "UMask": "0xEC" + }, + { + "EventName": "df_ioms_reqb.Node0.ioanyatomic", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanyatomic", + "UMask": "0x0B" + }, + { + "EventName": "df_ioms_reqb.Node1.ioanyatomic", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanyatomic", + "UMask": "0x2B" + }, + { + "EventName": "df_ioms_reqb.Node2.ioanyatomic", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanyatomic", + "UMask": "0x4B" + }, + { + "EventName": "df_ioms_reqb.Node3.ioanyatomic", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanyatomic", + "UMask": "0x6B" + }, + { + "EventName": "df_ioms_reqb.Node4.ioanyatomic", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanyatomic", + "UMask": "0x8B" + }, + { + "EventName": "df_ioms_reqb.Node5.ioanyatomic", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanyatomic", + "UMask": "0xAB" + }, + { + "EventName": "df_ioms_reqb.Node6.ioanyatomic", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanyatomic", + "UMask": "0xCB" + }, + { + "EventName": "df_ioms_reqb.Node7.ioanyatomic", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanyatomic", + "UMask": "0xEB" + }, + { + "EventName": "df_ioms_reqb.Node0.ioanynon-postedwrsized=64b", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanynon-postedwrsized=64b", + "UMask": "0x0A" + }, + { + "EventName": "df_ioms_reqb.Node1.ioanynon-postedwrsized=64b", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanynon-postedwrsized=64b", + "UMask": "0x2A" + }, + { + "EventName": "df_ioms_reqb.Node2.ioanynon-postedwrsized=64b", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanynon-postedwrsized=64b", + "UMask": "0x4A" + }, + { + "EventName": "df_ioms_reqb.Node3.ioanynon-postedwrsized=64b", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanynon-postedwrsized=64b", + "UMask": "0x6A" + }, + { + "EventName": "df_ioms_reqb.Node4.ioanynon-postedwrsized=64b", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanynon-postedwrsized=64b", + "UMask": "0x8A" + }, + { + "EventName": "df_ioms_reqb.Node5.ioanynon-postedwrsized=64b", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanynon-postedwrsized=64b", + "UMask": "0xAA" + }, + { + "EventName": "df_ioms_reqb.Node6.ioanynon-postedwrsized=64b", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanynon-postedwrsized=64b", + "UMask": "0xCA" + }, + { + "EventName": "df_ioms_reqb.Node7.ioanynon-postedwrsized=64b", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanynon-postedwrsized=64b", + "UMask": "0xEA" + }, + { + "EventName": "df_ioms_reqb.Node0.ioanynon-postedwrsized>32band<64b", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanynon-postedwrsized>32band<64b", + "UMask": "0x09" + }, + { + "EventName": "df_ioms_reqb.Node1.ioanynon-postedwrsized>32band<64b", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanynon-postedwrsized>32band<64b", + "UMask": "0x29" + }, + { + "EventName": "df_ioms_reqb.Node2.ioanynon-postedwrsized>32band<64b", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanynon-postedwrsized>32band<64b", + "UMask": "0x49" + }, + { + "EventName": "df_ioms_reqb.Node3.ioanynon-postedwrsized>32band<64b", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanynon-postedwrsized>32band<64b", + "UMask": "0x69" + }, + { + "EventName": "df_ioms_reqb.Node4.ioanynon-postedwrsized>32band<64b", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanynon-postedwrsized>32band<64b", + "UMask": "0x89" + }, + { + "EventName": "df_ioms_reqb.Node5.ioanynon-postedwrsized>32band<64b", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanynon-postedwrsized>32band<64b", + "UMask": "0xA9" + }, + { + "EventName": "df_ioms_reqb.Node6.ioanynon-postedwrsized>32band<64b", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanynon-postedwrsized>32band<64b", + "UMask": "0xC9" + }, + { + "EventName": "df_ioms_reqb.Node7.ioanynon-postedwrsized>32band<64b", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanynon-postedwrsized>32band<64b", + "UMask": "0xE9" + }, + { + "EventName": "df_ioms_reqb.Node0.ioanynon-postedwrsized=32b", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanynon-postedwrsized=32b", + "UMask": "0x08" + }, + { + "EventName": "df_ioms_reqb.Node1.ioanynon-postedwrsized=32b", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanynon-postedwrsized=32b", + "UMask": "0x28" + }, + { + "EventName": "df_ioms_reqb.Node2.ioanynon-postedwrsized=32b", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanynon-postedwrsized=32b", + "UMask": "0x48" + }, + { + "EventName": "df_ioms_reqb.Node3.ioanynon-postedwrsized=32b", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanynon-postedwrsized=32b", + "UMask": "0x68" + }, + { + "EventName": "df_ioms_reqb.Node4.ioanynon-postedwrsized=32b", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanynon-postedwrsized=32b", + "UMask": "0x88" + }, + { + "EventName": "df_ioms_reqb.Node5.ioanynon-postedwrsized=32b", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanynon-postedwrsized=32b", + "UMask": "0xA8" + }, + { + "EventName": "df_ioms_reqb.Node6.ioanynon-postedwrsized=32b", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanynon-postedwrsized=32b", + "UMask": "0xC8" + }, + { + "EventName": "df_ioms_reqb.Node7.ioanynon-postedwrsized=32b", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanynon-postedwrsized=32b", + "UMask": "0xE8" + }, + { + "EventName": "df_ioms_reqb.Node0.ioanynon-postedwrsized<32b", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanynon-postedwrsized<32b", + "UMask": "0x07" + }, + { + "EventName": "df_ioms_reqb.Node1.ioanynon-postedwrsized<32b", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanynon-postedwrsized<32b", + "UMask": "0x27" + }, + { + "EventName": "df_ioms_reqb.Node2.ioanynon-postedwrsized<32b", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanynon-postedwrsized<32b", + "UMask": "0x47" + }, + { + "EventName": "df_ioms_reqb.Node3.ioanynon-postedwrsized<32b", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanynon-postedwrsized<32b", + "UMask": "0x67" + }, + { + "EventName": "df_ioms_reqb.Node4.ioanynon-postedwrsized<32b", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanynon-postedwrsized<32b", + "UMask": "0x87" + }, + { + "EventName": "df_ioms_reqb.Node5.ioanynon-postedwrsized<32b", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanynon-postedwrsized<32b", + "UMask": "0xA7" + }, + { + "EventName": "df_ioms_reqb.Node6.ioanynon-postedwrsized<32b", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanynon-postedwrsized<32b", + "UMask": "0xC7" + }, + { + "EventName": "df_ioms_reqb.Node7.ioanynon-postedwrsized<32b", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanynon-postedwrsized<32b", + "UMask": "0xE7" + }, + { + "EventName": "df_ioms_reqb.Node0.ioanypostedwrsized=64b", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanypostedwrsized=64b", + "UMask": "0x06" + }, + { + "EventName": "df_ioms_reqb.Node1.ioanypostedwrsized=64b", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanypostedwrsized=64b", + "UMask": "0x26" + }, + { + "EventName": "df_ioms_reqb.Node2.ioanypostedwrsized=64b", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanypostedwrsized=64b", + "UMask": "0x46" + }, + { + "EventName": "df_ioms_reqb.Node3.ioanypostedwrsized=64b", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanypostedwrsized=64b", + "UMask": "0x66" + }, + { + "EventName": "df_ioms_reqb.Node4.ioanypostedwrsized=64b", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanypostedwrsized=64b", + "UMask": "0x86" + }, + { + "EventName": "df_ioms_reqb.Node5.ioanypostedwrsized=64b", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanypostedwrsized=64b", + "UMask": "0xA6" + }, + { + "EventName": "df_ioms_reqb.Node6.ioanypostedwrsized=64b", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanypostedwrsized=64b", + "UMask": "0xC6" + }, + { + "EventName": "df_ioms_reqb.Node7.ioanypostedwrsized=64b", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanypostedwrsized=64b", + "UMask": "0xE6" + }, + { + "EventName": "df_ioms_reqb.Node0.ioanypostedwrsized>32band<64b", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanypostedwrsized>32band<64b", + "UMask": "0x05" + }, + { + "EventName": "df_ioms_reqb.Node1.ioanypostedwrsized>32band<64b", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanypostedwrsized>32band<64b", + "UMask": "0x25" + }, + { + "EventName": "df_ioms_reqb.Node2.ioanypostedwrsized>32band<64b", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanypostedwrsized>32band<64b", + "UMask": "0x45" + }, + { + "EventName": "df_ioms_reqb.Node3.ioanypostedwrsized>32band<64b", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanypostedwrsized>32band<64b", + "UMask": "0x65" + }, + { + "EventName": "df_ioms_reqb.Node4.ioanypostedwrsized>32band<64b", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanypostedwrsized>32band<64b", + "UMask": "0x85" + }, + { + "EventName": "df_ioms_reqb.Node5.ioanypostedwrsized>32band<64b", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanypostedwrsized>32band<64b", + "UMask": "0xA5" + }, + { + "EventName": "df_ioms_reqb.Node6.ioanypostedwrsized>32band<64b", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanypostedwrsized>32band<64b", + "UMask": "0xC5" + }, + { + "EventName": "df_ioms_reqb.Node7.ioanypostedwrsized>32band<64b", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanypostedwrsized>32band<64b", + "UMask": "0xE5" + }, + { + "EventName": "df_ioms_reqb.Node0.ioanypostedwrsized=32", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanypostedwrsized=32", + "UMask": "0x04" + }, + { + "EventName": "df_ioms_reqb.Node1.ioanypostedwrsized=32", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanypostedwrsized=32", + "UMask": "0x24" + }, + { + "EventName": "df_ioms_reqb.Node2.ioanypostedwrsized=32", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanypostedwrsized=32", + "UMask": "0x44" + }, + { + "EventName": "df_ioms_reqb.Node3.ioanypostedwrsized=32", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanypostedwrsized=32", + "UMask": "0x64" + }, + { + "EventName": "df_ioms_reqb.Node4.ioanypostedwrsized=32", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanypostedwrsized=32", + "UMask": "0x84" + }, + { + "EventName": "df_ioms_reqb.Node5.ioanypostedwrsized=32", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanypostedwrsized=32", + "UMask": "0xA4" + }, + { + "EventName": "df_ioms_reqb.Node6.ioanypostedwrsized=32", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanypostedwrsized=32", + "UMask": "0xC4" + }, + { + "EventName": "df_ioms_reqb.Node7.ioanypostedwrsized=32", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanypostedwrsized=32", + "UMask": "0xE4" + }, + { + "EventName": "df_ioms_reqb.Node0.ioanypostedwrsized<32", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanypostedwrsized<32", + "UMask": "0x03" + }, + { + "EventName": "df_ioms_reqb.Node1.ioanypostedwrsized<32", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanypostedwrsized<32", + "UMask": "0x23" + }, + { + "EventName": "df_ioms_reqb.Node2.ioanypostedwrsized<32", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanypostedwrsized<32", + "UMask": "0x43" + }, + { + "EventName": "df_ioms_reqb.Node3.ioanypostedwrsized<32", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanypostedwrsized<32", + "UMask": "0x63" + }, + { + "EventName": "df_ioms_reqb.Node4.ioanypostedwrsized<32", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanypostedwrsized<32", + "UMask": "0x83" + }, + { + "EventName": "df_ioms_reqb.Node5.ioanypostedwrsized<32", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanypostedwrsized<32", + "UMask": "0xA3" + }, + { + "EventName": "df_ioms_reqb.Node6.ioanypostedwrsized<32", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanypostedwrsized<32", + "UMask": "0xC3" + }, + { + "EventName": "df_ioms_reqb.Node7.ioanypostedwrsized<32", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanypostedwrsized<32", + "UMask": "0xE3" + }, + { + "EventName": "df_ioms_reqb.Node0.ioanyrdsized", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanyrdsized", + "UMask": "0x02" + }, + { + "EventName": "df_ioms_reqb.Node1.ioanyrdsized", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanyrdsized", + "UMask": "0x22" + }, + { + "EventName": "df_ioms_reqb.Node2.ioanyrdsized", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanyrdsized", + "UMask": "0x42" + }, + { + "EventName": "df_ioms_reqb.Node3.ioanyrdsized", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanyrdsized", + "UMask": "0x62" + }, + { + "EventName": "df_ioms_reqb.Node4.ioanyrdsized", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanyrdsized", + "UMask": "0x82" + }, + { + "EventName": "df_ioms_reqb.Node5.ioanyrdsized", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanyrdsized", + "UMask": "0xA2" + }, + { + "EventName": "df_ioms_reqb.Node6.ioanyrdsized", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanyrdsized", + "UMask": "0xC2" + }, + { + "EventName": "df_ioms_reqb.Node7.ioanyrdsized", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered ioanyrdsized", + "UMask": "0xE2" + }, + { + "EventName": "df_ioms_reqb.Node0.iolargeread", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered iolargeread", + "UMask": "0x01" + }, + { + "EventName": "df_ioms_reqb.Node1.iolargeread", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered iolargeread", + "UMask": "0x21" + }, + { + "EventName": "df_ioms_reqb.Node2.iolargeread", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered iolargeread", + "UMask": "0x41" + }, + { + "EventName": "df_ioms_reqb.Node3.iolargeread", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered iolargeread", + "UMask": "0x61" + }, + { + "EventName": "df_ioms_reqb.Node4.iolargeread", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered iolargeread", + "UMask": "0x81" + }, + { + "EventName": "df_ioms_reqb.Node5.iolargeread", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered iolargeread", + "UMask": "0xA1" + }, + { + "EventName": "df_ioms_reqb.Node6.iolargeread", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered iolargeread", + "UMask": "0xC1" + }, + { + "EventName": "df_ioms_reqb.Node7.iolargeread", + "EventCode": "0x109", + "BriefDescription": "Data Fabric CCM Performance Monitor Event DF IOMS Request Type B (IO and PIE Requests) Ordered iolargeread", + "UMask": "0xE1" + } +] + + diff --git a/lib/libpmc/pmu-events/arch/x86/amdfam17h/l3cache.json b/lib/libpmc/pmu-events/arch/x86/amdfam17h/l3cache.json new file mode 100644 index 000000000000..f7e2dcd2194f --- /dev/null +++ b/lib/libpmc/pmu-events/arch/x86/amdfam17h/l3cache.json @@ -0,0 +1,5411 @@ +[ + { + "EventName": "l3_request_g1.t0.s0.wrsizednc", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses ", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x01", + "UMask": "0x02" + }, + { + "EventName": "l3_request_g1.t1.s0.wrsizednc", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x01", + "UMask": "0x02" + }, + { + "EventName": "l3_request_g1.t2.s0.wrsizednc", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x01", + "UMask": "0x02" + }, + { + "EventName": "l3_request_g1.t3.s0.wrsizednc", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x01", + "UMask": "0x02" + }, + { + "EventName": "l3_request_g1.t4.s0.wrsizednc", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x01", + "UMask": "0x02" + }, + { + "EventName": "l3_request_g1.t5.s0.wrsizednc", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x01", + "UMask": "0x02" + }, + { + "EventName": "l3_request_g1.t6.s0.wrsizednc", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x01", + "UMask": "0x02" + }, + + { + "EventName": "l3_request_g1.t7.s0.wrsizednc", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x01", + "UMask": "0x02" + }, + { + "EventName": "l3_request_g1.t0.s1.wrsizednc", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x02", + "UMask": "0x02" + }, + { + "EventName": "l3_request_g1.t1.s1.wrsizednc", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x02", + "UMask": "0x02" + }, + { + "EventName": "l3_request_g1.t2.s1.wrsizednc", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x02", + "UMask": "0x02" + }, + { + "EventName": "l3_request_g1.t3.s1.wrsizednc", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x02", + "UMask": "0x02" + }, + { + "EventName": "l3_request_g1.t4.s1.wrsizednc", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x02", + "UMask": "0x02" + }, + { + "EventName": "l3_request_g1.t5.s1.wrsizednc", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x02", + "UMask": "0x02" + }, + { + "EventName": "l3_request_g1.t6.s1.wrsizednc", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x02", + "UMask": "0x02" + }, + { + "EventName": "l3_request_g1.t7.s1.wrsizednc", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x02", + "UMask": "0x02" + }, + { + "EventName": "l3_request_g1.t0.s2.wrsizednc", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x04", + "UMask": "0x02" + }, + { + "EventName": "l3_request_g1.t1.s2.wrsizednc", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x04", + "UMask": "0x02" + }, + { + "EventName": "l3_request_g1.t2.s2.wrsizednc", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x04", + "UMask": "0x02" + }, + { + "EventName": "l3_request_g1.t3.s2.wrsizednc", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x04", + "UMask": "0x02" + }, + { + "EventName": "l3_request_g1.t4.s2.wrsizednc", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x04", + "UMask": "0x02" + }, + { + "EventName": "l3_request_g1.t5.s2.wrsizednc", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x04", + "UMask": "0x02" + }, + { + "EventName": "l3_request_g1.t6.s2.wrsizednc", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x04", + "UMask": "0x02" + }, + + { + "EventName": "l3_request_g1.t7.s2.wrsizednc", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x04", + "UMask": "0x02" + }, + { + "EventName": "l3_request_g1.t0.s3.wrsizednc", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x08", + "UMask": "0x02" + }, + { + "EventName": "l3_request_g1.t1.s3.wrsizednc", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x08", + "UMask": "0x02" + }, + { + "EventName": "l3_request_g1.t2.s3.wrsizednc", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x08", + "UMask": "0x02" + }, + { + "EventName": "l3_request_g1.t3.s3.wrsizednc", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x08", + "UMask": "0x02" + }, + { + "EventName": "l3_request_g1.t4.s3.wrsizednc", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x08", + "UMask": "0x02" + }, + { + "EventName": "l3_request_g1.t5.s3.wrsizednc", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x08", + "UMask": "0x02" + }, + { + "EventName": "l3_request_g1.t6.s3.wrsizednc", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x08", + "UMask": "0x02" + }, + { + "EventName": "l3_request_g1.t7.s3.wrsizednc", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x08", + "UMask": "0x02" + }, + { + "EventName": "l3_request_g1.t0.s0.wrsized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x01", + "UMask": "0x04" + }, + { + "EventName": "l3_request_g1.t1.s0.wrsized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x01", + "UMask": "0x04" + }, + { + "EventName": "l3_request_g1.t2.s0.wrsized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x01", + "UMask": "0x04" + }, + { + "EventName": "l3_request_g1.t3.s0.wrsized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x01", + "UMask": "0x04" + }, + { + "EventName": "l3_request_g1.t4.s0.wrsized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x01", + "UMask": "0x04" + }, + { + "EventName": "l3_request_g1.t5.s0.wrsized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x01", + "UMask": "0x04" + }, + { + "EventName": "l3_request_g1.t6.s0.wrsized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x01", + "UMask": "0x04" + }, + { + "EventName": "l3_request_g1.t7.s0.wrsized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x01", + "UMask": "0x04" + }, + { + "EventName": "l3_request_g1.t0.s1.wrsized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x02", + "UMask": "0x04" + }, + { + "EventName": "l3_request_g1.t1.s1.wrsized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x02", + "UMask": "0x04" + }, + { + "EventName": "l3_request_g1.t2.s1.wrsized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x02", + "UMask": "0x04" + }, + { + "EventName": "l3_request_g1.t3.s1.wrsized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x02", + "UMask": "0x04" + }, + { + "EventName": "l3_request_g1.t4.s1.wrsized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x02", + "UMask": "0x04" + }, + { + "EventName": "l3_request_g1.t5.s1.wrsized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x02", + "UMask": "0x04" + }, + { + "EventName": "l3_request_g1.t6.s1.wrsized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x02", + "UMask": "0x04" + }, + { + "EventName": "l3_request_g1.t7.s1.wrsized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x02", + "UMask": "0x04" + }, + { + "EventName": "l3_request_g1.t0.s2.wrsized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x04", + "UMask": "0x04" + }, + { + "EventName": "l3_request_g1.t1.s2.wrsized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x04", + "UMask": "0x04" + }, + { + "EventName": "l3_request_g1.t2.s2.wrsized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x04", + "UMask": "0x04" + }, + { + "EventName": "l3_request_g1.t3.s2.wrsized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x04", + "UMask": "0x04" + }, + { + "EventName": "l3_request_g1.t4.s2.wrsized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x04", + "UMask": "0x04" + }, + { + "EventName": "l3_request_g1.t5.s2.wrsized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x04", + "UMask": "0x04" + }, + { + "EventName": "l3_request_g1.t6.s2.wrsized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x04", + "UMask": "0x04" + }, + { + "EventName": "l3_request_g1.t7.s2.wrsized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x04", + "UMask": "0x04" + }, + { + "EventName": "l3_request_g1.t0.s3.wrsized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x08", + "UMask": "0x04" + }, + { + "EventName": "l3_request_g1.t1.s3.wrsized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x08", + "UMask": "0x04" + }, + { + "EventName": "l3_request_g1.t2.s3.wrsized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x08", + "UMask": "0x04" + }, + { + "EventName": "l3_request_g1.t3.s3.wrsized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x08", + "UMask": "0x04" + }, + { + "EventName": "l3_request_g1.t4.s3.wrsized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x08", + "UMask": "0x04" + }, + { + "EventName": "l3_request_g1.t5.s3.wrsized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x08", + "UMask": "0x04" + }, + { + "EventName": "l3_request_g1.t6.s3.wrsized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x08", + "UMask": "0x04" + }, + { + "EventName": "l3_request_g1.t7.s3.wrsized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x08", + "UMask": "0x04" + }, + { + "EventName": "l3_request_g1.t0.s0.RdSizedNC", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x01", + "UMask": "0x20" + }, + { + "EventName": "l3_request_g1.t1.s0.RdSizedNC", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x01", + "UMask": "0x20" + }, + { + "EventName": "l3_request_g1.t2.s0.RdSizedNC", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x01", + "UMask": "0x20" + }, + { + "EventName": "l3_request_g1.t3.s0.RdSizedNC", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x01", + "UMask": "0x20" + }, + { + "EventName": "l3_request_g1.t4.s0.RdSizedNC", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x01", + "UMask": "0x20" + }, + { + "EventName": "l3_request_g1.t5.s0.RdSizedNC", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x01", + "UMask": "0x20" + }, + { + "EventName": "l3_request_g1.t6.s0.RdSizedNC", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x01", + "UMask": "0x20" + }, + { + "EventName": "l3_request_g1.t7.s0.RdSizedNC", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x01", + "UMask": "0x20" + }, + { + "EventName": "l3_request_g1.t0.s1.RdSizedNC", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x02", + "UMask": "0x20" + }, + { + "EventName": "l3_request_g1.t1.s1.RdSizedNC", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x02", + "UMask": "0x20" + }, + { + "EventName": "l3_request_g1.t2.s1.RdSizedNC", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x02", + "UMask": "0x20" + }, + { + "EventName": "l3_request_g1.t3.s1.RdSizedNC", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x02", + "UMask": "0x20" + }, + { + "EventName": "l3_request_g1.t4.s1.RdSizedNC", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x02", + "UMask": "0x20" + }, + { + "EventName": "l3_request_g1.t5.s1.RdSizedNC", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x02", + "UMask": "0x20" + }, + { + "EventName": "l3_request_g1.t6.s1.RdSizedNC", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x02", + "UMask": "0x20" + }, + { + "EventName": "l3_request_g1.t7.s1.RdSizedNC", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x02", + "UMask": "0x20" + }, + +{ + "EventName": "l3_request_g1.t0.s2.RdSizedNC", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x04", + "UMask": "0x20" + }, + { + "EventName": "l3_request_g1.t1.s2.RdSizedNC", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x04", + "UMask": "0x20" + }, + { + "EventName": "l3_request_g1.t2.s2.RdSizedNC", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x04", + "UMask": "0x20" + }, + { + "EventName": "l3_request_g1.t3.s2.RdSizedNC", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x04", + "UMask": "0x20" + }, + { + "EventName": "l3_request_g1.t4.s2.RdSizedNC", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x04", + "UMask": "0x20" + }, + { + "EventName": "l3_request_g1.t5.s2.RdSizedNC", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x04", + "UMask": "0x20" + }, + { + "EventName": "l3_request_g1.t6.s2.RdSizedNC", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x04", + "UMask": "0x20" + }, + { + "EventName": "l3_request_g1.t7.s2.RdSizedNC", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x04", + "UMask": "0x20" + }, + +{ + "EventName": "l3_request_g1.t0.s3.RdSizedNC", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x08", + "UMask": "0x20" + }, + { + "EventName": "l3_request_g1.t1.s3.RdSizedNC", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x08", + "UMask": "0x20" + }, + { + "EventName": "l3_request_g1.t2.s3.RdSizedNC", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x08", + "UMask": "0x20" + }, + { + "EventName": "l3_request_g1.t3.s3.RdSizedNC", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x08", + "UMask": "0x20" + }, + { + "EventName": "l3_request_g1.t4.s3.RdSizedNC", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x08", + "UMask": "0x20" + }, + { + "EventName": "l3_request_g1.t5.s3.RdSizedNC", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x08", + "UMask": "0x20" + }, + { + "EventName": "l3_request_g1.t6.s3.RdSizedNC", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x08", + "UMask": "0x20" + }, + { + "EventName": "l3_request_g1.t7.s3.RdSizedNC", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x08", + "UMask": "0x20" + }, + { + "EventName": "l3_request_g1.t0.s0.RdSized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x01", + "UMask": "0x40" + }, + { + "EventName": "l3_request_g1.t1.s0.RdSized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x02", + "UMask": "0x40" + }, + { + "EventName": "l3_request_g1.t2.s0.RdSized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x01", + "UMask": "0x40" + }, + { + "EventName": "l3_request_g1.t3.s0.RdSized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x01", + "UMask": "0x40" + }, + { + "EventName": "l3_request_g1.t4.s0.RdSized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x01", + "UMask": "0x40" + }, + { + "EventName": "l3_request_g1.t5.s0.RdSized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x01", + "UMask": "0x40" + }, + { + "EventName": "l3_request_g1.t6.s0.RdSized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x01", + "UMask": "0x40" + }, + { + "EventName": "l3_request_g1.t7.s0.RdSized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x01", + "UMask": "0x40" + }, + { + "EventName": "l3_request_g1.t0.s1.RdSized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x02", + "UMask": "0x40" + }, + { + "EventName": "l3_request_g1.t1.s1.RdSized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x02", + "UMask": "0x40" + }, + { + "EventName": "l3_request_g1.t2.s1.RdSized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x02", + "UMask": "0x40" + }, + { + "EventName": "l3_request_g1.t3.s1.RdSized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x02", + "UMask": "0x40" + }, + { + "EventName": "l3_request_g1.t4.s1.RdSized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x02", + "UMask": "0x40" + }, + { + "EventName": "l3_request_g1.t5.s1.RdSized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x02", + "UMask": "0x40" + }, + { + "EventName": "l3_request_g1.t6.s1.RdSized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x02", + "UMask": "0x40" + }, + { + "EventName": "l3_request_g1.t7.s1.RdSized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x02", + "UMask": "0x40" + }, + +{ + "EventName": "l3_request_g1.t0.s2.RdSized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x04", + "UMask": "0x40" + }, + { + "EventName": "l3_request_g1.t1.s2.RdSized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x04", + "UMask": "0x40" + }, + { + "EventName": "l3_request_g1.t2.s2.RdSized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x04", + "UMask": "0x40" + }, + { + "EventName": "l3_request_g1.t3.s2.RdSized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x04", + "UMask": "0x40" + }, + { + "EventName": "l3_request_g1.t4.s2.RdSized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x04", + "UMask": "0x40" + }, + { + "EventName": "l3_request_g1.t5.s2.RdSized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x04", + "UMask": "0x40" + }, + { + "EventName": "l3_request_g1.t6.s2.RdSized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x04", + "UMask": "0x40" + }, + { + "EventName": "l3_request_g1.t7.s2.RdSized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x04", + "UMask": "0x40" + }, + +{ + "EventName": "l3_request_g1.t0.s3.RdSized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x08", + "UMask": "0x40" + }, + { + "EventName": "l3_request_g1.t1.s3.RdSized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x08", + "UMask": "0x40" + }, + { + "EventName": "l3_request_g1.t2.s3.RdSized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x08", + "UMask": "0x40" + }, + { + "EventName": "l3_request_g1.t3.s3.RdSized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x08", + "UMask": "0x40" + }, + { + "EventName": "l3_request_g1.t4.s3.RdSized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x08", + "UMask": "0x40" + }, + { + "EventName": "l3_request_g1.t5.s3.RdSized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x08", + "UMask": "0x40" + }, + { + "EventName": "l3_request_g1.t6.s3.RdSized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x08", + "UMask": "0x40" + }, + { + "EventName": "l3_request_g1.t7.s3.RdSized", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x08", + "UMask": "0x40" + }, + { + "EventName": "l3_request_g1.t0.s0.caching", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x01", + "UMask": "0x80" + }, + { + "EventName": "l3_request_g1.t1.s0.caching", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x01", + "UMask": "0x80" + }, +{ + "EventName": "l3_request_g1.t2.s0.caching", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x01", + "UMask": "0x80" + }, +{ + "EventName": "l3_request_g1.t3.s0.caching", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x01", + "UMask": "0x80" + }, +{ + "EventName": "l3_request_g1.t4.s0.caching", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x01", + "UMask": "0x80" + }, +{ + "EventName": "l3_request_g1.t5.s0.caching", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x01", + "UMask": "0x80" + }, +{ + "EventName": "l3_request_g1.t6.s0.caching", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x01", + "UMask": "0x80" + }, +{ + "EventName": "l3_request_g1.t7.s0.caching", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x01", + "UMask": "0x80" + }, + { + "EventName": "l3_request_g1.t0.s1.caching", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x02", + "UMask": "0x80" + }, + { + "EventName": "l3_request_g1.t1.s1.caching", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x02", + "UMask": "0x80" + }, +{ + "EventName": "l3_request_g1.t2.s1.caching", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x02", + "UMask": "0x80" + }, +{ + "EventName": "l3_request_g1.t3.s1.caching", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x02", + "UMask": "0x80" + }, +{ + "EventName": "l3_request_g1.t4.s1.caching", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x02", + "UMask": "0x80" + }, +{ + "EventName": "l3_request_g1.t5.s1.caching", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x02", + "UMask": "0x80" + }, +{ + "EventName": "l3_request_g1.t6.s1.caching", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x02", + "UMask": "0x80" + }, +{ + "EventName": "l3_request_g1.t7.s1.caching", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x02", + "UMask": "0x80" + }, + +{ + "EventName": "l3_request_g1.t0.s2.caching", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x04", + "UMask": "0x80" + }, + { + "EventName": "l3_request_g1.t1.s2.caching", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x04", + "UMask": "0x80" + }, +{ + "EventName": "l3_request_g1.t2.s2.caching", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x04", + "UMask": "0x80" + }, +{ + "EventName": "l3_request_g1.t3.s2.caching", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x04", + "UMask": "0x80" + }, +{ + "EventName": "l3_request_g1.t4.s2.caching", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x04", + "UMask": "0x80" + }, +{ + "EventName": "l3_request_g1.t5.s2.caching", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x04", + "UMask": "0x80" + }, +{ + "EventName": "l3_request_g1.t6.s2.caching", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x04", + "UMask": "0x80" + }, +{ + "EventName": "l3_request_g1.t7.s2.caching", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x04", + "UMask": "0x80" + }, + +{ + "EventName": "l3_request_g1.t0.s3.caching", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x08", + "UMask": "0x80" + }, + { + "EventName": "l3_request_g1.t1.s3.caching", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x08", + "UMask": "0x80" + }, +{ + "EventName": "l3_request_g1.t2.s3.caching", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x08", + "UMask": "0x80" + }, +{ + "EventName": "l3_request_g1.t3.s3.caching", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x08", + "UMask": "0x80" + }, +{ + "EventName": "l3_request_g1.t4.s3.caching", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x08", + "UMask": "0x80" + }, +{ + "EventName": "l3_request_g1.t5.s3.caching", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x08", + "UMask": "0x80" + }, +{ + "EventName": "l3_request_g1.t6.s3.caching", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x08", + "UMask": "0x80" + }, +{ + "EventName": "l3_request_g1.t7.s3.caching", + "EventCode": "0x01", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Cache Accesses", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x08", + "UMask": "0x80" + }, + { + "EventName": "l3fillvicreq.t0.s0.vicblk", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x01", + "UMask": "0x01" + }, + { + "EventName": "l3fillvicreq.t1.s0.vicblk", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x01", + "UMask": "0x01" + }, + { + "EventName": "l3fillvicreq.t2.s0.vicblk", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x01", + "UMask": "0x01" + }, + { + "EventName": "l3fillvicreq.t3.s0.vicblk", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x01", + "UMask": "0x01" + }, + { + "EventName": "l3fillvicreq.t4.s0.vicblk", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x01", + "UMask": "0x01" + }, + { + "EventName": "l3fillvicreq.t5.s0.vicblk", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x01", + "UMask": "0x01" + }, + { + "EventName": "l3fillvicreq.t6.s0.vicblk", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x01", + "UMask": "0x01" + }, + { + "EventName": "l3fillvicreq.t7.s0.vicblk", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x01", + "UMask": "0x01" + }, + + { + "EventName": "l3fillvicreq.t0.s1.vicblk", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x02", + "UMask": "0x01" + }, + { + "EventName": "l3fillvicreq.t1.s1.vicblk", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x02", + "UMask": "0x01" + }, + { + "EventName": "l3fillvicreq.t2.s1.vicblk", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x02", + "UMask": "0x01" + }, + { + "EventName": "l3fillvicreq.t3.s1.vicblk", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x02", + "UMask": "0x01" + }, + { + "EventName": "l3fillvicreq.t4.s1.vicblk", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x02", + "UMask": "0x01" + }, + { + "EventName": "l3fillvicreq.t5.s1.vicblk", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x02", + "UMask": "0x01" + }, + { + "EventName": "l3fillvicreq.t6.s1.vicblk", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x02", + "UMask": "0x01" + }, + { + "EventName": "l3fillvicreq.t7.s1.vicblk", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x02", + "UMask": "0x01" + }, + + + { + "EventName": "l3fillvicreq.t0.s2.vicblk", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x04", + "UMask": "0x01" + }, + { + "EventName": "l3fillvicreq.t1.s2.vicblk", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x01", + "UMask": "0x01" + }, + { + "EventName": "l3fillvicreq.t2.s2.vicblk", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x04", + "UMask": "0x01" + }, + { + "EventName": "l3fillvicreq.t3.s2.vicblk", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x04", + "UMask": "0x01" + }, + { + "EventName": "l3fillvicreq.t4.s2.vicblk", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x04", + "UMask": "0x01" + }, + { + "EventName": "l3fillvicreq.t5.s2.vicblk", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x04", + "UMask": "0x01" + }, + { + "EventName": "l3fillvicreq.t6.s2.vicblk", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x04", + "UMask": "0x01" + }, + { + "EventName": "l3fillvicreq.t7.s2.vicblk", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x04", + "UMask": "0x01" + }, + { + "EventName": "l3fillvicreq.t0.s3.vicblk", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x08", + "UMask": "0x01" + }, + { + "EventName": "l3fillvicreq.t1.s3.vicblk", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x08", + "UMask": "0x01" + }, + { + "EventName": "l3fillvicreq.t2.s3.vicblk", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x08", + "UMask": "0x01" + }, + { + "EventName": "l3fillvicreq.t3.s3.vicblk", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x08", + "UMask": "0x01" + }, + { + "EventName": "l3fillvicreq.t4.s3.vicblk", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x08", + "UMask": "0x01" + }, + { + "EventName": "l3fillvicreq.t5.s3.vicblk", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x08", + "UMask": "0x01" + }, + { + "EventName": "l3fillvicreq.t6.s3.vicblk", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x08", + "UMask": "0x01" + }, + { + "EventName": "l3fillvicreq.t7.s3.vicblk", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x08", + "UMask": "0x01" + }, + { + "EventName": "l3fillvicreq.t0.s0.chgtox", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x01", + "UMask": "0x02" + }, + { + "EventName": "l3fillvicreq.t1.s0.chgtox", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x01", + "UMask": "0x02" + }, + { + "EventName": "l3fillvicreq.t2.s0.chgtox", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x01", + "UMask": "0x02" + }, + { + "EventName": "l3fillvicreq.t3.s0.chgtox", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x01", + "UMask": "0x02" + }, + { + "EventName": "l3fillvicreq.t4.s0.chgtox", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x01", + "UMask": "0x02" + }, + { + "EventName": "l3fillvicreq.t5.s0.chgtox", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x01", + "UMask": "0x02" + }, + { + "EventName": "l3fillvicreq.t6.s0.chgtox", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x01", + "UMask": "0x02" + }, + { + "EventName": "l3fillvicreq.t7.s0.chgtox", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x01", + "UMask": "0x02" + }, + + { + "EventName": "l3fillvicreq.t0.s1.chgtox", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x02", + "UMask": "0x02" + }, + { + "EventName": "l3fillvicreq.t1.s1.chgtox", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x02", + "UMask": "0x02" + }, + { + "EventName": "l3fillvicreq.t2.s1.chgtox", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x02", + "UMask": "0x02" + }, + { + "EventName": "l3fillvicreq.t3.s1.chgtox", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x02", + "UMask": "0x02" + }, + { + "EventName": "l3fillvicreq.t4.s1.chgtox", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x02", + "UMask": "0x02" + }, + { + "EventName": "l3fillvicreq.t5.s1.chgtox", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x02", + "UMask": "0x02" + }, + { + "EventName": "l3fillvicreq.t6.s1.chgtox", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x02", + "UMask": "0x02" + }, + { + "EventName": "l3fillvicreq.t7.s1.chgtox", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x02", + "UMask": "0x02" + }, + { + "EventName": "l3fillvicreq.t0.s2.chgtox", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x04", + "UMask": "0x02" + }, + { + "EventName": "l3fillvicreq.t1.s2.chgtox", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x04", + "UMask": "0x02" + }, + { + "EventName": "l3fillvicreq.t2.s2.chgtox", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x04", + "UMask": "0x02" + }, + { + "EventName": "l3fillvicreq.t3.s2.chgtox", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x04", + "UMask": "0x02" + }, + { + "EventName": "l3fillvicreq.t4.s2.chgtox", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x04", + "UMask": "0x02" + }, + { + "EventName": "l3fillvicreq.t5.s2.chgtox", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x04", + "UMask": "0x02" + }, + { + "EventName": "l3fillvicreq.t6.s2.chgtox", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x04", + "UMask": "0x02" + }, + { + "EventName": "l3fillvicreq.t7.s2.chgtox", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x04", + "UMask": "0x02" + }, + { + "EventName": "l3fillvicreq.t0.s3.chgtox", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x08", + "UMask": "0x02" + }, + { + "EventName": "l3fillvicreq.t1.s3.chgtox", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x08", + "UMask": "0x02" + }, + { + "EventName": "l3fillvicreq.t2.s3.chgtox", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x08", + "UMask": "0x02" + }, + { + "EventName": "l3fillvicreq.t3.s3.chgtox", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x08", + "UMask": "0x02" + }, + { + "EventName": "l3fillvicreq.t4.s3.chgtox", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x08", + "UMask": "0x02" + }, + { + "EventName": "l3fillvicreq.t5.s3.chgtox", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x08", + "UMask": "0x02" + }, + { + "EventName": "l3fillvicreq.t6.s3.chgtox", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x08", + "UMask": "0x02" + }, + { + "EventName": "l3fillvicreq.t7.s3.chgtox", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x08", + "UMask": "0x02" + }, + { + "EventName": "l3fillvicreq.t0.s0.rdblkc_s_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x01", + "UMask": "0x04" + }, + { + "EventName": "l3fillvicreq.t1.s0.rdblkc_s_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x01", + "UMask": "0x04" + }, + { + "EventName": "l3fillvicreq.t2.s0.rdblkc_s_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x01", + "UMask": "0x04" + }, + { + "EventName": "l3fillvicreq.t3.s0.rdblkc_s_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x01", + "UMask": "0x04" + }, + { + "EventName": "l3fillvicreq.t4.s0.rdblkc_s_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x01", + "UMask": "0x04" + }, + { + "EventName": "l3fillvicreq.t5.s0.rdblkc_s_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x01", + "UMask": "0x04" + }, + { + "EventName": "l3fillvicreq.t6.s0.rdblkc_s_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x01", + "UMask": "0x04" + }, + { + "EventName": "l3fillvicreq.t7.s0.rdblkc_s_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x01", + "UMask": "0x04" + }, + + { + "EventName": "l3fillvicreq.t0.s1.rdblkc_s_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x02", + "UMask": "0x04" + }, + { + "EventName": "l3fillvicreq.t1.s1.rdblkc_s_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x02", + "UMask": "0x04" + }, + { + "EventName": "l3fillvicreq.t2.s1.rdblkc_s_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x02", + "UMask": "0x04" + }, + { + "EventName": "l3fillvicreq.t3.s1.rdblkc_s_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x02", + "UMask": "0x04" + }, + { + "EventName": "l3fillvicreq.t4.s1.rdblkc_s_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x02", + "UMask": "0x04" + }, + { + "EventName": "l3fillvicreq.t5.s1.rdblkc_s_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x02", + "UMask": "0x04" + }, + { + "EventName": "l3fillvicreq.t6.s1.rdblkc_s_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x02", + "UMask": "0x04" + }, + { + "EventName": "l3fillvicreq.t7.s1.rdblkc_s_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x02", + "UMask": "0x04" + }, + { + "EventName": "l3fillvicreq.t0.s2.rdblkc_s_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x04", + "UMask": "0x04" + }, + { + "EventName": "l3fillvicreq.t1.s2.rdblkc_s_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x04", + "UMask": "0x04" + }, + { + "EventName": "l3fillvicreq.t2.s2.rdblkc_s_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x04", + "UMask": "0x04" + }, + { + "EventName": "l3fillvicreq.t3.s2.rdblkc_s_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x04", + "UMask": "0x04" + }, + { + "EventName": "l3fillvicreq.t4.s2.rdblkc_s_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x04", + "UMask": "0x04" + }, + { + "EventName": "l3fillvicreq.t5.s2.rdblkc_s_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x04", + "UMask": "0x04" + }, + { + "EventName": "l3fillvicreq.t6.s2.rdblkc_s_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x04", + "UMask": "0x04" + }, + { + "EventName": "l3fillvicreq.t7.s2.rdblkc_s_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x04", + "UMask": "0x04" + }, + { + "EventName": "l3fillvicreq.t0.s3.rdblkc_s_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x08", + "UMask": "0x04" + }, + { + "EventName": "l3fillvicreq.t1.s3.rdblkc_s_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x08", + "UMask": "0x04" + }, + { + "EventName": "l3fillvicreq.t2.s3.rdblkc_s_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x08", + "UMask": "0x04" + }, + { + "EventName": "l3fillvicreq.t3.s3.rdblkc_s_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x08", + "UMask": "0x04" + }, + { + "EventName": "l3fillvicreq.t4.s3.rdblkc_s_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x08", + "UMask": "0x04" + }, + { + "EventName": "l3fillvicreq.t5.s3.rdblkc_s_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x08", + "UMask": "0x04" + }, + { + "EventName": "l3fillvicreq.t6.s3.rdblkc_s_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x08", + "UMask": "0x04" + }, + { + "EventName": "l3fillvicreq.t7.s3.rdblkc_s_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x08", + "UMask": "0x04" + }, + { + "EventName": "l3fillvicreq.t0.s0.rdblkc_s", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x01", + "UMask": "0x08" + }, + { + "EventName": "l3fillvicreq.t1.s0.rdblkc_s", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x01", + "UMask": "0x08" + }, + { + "EventName": "l3fillvicreq.t2.s0.rdblkc_s", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x01", + "UMask": "0x08" + }, + { + "EventName": "l3fillvicreq.t3.s0.rdblkc_s", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x01", + "UMask": "0x08" + }, + { + "EventName": "l3fillvicreq.t4.s0.rdblkc_s", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x01", + "UMask": "0x08" + }, + { + "EventName": "l3fillvicreq.t5.s0.rdblkc_s", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x01", + "UMask": "0x08" + }, + { + "EventName": "l3fillvicreq.t6.s0.rdblkc_s", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x01", + "UMask": "0x08" + }, + { + "EventName": "l3fillvicreq.t7.s0.rdblkc_s", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x01", + "UMask": "0x08" + }, + + { + "EventName": "l3fillvicreq.t0.s1.rdblkc_s", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x02", + "UMask": "0x08" + }, + { + "EventName": "l3fillvicreq.t1.s1.rdblkc_s", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x02", + "UMask": "0x08" + }, + { + "EventName": "l3fillvicreq.t2.s1.rdblkc_s", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x02", + "UMask": "0x08" + }, + { + "EventName": "l3fillvicreq.t3.s1.rdblkc_s", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x02", + "UMask": "0x08" + }, + { + "EventName": "l3fillvicreq.t4.s1.rdblkc_s", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x02", + "UMask": "0x08" + }, + { + "EventName": "l3fillvicreq.t5.s1.rdblkc_s", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x02", + "UMask": "0x08" + }, + { + "EventName": "l3fillvicreq.t6.s1.rdblkc_s", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x02", + "UMask": "0x08" + }, + { + "EventName": "l3fillvicreq.t7.s1.rdblkc_s", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x02", + "UMask": "0x08" + }, + { + "EventName": "l3fillvicreq.t0.s2.rdblkc_s", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x04", + "UMask": "0x08" + }, + { + "EventName": "l3fillvicreq.t1.s2.rdblkc_s", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x04", + "UMask": "0x08" + }, + { + "EventName": "l3fillvicreq.t2.s2.rdblkc_s", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x04", + "UMask": "0x08" + }, + { + "EventName": "l3fillvicreq.t3.s2.rdblkc_s", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x04", + "UMask": "0x08" + }, + { + "EventName": "l3fillvicreq.t4.s2.rdblkc_s", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x04", + "UMask": "0x08" + }, + { + "EventName": "l3fillvicreq.t5.s2.rdblkc_s", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x04", + "UMask": "0x08" + }, + { + "EventName": "l3fillvicreq.t6.s2.rdblkc_s", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x04", + "UMask": "0x08" + }, + { + "EventName": "l3fillvicreq.t7.s2.rdblkc_s", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x04", + "UMask": "0x08" + }, + { + "EventName": "l3fillvicreq.t0.s3.rdblkc_s", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x08", + "UMask": "0x08" + }, + { + "EventName": "l3fillvicreq.t1.s3.rdblkc_s", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x08", + "UMask": "0x08" + }, + { + "EventName": "l3fillvicreq.t2.s3.rdblkc_s", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x08", + "UMask": "0x08" + }, + { + "EventName": "l3fillvicreq.t3.s3.rdblkc_s", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x08", + "UMask": "0x08" + }, + { + "EventName": "l3fillvicreq.t4.s3.rdblkc_s", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x08", + "UMask": "0x08" + }, + { + "EventName": "l3fillvicreq.t5.s3.rdblkc_s", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x08", + "UMask": "0x08" + }, + { + "EventName": "l3fillvicreq.t6.s3.rdblkc_s", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x08", + "UMask": "0x08" + }, + { + "EventName": "l3fillvicreq.t7.s3.rdblkc_s", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x08", + "UMask": "0x08" + }, + { + "EventName": "l3fillvicreq.t0.s0.rdblkx_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x01", + "UMask": "0x10" + }, + { + "EventName": "l3fillvicreq.t1.s0.rdblkx_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x01", + "UMask": "0x10" + }, + { + "EventName": "l3fillvicreq.t2.s0.rdblkx_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x01", + "UMask": "0x10" + }, + { + "EventName": "l3fillvicreq.t3.s0.rdblkx_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x01", + "UMask": "0x10" + }, + { + "EventName": "l3fillvicreq.t4.s0.rdblkx_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x01", + "UMask": "0x10" + }, + { + "EventName": "l3fillvicreq.t5.s0.rdblkx_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x01", + "UMask": "0x10" + }, + { + "EventName": "l3fillvicreq.t6.s0.rdblkx_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x01", + "UMask": "0x10" + }, + { + "EventName": "l3fillvicreq.t7.s0.rdblkx_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x01", + "UMask": "0x10" + }, + + { + "EventName": "l3fillvicreq.t0.s1.rdblkx_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x02", + "UMask": "0x10" + }, + { + "EventName": "l3fillvicreq.t1.s1.rdblkx_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x02", + "UMask": "0x10" + }, + { + "EventName": "l3fillvicreq.t2.s1.rdblkx_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x02", + "UMask": "0x10" + }, + { + "EventName": "l3fillvicreq.t3.s1.rdblkx_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x02", + "UMask": "0x10" + }, + { + "EventName": "l3fillvicreq.t4.s1.rdblkx_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x02", + "UMask": "0x10" + }, + { + "EventName": "l3fillvicreq.t5.s1.rdblkx_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x02", + "UMask": "0x10" + }, + { + "EventName": "l3fillvicreq.t6.s1.rdblkx_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x02", + "UMask": "0x10" + }, + { + "EventName": "l3fillvicreq.t7.s1.rdblkx_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x02", + "UMask": "0x10" + }, + { + "EventName": "l3fillvicreq.t0.s2.rdblkx_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x04", + "UMask": "0x10" + }, + { + "EventName": "l3fillvicreq.t1.s2.rdblkx_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x04", + "UMask": "0x10" + }, + { + "EventName": "l3fillvicreq.t2.s2.rdblkx_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x04", + "UMask": "0x10" + }, + { + "EventName": "l3fillvicreq.t3.s2.rdblkx_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x04", + "UMask": "0x10" + }, + { + "EventName": "l3fillvicreq.t4.s2.rdblkx_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x04", + "UMask": "0x10" + }, + { + "EventName": "l3fillvicreq.t5.s2.rdblkx_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x04", + "UMask": "0x10" + }, + { + "EventName": "l3fillvicreq.t6.s2.rdblkx_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x04", + "UMask": "0x10" + }, + { + "EventName": "l3fillvicreq.t7.s2.rdblkx_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x04", + "UMask": "0x10" + }, + { + "EventName": "l3fillvicreq.t0.s3.rdblkx_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x08", + "UMask": "0x10" + }, + { + "EventName": "l3fillvicreq.t1.s3.rdblkx_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x08", + "UMask": "0x10" + }, + { + "EventName": "l3fillvicreq.t2.s3.rdblkx_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x08", + "UMask": "0x10" + }, + { + "EventName": "l3fillvicreq.t3.s3.rdblkx_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x08", + "UMask": "0x10" + }, + { + "EventName": "l3fillvicreq.t4.s3.rdblkx_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x08", + "UMask": "0x10" + }, + { + "EventName": "l3fillvicreq.t5.s3.rdblkx_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x08", + "UMask": "0x10" + }, + { + "EventName": "l3fillvicreq.t6.s3.rdblkx_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x08", + "UMask": "0x10" + }, + { + "EventName": "l3fillvicreq.t7.s3.rdblkx_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x08", + "UMask": "0x10" + }, + { + "EventName": "l3fillvicreq.t0.s0.rdblkx", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x01", + "UMask": "0x20" + }, + { + "EventName": "l3fillvicreq.t1.s0.rdblkx", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x01", + "UMask": "0x20" + }, + { + "EventName": "l3fillvicreq.t2.s0.rdblkx", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x01", + "UMask": "0x20" + }, + { + "EventName": "l3fillvicreq.t3.s0.rdblkx", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x01", + "UMask": "0x20" + }, + { + "EventName": "l3fillvicreq.t4.s0.rdblkx", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x01", + "UMask": "0x20" + }, + { + "EventName": "l3fillvicreq.t5.s0.rdblkx", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x01", + "UMask": "0x20" + }, + { + "EventName": "l3fillvicreq.t6.s0.rdblkx", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x01", + "UMask": "0x20" + }, + { + "EventName": "l3fillvicreq.t7.s0.rdblkx", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x01", + "UMask": "0x20" + }, + + { + "EventName": "l3fillvicreq.t0.s1.rdblkx", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x02", + "UMask": "0x20" + }, + { + "EventName": "l3fillvicreq.t1.s1.rdblkx", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x02", + "UMask": "0x20" + }, + { + "EventName": "l3fillvicreq.t2.s1.rdblkx", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x02", + "UMask": "0x20" + }, + { + "EventName": "l3fillvicreq.t3.s1.rdblkx", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x02", + "UMask": "0x20" + }, + { + "EventName": "l3fillvicreq.t4.s1.rdblkx", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x02", + "UMask": "0x20" + }, + { + "EventName": "l3fillvicreq.t5.s1.rdblkx", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x02", + "UMask": "0x20" + }, + { + "EventName": "l3fillvicreq.t6.s1.rdblkx", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x02", + "UMask": "0x20" + }, + { + "EventName": "l3fillvicreq.t7.s1.rdblkx", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x02", + "UMask": "0x20" + }, + { + "EventName": "l3fillvicreq.t0.s2.rdblkx", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x04", + "UMask": "0x20" + }, + { + "EventName": "l3fillvicreq.t1.s2.rdblkx", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x04", + "UMask": "0x20" + }, + { + "EventName": "l3fillvicreq.t2.s2.rdblkx", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x04", + "UMask": "0x20" + }, + { + "EventName": "l3fillvicreq.t3.s2.rdblkx", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x04", + "UMask": "0x20" + }, + { + "EventName": "l3fillvicreq.t4.s2.rdblkx", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x04", + "UMask": "0x20" + }, + { + "EventName": "l3fillvicreq.t5.s2.rdblkx", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x04", + "UMask": "0x20" + }, + { + "EventName": "l3fillvicreq.t6.s2.rdblkx", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x04", + "UMask": "0x20" + }, + { + "EventName": "l3fillvicreq.t7.s2.rdblkx", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x04", + "UMask": "0x20" + }, + { + "EventName": "l3fillvicreq.t0.s3.rdblkx", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x08", + "UMask": "0x20" + }, + { + "EventName": "l3fillvicreq.t1.s3.rdblkx", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x08", + "UMask": "0x20" + }, + { + "EventName": "l3fillvicreq.t2.s3.rdblkx", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x08", + "UMask": "0x20" + }, + { + "EventName": "l3fillvicreq.t3.s3.rdblkx", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x08", + "UMask": "0x20" + }, + { + "EventName": "l3fillvicreq.t4.s3.rdblkx", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x08", + "UMask": "0x20" + }, + { + "EventName": "l3fillvicreq.t5.s3.rdblkx", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x08", + "UMask": "0x20" + }, + { + "EventName": "l3fillvicreq.t6.s3.rdblkx", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x08", + "UMask": "0x20" + }, + { + "EventName": "l3fillvicreq.t7.s3.rdblkx", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x08", + "UMask": "0x20" + }, + { + "EventName": "l3fillvicreq.t0.s0.rdblkl_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x01", + "UMask": "0x40" + }, + { + "EventName": "l3fillvicreq.t1.s0.rdblkl_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x01", + "UMask": "0x40" + }, + { + "EventName": "l3fillvicreq.t2.s0.rdblkl_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x01", + "UMask": "0x40" + }, + { + "EventName": "l3fillvicreq.t3.s0.rdblkl_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x01", + "UMask": "0x40" + }, + { + "EventName": "l3fillvicreq.t4.s0.rdblkl_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x01", + "UMask": "0x40" + }, + { + "EventName": "l3fillvicreq.t5.s0.rdblkl_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x01", + "UMask": "0x40" + }, + { + "EventName": "l3fillvicreq.t6.s0.rdblkl_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x01", + "UMask": "0x40" + }, + { + "EventName": "l3fillvicreq.t7.s0.rdblkl_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x01", + "UMask": "0x40" + }, + + { + "EventName": "l3fillvicreq.t0.s1.rdblkl_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x02", + "UMask": "0x40" + }, + { + "EventName": "l3fillvicreq.t1.s1.rdblkl_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x02", + "UMask": "0x40" + }, + { + "EventName": "l3fillvicreq.t2.s1.rdblkl_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x02", + "UMask": "0x40" + }, + { + "EventName": "l3fillvicreq.t3.s1.rdblkl_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x02", + "UMask": "0x40" + }, + { + "EventName": "l3fillvicreq.t4.s1.rdblkl_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x02", + "UMask": "0x40" + }, + { + "EventName": "l3fillvicreq.t5.s1.rdblkl_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x02", + "UMask": "0x40" + }, + { + "EventName": "l3fillvicreq.t6.s1.rdblkl_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x02", + "UMask": "0x40" + }, + { + "EventName": "l3fillvicreq.t7.s1.rdblkl_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x02", + "UMask": "0x40" + }, + { + "EventName": "l3fillvicreq.t0.s2.rdblkl_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x04", + "UMask": "0x40" + }, + { + "EventName": "l3fillvicreq.t1.s2.rdblkl_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x04", + "UMask": "0x40" + }, + { + "EventName": "l3fillvicreq.t2.s2.rdblkl_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x04", + "UMask": "0x40" + }, + { + "EventName": "l3fillvicreq.t3.s2.rdblkl_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x04", + "UMask": "0x40" + }, + { + "EventName": "l3fillvicreq.t4.s2.rdblkl_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x04", + "UMask": "0x40" + }, + { + "EventName": "l3fillvicreq.t5.s2.rdblkl_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x04", + "UMask": "0x40" + }, + { + "EventName": "l3fillvicreq.t6.s2.rdblkl_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x04", + "UMask": "0x40" + }, + { + "EventName": "l3fillvicreq.t7.s2.rdblkl_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x04", + "UMask": "0x40" + }, + { + "EventName": "l3fillvicreq.t0.s3.rdblkl_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x08", + "UMask": "0x40" + }, + { + "EventName": "l3fillvicreq.t1.s3.rdblkl_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x08", + "UMask": "0x40" + }, + { + "EventName": "l3fillvicreq.t2.s3.rdblkl_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x08", + "UMask": "0x40" + }, + { + "EventName": "l3fillvicreq.t3.s3.rdblkl_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x08", + "UMask": "0x40" + }, + { + "EventName": "l3fillvicreq.t4.s3.rdblkl_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x08", + "UMask": "0x40" + }, + { + "EventName": "l3fillvicreq.t5.s3.rdblkl_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x08", + "UMask": "0x40" + }, + { + "EventName": "l3fillvicreq.t6.s3.rdblkl_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x08", + "UMask": "0x40" + }, + { + "EventName": "l3fillvicreq.t7.s3.rdblkl_vic", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x08", + "UMask": "0x40" + }, + { + "EventName": "l3fillvicreq.t0.s0.rdblkl", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x01", + "UMask": "0x80" + }, + { + "EventName": "l3fillvicreq.t1.s0.rdblkl", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x01", + "UMask": "0x80" + }, + { + "EventName": "l3fillvicreq.t2.s0.rdblkl", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x01", + "UMask": "0x80" + }, + { + "EventName": "l3fillvicreq.t3.s0.rdblkl", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x01", + "UMask": "0x80" + }, + { + "EventName": "l3fillvicreq.t4.s0.rdblkl", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x01", + "UMask": "0x80" + }, + { + "EventName": "l3fillvicreq.t5.s0.rdblkl", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x01", + "UMask": "0x80" + }, + { + "EventName": "l3fillvicreq.t6.s0.rdblkl", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x01", + "UMask": "0x80" + }, + { + "EventName": "l3fillvicreq.t7.s0.rdblkl", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x01", + "UMask": "0x80" + }, + + { + "EventName": "l3fillvicreq.t0.s1.rdblkl", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x02", + "UMask": "0x80" + }, + { + "EventName": "l3fillvicreq.t1.s1.rdblkl", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x02", + "UMask": "0x80" + }, + { + "EventName": "l3fillvicreq.t2.s1.rdblkl", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x02", + "UMask": "0x80" + }, + { + "EventName": "l3fillvicreq.t3.s1.rdblkl", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x02", + "UMask": "0x80" + }, + { + "EventName": "l3fillvicreq.t4.s1.rdblkl", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x02", + "UMask": "0x80" + }, + { + "EventName": "l3fillvicreq.t5.s1.rdblkl", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x02", + "UMask": "0x80" + }, + { + "EventName": "l3fillvicreq.t6.s1.rdblkl", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x02", + "UMask": "0x80" + }, + { + "EventName": "l3fillvicreq.t7.s1.rdblkl", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x02", + "UMask": "0x80" + }, + { + "EventName": "l3fillvicreq.t0.s2.rdblkl", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x04", + "UMask": "0x80" + }, + { + "EventName": "l3fillvicreq.t1.s2.rdblkl", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x04", + "UMask": "0x80" + }, + { + "EventName": "l3fillvicreq.t2.s2.rdblkl", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x04", + "UMask": "0x80" + }, + { + "EventName": "l3fillvicreq.t3.s2.rdblkl", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x04", + "UMask": "0x80" + }, + { + "EventName": "l3fillvicreq.t4.s2.rdblkl", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x04", + "UMask": "0x80" + }, + { + "EventName": "l3fillvicreq.t5.s2.rdblkl", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x04", + "UMask": "0x80" + }, + { + "EventName": "l3fillvicreq.t6.s2.rdblkl", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x04", + "UMask": "0x80" + }, + { + "EventName": "l3fillvicreq.t7.s2.rdblkl", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x04", + "UMask": "0x80" + }, + { + "EventName": "l3fillvicreq.t0.s3.rdblkl", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x08", + "UMask": "0x80" + }, + { + "EventName": "l3fillvicreq.t1.s3.rdblkl", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x08", + "UMask": "0x80" + }, + { + "EventName": "l3fillvicreq.t2.s3.rdblkl", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x08", + "UMask": "0x80" + }, + { + "EventName": "l3fillvicreq.t3.s3.rdblkl", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x08", + "UMask": "0x80" + }, + { + "EventName": "l3fillvicreq.t4.s3.rdblkl", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x08", + "UMask": "0x80" + }, + { + "EventName": "l3fillvicreq.t5.s3.rdblkl", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x08", + "UMask": "0x80" + }, + { + "EventName": "l3fillvicreq.t6.s3.rdblkl", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x08", + "UMask": "0x80" + }, + { + "EventName": "l3fillvicreq.t7.s3.rdblkl", + "EventCode": "0x03", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 cache access types", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x08", + "UMask": "0x80" + }, + { + "EventName": "l3combclstrstate", + "EventCode": "0x06", + "BriefDescription": "L3 Cache Performance Monitor Counters RequestMiss: L3 miss", + "UMask": "0x01" + }, + { + "EventName": "l3victimstate.t0.s0.nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x01", + "UMask": "0x01" + }, + { + "EventName": "l3victimstate.t1.s0.nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x01", + "UMask": "0x01" + }, + { + "EventName": "l3victimstate.t2.s0.nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x01", + "UMask": "0x01" + }, + { + "EventName": "l3victimstate.t3.s0.nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x01", + "UMask": "0x01" + }, + { + "EventName": "l3victimstate.t4.s0.nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x01", + "UMask": "0x01" + }, + { + "EventName": "l3victimstate.t5.s0.nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x01", + "UMask": "0x01" + }, + { + "EventName": "l3victimstate.t6.s0.nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x01", + "UMask": "0x01" + }, + { + "EventName": "l3victimstate.t7.s0.nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x01", + "UMask": "0x01" + }, + + { + "EventName": "l3victimstate.t0.s1.nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x02", + "UMask": "0x01" + }, + { + "EventName": "l3victimstate.t1.s1.nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x02", + "UMask": "0x01" + }, + { + "EventName": "l3victimstate.t2.s1.nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x02", + "UMask": "0x01" + }, + { + "EventName": "l3victimstate.t3.s1.nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x02", + "UMask": "0x01" + }, + { + "EventName": "l3victimstate.t4.s1.nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x02", + "UMask": "0x01" + }, + { + "EventName": "l3victimstate.t5.s1.nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x02", + "UMask": "0x01" + }, + { + "EventName": "l3victimstate.t6.s1.nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x02", + "UMask": "0x01" + }, + { + "EventName": "l3victimstate.t7.s1.nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x02", + "UMask": "0x01" + }, + { + "EventName": "l3victimstate.t0.s2.nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x04", + "UMask": "0x01" + }, + { + "EventName": "l3victimstate.t1.s2.nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x04", + "UMask": "0x01" + }, + { + "EventName": "l3victimstate.t2.s2.nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x04", + "UMask": "0x01" + }, + { + "EventName": "l3victimstate.t3.s2.nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x04", + "UMask": "0x01" + }, + { + "EventName": "l3victimstate.t4.s2.nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x04", + "UMask": "0x01" + }, + { + "EventName": "l3victimstate.t5.s2.nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x04", + "UMask": "0x01" + }, + { + "EventName": "l3victimstate.t6.s2.nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x04", + "UMask": "0x01" + }, + { + "EventName": "l3victimstate.t7.s2.nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x04", + "UMask": "0x01" + }, + { + "EventName": "l3victimstate.t0.s3.nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x08", + "UMask": "0x01" + }, + { + "EventName": "l3victimstate.t1.s3.nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x08", + "UMask": "0x01" + }, + { + "EventName": "l3victimstate.t2.s3.nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x08", + "UMask": "0x01" + }, + { + "EventName": "l3victimstate.t3.s3.nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x08", + "UMask": "0x01" + }, + { + "EventName": "l3victimstate.t4.s3.nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x08", + "UMask": "0x01" + }, + { + "EventName": "l3victimstate.t5.s3.nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x08", + "UMask": "0x01" + }, + { + "EventName": "l3victimstate.t6.s3.nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x08", + "UMask": "0x01" + }, + { + "EventName": "l3victimstate.t7.s3.nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x08", + "UMask": "0x01" + }, + { + "EventName": "l3victimstate.t0.s0.none_nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x01", + "UMask": "0x02" + }, + { + "EventName": "l3victimstate.t1.s0.none_nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x01", + "UMask": "0x02" + }, + { + "EventName": "l3victimstate.t2.s0.none_nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x01", + "UMask": "0x02" + }, + { + "EventName": "l3victimstate.t3.s0.none_nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x01", + "UMask": "0x02" + }, + { + "EventName": "l3victimstate.t4.s0.none_nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x01", + "UMask": "0x02" + }, + { + "EventName": "l3victimstate.t5.s0.none_nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x01", + "UMask": "0x02" + }, + { + "EventName": "l3victimstate.t6.s0.none_nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x01", + "UMask": "0x02" + }, + { + "EventName": "l3victimstate.t7.s0.none_nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x01", + "UMask": "0x02" + }, + + { + "EventName": "l3victimstate.t0.s1.none_nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x02", + "UMask": "0x02" + }, + { + "EventName": "l3victimstate.t1.s1.none_nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x02", + "UMask": "0x02" + }, + { + "EventName": "l3victimstate.t2.s1.none_nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x02", + "UMask": "0x02" + }, + { + "EventName": "l3victimstate.t3.s1.none_nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x02", + "UMask": "0x02" + }, + { + "EventName": "l3victimstate.t4.s1.none_nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x02", + "UMask": "0x02" + }, + { + "EventName": "l3victimstate.t5.s1.none_nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x02", + "UMask": "0x02" + }, + { + "EventName": "l3victimstate.t6.s1.none_nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x02", + "UMask": "0x02" + }, + { + "EventName": "l3victimstate.t7.s1.none_nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x02", + "UMask": "0x02" + }, + { + "EventName": "l3victimstate.t0.s2.none_nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x04", + "UMask": "0x02" + }, + { + "EventName": "l3victimstate.t1.s2.none_nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x04", + "UMask": "0x02" + }, + { + "EventName": "l3victimstate.t2.s2.none_nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x04", + "UMask": "0x02" + }, + { + "EventName": "l3victimstate.t3.s2.none_nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x04", + "UMask": "0x02" + }, + { + "EventName": "l3victimstate.t4.s2.none_nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x04", + "UMask": "0x02" + }, + { + "EventName": "l3victimstate.t5.s2.none_nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x04", + "UMask": "0x02" + }, + { + "EventName": "l3victimstate.t6.s2.none_nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x04", + "UMask": "0x02" + }, + { + "EventName": "l3victimstate.t7.s2.none_nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x04", + "UMask": "0x02" + }, + { + "EventName": "l3victimstate.t0.s3.none_nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x08", + "UMask": "0x02" + }, + { + "EventName": "l3victimstate.t1.s3.none_nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x08", + "UMask": "0x02" + }, + { + "EventName": "l3victimstate.t2.s3.none_nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x08", + "UMask": "0x02" + }, + { + "EventName": "l3victimstate.t3.s3.none_nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x08", + "UMask": "0x02" + }, + { + "EventName": "l3victimstate.t4.s3.none_nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x08", + "UMask": "0x02" + }, + { + "EventName": "l3victimstate.t5.s3.none_nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x08", + "UMask": "0x02" + }, + { + "EventName": "l3victimstate.t6.s3.none_nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x08", + "UMask": "0x02" + }, + { + "EventName": "l3victimstate.t7.s3.none_nol3victimline", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x08", + "UMask": "0x02" + }, + { + "EventName": "l3victimstate.t0.s0.F_S", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x01", + "UMask": "0x04" + }, + { + "EventName": "l3victimstate.t1.s0.F_S", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x01", + "UMask": "0x04" + }, + { + "EventName": "l3victimstate.t2.s0.F_S", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x01", + "UMask": "0x04" + }, + { + "EventName": "l3victimstate.t3.s0.F_S", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x01", + "UMask": "0x04" + }, + { + "EventName": "l3victimstate.t4.s0.F_S", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x01", + "UMask": "0x04" + }, + { + "EventName": "l3victimstate.t5.s0.F_S", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x01", + "UMask": "0x04" + }, + { + "EventName": "l3victimstate.t6.s0.F_S", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x01", + "UMask": "0x04" + }, + { + "EventName": "l3victimstate.t7.s0.F_S", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x01", + "UMask": "0x04" + }, + + { + "EventName": "l3victimstate.t0.s1.F_S", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x02", + "UMask": "0x04" + }, + { + "EventName": "l3victimstate.t1.s1.F_S", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x02", + "UMask": "0x04" + }, + { + "EventName": "l3victimstate.t2.s1.F_S", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x02", + "UMask": "0x04" + }, + { + "EventName": "l3victimstate.t3.s1.F_S", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x02", + "UMask": "0x04" + }, + { + "EventName": "l3victimstate.t4.s1.F_S", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x02", + "UMask": "0x04" + }, + { + "EventName": "l3victimstate.t5.s1.F_S", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x02", + "UMask": "0x04" + }, + { + "EventName": "l3victimstate.t6.s1.F_S", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x02", + "UMask": "0x04" + }, + { + "EventName": "l3victimstate.t7.s1.F_S", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x02", + "UMask": "0x04" + }, + { + "EventName": "l3victimstate.t0.s2.F_S", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x04", + "UMask": "0x04" + }, + { + "EventName": "l3victimstate.t1.s2.F_S", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x04", + "UMask": "0x04" + }, + { + "EventName": "l3victimstate.t2.s2.F_S", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x04", + "UMask": "0x04" + }, + { + "EventName": "l3victimstate.t3.s2.F_S", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x04", + "UMask": "0x04" + }, + { + "EventName": "l3victimstate.t4.s2.F_S", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x04", + "UMask": "0x04" + }, + { + "EventName": "l3victimstate.t5.s2.F_S", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x04", + "UMask": "0x04" + }, + { + "EventName": "l3victimstate.t6.s2.F_S", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x04", + "UMask": "0x04" + }, + { + "EventName": "l3victimstate.t7.s2.F_S", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x04", + "UMask": "0x04" + }, + { + "EventName": "l3victimstate.t0.s3.F_S", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x08", + "UMask": "0x04" + }, + { + "EventName": "l3victimstate.t1.s3.F_S", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x08", + "UMask": "0x04" + }, + { + "EventName": "l3victimstate.t2.s3.F_S", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x08", + "UMask": "0x04" + }, + { + "EventName": "l3victimstate.t3.s3.F_S", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x08", + "UMask": "0x04" + }, + { + "EventName": "l3victimstate.t4.s3.F_S", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x08", + "UMask": "0x04" + }, + { + "EventName": "l3victimstate.t5.s3.F_S", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x08", + "UMask": "0x04" + }, + { + "EventName": "l3victimstate.t6.s3.F_S", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x08", + "UMask": "0x04" + }, + { + "EventName": "l3victimstate.t7.s3.F_S", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x08", + "UMask": "0x04" + }, + { + "EventName": "l3victimstate.t0.s0.o", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x01", + "UMask": "0x08" + }, + { + "EventName": "l3victimstate.t1.s0.o", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x01", + "UMask": "0x08" + }, + { + "EventName": "l3victimstate.t2.s0.o", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x01", + "UMask": "0x08" + }, + { + "EventName": "l3victimstate.t3.s0.o", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x01", + "UMask": "0x08" + }, + { + "EventName": "l3victimstate.t4.s0.o", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x01", + "UMask": "0x08" + }, + { + "EventName": "l3victimstate.t5.s0.o", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x01", + "UMask": "0x08" + }, + { + "EventName": "l3victimstate.t6.s0.o", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x01", + "UMask": "0x08" + }, + { + "EventName": "l3victimstate.t7.s0.o", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x01", + "UMask": "0x08" + }, + + { + "EventName": "l3victimstate.t0.s1.o", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x02", + "UMask": "0x08" + }, + { + "EventName": "l3victimstate.t1.s1.o", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x02", + "UMask": "0x08" + }, + { + "EventName": "l3victimstate.t2.s1.o", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x02", + "UMask": "0x08" + }, + { + "EventName": "l3victimstate.t3.s1.o", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x02", + "UMask": "0x08" + }, + { + "EventName": "l3victimstate.t4.s1.o", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x02", + "UMask": "0x08" + }, + { + "EventName": "l3victimstate.t5.s1.o", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x02", + "UMask": "0x08" + }, + { + "EventName": "l3victimstate.t6.s1.o", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x02", + "UMask": "0x08" + }, + { + "EventName": "l3victimstate.t7.s1.o", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x02", + "UMask": "0x08" + }, + { + "EventName": "l3victimstate.t0.s2.o", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x04", + "UMask": "0x08" + }, + { + "EventName": "l3victimstate.t1.s2.o", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x04", + "UMask": "0x08" + }, + { + "EventName": "l3victimstate.t2.s2.o", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x04", + "UMask": "0x08" + }, + { + "EventName": "l3victimstate.t3.s2.o", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x04", + "UMask": "0x08" + }, + { + "EventName": "l3victimstate.t4.s2.o", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x04", + "UMask": "0x08" + }, + { + "EventName": "l3victimstate.t5.s2.o", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x04", + "UMask": "0x08" + }, + { + "EventName": "l3victimstate.t6.s2.o", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x04", + "UMask": "0x08" + }, + { + "EventName": "l3victimstate.t7.s2.o", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x04", + "UMask": "0x08" + }, + { + "EventName": "l3victimstate.t0.s3.o", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x08", + "UMask": "0x08" + }, + { + "EventName": "l3victimstate.t1.s3.o", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x08", + "UMask": "0x08" + }, + { + "EventName": "l3victimstate.t2.s3.o", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x08", + "UMask": "0x08" + }, + { + "EventName": "l3victimstate.t3.s3.o", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x08", + "UMask": "0x08" + }, + { + "EventName": "l3victimstate.t4.s3.o", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x08", + "UMask": "0x08" + }, + { + "EventName": "l3victimstate.t5.s3.o", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x08", + "UMask": "0x08" + }, + { + "EventName": "l3victimstate.t6.s3.o", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x08", + "UMask": "0x08" + }, + { + "EventName": "l3victimstate.t7.s3.o", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x08", + "UMask": "0x08" + }, + { + "EventName": "l3victimstate.t0.s0.e_fe", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x01", + "UMask": "0x10" + }, + { + "EventName": "l3victimstate.t1.s0.e_fe", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x01", + "UMask": "0x10" + }, + { + "EventName": "l3victimstate.t2.s0.e_fe", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x01", + "UMask": "0x10" + }, + { + "EventName": "l3victimstate.t3.s0.e_fe", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x01", + "UMask": "0x10" + }, + { + "EventName": "l3victimstate.t4.s0.e_fe", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x01", + "UMask": "0x10" + }, + { + "EventName": "l3victimstate.t5.s0.e_fe", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x01", + "UMask": "0x10" + }, + { + "EventName": "l3victimstate.t6.s0.e_fe", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x01", + "UMask": "0x10" + }, + { + "EventName": "l3victimstate.t7.s0.e_fe", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x01", + "UMask": "0x10" + }, + + { + "EventName": "l3victimstate.t0.s1.e_fe", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x02", + "UMask": "0x10" + }, + { + "EventName": "l3victimstate.t1.s1.e_fe", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x02", + "UMask": "0x10" + }, + { + "EventName": "l3victimstate.t2.s1.e_fe", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x02", + "UMask": "0x10" + }, + { + "EventName": "l3victimstate.t3.s1.e_fe", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x02", + "UMask": "0x10" + }, + { + "EventName": "l3victimstate.t4.s1.e_fe", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x02", + "UMask": "0x10" + }, + { + "EventName": "l3victimstate.t5.s1.e_fe", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x02", + "UMask": "0x10" + }, + { + "EventName": "l3victimstate.t6.s1.e_fe", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x02", + "UMask": "0x10" + }, + { + "EventName": "l3victimstate.t7.s1.e_fe", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x02", + "UMask": "0x10" + }, + { + "EventName": "l3victimstate.t0.s2.e_fe", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x04", + "UMask": "0x10" + }, + { + "EventName": "l3victimstate.t1.s2.e_fe", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x04", + "UMask": "0x10" + }, + { + "EventName": "l3victimstate.t2.s2.e_fe", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x04", + "UMask": "0x10" + }, + { + "EventName": "l3victimstate.t3.s2.e_fe", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x04", + "UMask": "0x10" + }, + { + "EventName": "l3victimstate.t4.s2.e_fe", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x04", + "UMask": "0x10" + }, + { + "EventName": "l3victimstate.t5.s2.e_fe", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x04", + "UMask": "0x10" + }, + { + "EventName": "l3victimstate.t6.s2.e_fe", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x04", + "UMask": "0x10" + }, + { + "EventName": "l3victimstate.t7.s2.e_fe", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x04", + "UMask": "0x10" + }, + { + "EventName": "l3victimstate.t0.s3.e_fe", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x08", + "UMask": "0x10" + }, + { + "EventName": "l3victimstate.t1.s3.e_fe", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x08", + "UMask": "0x10" + }, + { + "EventName": "l3victimstate.t2.s3.e_fe", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x08", + "UMask": "0x10" + }, + { + "EventName": "l3victimstate.t3.s3.e_fe", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x08", + "UMask": "0x10" + }, + { + "EventName": "l3victimstate.t4.s3.e_fe", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x08", + "UMask": "0x10" + }, + { + "EventName": "l3victimstate.t5.s3.e_fe", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x08", + "UMask": "0x10" + }, + { + "EventName": "l3victimstate.t6.s3.e_fe", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x08", + "UMask": "0x10" + }, + { + "EventName": "l3victimstate.t7.s3.e_fe", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x08" + }, + { + "EventName": "l3victimstate.t0.s0.m", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x01", + "UMask": "0x20" + }, + { + "EventName": "l3victimstate.t1.s0.m", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x01", + "UMask": "0x20" + }, + { + "EventName": "l3victimstate.t2.s0.m", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x01", + "UMask": "0x20" + }, + { + "EventName": "l3victimstate.t3.s0.m", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x01", + "UMask": "0x20" + }, + { + "EventName": "l3victimstate.t4.s0.m", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x01", + "UMask": "0x20" + }, + { + "EventName": "l3victimstate.t5.s0.m", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x01", + "UMask": "0x20" + }, + { + "EventName": "l3victimstate.t6.s0.m", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x01", + "UMask": "0x20" + }, + { + "EventName": "l3victimstate.t7.s0.m", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x01", + "UMask": "0x20" + }, + + { + "EventName": "l3victimstate.t0.s1.m", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x02", + "UMask": "0x20" + }, + { + "EventName": "l3victimstate.t1.s1.m", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x02", + "UMask": "0x20" + }, + { + "EventName": "l3victimstate.t2.s1.m", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x02", + "UMask": "0x20" + }, + { + "EventName": "l3victimstate.t3.s1.m", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x02", + "UMask": "0x20" + }, + { + "EventName": "l3victimstate.t4.s1.m", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x02", + "UMask": "0x20" + }, + { + "EventName": "l3victimstate.t5.s1.m", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x02", + "UMask": "0x20" + }, + { + "EventName": "l3victimstate.t6.s1.m", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x02", + "UMask": "0x20" + }, + { + "EventName": "l3victimstate.t7.s1.m", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x02", + "UMask": "0x20" + }, + { + "EventName": "l3victimstate.t0.s2.m", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x04", + "UMask": "0x20" + }, + { + "EventName": "l3victimstate.t1.s2.m", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x04", + "UMask": "0x20" + }, + { + "EventName": "l3victimstate.t2.s2.m", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x04", + "UMask": "0x20" + }, + { + "EventName": "l3victimstate.t3.s2.m", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x04", + "UMask": "0x20" + }, + { + "EventName": "l3victimstate.t4.s2.m", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x04", + "UMask": "0x20" + }, + { + "EventName": "l3victimstate.t5.s2.m", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x04", + "UMask": "0x20" + }, + { + "EventName": "l3victimstate.t6.s2.m", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x04", + "UMask": "0x20" + }, + { + "EventName": "l3victimstate.t7.s2.m", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x04", + "UMask": "0x20" + }, + { + "EventName": "l3victimstate.t0.s3.m", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x08", + "UMask": "0x20" + }, + { + "EventName": "l3victimstate.t1.s3.m", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x08", + "UMask": "0x20" + }, + { + "EventName": "l3victimstate.t2.s3.m", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x08", + "UMask": "0x20" + }, + { + "EventName": "l3victimstate.t3.s3.m", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x08", + "UMask": "0x20" + }, + { + "EventName": "l3victimstate.t4.s3.m", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x08", + "UMask": "0x20" + }, + { + "EventName": "l3victimstate.t5.s3.m", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x08", + "UMask": "0x20" + }, + { + "EventName": "l3victimstate.t6.s3.m", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x08", + "UMask": "0x20" + }, + { + "EventName": "l3victimstate.t7.s3.m", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x08", + "UMask": "0x20" + }, + { + "EventName": "l3victimstate.t0.s0.d", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x01", + "UMask": "0x40" + }, + { + "EventName": "l3victimstate.t1.s0.d", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x01", + "UMask": "0x40" + }, + { + "EventName": "l3victimstate.t2.s0.d", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x01", + "UMask": "0x40" + }, + { + "EventName": "l3victimstate.t3.s0.d", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x01", + "UMask": "0x40" + }, + { + "EventName": "l3victimstate.t4.s0.d", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x01", + "UMask": "0x40" + }, + { + "EventName": "l3victimstate.t5.s0.d", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x01", + "UMask": "0x40" + }, + { + "EventName": "l3victimstate.t6.s0.d", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x01", + "UMask": "0x40" + }, + { + "EventName": "l3victimstate.t7.s0.d", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x01", + "UMask": "0x40" + }, + + { + "EventName": "l3victimstate.t0.s1.d", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x02", + "UMask": "0x40" + }, + { + "EventName": "l3victimstate.t1.s1.d", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x02", + "UMask": "0x40" + }, + { + "EventName": "l3victimstate.t2.s1.d", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x02", + "UMask": "0x40" + }, + { + "EventName": "l3victimstate.t3.s1.d", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x02", + "UMask": "0x40" + }, + { + "EventName": "l3victimstate.t4.s1.d", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x02", + "UMask": "0x40" + }, + { + "EventName": "l3victimstate.t5.s1.d", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x02", + "UMask": "0x40" + }, + { + "EventName": "l3victimstate.t6.s1.d", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x02", + "UMask": "0x40" + }, + { + "EventName": "l3victimstate.t7.s1.d", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x02", + "UMask": "0x40" + }, + { + "EventName": "l3victimstate.t0.s2.d", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x04", + "UMask": "0x40" + }, + { + "EventName": "l3victimstate.t1.s2.d", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x04", + "UMask": "0x40" + }, + { + "EventName": "l3victimstate.t2.s2.d", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x04", + "UMask": "0x40" + }, + { + "EventName": "l3victimstate.t3.s2.d", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x04", + "UMask": "0x40" + }, + { + "EventName": "l3victimstate.t4.s2.d", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x04", + "UMask": "0x40" + }, + { + "EventName": "l3victimstate.t5.s2.d", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x04", + "UMask": "0x40" + }, + { + "EventName": "l3victimstate.t6.s2.d", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x04", + "UMask": "0x40" + }, + { + "EventName": "l3victimstate.t7.s2.d", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x04", + "UMask": "0x40" + }, + { + "EventName": "l3victimstate.t0.s3.d", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x08", + "UMask": "0x40" + }, + { + "EventName": "l3victimstate.t1.s3.d", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x08", + "UMask": "0x40" + }, + { + "EventName": "l3victimstate.t2.s3.d", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x08", + "UMask": "0x40" + }, + { + "EventName": "l3victimstate.t3.s3.d", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x08", + "UMask": "0x40" + }, + { + "EventName": "l3victimstate.t4.s3.d", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x08", + "UMask": "0x40" + }, + { + "EventName": "l3victimstate.t5.s3.d", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x08", + "UMask": "0x40" + }, + { + "EventName": "l3victimstate.t6.s3.d", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x08", + "UMask": "0x40" + }, + { + "EventName": "l3victimstate.t7.s3.d", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x08", + "UMask": "0x40" + }, + { + "EventName": "l3victimstate.t0.s0.od", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x01", + "UMask": "0x80" + }, + { + "EventName": "l3victimstate.t1.s0.od", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x01", + "UMask": "0x80" + }, + { + "EventName": "l3victimstate.t2.s0.od", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x01", + "UMask": "0x80" + }, + { + "EventName": "l3victimstate.t3.s0.od", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x01", + "UMask": "0x80" + }, + { + "EventName": "l3victimstate.t4.s0.od", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x01", + "UMask": "0x80" + }, + { + "EventName": "l3victimstate.t5.s0.od", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x01", + "UMask": "0x80" + }, + { + "EventName": "l3victimstate.t6.s0.od", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x01", + "UMask": "0x80" + }, + { + "EventName": "l3victimstate.t7.s0.od", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x01", + "UMask": "0x80" + }, + + { + "EventName": "l3victimstate.t0.s1.od", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x02", + "UMask": "0x80" + }, + { + "EventName": "l3victimstate.t1.s1.od", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x02", + "UMask": "0x80" + }, + { + "EventName": "l3victimstate.t2.s1.od", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x02", + "UMask": "0x80" + }, + { + "EventName": "l3victimstate.t3.s1.od", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x02", + "UMask": "0x80" + }, + { + "EventName": "l3victimstate.t4.s1.od", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x02", + "UMask": "0x80" + }, + { + "EventName": "l3victimstate.t5.s1.od", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x02", + "UMask": "0x80" + }, + { + "EventName": "l3victimstate.t6.s1.od", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x02", + "UMask": "0x80" + }, + { + "EventName": "l3victimstate.t7.s1.od", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x02", + "UMask": "0x80" + }, + { + "EventName": "l3victimstate.t0.s2.od", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x04", + "UMask": "0x80" + }, + { + "EventName": "l3victimstate.t1.s2.od", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x04", + "UMask": "0x80" + }, + { + "EventName": "l3victimstate.t2.s2.od", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x04", + "UMask": "0x80" + }, + { + "EventName": "l3victimstate.t3.s2.od", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x04", + "UMask": "0x80" + }, + { + "EventName": "l3victimstate.t4.s2.od", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x04", + "UMask": "0x80" + }, + { + "EventName": "l3victimstate.t5.s2.od", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x04", + "UMask": "0x80" + }, + { + "EventName": "l3victimstate.t6.s2.od", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x04", + "UMask": "0x80" + }, + { + "EventName": "l3victimstate.t7.s2.od", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x04", + "UMask": "0x80" + }, + { + "EventName": "l3victimstate.t0.s3.od", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x01", + "L3SliceMask": "0x08", + "UMask": "0x80" + }, + { + "EventName": "l3victimstate.t1.s3.od", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x02", + "L3SliceMask": "0x08", + "UMask": "0x80" + }, + { + "EventName": "l3victimstate.t2.s3.od", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x04", + "L3SliceMask": "0x08", + "UMask": "0x80" + }, + { + "EventName": "l3victimstate.t3.s3.od", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x08", + "L3SliceMask": "0x08", + "UMask": "0x80" + }, + { + "EventName": "l3victimstate.t4.s3.od", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x10", + "L3SliceMask": "0x08", + "UMask": "0x80" + }, + { + "EventName": "l3victimstate.t5.s3.od", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x20", + "L3SliceMask": "0x08", + "UMask": "0x80" + }, + { + "EventName": "l3victimstate.t6.s3.od", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x40", + "L3SliceMask": "0x08", + "UMask": "0x80" + }, + { + "EventName": "l3victimstate.t7.s3.od", + "EventCode": "0x09", + "BriefDescription": "L3 Cache Performance Monitor Counters L3 Victim State", + "L3ThreadMask": "0x80", + "L3SliceMask": "0x08", + "UMask": "0x80" + } + +] + diff --git a/lib/libpmc/pmu-events/jevents.c b/lib/libpmc/pmu-events/jevents.c index c92616b716d9..4bf9d7e1d5e3 100644 --- a/lib/libpmc/pmu-events/jevents.c +++ b/lib/libpmc/pmu-events/jevents.c @@ -184,6 +184,8 @@ static struct field { { "SampleAfterValue", "period=" }, { "FCMask", "fc_mask=" }, { "PortMask", "ch_mask=" }, + { "L3ThreadMask", "l3_thread_mask=" }, + { "L3SliceMask", "l3_slice_mask=" }, { NULL, NULL } }; diff --git a/sys/dev/hwpmc/hwpmc_amd.c b/sys/dev/hwpmc/hwpmc_amd.c index 1b0470606368..9610ff6b01f0 100644 --- a/sys/dev/hwpmc/hwpmc_amd.c +++ b/sys/dev/hwpmc/hwpmc_amd.c @@ -105,7 +105,139 @@ static struct amd_descr amd_pmcdesc[AMD_NPMCS] = }, .pm_evsel = AMD_PMC_EVSEL_3, .pm_perfctr = AMD_PMC_PERFCTR_3 - } + }, + { + .pm_descr = + { + .pd_name = "", + .pd_class = -1, + .pd_caps = AMD_PMC_CAPS, + .pd_width = 48 + }, + .pm_evsel = AMD_PMC_EVSEL_4, + .pm_perfctr = AMD_PMC_PERFCTR_4 + }, + { + .pm_descr = + { + .pd_name = "", + .pd_class = -1, + .pd_caps = AMD_PMC_CAPS, + .pd_width = 48 + }, + .pm_evsel = AMD_PMC_EVSEL_5, + .pm_perfctr = AMD_PMC_PERFCTR_5 + }, + { + .pm_descr = + { + .pd_name = "", + .pd_class = -1, + .pd_caps = AMD_PMC_CAPS, + .pd_width = 48 + }, + .pm_evsel = AMD_PMC_EVSEL_EP_L3_0, + .pm_perfctr = AMD_PMC_PERFCTR_EP_L3_0 + }, + { + .pm_descr = + { + .pd_name = "", + .pd_class = -1, + .pd_caps = AMD_PMC_CAPS, + .pd_width = 48 + }, + .pm_evsel = AMD_PMC_EVSEL_EP_L3_1, + .pm_perfctr = AMD_PMC_PERFCTR_EP_L3_1 + }, + { + .pm_descr = + { + .pd_name = "", + .pd_class = -1, + .pd_caps = AMD_PMC_CAPS, + .pd_width = 48 + }, + .pm_evsel = AMD_PMC_EVSEL_EP_L3_2, + .pm_perfctr = AMD_PMC_PERFCTR_EP_L3_2 + }, + { + .pm_descr = + { + .pd_name = "", + .pd_class = -1, + .pd_caps = AMD_PMC_CAPS, + .pd_width = 48 + }, + .pm_evsel = AMD_PMC_EVSEL_EP_L3_3, + .pm_perfctr = AMD_PMC_PERFCTR_EP_L3_3 + }, + { + .pm_descr = + { + .pd_name = "", + .pd_class = -1, + .pd_caps = AMD_PMC_CAPS, + .pd_width = 48 + }, + .pm_evsel = AMD_PMC_EVSEL_EP_L3_4, + .pm_perfctr = AMD_PMC_PERFCTR_EP_L3_4 + }, + { + .pm_descr = + { + .pd_name = "", + .pd_class = -1, + .pd_caps = AMD_PMC_CAPS, + .pd_width = 48 + }, + .pm_evsel = AMD_PMC_EVSEL_EP_L3_5, + .pm_perfctr = AMD_PMC_PERFCTR_EP_L3_5 + }, + { + .pm_descr = + { + .pd_name = "", + .pd_class = -1, + .pd_caps = AMD_PMC_CAPS, + .pd_width = 48 + }, + .pm_evsel = AMD_PMC_EVSEL_EP_DF_0, + .pm_perfctr = AMD_PMC_PERFCTR_EP_DF_0 + }, + { + .pm_descr = + { + .pd_name = "", + .pd_class = -1, + .pd_caps = AMD_PMC_CAPS, + .pd_width = 48 + }, + .pm_evsel = AMD_PMC_EVSEL_EP_DF_1, + .pm_perfctr = AMD_PMC_PERFCTR_EP_DF_1 + }, + { + .pm_descr = + { + .pd_name = "", + .pd_class = -1, + .pd_caps = AMD_PMC_CAPS, + .pd_width = 48 + }, + .pm_evsel = AMD_PMC_EVSEL_EP_DF_2, + .pm_perfctr = AMD_PMC_PERFCTR_EP_DF_2 + }, + { + .pm_descr = + { + .pd_name = "", + .pd_class = -1, + .pd_caps = AMD_PMC_CAPS, + .pd_width = 48 + }, + .pm_evsel = AMD_PMC_EVSEL_EP_DF_3, + .pm_perfctr = AMD_PMC_PERFCTR_EP_DF_3 + } }; struct amd_event_code_map { @@ -435,7 +567,7 @@ amd_allocate_pmc(int cpu, int ri, struct pmc *pm, const struct pmc_op_pmcallocate *a) { int i; - uint32_t allowed_unitmask, caps, config, unitmask; + uint64_t allowed_unitmask, caps, config, unitmask; enum pmc_event pe; const struct pmc_descr *pd; @@ -456,6 +588,13 @@ amd_allocate_pmc(int cpu, int ri, struct pmc *pm, PMCDBG2(MDP,ALL,1,"amd-allocate ri=%d caps=0x%x", ri, caps); + if((ri >= 0 && ri < 6) && !(a->pm_md.pm_amd.pm_amd_sub_class == PMC_AMD_SUB_CLASS_CORE)) + return EINVAL; + if((ri >= 6 && ri < 12) && !(a->pm_md.pm_amd.pm_amd_sub_class == PMC_AMD_SUB_CLASS_L3_CACHE)) + return EINVAL; + if((ri >= 12 && ri < 16) && !(a->pm_md.pm_amd.pm_amd_sub_class == PMC_AMD_SUB_CLASS_DATA_FABRIC)) + return EINVAL; + if ((pd->pd_caps & caps) != caps) return EPERM; if (strlen(pmc_cpuid) != 0) { @@ -556,7 +695,7 @@ amd_release_pmc(int cpu, int ri, struct pmc *pmc) static int amd_start_pmc(int cpu, int ri) { - uint32_t config; + uint64_t config; struct pmc *pm; struct pmc_hw *phw; const struct amd_descr *pd; @@ -636,7 +775,7 @@ static int amd_intr(struct trapframe *tf) { int i, error, retval, cpu; - uint32_t config, evsel, perfctr; + uint64_t config, evsel, perfctr; struct pmc *pm; struct amd_cpu *pac; pmc_value_t v; @@ -688,8 +827,8 @@ amd_intr(struct trapframe *tf) KASSERT((config & ~AMD_PMC_ENABLE) == (pm->pm_md.pm_amd.pm_amd_evsel & ~AMD_PMC_ENABLE), - ("[amd,%d] config mismatch reg=0x%x pm=0x%x", __LINE__, - config, pm->pm_md.pm_amd.pm_amd_evsel)); + ("[amd,%d] config mismatch reg=0x%jx pm=0x%jx", __LINE__, + (uintmax_t)config, (uintmax_t)pm->pm_md.pm_amd.pm_amd_evsel)); wrmsr(evsel, config & ~AMD_PMC_ENABLE); wrmsr(perfctr, AMD_RELOAD_COUNT_TO_PERFCTR_VALUE(v)); diff --git a/sys/dev/hwpmc/hwpmc_amd.h b/sys/dev/hwpmc/hwpmc_amd.h index 2eb5a2d3ce15..9cf5260bf8b9 100644 --- a/sys/dev/hwpmc/hwpmc_amd.h +++ b/sys/dev/hwpmc/hwpmc_amd.h @@ -44,10 +44,40 @@ #define AMD_PMC_PERFCTR_1 0xC0010005 #define AMD_PMC_PERFCTR_2 0xC0010006 #define AMD_PMC_PERFCTR_3 0xC0010007 +/* CORE */ +#define AMD_PMC_EVSEL_4 0xC0010208 +#define AMD_PMC_EVSEL_5 0xC001020A + +#define AMD_PMC_PERFCTR_4 0xC0010209 +#define AMD_PMC_PERFCTR_5 0xC001020B +/* L3 */ +#define AMD_PMC_EVSEL_EP_L3_0 0xC0010230 +#define AMD_PMC_EVSEL_EP_L3_1 0xC0010232 +#define AMD_PMC_EVSEL_EP_L3_2 0xC0010234 +#define AMD_PMC_EVSEL_EP_L3_3 0xC0010236 +#define AMD_PMC_EVSEL_EP_L3_4 0xC0010238 +#define AMD_PMC_EVSEL_EP_L3_5 0xC001023A + +#define AMD_PMC_PERFCTR_EP_L3_0 0xC0010231 +#define AMD_PMC_PERFCTR_EP_L3_1 0xC0010233 +#define AMD_PMC_PERFCTR_EP_L3_2 0xC0010235 +#define AMD_PMC_PERFCTR_EP_L3_3 0xC0010237 +#define AMD_PMC_PERFCTR_EP_L3_4 0xC0010239 +#define AMD_PMC_PERFCTR_EP_L3_5 0xC001023B +/* DF */ +#define AMD_PMC_EVSEL_EP_DF_0 0xC0010240 +#define AMD_PMC_EVSEL_EP_DF_1 0xC0010242 +#define AMD_PMC_EVSEL_EP_DF_2 0xC0010244 +#define AMD_PMC_EVSEL_EP_DF_3 0xC0010246 + +#define AMD_PMC_PERFCTR_EP_DF_0 0xC0010241 +#define AMD_PMC_PERFCTR_EP_DF_1 0xC0010243 +#define AMD_PMC_PERFCTR_EP_DF_2 0xC0010245 +#define AMD_PMC_PERFCTR_EP_DF_3 0xC0010247 + +#define AMD_NPMCS 16 -#define AMD_NPMCS 4 - #define AMD_PMC_COUNTERMASK 0xFF000000 #define AMD_PMC_TO_COUNTER(x) (((x) << 24) & AMD_PMC_COUNTERMASK) #define AMD_PMC_INVERT (1 << 23) @@ -57,6 +87,10 @@ #define AMD_PMC_EDGE (1 << 18) #define AMD_PMC_OS (1 << 17) #define AMD_PMC_USR (1 << 16) +#define AMD_PMC_L3SLICEMASK (0x000F000000000000) +#define AMD_PMC_L3COREMASK (0xFF00000000000000) +#define AMD_PMC_TO_L3SLICE(x) (((x) << 48) & AMD_PMC_L3SLICEMASK) +#define AMD_PMC_TO_L3CORE(x) (((x) << 56) & AMD_PMC_L3COREMASK) #define AMD_PMC_UNITMASK_M 0x10 #define AMD_PMC_UNITMASK_O 0x08 @@ -70,6 +104,7 @@ #define AMD_PMC_TO_UNITMASK(x) (((x) << 8) & AMD_PMC_UNITMASK) #define AMD_PMC_TO_EVENTMASK(x) (((x) & 0xFF) | (((uint64_t)(x) & 0xF00) << 24)) +#define AMD_PMC_TO_EVENTMASK_DF(x) (((x) & 0xFF) | (((uint64_t)(x) & 0x0F00) << 24)) | (((uint64_t)(x) & 0x3000) << 47) #define AMD_VALID_BITS (AMD_PMC_COUNTERMASK | AMD_PMC_INVERT | \ AMD_PMC_ENABLE | AMD_PMC_INT | AMD_PMC_PC | AMD_PMC_EDGE | \ AMD_PMC_OS | AMD_PMC_USR | AMD_PMC_UNITMASK | AMD_PMC_EVENTMASK) @@ -84,15 +119,22 @@ #define AMD_RELOAD_COUNT_TO_PERFCTR_VALUE(V) (-(V)) #define AMD_PERFCTR_VALUE_TO_RELOAD_COUNT(P) (-(P)) +enum sub_class{ + PMC_AMD_SUB_CLASS_CORE, + PMC_AMD_SUB_CLASS_L3_CACHE, + PMC_AMD_SUB_CLASS_DATA_FABRIC +}; + struct pmc_md_amd_op_pmcallocate { - uint32_t pm_amd_config; + uint64_t pm_amd_config; + uint32_t pm_amd_sub_class; }; #ifdef _KERNEL /* MD extension for 'struct pmc' */ struct pmc_md_amd_pmc { - uint32_t pm_amd_evsel; + uint64_t pm_amd_evsel; }; #endif /* _KERNEL */ -- cgit v1.3