From owner-svn-soc-all@FreeBSD.ORG Mon Jul 21 09:47:55 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C59F5D2D for ; Mon, 21 Jul 2014 09:47:55 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AF6E12E60 for ; Mon, 21 Jul 2014 09:47:55 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6L9lt50064784 for ; Mon, 21 Jul 2014 09:47:55 GMT (envelope-from zkorchev@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s6L9lsQ9064777 for svn-soc-all@FreeBSD.org; Mon, 21 Jul 2014 09:47:54 GMT (envelope-from zkorchev@FreeBSD.org) Date: Mon, 21 Jul 2014 09:47:54 GMT Message-Id: <201407210947.s6L9lsQ9064777@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to zkorchev@FreeBSD.org using -f From: zkorchev@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r271186 - soc2014/zkorchev/freebsd_head/usr.bin/w MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2014 09:47:55 -0000 Author: zkorchev Date: Mon Jul 21 09:47:53 2014 New Revision: 271186 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271186 Log: libsol support for w/uptime Modified: soc2014/zkorchev/freebsd_head/usr.bin/w/Makefile soc2014/zkorchev/freebsd_head/usr.bin/w/extern.h soc2014/zkorchev/freebsd_head/usr.bin/w/pr_time.c soc2014/zkorchev/freebsd_head/usr.bin/w/w.c Modified: soc2014/zkorchev/freebsd_head/usr.bin/w/Makefile ============================================================================== --- soc2014/zkorchev/freebsd_head/usr.bin/w/Makefile Mon Jul 21 08:47:54 2014 (r271185) +++ soc2014/zkorchev/freebsd_head/usr.bin/w/Makefile Mon Jul 21 09:47:53 2014 (r271186) @@ -4,8 +4,9 @@ PROG= w SRCS= fmt.c pr_time.c proc_compare.c w.c MAN= w.1 uptime.1 +CFLAGS+=-DSOL_ON -I/usr/local/include DPADD= ${LIBKVM} ${LIBUTIL} -LDADD= -lkvm -lutil +LDADD= -lkvm -lutil -lsol #BINGRP= kmem #BINMODE=2555 LINKS= ${BINDIR}/w ${BINDIR}/uptime Modified: soc2014/zkorchev/freebsd_head/usr.bin/w/extern.h ============================================================================== --- soc2014/zkorchev/freebsd_head/usr.bin/w/extern.h Mon Jul 21 08:47:54 2014 (r271185) +++ soc2014/zkorchev/freebsd_head/usr.bin/w/extern.h Mon Jul 21 09:47:53 2014 (r271186) @@ -32,6 +32,11 @@ extern int use_ampm; +#if defined(SOL_ON) +extern struct sol_stream sol_stream; +#endif +extern int sol_format; + struct kinfo_proc; int pr_attime(time_t *, time_t *); int pr_idle(time_t); Modified: soc2014/zkorchev/freebsd_head/usr.bin/w/pr_time.c ============================================================================== --- soc2014/zkorchev/freebsd_head/usr.bin/w/pr_time.c Mon Jul 21 08:47:54 2014 (r271185) +++ soc2014/zkorchev/freebsd_head/usr.bin/w/pr_time.c Mon Jul 21 09:47:53 2014 (r271186) @@ -41,6 +41,9 @@ #include #include #include +#if defined(SOL_ON) +# include +#endif #include "extern.h" @@ -56,14 +59,18 @@ time_t diff; const wchar_t *fmt; int len, width, offset = 0; + static char sol_buf[256]; + const char *sol_fmt; tp = *localtime(started); tm = *localtime(now); diff = *now - *started; /* If more than a week, use day-month-year. */ - if (diff > 86400 * 7) + if (diff > 86400 * 7) { fmt = L"%d%b%y"; + sol_fmt = "%d%b%y"; + } /* If not today, use day-hour-am/pm. */ else if (tm.tm_mday != tp.tm_mday || @@ -72,23 +79,36 @@ /* The line below does not take DST into consideration */ /* else if (*now / 86400 != *started / 86400) { */ fmt = use_ampm ? L"%a%I%p" : L"%a%H"; + sol_fmt = use_ampm ? "%a%I%p" : "%a%H"; } /* Default is hh:mm{am,pm}. */ else { fmt = use_ampm ? L"%l:%M%p" : L"%k:%M"; + sol_fmt = use_ampm ? "%l:%M%p" : "%k:%M"; } - (void)wcsftime(buf, sizeof(buf), fmt, &tp); - len = wcslen(buf); - width = wcswidth(buf, len); - if (len == width) - (void)wprintf(L"%-7.7ls", buf); - else if (width < 7) - (void)wprintf(L"%ls%.*s", buf, 7 - width, " "); - else { - (void)wprintf(L"%ls", buf); - offset = width - 7; +#if defined(SOL_ON) + if (sol_format) + { + SOL_MAP_KEYL(&sol_stream, "login"); + strftime(sol_buf, sizeof(sol_buf), sol_fmt, &tp); + sol_string(&sol_stream, sol_buf, strlen(sol_buf)); + } + else +#endif + { + (void)wcsftime(buf, sizeof(buf), fmt, &tp); + len = wcslen(buf); + width = wcswidth(buf, len); + if (len == width) + (void)wprintf(L"%-7.7ls", buf); + else if (width < 7) + (void)wprintf(L"%ls%.*s", buf, 7 - width, " "); + else { + (void)wprintf(L"%ls", buf); + offset = width - 7; + } } return (offset); } @@ -104,7 +124,14 @@ /* If idle more than 36 hours, print as a number of days. */ if (idle >= 36 * 3600) { int days = idle / 86400; - (void)printf(" %dday%s ", days, days > 1 ? "s" : " " ); +#if defined(SOL_ON) + if (sol_format) { + SOL_MAP_KEYL(&sol_stream, "days"); + sol_integer(&sol_stream, days); + } + else +#endif + (void)printf(" %dday%s ", days, days > 1 ? "s" : " " ); if (days >= 100) return (2); if (days >= 10) @@ -112,16 +139,38 @@ } /* If idle more than an hour, print as HH:MM. */ - else if (idle >= 3600) - (void)printf(" %2d:%02d ", - (int)(idle / 3600), (int)((idle % 3600) / 60)); + else if (idle >= 3600) { +#if defined(SOL_ON) + if (sol_format) { + SOL_MAP_KEYL(&sol_stream, "hours"); + sol_integer(&sol_stream, idle / 3600); + SOL_MAP_KEYL(&sol_stream, "minutes"); + sol_integer(&sol_stream, (idle % 3600) / 60); + } + else +#endif + (void)printf(" %2d:%02d ", + (int)(idle / 3600), (int)((idle % 3600) / 60)); + } - else if (idle / 60 == 0) - (void)printf(" - "); + else if (idle / 60 == 0) { +#if defined(SOL_ON) + if (!sol_format) +#endif + (void)printf(" - "); + } /* Else print the minutes idle. */ - else - (void)printf(" %2d ", (int)(idle / 60)); + else { +#if defined(SOL_ON) + if (sol_format) { + SOL_MAP_KEYL(&sol_stream, "minutes"); + sol_integer(&sol_stream, idle / 60); + } + else +#endif + (void)printf(" %2d ", (int)(idle / 60)); + } return (0); /* not idle longer than 9 days */ } Modified: soc2014/zkorchev/freebsd_head/usr.bin/w/w.c ============================================================================== --- soc2014/zkorchev/freebsd_head/usr.bin/w/w.c Mon Jul 21 08:47:54 2014 (r271185) +++ soc2014/zkorchev/freebsd_head/usr.bin/w/w.c Mon Jul 21 09:47:53 2014 (r271186) @@ -82,6 +82,9 @@ #include #include #include +#if defined(SOL_ON) +# include +#endif #include "extern.h" @@ -99,6 +102,11 @@ static int use_comma; /* use comma as floats separator */ static char **sel_users; /* login array of particular users selected */ +#if defined(SOL_ON) +struct sol_stream sol_stream; +#endif +int sol_format; + /* * One of these per active utmp entry. */ @@ -254,10 +262,21 @@ } endutxent(); +#if defined(SOL_ON) + sol_format = sol_init(&sol_stream); +#endif + +#if defined(SOL_ON) + if ((header && !sol_format) || wcmd == 0) { +#else if (header || wcmd == 0) { +#endif pr_header(&now, nusers); if (wcmd == 0) { (void)kvm_close(kd); +#if defined(SOL_ON) + if (sol_format) sol_term(&sol_stream); +#endif exit(0); } @@ -342,6 +361,9 @@ } } +#if defined(SOL_ON) + if (sol_format) sol_array_start(&sol_stream); +#endif for (ep = ehead; ep != NULL; ep = ep->next) { struct addrinfo hints, *res; struct sockaddr_storage ss; @@ -411,21 +433,56 @@ dkp->ki_pid, ptr); } } - (void)printf("%-*.*s %-*.*s %-*.*s ", - W_DISPUSERSIZE, W_DISPUSERSIZE, ep->utmp.ut_user, - W_DISPLINESIZE, W_DISPLINESIZE, - *ep->utmp.ut_line ? - (strncmp(ep->utmp.ut_line, "tty", 3) && - strncmp(ep->utmp.ut_line, "cua", 3) ? - ep->utmp.ut_line : ep->utmp.ut_line + 3) : "-", - W_DISPHOSTSIZE, W_DISPHOSTSIZE, *p ? p : "-"); +#if defined(SOL_ON) + if (sol_format) + { + SOL_MAP_KEYL(&sol_stream, "user"); + sol_string(&sol_stream, ep->utmp.ut_user, strlen(ep->utmp.ut_user)); + if (*ep->utmp.ut_line) { + const char *tty = ep->utmp.ut_line; + + if (!strncmp(ep->utmp.ut_line, "tty", 3) || !strncmp(ep->utmp.ut_line, "cua", 3)) + tty += 3; + SOL_MAP_KEYL(&sol_stream, "tty"); + sol_string(&sol_stream, tty, strlen(tty)); + } + if (*p) { + SOL_MAP_KEYL(&sol_stream, "from"); + sol_string(&sol_stream, p, strlen(p)); + } + } + else +#endif + { + (void)printf("%-*.*s %-*.*s %-*.*s ", + W_DISPUSERSIZE, W_DISPUSERSIZE, ep->utmp.ut_user, + W_DISPLINESIZE, W_DISPLINESIZE, + *ep->utmp.ut_line ? + (strncmp(ep->utmp.ut_line, "tty", 3) && + strncmp(ep->utmp.ut_line, "cua", 3) ? + ep->utmp.ut_line : ep->utmp.ut_line + 3) : "-", + W_DISPHOSTSIZE, W_DISPHOSTSIZE, *p ? p : "-"); + } t = ep->utmp.ut_tv.tv_sec; longattime = pr_attime(&t, &now); longidle = pr_idle(ep->idle); - (void)printf("%.*s\n", argwidth - longidle - longattime, - ep->args); +#if defined(SOL_ON) + if (sol_format) { + SOL_MAP_KEYL(&sol_stream, "what"); + sol_string(&sol_stream, ep->args, strlen(ep->args)); + } + else +#endif + (void)printf("%.*s\n", argwidth - longidle - longattime, + ep->args); } (void)kvm_close(kd); +#if defined(SOL_ON) + if (sol_format) { + sol_array_end(&sol_stream); + sol_term(&sol_stream); + } +#endif exit(0); } @@ -438,12 +495,24 @@ int days, hrs, i, mins, secs; char buf[256]; +#if defined(SOL_ON) + if (sol_format) sol_map_start(&sol_stream); +#endif + /* * Print time of day. */ if (strftime(buf, sizeof(buf), - use_ampm ? "%l:%M%p" : "%k:%M", localtime(nowp)) != 0) - (void)printf("%s ", buf); + use_ampm ? "%l:%M%p" : "%k:%M", localtime(nowp)) != 0) { +#if defined(SOL_ON) + if (sol_format) { + SOL_MAP_KEYL(&sol_stream, "time"); + sol_string(&sol_stream, buf, strlen(buf)); + } + else +#endif + (void)printf("%s ", buf); + } /* * Print how long system has been up. */ @@ -457,36 +526,92 @@ uptime %= 3600; mins = uptime / 60; secs = uptime % 60; - (void)printf(" up"); - if (days > 0) - (void)printf(" %d day%s,", days, days > 1 ? "s" : ""); - if (hrs > 0 && mins > 0) - (void)printf(" %2d:%02d,", hrs, mins); - else if (hrs > 0) - (void)printf(" %d hr%s,", hrs, hrs > 1 ? "s" : ""); - else if (mins > 0) - (void)printf(" %d min%s,", mins, mins > 1 ? "s" : ""); + +#if defined(SOL_ON) + if (sol_format) + { + SOL_MAP_KEYL(&sol_stream, "uptime"); + sol_map_start(&sol_stream); + if (days > 0) { + SOL_MAP_KEYL(&sol_stream, "days"); + sol_integer(&sol_stream, days); + } + if (hrs > 0) { + SOL_MAP_KEYL(&sol_stream, "hours"); + sol_integer(&sol_stream, hrs); + } + else if (mins > 0) { + SOL_MAP_KEYL(&sol_stream, "minutes"); + sol_integer(&sol_stream, mins); + } + else { + SOL_MAP_KEYL(&sol_stream, "seconds"); + sol_integer(&sol_stream, secs); + } + sol_map_end(&sol_stream); + } else - (void)printf(" %d sec%s,", secs, secs > 1 ? "s" : ""); +#endif + { + (void)printf(" up"); + if (days > 0) + (void)printf(" %d day%s,", days, days > 1 ? "s" : ""); + if (hrs > 0 && mins > 0) + (void)printf(" %2d:%02d,", hrs, mins); + else if (hrs > 0) + (void)printf(" %d hr%s,", hrs, hrs > 1 ? "s" : ""); + else if (mins > 0) + (void)printf(" %d min%s,", mins, mins > 1 ? "s" : ""); + else + (void)printf(" %d sec%s,", secs, secs > 1 ? "s" : ""); + } } /* Print number of users logged in to system */ - (void)printf(" %d user%s", nusers, nusers == 1 ? "" : "s"); +#if defined(SOL_ON) + if (sol_format) { + SOL_MAP_KEYL(&sol_stream, "users"); + sol_integer(&sol_stream, nusers); + } + else +#endif + (void)printf(" %d user%s", nusers, nusers == 1 ? "" : "s"); /* * Print 1, 5, and 15 minute load averages. */ - if (getloadavg(avenrun, sizeof(avenrun) / sizeof(avenrun[0])) == -1) - (void)printf(", no load average information available\n"); + if (getloadavg(avenrun, sizeof(avenrun) / sizeof(avenrun[0])) == -1) { +#if defined(SOL_ON) + if (!sol_format) +#endif + (void)printf(", no load average information available\n"); + } else { - (void)printf(", load averages:"); - for (i = 0; i < (int)(sizeof(avenrun) / sizeof(avenrun[0])); i++) { - if (use_comma && i > 0) - (void)printf(","); - (void)printf(" %.2f", avenrun[i]); +#if defined(SOL_ON) + if (sol_format) + { + SOL_MAP_KEYL(&sol_stream, "load"); + sol_array_start(&sol_stream); + for (i = 0; i < (int)(sizeof(avenrun) / sizeof(avenrun[0])); i++) + sol_float(&sol_stream, avenrun[i]); + sol_array_end(&sol_stream); + } + else +#endif + { + (void)printf(", load averages:"); + for (i = 0; i < (int)(sizeof(avenrun) / sizeof(avenrun[0])); i++) { + if (use_comma && i > 0) + (void)printf(","); + (void)printf(" %.2f", avenrun[i]); + } + (void)printf("\n"); } - (void)printf("\n"); } + +#if defined(SOL_ON) + if (sol_format) sol_map_end(&sol_stream); +#endif } static struct stat * From owner-svn-soc-all@FreeBSD.ORG Mon Jul 21 09:48:15 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 34D04D46 for ; Mon, 21 Jul 2014 09:48:15 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 16AB32E66 for ; Mon, 21 Jul 2014 09:48:15 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6L9mEcC065018 for ; Mon, 21 Jul 2014 09:48:14 GMT (envelope-from zkorchev@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s6L9mEOn065012 for svn-soc-all@FreeBSD.org; Mon, 21 Jul 2014 09:48:14 GMT (envelope-from zkorchev@FreeBSD.org) Date: Mon, 21 Jul 2014 09:48:14 GMT Message-Id: <201407210948.s6L9mEOn065012@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to zkorchev@FreeBSD.org using -f From: zkorchev@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r271187 - soc2014/zkorchev/freebsd_head/usr.bin/du MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2014 09:48:15 -0000 Author: zkorchev Date: Mon Jul 21 09:48:13 2014 New Revision: 271187 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271187 Log: libsol support for du Modified: soc2014/zkorchev/freebsd_head/usr.bin/du/Makefile soc2014/zkorchev/freebsd_head/usr.bin/du/du.c Modified: soc2014/zkorchev/freebsd_head/usr.bin/du/Makefile ============================================================================== --- soc2014/zkorchev/freebsd_head/usr.bin/du/Makefile Mon Jul 21 09:47:53 2014 (r271186) +++ soc2014/zkorchev/freebsd_head/usr.bin/du/Makefile Mon Jul 21 09:48:13 2014 (r271187) @@ -3,6 +3,7 @@ PROG= du DPADD= ${LIBUTIL} -LDADD= -lutil +CFLAGS+= -DSOL_ON -I/usr/local/include +LDADD= -lutil -lsol .include Modified: soc2014/zkorchev/freebsd_head/usr.bin/du/du.c ============================================================================== --- soc2014/zkorchev/freebsd_head/usr.bin/du/du.c Mon Jul 21 09:47:53 2014 (r271186) +++ soc2014/zkorchev/freebsd_head/usr.bin/du/du.c Mon Jul 21 09:48:13 2014 (r271187) @@ -60,6 +60,9 @@ #include #include #include +#if defined(SOL_ON) +# include +#endif static SLIST_HEAD(ignhead, ignentry) ignores; struct ignentry { @@ -67,6 +70,11 @@ SLIST_ENTRY(ignentry) next; }; +#if defined(SOL_ON) +static struct sol_stream sol_stream; +#endif +static int sol_format; + static int linkchk(FTSENT *); static void usage(void); static void prthumanval(int64_t); @@ -252,6 +260,17 @@ if ((fts = fts_open(argv, ftsoptions, NULL)) == NULL) err(1, "fts_open"); +#if defined(SOL_ON) + sol_format = sol_init(&sol_stream); + if (sol_format) { + sol_map_start(&sol_stream); + if (cflag) { + SOL_MAP_KEYL(&sol_stream, "size"); + sol_map_start(&sol_stream); + } + } +#endif + while ((p = fts_read(fts)) != NULL) { switch (p->fts_info) { case FTS_D: /* Ignore. */ @@ -271,14 +290,28 @@ if (p->fts_level <= depth && threshold <= threshold_sign * howmany(p->fts_bignum * cblocksize, blocksize)) { - if (hflag) { - prthumanval(p->fts_bignum); - (void)printf("\t%s\n", p->fts_path); - } else { - (void)printf("%jd\t%s\n", - (intmax_t)howmany(p->fts_bignum * - cblocksize, blocksize), - p->fts_path); +#if defined(SOL_ON) + if (sol_format) + { + sol_map_key(&sol_stream, p->fts_path, strlen(p->fts_path)); + if (hflag) + prthumanval(p->fts_bignum); + else + sol_integer(&sol_stream, howmany(p->fts_bignum * + cblocksize, blocksize)); + } + else +#endif + { + if (hflag) { + prthumanval(p->fts_bignum); + (void)printf("\t%s\n", p->fts_path); + } else { + (void)printf("%jd\t%s\n", + (intmax_t)howmany(p->fts_bignum * + cblocksize, blocksize), + p->fts_path); + } } } if (info) { @@ -307,14 +340,28 @@ howmany(p->fts_statp->st_blocks, cblocksize); if (aflag || p->fts_level == 0) { - if (hflag) { - prthumanval(curblocks); - (void)printf("\t%s\n", p->fts_path); - } else { - (void)printf("%jd\t%s\n", - (intmax_t)howmany(curblocks * - cblocksize, blocksize), - p->fts_path); +#if defined(SOL_ON) + if (sol_format) + { + sol_map_key(&sol_stream, p->fts_path, strlen(p->fts_path)); + if (hflag) + prthumanval(curblocks); + else + sol_integer(&sol_stream, howmany(curblocks * + cblocksize, blocksize)); + } + else +#endif + { + if (hflag) { + prthumanval(curblocks); + (void)printf("\t%s\n", p->fts_path); + } else { + (void)printf("%jd\t%s\n", + (intmax_t)howmany(curblocks * + cblocksize, blocksize), + p->fts_path); + } } } @@ -327,15 +374,35 @@ err(1, "fts_read"); if (cflag) { - if (hflag) { - prthumanval(savednumber); - (void)printf("\ttotal\n"); - } else { - (void)printf("%jd\ttotal\n", (intmax_t)howmany( - savednumber * cblocksize, blocksize)); +#if defined(SOL_ON) + if (sol_format) { + sol_map_end(&sol_stream); + SOL_MAP_KEYL(&sol_stream, "total"); + if (hflag) + prthumanval(savednumber); + else + sol_integer(&sol_stream, howmany(savednumber * cblocksize, blocksize)); + } + else +#endif + { + if (hflag) { + prthumanval(savednumber); + (void)printf("\ttotal\n"); + } else { + (void)printf("%jd\ttotal\n", (intmax_t)howmany( + savednumber * cblocksize, blocksize)); + } } } +#if defined(SOL_ON) + if (sol_format) { + sol_map_end(&sol_stream); + sol_term(&sol_stream); + } +#endif + ignoreclean(); exit(rval); } @@ -478,15 +545,21 @@ prthumanval(int64_t bytes) { char buf[5]; + size_t len; bytes *= cblocksize; if (!Aflag) bytes *= DEV_BSIZE; - humanize_number(buf, sizeof(buf), bytes, "", HN_AUTOSCALE, + len = humanize_number(buf, sizeof(buf), bytes, "", HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL); - (void)printf("%4s", buf); +#if defined(SOL_ON) + if (sol_format) + sol_string(&sol_stream, buf, len); + else +#endif + (void)printf("%4s", buf); } static void From owner-svn-soc-all@FreeBSD.ORG Mon Jul 21 09:48:36 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 39874D60 for ; Mon, 21 Jul 2014 09:48:36 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 253CA2E6A for ; Mon, 21 Jul 2014 09:48:36 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6L9mawW065253 for ; Mon, 21 Jul 2014 09:48:36 GMT (envelope-from zkorchev@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s6L9mYL9065245 for svn-soc-all@FreeBSD.org; Mon, 21 Jul 2014 09:48:34 GMT (envelope-from zkorchev@FreeBSD.org) Date: Mon, 21 Jul 2014 09:48:34 GMT Message-Id: <201407210948.s6L9mYL9065245@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to zkorchev@FreeBSD.org using -f From: zkorchev@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r271188 - soc2014/zkorchev/freebsd_head/usr.bin/finger MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2014 09:48:36 -0000 Author: zkorchev Date: Mon Jul 21 09:48:34 2014 New Revision: 271188 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271188 Log: libsol support for finger Modified: soc2014/zkorchev/freebsd_head/usr.bin/finger/Makefile soc2014/zkorchev/freebsd_head/usr.bin/finger/finger.c soc2014/zkorchev/freebsd_head/usr.bin/finger/finger.h soc2014/zkorchev/freebsd_head/usr.bin/finger/sprint.c Modified: soc2014/zkorchev/freebsd_head/usr.bin/finger/Makefile ============================================================================== --- soc2014/zkorchev/freebsd_head/usr.bin/finger/Makefile Mon Jul 21 09:48:13 2014 (r271187) +++ soc2014/zkorchev/freebsd_head/usr.bin/finger/Makefile Mon Jul 21 09:48:34 2014 (r271188) @@ -5,4 +5,7 @@ SRCS= finger.c lprint.c net.c sprint.c util.c MAN= finger.1 finger.conf.5 +LDADD+= -lsol +CFLAGS+=-DSOL_ON -I/usr/local/include + .include Modified: soc2014/zkorchev/freebsd_head/usr.bin/finger/finger.c ============================================================================== --- soc2014/zkorchev/freebsd_head/usr.bin/finger/finger.c Mon Jul 21 09:48:13 2014 (r271187) +++ soc2014/zkorchev/freebsd_head/usr.bin/finger/finger.c Mon Jul 21 09:48:34 2014 (r271188) @@ -81,6 +81,9 @@ #include #include #include +#if defined(SOL_ON) +# include +#endif #include "finger.h" #include "pathnames.h" @@ -94,6 +97,11 @@ char tbuf[1024]; int invoker_root = 0; +#if defined(SOL_ON) +struct sol_stream sol_stream; +#endif +int sol_format; + static void loginlist(void); static int option(int, char **); static void usage(void); @@ -196,6 +204,13 @@ argc -= argcnt; argv += argcnt; +#if defined(SOL_ON) + // libsol is not useful for "large" format so don't use it with it + if (!lflag && (!*argv || sflag)) { + sol_format = sol_init(&sol_stream); + if (sol_format) sol_array_start(&sol_stream); + } +#endif (void)time(&now); setpassent(1); if (!*argv) { @@ -207,8 +222,11 @@ if (!lflag) sflag = 1; /* if -l not explicit, force -s */ loginlist(); - if (entries == 0) - (void)printf("No one logged on.\n"); +#if defined(SOL_ON) + if (sol_format) +#endif + if (entries == 0) + (void)printf("No one logged on.\n"); } else { userlist(argc, argv); /* @@ -225,6 +243,12 @@ else sflag_print(); } +#if defined(SOL_ON) + if (sol_format) { + sol_array_end(&sol_stream); + sol_term(&sol_stream); + } +#endif return (0); } Modified: soc2014/zkorchev/freebsd_head/usr.bin/finger/finger.h ============================================================================== --- soc2014/zkorchev/freebsd_head/usr.bin/finger/finger.h Mon Jul 21 09:48:13 2014 (r271187) +++ soc2014/zkorchev/freebsd_head/usr.bin/finger/finger.h Mon Jul 21 09:48:34 2014 (r271188) @@ -69,4 +69,9 @@ #include "extern.h" +#if defined(SOL_ON) +extern struct sol_stream sol_stream; +#endif +extern int sol_format; + #endif /* !_FINGER_H_ */ Modified: soc2014/zkorchev/freebsd_head/usr.bin/finger/sprint.c ============================================================================== --- soc2014/zkorchev/freebsd_head/usr.bin/finger/sprint.c Mon Jul 21 09:48:13 2014 (r271187) +++ soc2014/zkorchev/freebsd_head/usr.bin/finger/sprint.c Mon Jul 21 09:48:34 2014 (r271188) @@ -50,6 +50,9 @@ #include #include #include +#if defined(SOL_ON) +# include +#endif #include "finger.h" static void stimeprint(WHERE *); @@ -61,6 +64,7 @@ WHERE *w; int sflag, r, namelen; char p[80]; + size_t len; PERSON *tmp; DBT data, key; struct tm *lc; @@ -85,9 +89,12 @@ */ #define MAXREALNAME 16 #define MAXHOSTNAME 17 /* in reality, hosts are never longer than 16 */ - (void)printf("%-*s %-*s%s %s\n", MAXLOGNAME, "Login", MAXREALNAME, - "Name", " TTY Idle Login Time ", (gflag) ? "" : - oflag ? "Office Phone" : "Where"); +#if defined(SOL_ON) + if (!sol_format) +#endif + (void)printf("%-*s %-*s%s %s\n", MAXLOGNAME, "Login", MAXREALNAME, + "Name", " TTY Idle Login Time ", (gflag) ? "" : + oflag ? "Office Phone" : "Where"); for (sflag = R_FIRST;; sflag = R_NEXT) { r = (*db->seq)(db, &key, &data, sflag); @@ -99,62 +106,136 @@ pn = tmp; for (w = pn->whead; w != NULL; w = w->next) { - namelen = MAXREALNAME; - if (w->info == LOGGEDIN && !w->writable) - --namelen; /* leave space before `*' */ - (void)printf("%-*.*s %-*.*s", MAXLOGNAME, MAXLOGNAME, - pn->name, MAXREALNAME, namelen, - pn->realname ? pn->realname : ""); - if (!w->loginat) { - (void)printf(" * * No logins "); - goto office; - } - (void)putchar(w->info == LOGGEDIN && !w->writable ? - '*' : ' '); - if (*w->tty) - (void)printf("%-7.7s ", - (strncmp(w->tty, "tty", 3) - && strncmp(w->tty, "cua", 3)) - ? w->tty : w->tty + 3); +#if defined(SOL_ON) + if (sol_format) + { + char buf[1 + sizeof(((struct utmpx *)0)->ut_line)]; + + sol_map_start(&sol_stream); + SOL_MAP_KEYL(&sol_stream, "login"); + sol_string(&sol_stream, pn->name, strlen(pn->name)); + if (pn->realname) { + SOL_MAP_KEYL(&sol_stream, "name"); + sol_string(&sol_stream, pn->realname, strlen(pn->realname)); + } + if (!w->loginat) goto office; + *buf = (w->info == LOGGEDIN && !w->writable ? '*' : ' '); + if (*w->tty) + strcpy(buf + 1, w->tty + ((strncmp(w->tty, "tty", 3) + && strncmp(w->tty, "cua", 3)) ? 0 : 3)); + else + buf[1] = 0; + SOL_MAP_KEYL(&sol_stream, "tty"); + sol_string(&sol_stream, buf, strlen(buf)); + } else - (void)printf(" "); +#endif + { + namelen = MAXREALNAME; + if (w->info == LOGGEDIN && !w->writable) + --namelen; /* leave space before `*' */ + (void)printf("%-*.*s %-*.*s", MAXLOGNAME, MAXLOGNAME, + pn->name, MAXREALNAME, namelen, + pn->realname ? pn->realname : ""); + if (!w->loginat) { + (void)printf(" * * No logins "); + goto office; + } + (void)putchar(w->info == LOGGEDIN && !w->writable ? + '*' : ' '); + if (*w->tty) + (void)printf("%-7.7s ", + (strncmp(w->tty, "tty", 3) + && strncmp(w->tty, "cua", 3)) + ? w->tty : w->tty + 3); + else + (void)printf(" "); + } if (w->info == LOGGEDIN) { stimeprint(w); - (void)printf(" "); +#if defined(SOL_ON) + if (!sol_format) +#endif + (void)printf(" "); } else - (void)printf(" * "); +#if defined(SOL_ON) + if (!sol_format) +#endif + (void)printf(" * "); lc = localtime(&w->loginat); #define SECSPERDAY 86400 #define DAYSPERWEEK 7 #define DAYSPERNYEAR 365 if (now - w->loginat < SECSPERDAY * (DAYSPERWEEK - 1)) { - (void)strftime(p, sizeof(p), "%a", lc); + len = strftime(p, sizeof(p), "%a", lc); } else { - (void)strftime(p, sizeof(p), + len = strftime(p, sizeof(p), d_first ? "%e %b" : "%b %e", lc); } - (void)printf("%-6.6s", p); +#if defined(SOL_ON) + if (sol_format) { + SOL_MAP_KEYL(&sol_stream, "login"); + sol_string(&sol_stream, p, len); + } + else +#endif + (void)printf("%-6.6s", p); if (now - w->loginat >= SECSPERDAY * DAYSPERNYEAR / 2) { - (void)strftime(p, sizeof(p), "%Y", lc); + len = strftime(p, sizeof(p), "%Y", lc); } else { - (void)strftime(p, sizeof(p), "%R", lc); + len = strftime(p, sizeof(p), "%R", lc); + } +#if defined(SOL_ON) + if (sol_format) { + SOL_MAP_KEYL(&sol_stream, "time"); + sol_string(&sol_stream, p, len); } - (void)printf(" %-5.5s", p); + else +#endif + (void)printf(" %-5.5s", p); office: if (gflag) goto no_gecos; - if (oflag) { - if (pn->office) - (void)printf(" %-7.7s", pn->office); - else if (pn->officephone) - (void)printf(" %-7.7s", " "); - if (pn->officephone) - (void)printf(" %-.9s", - prphone(pn->officephone)); - } else - (void)printf(" %.*s", MAXHOSTNAME, w->host); +#if defined(SOL_ON) + if (sol_format) + { + if (oflag) { + if (pn->office) { + SOL_MAP_KEYL(&sol_stream, "office"); + sol_string(&sol_stream, pn->office, strlen(pn->office)); + } + if (pn->officephone) { + const char *phone = prphone(pn->officephone); + SOL_MAP_KEYL(&sol_stream, "phone"); + sol_string(&sol_stream, phone, strlen(phone)); + } + } + else { + SOL_MAP_KEYL(&sol_stream, "?host"); + sol_string(&sol_stream, w->host, strlen(w->host)); + } + } + else +#endif + { + if (oflag) { + if (pn->office) + (void)printf(" %-7.7s", pn->office); + else if (pn->officephone) + (void)printf(" %-7.7s", " "); + if (pn->officephone) + (void)printf(" %-.9s", + prphone(pn->officephone)); + } else + (void)printf(" %.*s", MAXHOSTNAME, w->host); + } no_gecos: - putchar('\n'); +#if defined(SOL_ON) + if (sol_format) + sol_map_end(&sol_stream); + else +#endif + putchar('\n'); } } } @@ -164,6 +245,28 @@ { struct tm *delta; +#if defined(SOL_ON) + if (sol_format) { + if (w->idletime == -1) return; + delta = gmtime(&w->idletime); + if (delta->tm_yday) { + SOL_MAP_KEYL(&sol_stream, "yday"); + sol_integer(&sol_stream, delta->tm_yday); + } + else { + if (delta->tm_hour) { + SOL_MAP_KEYL(&sol_stream, "hour"); + sol_integer(&sol_stream, delta->tm_hour); + } + if (delta->tm_min) { + SOL_MAP_KEYL(&sol_stream, "minute"); + sol_integer(&sol_stream, delta->tm_min); + } + } + return; + } +#endif + if (w->idletime == -1) { (void)printf(" "); return; From owner-svn-soc-all@FreeBSD.ORG Mon Jul 21 09:49:10 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 26BBCD89 for ; Mon, 21 Jul 2014 09:49:10 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 12AEC2E73 for ; Mon, 21 Jul 2014 09:49:10 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6L9n9QQ065556 for ; Mon, 21 Jul 2014 09:49:09 GMT (envelope-from zkorchev@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s6L9n9tu065553 for svn-soc-all@FreeBSD.org; Mon, 21 Jul 2014 09:49:09 GMT (envelope-from zkorchev@FreeBSD.org) Date: Mon, 21 Jul 2014 09:49:09 GMT Message-Id: <201407210949.s6L9n9tu065553@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to zkorchev@FreeBSD.org using -f From: zkorchev@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r271189 - soc2014/zkorchev/freebsd_head/usr.bin/procstat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2014 09:49:10 -0000 Author: zkorchev Date: Mon Jul 21 09:49:09 2014 New Revision: 271189 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271189 Log: removed Makefile options for debugging Modified: soc2014/zkorchev/freebsd_head/usr.bin/procstat/Makefile Modified: soc2014/zkorchev/freebsd_head/usr.bin/procstat/Makefile ============================================================================== --- soc2014/zkorchev/freebsd_head/usr.bin/procstat/Makefile Mon Jul 21 09:48:34 2014 (r271188) +++ soc2014/zkorchev/freebsd_head/usr.bin/procstat/Makefile Mon Jul 21 09:49:09 2014 (r271189) @@ -18,6 +18,6 @@ LDADD+= -lutil -lprocstat -lkvm -lsol DPADD+= ${LIBUTIL} ${LIBPROCSTAT} ${LIBKVM} -CFLAGS+=-DSOL_ON -I/usr/local/include -g +CFLAGS+=-DSOL_ON -I/usr/local/include .include From owner-svn-soc-all@FreeBSD.ORG Mon Jul 21 10:44:16 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 39B2D739 for ; Mon, 21 Jul 2014 10:44:16 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2680123DB for ; Mon, 21 Jul 2014 10:44:16 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6LAiFeu076338 for ; Mon, 21 Jul 2014 10:44:15 GMT (envelope-from dpl@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s6LAiFLD076325 for svn-soc-all@FreeBSD.org; Mon, 21 Jul 2014 10:44:15 GMT (envelope-from dpl@FreeBSD.org) Date: Mon, 21 Jul 2014 10:44:15 GMT Message-Id: <201407211044.s6LAiFLD076325@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to dpl@FreeBSD.org using -f From: dpl@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r271190 - soc2014/dpl/CellularAutomata MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2014 10:44:16 -0000 Author: dpl Date: Mon Jul 21 10:44:15 2014 New Revision: 271190 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271190 Log: Updated Makefile to use llvm-config-devel. Modified: soc2014/dpl/CellularAutomata/Makefile Modified: soc2014/dpl/CellularAutomata/Makefile ============================================================================== --- soc2014/dpl/CellularAutomata/Makefile Mon Jul 21 09:49:09 2014 (r271189) +++ soc2014/dpl/CellularAutomata/Makefile Mon Jul 21 10:44:15 2014 (r271190) @@ -5,7 +5,7 @@ all: cellatom cellatom: interpreter.o main.o grammar.o compiler.o runtime.bc - c++ compiler.o interpreter.o grammar.o main.o `llvm-config --ldflags --libs ${LLVM_LIBS}` -o cellatom -ldl + c++ compiler.o interpreter.o grammar.o main.o `llvm-config-devel --ldflags --libs ${LLVM_LIBS}` -o cellatom -ldl interpreter.o: interpreter.c AST.h main.o: main.c AST.h grammar.h @@ -14,7 +14,7 @@ clang -c -emit-llvm runtime.c -o runtime.bc -O0 compiler.o: compiler.cc AST.h - c++ -std=c++0x `llvm-config --cxxflags` -c compiler.cc -O3 #-g -O0 -fno-inline + c++ -std=c++0x `llvm-config-devel --cxxflags` -c compiler.cc -O3 #-g -O0 -fno-inline grammar.h: grammar.c grammar.c: grammar.y AST.h lemon From owner-svn-soc-all@FreeBSD.ORG Mon Jul 21 13:37:25 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 383488A3 for ; Mon, 21 Jul 2014 13:37:25 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0CA6D2672 for ; Mon, 21 Jul 2014 13:37:25 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6LDbONv095990 for ; Mon, 21 Jul 2014 13:37:24 GMT (envelope-from dpl@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s6LDbOlD095916 for svn-soc-all@FreeBSD.org; Mon, 21 Jul 2014 13:37:24 GMT (envelope-from dpl@FreeBSD.org) Date: Mon, 21 Jul 2014 13:37:24 GMT Message-Id: <201407211337.s6LDbOlD095916@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to dpl@FreeBSD.org using -f From: dpl@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r271191 - soc2014/dpl/CellularAutomata MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2014 13:37:25 -0000 Author: dpl Date: Mon Jul 21 13:37:24 2014 New Revision: 271191 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271191 Log: Removed CellularAutomata Deleted: soc2014/dpl/CellularAutomata/ From owner-svn-soc-all@FreeBSD.ORG Mon Jul 21 13:39:30 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E04508D3 for ; Mon, 21 Jul 2014 13:39:30 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CA4EE2681 for ; Mon, 21 Jul 2014 13:39:30 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6LDdUvY017858 for ; Mon, 21 Jul 2014 13:39:30 GMT (envelope-from dpl@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s6LDdTmh017612 for svn-soc-all@FreeBSD.org; Mon, 21 Jul 2014 13:39:29 GMT (envelope-from dpl@FreeBSD.org) Date: Mon, 21 Jul 2014 13:39:29 GMT Message-Id: <201407211339.s6LDdTmh017612@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to dpl@FreeBSD.org using -f From: dpl@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r271192 - in soc2014/dpl/CellularAutomata: . Pegmatite Pegmatite/examples Pegmatite/examples/calculator examples MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2014 13:39:31 -0000 Author: dpl Date: Mon Jul 21 13:39:29 2014 New Revision: 271192 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271192 Log: Added newest CellularAutomata Added: soc2014/dpl/CellularAutomata/ soc2014/dpl/CellularAutomata/CMakeLists.txt soc2014/dpl/CellularAutomata/Doxyfile.in soc2014/dpl/CellularAutomata/LICENSE soc2014/dpl/CellularAutomata/Makefile soc2014/dpl/CellularAutomata/Pegmatite/ soc2014/dpl/CellularAutomata/Pegmatite/.git soc2014/dpl/CellularAutomata/Pegmatite/.gitignore soc2014/dpl/CellularAutomata/Pegmatite/CMakeLists.txt soc2014/dpl/CellularAutomata/Pegmatite/Doxyfile.in soc2014/dpl/CellularAutomata/Pegmatite/LICENSE.txt soc2014/dpl/CellularAutomata/Pegmatite/README.md soc2014/dpl/CellularAutomata/Pegmatite/ast.cc soc2014/dpl/CellularAutomata/Pegmatite/ast.hh soc2014/dpl/CellularAutomata/Pegmatite/examples/ soc2014/dpl/CellularAutomata/Pegmatite/examples/calculator/ soc2014/dpl/CellularAutomata/Pegmatite/examples/calculator/README.txt soc2014/dpl/CellularAutomata/Pegmatite/examples/calculator/calculator.cc soc2014/dpl/CellularAutomata/Pegmatite/parser.cc soc2014/dpl/CellularAutomata/Pegmatite/parser.hh soc2014/dpl/CellularAutomata/Pegmatite/pegmatite.hh soc2014/dpl/CellularAutomata/README.md soc2014/dpl/CellularAutomata/ast.cc soc2014/dpl/CellularAutomata/ast.hh soc2014/dpl/CellularAutomata/compiler.cc soc2014/dpl/CellularAutomata/examples/ soc2014/dpl/CellularAutomata/examples/connway.ca soc2014/dpl/CellularAutomata/examples/count.ca soc2014/dpl/CellularAutomata/examples/countNeighbours.ca soc2014/dpl/CellularAutomata/examples/flash.ca soc2014/dpl/CellularAutomata/examples/on.ca soc2014/dpl/CellularAutomata/interpreter.cc soc2014/dpl/CellularAutomata/main.cc soc2014/dpl/CellularAutomata/parser.hh soc2014/dpl/CellularAutomata/runtime.c Added: soc2014/dpl/CellularAutomata/CMakeLists.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2014/dpl/CellularAutomata/CMakeLists.txt Mon Jul 21 13:39:29 2014 (r271192) @@ -0,0 +1,94 @@ +cmake_minimum_required(VERSION 2.8) + +project(cellatom) + +set(cellatom_CXX_SRCS + # Just compile the Pegmatite .cc files into the program, don't bother + # building a separate library. + Pegmatite/ast.cc + Pegmatite/parser.cc + ast.cc + compiler.cc + interpreter.cc + main.cc +) +set(LLVM_LIBS + instrumentation + irreader + jit + linker + lto + nativecodegen + scalaropts + support + transformutils +) + +# Define the cellatom program that we will build +add_executable(cellatom ${cellatom_CXX_SRCS}) +# We're using pegmatite in the RTTI mode +add_definitions(-DUSE_RTTI=1) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") + + +find_program(LLVM_CONFIG NAMES llvm-config DOC "Path to llvm-config utility") +if (${LLVM_CONFIG} STREQUAL "LLVM_CONFIG-NOTFOUND") + message(SEND_ERROR "llvm-config not found, please manually set path with -DLLVM_CONFIG") +endif() +message(STATUS "Using llvm-config: ${LLVM_CONFIG}") + +# Define LLVM version macros so that we can support multiple versions in the source. +exec_program(${LLVM_CONFIG} + ARGS --version + OUTPUT_VARIABLE LLVM_VER) +exec_program(${LLVM_CONFIG} + ARGS --cxxflags + OUTPUT_VARIABLE LLVM_CXXFLAGS) +exec_program(${LLVM_CONFIG} + ARGS --libs ${LLVM_LIBS} + OUTPUT_VARIABLE LLVM_LIBS_FLAGS) +exec_program(${LLVM_CONFIG} + ARGS --ldflags + OUTPUT_VARIABLE LLVM_LDFLAGS) +exec_program(${LLVM_CONFIG} + ARGS --system-libs + OUTPUT_VARIABLE LLVM_SYSTEMLIBS) +string(REGEX REPLACE "([0-9]*).([0-9]*).*" "-DLLVM_MAJOR=\\1 -DLLVM_MINOR=\\2" LLVM_VERSION "${LLVM_VER}") + +add_custom_command(OUTPUT runtime.bc + COMMAND clang -c -emit-llvm ${CMAKE_CURRENT_SOURCE_DIR}/runtime.c -o runtime.bc -O0 + MAIN_DEPENDENCY runtime.c) +add_custom_target(build_runtime DEPENDS runtime.bc) +add_dependencies(cellatom build_runtime) + +# Explicitly enable RTTI. The llvm-config output may add -fno-rtti, but +# Pegmatite needs it. +set(CMAKE_CXX_FLAGS + "${CMAKE_CXX_FLAGS} ${LLVM_CXXFLAGS} ${LLVM_VERSION} -frtti") +target_link_libraries(cellatom ${LLVM_LIBS_FLAGS}) +# llvm-config only gained a --system-libs flag in 3.5 +if (LLVM_VER VERSION_GREATER 3.4) + target_link_libraries(cellatom ${LLVM_SYSTEMLIBS}) +endif() +set(CMAKE_EXE_LINKER_FLAGS "${LLVM_LDFLAGS} ${CMAKE_EXE_LINKER_FLAGS}") + + + + + +option(BUILD_DOCUMENTATION "Use Doxygen to create the HTML based API documentation" OFF) +if(BUILD_DOCUMENTATION) + FIND_PACKAGE(Doxygen) + if (NOT DOXYGEN_FOUND) + message(FATAL_ERROR + "Doxygen is needed to build the documentation. Please install it correctly") + endif() + #-- Configure the Template Doxyfile for our specific project + configure_file(Doxyfile.in + ${PROJECT_BINARY_DIR}/Doxyfile @ONLY IMMEDIATE) + #-- Add a custom target to run Doxygen when ever the project is built + add_custom_target (Docs ALL + COMMAND ${DOXYGEN_EXECUTABLE} ${PROJECT_BINARY_DIR}/Doxyfile + SOURCES ${PROJECT_BINARY_DIR}/Doxyfile) +endif() + Added: soc2014/dpl/CellularAutomata/Doxyfile.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2014/dpl/CellularAutomata/Doxyfile.in Mon Jul 21 13:39:29 2014 (r271192) @@ -0,0 +1,2309 @@ +# Doxyfile 1.8.6 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a double hash (##) is considered a comment and is placed in +# front of the TAG it is preceding. +# +# All text after a single hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists, items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (\" \"). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all text +# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv +# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv +# for the list of possible encodings. +# The default value is: UTF-8. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by +# double-quotes, unless you are using Doxywizard) that should identify the +# project for which the documentation is generated. This name is used in the +# title of most generated pages and in a few other places. +# The default value is: My Project. + +PROJECT_NAME = "Pegmatite" + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. This +# could be handy for archiving the generated documentation or if some version +# control system is used. + +PROJECT_NUMBER = + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer a +# quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = + +# With the PROJECT_LOGO tag one can specify an logo or icon that is included in +# the documentation. The maximum height of the logo should not exceed 55 pixels +# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo +# to the output directory. + +PROJECT_LOGO = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path +# into which the generated documentation will be written. If a relative path is +# entered, it will be relative to the location where doxygen was started. If +# left blank the current directory will be used. + +OUTPUT_DIRECTORY = + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub- +# directories (in 2 levels) under the output directory of each output format and +# will distribute the generated files over these directories. Enabling this +# option can be useful when feeding doxygen a huge amount of source files, where +# putting all generated files in the same directory would otherwise causes +# performance problems for the file system. +# The default value is: NO. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, +# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), +# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, +# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), +# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, +# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, +# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, +# Ukrainian and Vietnamese. +# The default value is: English. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member +# descriptions after the members that are listed in the file and class +# documentation (similar to Javadoc). Set to NO to disable this. +# The default value is: YES. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief +# description of a member or function before the detailed description +# +# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. +# The default value is: YES. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator that is +# used to form the text in various listings. Each string in this list, if found +# as the leading text of the brief description, will be stripped from the text +# and the result, after processing the whole list, is used as the annotated +# text. Otherwise, the brief description is used as-is. If left blank, the +# following values are used ($name is automatically replaced with the name of +# the entity):The $name class, The $name widget, The $name file, is, provides, +# specifies, contains, represents, a, an and the. + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# doxygen will generate a detailed section even if there is only a brief +# description. +# The default value is: NO. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. +# The default value is: NO. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path +# before files name in the file list and in the header files. If set to NO the +# shortest path that makes the file name unique will be used +# The default value is: YES. + +FULL_PATH_NAMES = YES + +# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. +# Stripping is only done if one of the specified strings matches the left-hand +# part of the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the path to +# strip. +# +# Note that you can specify absolute paths here, but also relative paths, which +# will be relative from the directory where doxygen is started. +# This tag requires that the tag FULL_PATH_NAMES is set to YES. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the +# path mentioned in the documentation of a class, which tells the reader which +# header file to include in order to use a class. If left blank only the name of +# the header file containing the class definition is used. Otherwise one should +# specify the list of include paths that are normally passed to the compiler +# using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but +# less readable) file names. This can be useful is your file systems doesn't +# support long names like on DOS, Mac, or CD-ROM. +# The default value is: NO. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the +# first line (until the first dot) of a Javadoc-style comment as the brief +# description. If set to NO, the Javadoc-style will behave just like regular Qt- +# style comments (thus requiring an explicit @brief command for a brief +# description.) +# The default value is: NO. + +JAVADOC_AUTOBRIEF = YES + +# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first +# line (until the first dot) of a Qt-style comment as the brief description. If +# set to NO, the Qt-style will behave just like regular Qt-style comments (thus +# requiring an explicit \brief command for a brief description.) +# The default value is: NO. + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a +# multi-line C++ special comment block (i.e. a block of //! or /// comments) as +# a brief description. This used to be the default behavior. The new default is +# to treat a multi-line C++ comment block as a detailed description. Set this +# tag to YES if you prefer the old behavior instead. +# +# Note that setting this tag to YES also means that rational rose comments are +# not recognized any more. +# The default value is: NO. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the +# documentation from any documented member that it re-implements. +# The default value is: YES. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a +# new page for each member. If set to NO, the documentation of a member will be +# part of the file/class/namespace that contains it. +# The default value is: NO. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen +# uses this value to replace tabs by spaces in code fragments. +# Minimum value: 1, maximum value: 16, default value: 4. + +TAB_SIZE = 4 + +# This tag can be used to specify a number of aliases that act as commands in +# the documentation. An alias has the form: +# name=value +# For example adding +# "sideeffect=@par Side Effects:\n" +# will allow you to put the command \sideeffect (or @sideeffect) in the +# documentation, which will result in a user-defined paragraph with heading +# "Side Effects:". You can put \n's in the value part of an alias to insert +# newlines. + +ALIASES = + +# This tag can be used to specify a number of word-keyword mappings (TCL only). +# A mapping has the form "name=value". For example adding "class=itcl::class" +# will allow you to use the command class in the itcl::class meaning. + +TCL_SUBST = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources +# only. Doxygen will then generate output that is more tailored for C. For +# instance, some of the names that are used will be different. The list of all +# members will be omitted, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or +# Python sources only. Doxygen will then generate output that is more tailored +# for that language. For instance, namespaces will be presented as packages, +# qualified scopes will look different, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources. Doxygen will then generate output that is tailored for Fortran. +# The default value is: NO. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for VHDL. +# The default value is: NO. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given +# extension. Doxygen has a built-in mapping, but you can override or extend it +# using this tag. The format is ext=language, where ext is a file extension, and +# language is one of the parsers supported by doxygen: IDL, Java, Javascript, +# C#, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL. For instance to make +# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C +# (default is Fortran), use: inc=Fortran f=C. +# +# Note For files without extension you can use no_extension as a placeholder. +# +# Note that for custom extensions you also need to set FILE_PATTERNS otherwise +# the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments +# according to the Markdown format, which allows for more readable +# documentation. See http://daringfireball.net/projects/markdown/ for details. +# The output of markdown processing is further processed by doxygen, so you can +# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in +# case of backward compatibilities issues. +# The default value is: YES. + +MARKDOWN_SUPPORT = YES + +# When enabled doxygen tries to link words that correspond to documented +# classes, or namespaces to their corresponding documentation. Such a link can +# be prevented in individual cases by by putting a % sign in front of the word +# or globally by setting AUTOLINK_SUPPORT to NO. +# The default value is: YES. + +AUTOLINK_SUPPORT = YES + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should set this +# tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); +# versus func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. +# The default value is: NO. + +BUILTIN_STL_SUPPORT = YES + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. +# The default value is: NO. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: +# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen +# will parse them like normal C++ but will assume all classes use public instead +# of private inheritance when no explicit protection keyword is present. +# The default value is: NO. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate +# getter and setter methods for a property. Setting this option to YES will make +# doxygen to replace the get and set methods by a property in the documentation. +# This will only work if the methods are indeed getting or setting a simple +# type. If this is not the case, or you want to show the methods anyway, you +# should set this option to NO. +# The default value is: YES. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. +# The default value is: NO. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES to allow class member groups of the same type +# (for instance a group of public functions) to be put as a subgroup of that +# type (e.g. under the Public Functions section). Set it to NO to prevent +# subgrouping. Alternatively, this can be done per class using the +# \nosubgrouping command. +# The default value is: YES. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions +# are shown inside the group in which they are included (e.g. using \ingroup) +# instead of on a separate page (for HTML and Man pages) or section (for LaTeX +# and RTF). +# +# Note that this feature does not work in combination with +# SEPARATE_MEMBER_PAGES. +# The default value is: NO. + +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions +# with only public data fields or simple typedef fields will be shown inline in +# the documentation of the scope in which they are defined (i.e. file, +# namespace, or group documentation), provided this scope is documented. If set +# to NO, structs, classes, and unions are shown on a separate page (for HTML and +# Man pages) or section (for LaTeX and RTF). +# The default value is: NO. + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or +# enum is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically be +# useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. +# The default value is: NO. + +TYPEDEF_HIDES_STRUCT = NO + +# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This +# cache is used to resolve symbols given their name and scope. Since this can be +# an expensive process and often the same symbol appears multiple times in the +# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small +# doxygen will become slower. If the cache is too large, memory is wasted. The +# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range +# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 +# symbols. At the end of a run doxygen will report the cache usage and suggest +# the optimal cache size from a speed point of view. +# Minimum value: 0, maximum value: 9, default value: 0. + +LOOKUP_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. Private +# class members and static file members will be hidden unless the +# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. +# Note: This will also disable the warnings about undocumented members that are +# normally produced when WARNINGS is set to YES. +# The default value is: NO. + +EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will +# be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal +# scope will be included in the documentation. +# The default value is: NO. + +EXTRACT_PACKAGE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file will be +# included in the documentation. +# The default value is: NO. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO +# only classes defined in header files are included. Does not have any effect +# for Java sources. +# The default value is: YES. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local methods, +# which are defined in the implementation section but not in the interface are +# included in the documentation. If set to NO only methods in the interface are +# included. +# The default value is: NO. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base name of +# the file that contains the anonymous namespace. By default anonymous namespace +# are hidden. +# The default value is: NO. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all +# undocumented members inside documented classes or files. If set to NO these +# members will be included in the various overviews, but no documentation +# section is generated. This option has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. If set +# to NO these classes will be included in the various overviews. This option has +# no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend +# (class|struct|union) declarations. If set to NO these declarations will be +# included in the documentation. +# The default value is: NO. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any +# documentation blocks found inside the body of a function. If set to NO these +# blocks will be appended to the function's detailed documentation block. +# The default value is: NO. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation that is typed after a +# \internal command is included. If the tag is set to NO then the documentation +# will be excluded. Set it to YES to include the internal documentation. +# The default value is: NO. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file +# names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. +# The default value is: system dependent. + +CASE_SENSE_NAMES = NO + +# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with +# their full class and namespace scopes in the documentation. If set to YES the +# scope will be hidden. +# The default value is: NO. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of +# the files that are included by a file in the documentation of that file. +# The default value is: YES. + +SHOW_INCLUDE_FILES = YES + +# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each +# grouped member an include statement to the documentation, telling the reader +# which file to include in order to use the member. +# The default value is: NO. + +SHOW_GROUPED_MEMB_INC = NO + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include +# files with double quotes in the documentation rather than with sharp brackets. +# The default value is: NO. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the +# documentation for inline members. +# The default value is: YES. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the +# (detailed) documentation of file and class members alphabetically by member +# name. If set to NO the members will appear in declaration order. +# The default value is: YES. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief +# descriptions of file, namespace and class members alphabetically by member +# name. If set to NO the members will appear in declaration order. Note that +# this will also influence the order of the classes in the class list. +# The default value is: NO. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the +# (brief and detailed) documentation of class members so that constructors and +# destructors are listed first. If set to NO the constructors will appear in the +# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. +# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief +# member documentation. +# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting +# detailed member documentation. +# The default value is: NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy +# of group names into alphabetical order. If set to NO the group names will +# appear in their defined order. +# The default value is: NO. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by +# fully-qualified names, including namespaces. If set to NO, the class list will +# be sorted only by class name, not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the alphabetical +# list. +# The default value is: NO. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper +# type resolution of all parameters of a function it will reject a match between +# the prototype and the implementation of a member function even if there is +# only one candidate or it is obvious which candidate to choose by doing a +# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still +# accept a match between prototype and implementation in such cases. +# The default value is: NO. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the +# todo list. This list is created by putting \todo commands in the +# documentation. +# The default value is: YES. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the +# test list. This list is created by putting \test commands in the +# documentation. +# The default value is: YES. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug +# list. This list is created by putting \bug commands in the documentation. +# The default value is: YES. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO) +# the deprecated list. This list is created by putting \deprecated commands in +# the documentation. +# The default value is: YES. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional documentation +# sections, marked by \if ... \endif and \cond +# ... \endcond blocks. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the +# initial value of a variable or macro / define can have for it to appear in the +# documentation. If the initializer consists of more lines than specified here +# it will be hidden. Use a value of 0 to hide initializers completely. The +# appearance of the value of individual variables and macros / defines can be +# controlled using \showinitializer or \hideinitializer command in the +# documentation regardless of this setting. +# Minimum value: 0, maximum value: 10000, default value: 30. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at +# the bottom of the documentation of classes and structs. If set to YES the list +# will mention the files that were used to generate the documentation. +# The default value is: YES. + +SHOW_USED_FILES = YES + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This +# will remove the Files entry from the Quick Index and from the Folder Tree View +# (if specified). +# The default value is: YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces +# page. This will remove the Namespaces entry from the Quick Index and from the +# Folder Tree View (if specified). +# The default value is: YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command command input-file, where command is the value of the +# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided +# by doxygen. Whatever the program writes to standard output is used as the file +# version. For an example see the documentation. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. To create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. You can +# optionally specify a file name after the option, if omitted DoxygenLayout.xml +# will be used as the name of the layout file. +# +# Note that if you run doxygen from a directory containing a file called +# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE +# tag is left empty. + +LAYOUT_FILE = + +# The CITE_BIB_FILES tag can be used to specify one or more bib files containing +# the reference definitions. This must be a list of .bib files. The .bib +# extension is automatically appended if omitted. This requires the bibtex tool +# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. +# For LaTeX the style of the bibliography can be controlled using +# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the +# search path. Do not use file names with spaces, bibtex cannot handle them. See +# also \cite for info how to create references. + +CITE_BIB_FILES = + +#--------------------------------------------------------------------------- +# Configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated to +# standard output by doxygen. If QUIET is set to YES this implies that the +# messages are off. +# The default value is: NO. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES +# this implies that the warnings are on. +# +# Tip: Turn warnings on while writing the documentation. +# The default value is: YES. + +WARNINGS = YES + +# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate +# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag +# will automatically be disabled. +# The default value is: YES. + +WARN_IF_UNDOCUMENTED = YES + +# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some parameters +# in a documented function, or documenting parameters that don't exist or using +# markup commands wrongly. +# The default value is: YES. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that +# are documented, but have no documentation for their parameters or return +# value. If set to NO doxygen will only warn about wrong or incomplete parameter +# documentation, but not about the absence of documentation. +# The default value is: NO. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that doxygen +# can produce. The string should contain the $file, $line, and $text tags, which +# will be replaced by the file and line number from which the warning originated +# and the warning text. Optionally the format may contain $version, which will +# be replaced by the version of the file (if it could be obtained via +# FILE_VERSION_FILTER) +# The default value is: $file:$line: $text. + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning and error +# messages should be written. If left blank the output is written to standard +# error (stderr). + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# Configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag is used to specify the files and/or directories that contain +# documented source files. You may enter file names like myfile.cpp or +# directories like /usr/src/myproject. Separate the files or directories with +# spaces. +# Note: If this tag is empty the current directory is searched. + +INPUT = "@PROJECT_SOURCE_DIR@/ast.hh" \ + "@PROJECT_SOURCE_DIR@/ast.cc" \ + "@PROJECT_SOURCE_DIR@/parser.hh" \ + "@PROJECT_SOURCE_DIR@/parser.cc" \ + "@PROJECT_SOURCE_DIR@/main.cc" \ + "@PROJECT_SOURCE_DIR@/compiler.cc" \ + "@PROJECT_SOURCE_DIR@/interpreter.cc" + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses +# libiconv (or the iconv built into libc) for the transcoding. See the libiconv +# documentation (see: http://www.gnu.org/software/libiconv) for the list of +# possible encodings. +# The default value is: UTF-8. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank the +# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii, +# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, +# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, +# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, +# *.qsf, *.as and *.js. + +FILE_PATTERNS = + +# The RECURSIVE tag can be used to specify whether or not subdirectories should +# be searched for input files as well. +# The default value is: NO. + +RECURSIVE = NO + +# The EXCLUDE tag can be used to specify files and/or directories that should be +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. +# +# Note that relative paths are relative to the directory from which doxygen is +# run. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. +# The default value is: NO. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories use the pattern */test/* + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or directories +# that contain example code fragments that are included (see the \include +# command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank all +# files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude commands +# irrespective of the value of the RECURSIVE tag. +# The default value is: NO. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or directories +# that contain images that are to be included in the documentation (see the +# \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command: +# +# +# +# where is the value of the INPUT_FILTER tag, and is the +# name of an input file. Doxygen will then use the output that the filter +# program writes to standard output. If FILTER_PATTERNS is specified, this tag +# will be ignored. +# +# Note that the filter must not add or remove lines; it is applied before the +# code is scanned, but not when the output code is generated. If lines are added +# or removed, the anchors will not be placed correctly. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: pattern=filter +# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how +# filters are used. If the FILTER_PATTERNS tag is empty or if none of the +# patterns match the file name, INPUT_FILTER is applied. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER ) will also be used to filter the input files that are used for +# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). +# The default value is: NO. + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and +# it is also possible to disable source filtering for a specific pattern using +# *.ext= (so without naming a filter). +# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. + +FILTER_SOURCE_PATTERNS = + +# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that +# is part of the input, its contents will be placed on the main page +# (index.html). This can be useful if you have a project on for instance GitHub +# and want to reuse the introduction page also for the doxygen output. + +USE_MDFILE_AS_MAINPAGE = + +#--------------------------------------------------------------------------- +# Configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will be +# generated. Documented entities will be cross-referenced with these sources. +# +# Note: To get rid of all source code in the generated output, make sure that +# also VERBATIM_HEADERS is set to NO. +# The default value is: NO. + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-soc-all@FreeBSD.ORG Mon Jul 21 16:57:27 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 88FE2596 for ; Mon, 21 Jul 2014 16:57:27 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 750732C65 for ; Mon, 21 Jul 2014 16:57:27 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6LGvRI9078003 for ; Mon, 21 Jul 2014 16:57:27 GMT (envelope-from dpl@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s6LGvQ7p077996 for svn-soc-all@FreeBSD.org; Mon, 21 Jul 2014 16:57:26 GMT (envelope-from dpl@FreeBSD.org) Date: Mon, 21 Jul 2014 16:57:26 GMT Message-Id: <201407211657.s6LGvQ7p077996@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to dpl@FreeBSD.org using -f From: dpl@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r271199 - in soc2014/dpl/netmap-ipfwjit: . sys/netpfil/ipfw MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2014 16:57:27 -0000 Author: dpl Date: Mon Jul 21 16:57:25 2014 New Revision: 271199 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271199 Log: Improve jit.cc, and Makefiles. Modified: soc2014/dpl/netmap-ipfwjit/Makefile.kipfw soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw2.c soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/jit.cc soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/jit.h Modified: soc2014/dpl/netmap-ipfwjit/Makefile.kipfw ============================================================================== --- soc2014/dpl/netmap-ipfwjit/Makefile.kipfw Mon Jul 21 15:44:59 2014 (r271198) +++ soc2014/dpl/netmap-ipfwjit/Makefile.kipfw Mon Jul 21 16:57:25 2014 (r271199) @@ -93,7 +93,7 @@ E_CFLAGS += -Dradix MOD := kipfw -LIBS= -lpthread +LIBS= -lpthread `llvm-config-devel --ldflags --libs jit support` CFLAGS = $(E_CFLAGS) IPFW_OBJS= $(IPFW_SRCS:%.c=%.o) @@ -136,7 +136,7 @@ EFILES = $(foreach i,$(EDIRS),$(subst $(empty) , $(i)/, $(EFILES_$(i): = ))) BCFLAGS=-emit-llvm -c -CXXFLAGS= `llvm-config-devel --cxxflags --libs jit support` +CXXFLAGS= -c `llvm-config-devel --cxxflags` include_e: -@echo "Building $(OBJPATH)/include_e ..." @@ -150,20 +150,20 @@ ip_fw2.o ip_dummynet.o: # EFLAGS= -include missing.h ip_fw2.o: jit.o +#Generate the actual bytecode to be used +../ip_fw_rules.bc: + $(CC) $(CFLAGS) $(BCFLAGS) -o ../ip_fw_rules.bc ../sys/netpfil/ipfw/ip_fw_rules.h + radix.o:# CFLAGS += -U_KERNEL # session.o: CFLAGS = -O2 nm_util.o: CFLAGS = -O2 -Wall -Werror $(NETMAP_FLAGS) -$(MOD): $(IPFW_OBJS) ../ip_fw_rules.bc jit.o +$(MOD): $(IPFW_OBJS) jit.o $(MSG) " LD $@" $(HIDE)$(CC) -o $@ $^ $(LIBS) -#Generate the actual bytecode to be used -../ip_fw_rules.bc: - @$(CC) $(CFLAGS) $(BCFLAGS) -o ../ip_fw_rules.bc ../sys/netpfil/ipfw/ip_fw_rules.h - -jit.o: jit.cc +jit.o: jit.cc ../ip_fw_rules.bc @clang++ $(CXXFLAGS) ../sys/netpfil/ipfw/jit.cc -o ./jit.o clean: Modified: soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw2.c Mon Jul 21 15:44:59 2014 (r271198) +++ soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw2.c Mon Jul 21 16:57:25 2014 (r271199) @@ -232,7 +232,7 @@ static inline void rule_reass(struct ip_fw *, int, struct ip_fw_chain *, int, struct ip *, struct ip_fw_args *, struct mbuf *, int *, int *, int *); /* JIT compiling API */ -static void ipfw_jit_init(); +void ipfw_jit_init(); /* * Each rule belongs to one of 32 different sets (0..31). Modified: soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/jit.cc ============================================================================== --- soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/jit.cc Mon Jul 21 15:44:59 2014 (r271198) +++ soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/jit.cc Mon Jul 21 16:57:25 2014 (r271199) @@ -1,4 +1,6 @@ /* JIT compilation code */ +#include + #include #include #include @@ -8,7 +10,6 @@ using namespace llvm; -ErrorOr ptr; Module *mod; LLVMContext con; LLVMContext &c = con; @@ -17,8 +18,19 @@ static void ipfw_jit_init() { - ptr = mod; /* We load the bc for JIT compilation */ - MemoryBuffer::getFile("ip_fw_rules.bc", buffer); + error_code ec = MemoryBuffer::getFile("runtime.bc", buffer); + if (ec) { + std::cerr << "Failed to open runtime.bc: " << ec.message() << "\n"; + exit(EXIT_FAILURE); + } + + ErrorOr ptr = parseBitcodeFile(buffer.get(), con); + if ((ec = ptr.getError())) + { + std::cerr << "Failed to parse runtime.bc: " << ec.message() << "\n"; + exit(EXIT_FAILURE); + } + mod = ptr.get(); ptr = parseBitcodeFile(buffer.get(), c); } Modified: soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/jit.h ============================================================================== --- soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/jit.h Mon Jul 21 15:44:59 2014 (r271198) +++ soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/jit.h Mon Jul 21 16:57:25 2014 (r271199) @@ -1,2 +1,2 @@ - -static void ipfw_jit_init(); +/* JIT code headers */ +void ipfw_jit_init(); From owner-svn-soc-all@FreeBSD.ORG Mon Jul 21 17:09:57 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CCCCD961 for ; Mon, 21 Jul 2014 17:09:57 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B954E2D79 for ; Mon, 21 Jul 2014 17:09:57 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6LH9vYn097981 for ; Mon, 21 Jul 2014 17:09:57 GMT (envelope-from dpl@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s6LH9vVQ097976 for svn-soc-all@FreeBSD.org; Mon, 21 Jul 2014 17:09:57 GMT (envelope-from dpl@FreeBSD.org) Date: Mon, 21 Jul 2014 17:09:57 GMT Message-Id: <201407211709.s6LH9vVQ097976@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to dpl@FreeBSD.org using -f From: dpl@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r271202 - in soc2014/dpl/netmap-ipfwjit: . sys/netpfil/ipfw MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2014 17:09:57 -0000 Author: dpl Date: Mon Jul 21 17:09:56 2014 New Revision: 271202 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271202 Log: Fixed Makefile. Modified: soc2014/dpl/netmap-ipfwjit/Makefile.kipfw soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/jit.cc Modified: soc2014/dpl/netmap-ipfwjit/Makefile.kipfw ============================================================================== --- soc2014/dpl/netmap-ipfwjit/Makefile.kipfw Mon Jul 21 16:38:05 2014 (r271201) +++ soc2014/dpl/netmap-ipfwjit/Makefile.kipfw Mon Jul 21 17:09:56 2014 (r271202) @@ -93,7 +93,7 @@ E_CFLAGS += -Dradix MOD := kipfw -LIBS= -lpthread `llvm-config-devel --ldflags --libs jit support` +LIBS= -lpthread `llvm-config-devel --ldflags --system-libs --libs all` CFLAGS = $(E_CFLAGS) IPFW_OBJS= $(IPFW_SRCS:%.c=%.o) @@ -152,7 +152,7 @@ #Generate the actual bytecode to be used ../ip_fw_rules.bc: - $(CC) $(CFLAGS) $(BCFLAGS) -o ../ip_fw_rules.bc ../sys/netpfil/ipfw/ip_fw_rules.h + @$(CC) $(CFLAGS) $(BCFLAGS) -o ../ip_fw_rules.bc ../sys/netpfil/ipfw/ip_fw_rules.h radix.o:# CFLAGS += -U_KERNEL @@ -161,7 +161,7 @@ $(MOD): $(IPFW_OBJS) jit.o $(MSG) " LD $@" - $(HIDE)$(CC) -o $@ $^ $(LIBS) + $(HIDE)clang++ -o $@ $^ $(LIBS) jit.o: jit.cc ../ip_fw_rules.bc @clang++ $(CXXFLAGS) ../sys/netpfil/ipfw/jit.cc -o ./jit.o Modified: soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/jit.cc ============================================================================== --- soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/jit.cc Mon Jul 21 16:38:05 2014 (r271201) +++ soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/jit.cc Mon Jul 21 17:09:56 2014 (r271202) @@ -15,7 +15,7 @@ LLVMContext &c = con; OwningPtr buffer; -static void +extern "C" void ipfw_jit_init() { /* We load the bc for JIT compilation */ From owner-svn-soc-all@FreeBSD.ORG Tue Jul 22 13:26:55 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 28E6D257 for ; Tue, 22 Jul 2014 13:26:55 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EF98125D2 for ; Tue, 22 Jul 2014 13:26:54 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6MDQs3U025656 for ; Tue, 22 Jul 2014 13:26:54 GMT (envelope-from dpl@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s6MDQswQ025526 for svn-soc-all@FreeBSD.org; Tue, 22 Jul 2014 13:26:54 GMT (envelope-from dpl@FreeBSD.org) Date: Tue, 22 Jul 2014 13:26:54 GMT Message-Id: <201407221326.s6MDQswQ025526@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to dpl@FreeBSD.org using -f From: dpl@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r271237 - soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jul 2014 13:26:55 -0000 Author: dpl Date: Tue Jul 22 13:26:54 2014 New Revision: 271237 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271237 Log: Added basic boilerplate (to be modified). Modified: soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/jit.cc Modified: soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/jit.cc ============================================================================== --- soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/jit.cc Tue Jul 22 08:52:49 2014 (r271236) +++ soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/jit.cc Tue Jul 22 13:26:54 2014 (r271237) @@ -1,5 +1,7 @@ /* JIT compilation code */ #include +#include +#include #include #include @@ -10,6 +12,13 @@ using namespace llvm; +struct funcdef { + string name; + int args; +} + +vector funcdefs = { + Module *mod; LLVMContext con; LLVMContext &c = con; @@ -33,4 +42,46 @@ } mod = ptr.get(); ptr = parseBitcodeFile(buffer.get(), c); + + + // XXX - We have to automate this. + // Get the stub (prototype) for the cell function + F = Mod->getFunction("cell"); + // Set it to have private linkage, so that it can be removed after being + // inlined. + F->setLinkage(GlobalValue::PrivateLinkage); + // Add an entry basic block to this function and set it + BasicBlock *entry = BasicBlock::Create(C, "entry", F); + B.SetInsertPoint(entry); + // Cache the type of registers + regTy = Type::getInt16Ty(C); + + // Collect the function parameters + auto args = F->arg_begin(); + oldGrid = args++; + newGrid = args++; + width = args++; + height = args++; + x = args++; + y = args++; + + // Create space on the stack for the local registers + for (int i=0 ; i<10 ; i++) + { + a[i] = B.CreateAlloca(regTy); + } + // Create a space on the stack for the current value. This can be + // assigned to, and will be returned at the end. Store the value passed + // as a parameter in this. + v = B.CreateAlloca(regTy); + B.CreateStore(args++, v); + + // Create a load of pointers to the global registers. + Value *gArg = args; + for (int i=0 ; i<10 ; i++) + { + B.CreateStore(ConstantInt::get(regTy, 0), a[i]); + g[i] = B.CreateConstGEP1_32(gArg, i); + } + } From owner-svn-soc-all@FreeBSD.ORG Wed Jul 23 09:20:18 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9A5512D0 for ; Wed, 23 Jul 2014 09:20:18 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 856A22492 for ; Wed, 23 Jul 2014 09:20:18 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6N9KIFR045112 for ; Wed, 23 Jul 2014 09:20:18 GMT (envelope-from op@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s6N9KGiw043981 for svn-soc-all@FreeBSD.org; Wed, 23 Jul 2014 09:20:16 GMT (envelope-from op@FreeBSD.org) Date: Wed, 23 Jul 2014 09:20:16 GMT Message-Id: <201407230920.s6N9KGiw043981@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to op@FreeBSD.org using -f From: op@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r271267 - in soc2014/op/freebsd-base/sys: amd64/include sys x86/include MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jul 2014 09:20:18 -0000 Author: op Date: Wed Jul 23 09:20:16 2014 New Revision: 271267 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271267 Log: KSP: refactor, renamed */_selfpatch.h to selfpatch-machdep.h Signed-off-by: Oliver Pinter git: https://github.com/opntr/opBSD/tree/op/gsoc2014/kpatch Added: soc2014/op/freebsd-base/sys/amd64/include/selfpatch-machdep.h soc2014/op/freebsd-base/sys/x86/include/selfpatch-machdep.h Modified: soc2014/op/freebsd-base/sys/amd64/include/_selfpatch.h soc2014/op/freebsd-base/sys/sys/selfpatch.h soc2014/op/freebsd-base/sys/x86/include/_selfpatch.h Modified: soc2014/op/freebsd-base/sys/amd64/include/_selfpatch.h ============================================================================== --- soc2014/op/freebsd-base/sys/amd64/include/_selfpatch.h Wed Jul 23 08:00:34 2014 (r271266) +++ soc2014/op/freebsd-base/sys/amd64/include/_selfpatch.h Wed Jul 23 09:20:16 2014 (r271267) @@ -1,34 +0,0 @@ -/*- - * Copyright (c) 2014, by Oliver Pinter - * All rights reserved. - * - * 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 __AMD64_SELFPATH_H__ -#define __AMD64_SELFPATH_H__ - -#include - -#endif /* __AMD64_SELFPATH_H__ */ Added: soc2014/op/freebsd-base/sys/amd64/include/selfpatch-machdep.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2014/op/freebsd-base/sys/amd64/include/selfpatch-machdep.h Wed Jul 23 09:20:16 2014 (r271267) @@ -0,0 +1,34 @@ +/*- + * Copyright (c) 2014, by Oliver Pinter + * All rights reserved. + * + * 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 __AMD64_SELFPATH_MACHDEP_H__ +#define __AMD64_SELFPATH_MACHDEP_H__ + +#include + +#endif /* __AMD64_SELFPATH_MACHDEP_H__ */ Modified: soc2014/op/freebsd-base/sys/sys/selfpatch.h ============================================================================== --- soc2014/op/freebsd-base/sys/sys/selfpatch.h Wed Jul 23 08:00:34 2014 (r271266) +++ soc2014/op/freebsd-base/sys/sys/selfpatch.h Wed Jul 23 09:20:16 2014 (r271267) @@ -32,7 +32,7 @@ #define KSP_SELFTEST 0 #define KSP_FEATURE_SELFTEST 1 -#include +#include struct linker_file_t; Modified: soc2014/op/freebsd-base/sys/x86/include/_selfpatch.h ============================================================================== --- soc2014/op/freebsd-base/sys/x86/include/_selfpatch.h Wed Jul 23 08:00:34 2014 (r271266) +++ soc2014/op/freebsd-base/sys/x86/include/_selfpatch.h Wed Jul 23 09:20:16 2014 (r271267) @@ -1,46 +0,0 @@ -/*- - * Copyright (c) 2014, by Oliver Pinter - * All rights reserved. - * - * 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 __X86_SELFPATH_H__ -#define __X86_SELFPATH_H__ - -#define KSP_CPU_FEATURE 1 -#define KSP_CPU_FEATURE2 2 -#define KSP_AMD_FEATURE 3 -#define KSP_AMD_FEATURE2 4 -#define KSP_VIA_FEATURE_RNG 5 -#define KSP_VIA_FEATURE_XCRYPT 6 -#define KSP_CPU_STDEXT_FEATURE 7 - -struct lf_selfpatch; - -extern char *md_selfpatch_nop_table[]; - -bool lf_selfpatch_patch_needed(struct lf_selfpatch *p); - -#endif /* __X86_SELFPATH_H__ */ Added: soc2014/op/freebsd-base/sys/x86/include/selfpatch-machdep.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2014/op/freebsd-base/sys/x86/include/selfpatch-machdep.h Wed Jul 23 09:20:16 2014 (r271267) @@ -0,0 +1,46 @@ +/*- + * Copyright (c) 2014, by Oliver Pinter + * All rights reserved. + * + * 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 __X86_SELFPATH_MACHDEP_H__ +#define __X86_SELFPATH_MACHDEP_H__ + +#define KSP_CPU_FEATURE 1 +#define KSP_CPU_FEATURE2 2 +#define KSP_AMD_FEATURE 3 +#define KSP_AMD_FEATURE2 4 +#define KSP_VIA_FEATURE_RNG 5 +#define KSP_VIA_FEATURE_XCRYPT 6 +#define KSP_CPU_STDEXT_FEATURE 7 + +struct lf_selfpatch; + +extern char *md_selfpatch_nop_table[]; + +bool lf_selfpatch_patch_needed(struct lf_selfpatch *p); + +#endif /* __X86_SELFPATH_MACHDEP_H__ */ From owner-svn-soc-all@FreeBSD.ORG Wed Jul 23 09:22:12 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CE9E2308 for ; Wed, 23 Jul 2014 09:22:12 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A1BC32515 for ; Wed, 23 Jul 2014 09:22:12 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6N9MCfN092492 for ; Wed, 23 Jul 2014 09:22:12 GMT (envelope-from op@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s6N9MCQ5092382 for svn-soc-all@FreeBSD.org; Wed, 23 Jul 2014 09:22:12 GMT (envelope-from op@FreeBSD.org) Date: Wed, 23 Jul 2014 09:22:12 GMT Message-Id: <201407230922.s6N9MCQ5092382@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to op@FreeBSD.org using -f From: op@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r271268 - in soc2014/op/freebsd-base/sys: amd64/include x86/include MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jul 2014 09:22:12 -0000 Author: op Date: Wed Jul 23 09:22:12 2014 New Revision: 271268 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271268 Log: KSP: delete empty files Signed-off-by: Oliver Pinter Deleted: soc2014/op/freebsd-base/sys/amd64/include/_selfpatch.h soc2014/op/freebsd-base/sys/x86/include/_selfpatch.h From owner-svn-soc-all@FreeBSD.ORG Wed Jul 23 13:06:12 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DD6BA41F for ; Wed, 23 Jul 2014 13:06:12 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BEF8D28D7 for ; Wed, 23 Jul 2014 13:06:12 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6ND6CkJ068074 for ; Wed, 23 Jul 2014 13:06:12 GMT (envelope-from op@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s6ND6B8v068070 for svn-soc-all@FreeBSD.org; Wed, 23 Jul 2014 13:06:11 GMT (envelope-from op@FreeBSD.org) Date: Wed, 23 Jul 2014 13:06:11 GMT Message-Id: <201407231306.s6ND6B8v068070@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to op@FreeBSD.org using -f From: op@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r271269 - in soc2014/op/freebsd-base/sys: amd64/include x86/include MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jul 2014 13:06:12 -0000 Author: op Date: Wed Jul 23 13:06:11 2014 New Revision: 271269 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271269 Log: KSP: added SMAP and XSAVE related patch definitions Signed-off-by: Oliver Pinter git: https://github.com/opntr/opBSD/tree/op/gsoc2014/kpatch Added: soc2014/op/freebsd-base/sys/amd64/include/selfpatch-asmacros.h soc2014/op/freebsd-base/sys/x86/include/selfpatch-asmacros.h Modified: soc2014/op/freebsd-base/sys/x86/include/selfpatch-machdep.h Added: soc2014/op/freebsd-base/sys/amd64/include/selfpatch-asmacros.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2014/op/freebsd-base/sys/amd64/include/selfpatch-asmacros.h Wed Jul 23 13:06:11 2014 (r271269) @@ -0,0 +1,34 @@ +/*- + * Copyright (c) 2014, by Oliver Pinter + * All rights reserved. + * + * 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 __AMD64_SELFPATH_ASMACROS_H__ +#define __AMD64_SELFPATH_ASMACROS_H__ + +#include + +#endif /* __AMD64_SELFPATH_ASMACROS_H__ */ Added: soc2014/op/freebsd-base/sys/x86/include/selfpatch-asmacros.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2014/op/freebsd-base/sys/x86/include/selfpatch-asmacros.h Wed Jul 23 13:06:11 2014 (r271269) @@ -0,0 +1,130 @@ +/*- + * Copyright (c) 2014, by Oliver Pinter + * All rights reserved. + * + * 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 __X86_SELFPATCH_ASMACROS_H__ +#define __X86_SELFPATCH_ASMACROS_H__ + +#define KSP_CPU_FEATURE 1 +#define KSP_CPU_FEATURE2 2 +#define KSP_AMD_FEATURE 3 +#define KSP_AMD_FEATURE2 4 +#define KSP_VIA_FEATURE_RNG 5 +#define KSP_VIA_FEATURE_XCRYPT 6 +#define KSP_CPU_STDEXT_FEATURE 7 + +/* + * Intel Instruction Set Reference M-Z + * Table 4-12. recommended Multi-Byte Sequeance of NOP Instruction + */ +#define KSP_INSTR_INTEL_NOP1 .byte 0x90 +#define KSP_INSTR_INTEL_NOP2 .byte 0x66,0x90 +#define KSP_INSTR_INTEL_NOP3 .byte 0x0f,0x1f,0x00 +#define KSP_INSTR_INTEL_NOP4 .byte 0x0f,0x1f,0x40,0x00 +#define KSP_INSTR_INTEL_NOP5 .byte 0x0f,0x1f,0x44,0x00,0x00 +#define KSP_INSTR_INTEL_NOP6 .byte 0x66,0x0f,0x1f,0x44,0x00,0x00 +#define KSP_INSTR_INTEL_NOP7 .byte 0x0f,0x1f,0x80,0x00,0x00,0x00,0x00 +#define KSP_INSTR_INTEL_NOP8 .byte 0x0f,0x1f,0x84,0x00,0x00,0x00,0x00,0x00 +#define KSP_INSTR_INTEL_NOP9 .byte 0x66,0x0f,0x1f,0x84,0x00,0x00,0x00,0x00,0x00 + +#define KSP_INSTR_NOP1 KSP_INSTR_INTEL_NOP1 +#define KSP_INSTR_NOP2 KSP_INSTR_INTEL_NOP2 +#define KSP_INSTR_NOP3 KSP_INSTR_INTEL_NOP3 +#define KSP_INSTR_NOP4 KSP_INSTR_INTEL_NOP4 +#define KSP_INSTR_NOP5 KSP_INSTR_INTEL_NOP5 +#define KSP_INSTR_NOP6 KSP_INSTR_INTEL_NOP6 +#define KSP_INSTR_NOP7 KSP_INSTR_INTEL_NOP7 +#define KSP_INSTR_NOP8 KSP_INSTR_INTEL_NOP8 +#define KSP_INSTR_NOP9 KSP_INSTR_INTEL_NOP9 + +#define KSP_INSTR_XSAVE_XSAVEOPT(_ARG) \ + "0723:" \ + " xsave " _ARG " ; " \ + "0724: " \ + " .pushsection set_selfpatch_patch_set, \"ax\" ; " \ + "0725: " \ + " xsaveopt " _ARG " ;" \ + "0726: " \ + " .popsection " \ + " .pushsection set_selfpatch_set, \"a\" ; " \ + " .quad 0723b ; " \ + " .quad 0725b ; " \ + " .int 0724b-0723b ; " \ + " .int 0726b-0725b ; " \ + " .int " KSP_CPU_FEATURE2 " ; " \ + " .int " CPUID2_OSXSAVE " ; " \ + " .quad 0 ; " \ + " .popsection ; " + +#define _xsave_xsaveopt(_ARG) KSP_INSTR_XSAVE_XSAVEOPT(_ARG) + + +#define KSP_INSTR_NOP3_CLAC \ + "0723:" \ + " " KSP_INSTR_NOP3 " ; " \ + "0724: " \ + " .pushsection set_selfpatch_patch_set, \"ax\" ; " \ + "0725: " \ + " clac " ;" \ + "0726: " \ + " .popsection " \ + " .pushsection set_selfpatch_set, \"a\" ; " \ + " .quad 0723b ; " \ + " .quad 0725b ; " \ + " .int 0724b-0723b ; " \ + " .int 0726b-0725b ; " \ + " .int " KSP_CPU_STDEXT_FEATURE " ; " \ + " .int " CPUID_STDEXT_SMAP " ; " \ + " .quad 0 ; " \ + " .popsection ; " + +#define _clac KSP_INSTR_NOP3_CLAC + + +#define KSP_INSTR_NOP3_STAC \ + "0723:" \ + " " KSP_INSTR_NOP3 " ; " \ + "0724: " \ + " .pushsection set_selfpatch_patch_set, \"ax\" ; " \ + "0725: " \ + " stac " ;" \ + "0726: " \ + " .popsection " \ + " .pushsection set_selfpatch_set, \"a\" ; " \ + " .quad 0723b ; " \ + " .quad 0725b ; " \ + " .int 0724b-0723b ; " \ + " .int 0726b-0725b ; " \ + " .int " KSP_CPU_STDEXT_FEATURE " ; " \ + " .int " CPUID_STDEXT_SMAP " ; " \ + " .quad 0 ; " \ + " .popsection ; " + +#define _stac KSP_INSTR_NOP3_STAC + +#endif /* __X86_SELFPATCH_ASMACROS_H__ */ Modified: soc2014/op/freebsd-base/sys/x86/include/selfpatch-machdep.h ============================================================================== --- soc2014/op/freebsd-base/sys/x86/include/selfpatch-machdep.h Wed Jul 23 09:22:12 2014 (r271268) +++ soc2014/op/freebsd-base/sys/x86/include/selfpatch-machdep.h Wed Jul 23 13:06:11 2014 (r271269) @@ -29,14 +29,6 @@ #ifndef __X86_SELFPATH_MACHDEP_H__ #define __X86_SELFPATH_MACHDEP_H__ -#define KSP_CPU_FEATURE 1 -#define KSP_CPU_FEATURE2 2 -#define KSP_AMD_FEATURE 3 -#define KSP_AMD_FEATURE2 4 -#define KSP_VIA_FEATURE_RNG 5 -#define KSP_VIA_FEATURE_XCRYPT 6 -#define KSP_CPU_STDEXT_FEATURE 7 - struct lf_selfpatch; extern char *md_selfpatch_nop_table[]; From owner-svn-soc-all@FreeBSD.ORG Wed Jul 23 13:06:23 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4ACF9434 for ; Wed, 23 Jul 2014 13:06:23 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 369BB28DE for ; Wed, 23 Jul 2014 13:06:23 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6ND6N2s068198 for ; Wed, 23 Jul 2014 13:06:23 GMT (envelope-from op@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s6ND6Mv6068194 for svn-soc-all@FreeBSD.org; Wed, 23 Jul 2014 13:06:22 GMT (envelope-from op@FreeBSD.org) Date: Wed, 23 Jul 2014 13:06:22 GMT Message-Id: <201407231306.s6ND6Mv6068194@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to op@FreeBSD.org using -f From: op@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r271270 - in soc2014/op/freebsd-base/sys: kern sys x86/include MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jul 2014 13:06:23 -0000 Author: op Date: Wed Jul 23 13:06:21 2014 New Revision: 271270 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271270 Log: KSP: renamed feature selectors Signed-off-by: Oliver Pinter git: https://github.com/opntr/opBSD/tree/op/gsoc2014/kpatch Modified: soc2014/op/freebsd-base/sys/kern/kern_selfpatch.c soc2014/op/freebsd-base/sys/sys/selfpatch.h soc2014/op/freebsd-base/sys/x86/include/selfpatch-asmacros.h Modified: soc2014/op/freebsd-base/sys/kern/kern_selfpatch.c ============================================================================== --- soc2014/op/freebsd-base/sys/kern/kern_selfpatch.c Wed Jul 23 13:06:11 2014 (r271269) +++ soc2014/op/freebsd-base/sys/kern/kern_selfpatch.c Wed Jul 23 13:06:21 2014 (r271270) @@ -72,32 +72,32 @@ } switch (p->feature_selector) { - case KSP_CPU_FEATURE : + case KSP_CPUID : if ((cpu_feature & p->feature) != 0) return (true); break; - case KSP_CPU_FEATURE2 : + case KSP_CPUID2 : if ((cpu_feature2 & p->feature) != 0) return (true); break; - case KSP_AMD_FEATURE : + case KSP_AMDID : if ((amd_feature & p->feature) != 0) return (true); break; - case KSP_AMD_FEATURE2 : + case KSP_AMDID2 : if ((amd_feature2 & p->feature) != 0) return (true); break; - case KSP_VIA_FEATURE_RNG : - if ((via_feature_rng & p->feature) != 0) + case KSP_CPUID_STDEXT : + if ((cpu_stdext_feature & p->feature) != 0) return (true); break; - case KSP_VIA_FEATURE_XCRYPT : - if ((via_feature_xcrypt & p->feature) != 0) + case KSP_VIA_CPUID : + if ((via_feature_rng & p->feature) != 0) return (true); break; - case KSP_CPU_STDEXT_FEATURE : - if ((cpu_stdext_feature & p->feature) != 0) + case KSP_VIA_CRYPT_CWLO : + if ((via_feature_xcrypt & p->feature) != 0) return (true); break; case KSP_SELFTEST: Modified: soc2014/op/freebsd-base/sys/sys/selfpatch.h ============================================================================== --- soc2014/op/freebsd-base/sys/sys/selfpatch.h Wed Jul 23 13:06:11 2014 (r271269) +++ soc2014/op/freebsd-base/sys/sys/selfpatch.h Wed Jul 23 13:06:21 2014 (r271270) @@ -33,6 +33,7 @@ #define KSP_FEATURE_SELFTEST 1 #include +#include struct linker_file_t; Modified: soc2014/op/freebsd-base/sys/x86/include/selfpatch-asmacros.h ============================================================================== --- soc2014/op/freebsd-base/sys/x86/include/selfpatch-asmacros.h Wed Jul 23 13:06:11 2014 (r271269) +++ soc2014/op/freebsd-base/sys/x86/include/selfpatch-asmacros.h Wed Jul 23 13:06:21 2014 (r271270) @@ -30,13 +30,13 @@ #ifndef __X86_SELFPATCH_ASMACROS_H__ #define __X86_SELFPATCH_ASMACROS_H__ -#define KSP_CPU_FEATURE 1 -#define KSP_CPU_FEATURE2 2 -#define KSP_AMD_FEATURE 3 -#define KSP_AMD_FEATURE2 4 -#define KSP_VIA_FEATURE_RNG 5 -#define KSP_VIA_FEATURE_XCRYPT 6 -#define KSP_CPU_STDEXT_FEATURE 7 +#define KSP_CPUID 1 +#define KSP_CPUID2 2 +#define KSP_AMDID 3 +#define KSP_AMDID2 4 +#define KSP_CPUID_STDEXT 5 +#define KSP_VIA_CPUID 6 +#define KSP_VIA_CRYPT_CWLO 7 /* * Intel Instruction Set Reference M-Z @@ -76,7 +76,7 @@ " .quad 0725b ; " \ " .int 0724b-0723b ; " \ " .int 0726b-0725b ; " \ - " .int " KSP_CPU_FEATURE2 " ; " \ + " .int " KSP_CPUID2 " ; " \ " .int " CPUID2_OSXSAVE " ; " \ " .quad 0 ; " \ " .popsection ; " @@ -98,7 +98,7 @@ " .quad 0725b ; " \ " .int 0724b-0723b ; " \ " .int 0726b-0725b ; " \ - " .int " KSP_CPU_STDEXT_FEATURE " ; " \ + " .int " KSP_CPUID_STDEXT " ; " \ " .int " CPUID_STDEXT_SMAP " ; " \ " .quad 0 ; " \ " .popsection ; " @@ -120,7 +120,7 @@ " .quad 0725b ; " \ " .int 0724b-0723b ; " \ " .int 0726b-0725b ; " \ - " .int " KSP_CPU_STDEXT_FEATURE " ; " \ + " .int " KSP_CPUID_STDEXT " ; " \ " .int " CPUID_STDEXT_SMAP " ; " \ " .quad 0 ; " \ " .popsection ; " From owner-svn-soc-all@FreeBSD.ORG Wed Jul 23 13:06:32 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D3413446 for ; Wed, 23 Jul 2014 13:06:32 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BED9428DF for ; Wed, 23 Jul 2014 13:06:32 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6ND6WPh068246 for ; Wed, 23 Jul 2014 13:06:32 GMT (envelope-from op@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s6ND6WCe068244 for svn-soc-all@FreeBSD.org; Wed, 23 Jul 2014 13:06:32 GMT (envelope-from op@FreeBSD.org) Date: Wed, 23 Jul 2014 13:06:32 GMT Message-Id: <201407231306.s6ND6WCe068244@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to op@FreeBSD.org using -f From: op@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r271271 - soc2014/op/freebsd-base/sys/x86/include MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jul 2014 13:06:33 -0000 Author: op Date: Wed Jul 23 13:06:31 2014 New Revision: 271271 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271271 Log: KSP: updated selfpatches Signed-off-by: Oliver Pinter git: https://github.com/opntr/opBSD/tree/op/gsoc2014/kpatch Modified: soc2014/op/freebsd-base/sys/x86/include/selfpatch-asmacros.h Modified: soc2014/op/freebsd-base/sys/x86/include/selfpatch-asmacros.h ============================================================================== --- soc2014/op/freebsd-base/sys/x86/include/selfpatch-asmacros.h Wed Jul 23 13:06:21 2014 (r271270) +++ soc2014/op/freebsd-base/sys/x86/include/selfpatch-asmacros.h Wed Jul 23 13:06:31 2014 (r271271) @@ -63,68 +63,73 @@ #define KSP_INSTR_NOP9 KSP_INSTR_INTEL_NOP9 #define KSP_INSTR_XSAVE_XSAVEOPT(_ARG) \ - "0723:" \ - " xsave " _ARG " ; " \ - "0724: " \ - " .pushsection set_selfpatch_patch_set, \"ax\" ; " \ - "0725: " \ - " xsaveopt " _ARG " ;" \ - "0726: " \ - " .popsection " \ - " .pushsection set_selfpatch_set, \"a\" ; " \ - " .quad 0723b ; " \ - " .quad 0725b ; " \ - " .int 0724b-0723b ; " \ - " .int 0726b-0725b ; " \ - " .int " KSP_CPUID2 " ; " \ - " .int " CPUID2_OSXSAVE " ; " \ - " .quad 0 ; " \ - " .popsection ; " - -#define _xsave_xsaveopt(_ARG) KSP_INSTR_XSAVE_XSAVEOPT(_ARG) - + 0723: \ + xsave _ARG ; \ + 0724: \ + .pushsection set_selfpatch_patch_set, "ax" ; \ + 0725: \ + xsaveopt _ARG ; \ + 0726: \ + .popsection \ + .pushsection set_selfpatch_set, "a" ; \ + .quad 0723b ; \ + .quad 0725b ; \ + .int 0724b-0723b ; \ + .int 0726b-0725b ; \ + .int KSP_CPUID2 ; \ + .int CPUID2_OSXSAVE ; \ + .quad 0 ; \ + .popsection ; + +#ifndef _xsave_xsaveopt +#define _xsave_xsaveopt(_ARG) KSP_INSTR_XSAVE_XSAVEOPT(_ARG) +#endif #define KSP_INSTR_NOP3_CLAC \ - "0723:" \ - " " KSP_INSTR_NOP3 " ; " \ - "0724: " \ - " .pushsection set_selfpatch_patch_set, \"ax\" ; " \ - "0725: " \ - " clac " ;" \ - "0726: " \ - " .popsection " \ - " .pushsection set_selfpatch_set, \"a\" ; " \ - " .quad 0723b ; " \ - " .quad 0725b ; " \ - " .int 0724b-0723b ; " \ - " .int 0726b-0725b ; " \ - " .int " KSP_CPUID_STDEXT " ; " \ - " .int " CPUID_STDEXT_SMAP " ; " \ - " .quad 0 ; " \ - " .popsection ; " + 0723: \ + KSP_INSTR_NOP3 ; \ + 0724: \ + .pushsection set_selfpatch_patch_set, "ax" ; \ + 0725: \ + clac ; \ + 0726: \ + .popsection \ + .pushsection set_selfpatch_set, "a" ; \ + .quad 0723b ; \ + .quad 0725b ; \ + .int 0724b-0723b ; \ + .int 0726b-0725b ; \ + .int KSP_CPUID_STDEXT ; \ + .int CPUID_STDEXT_SMAP ; \ + .quad 0 ; \ + .popsection ; +#ifndef _clac #define _clac KSP_INSTR_NOP3_CLAC +#endif #define KSP_INSTR_NOP3_STAC \ - "0723:" \ - " " KSP_INSTR_NOP3 " ; " \ - "0724: " \ - " .pushsection set_selfpatch_patch_set, \"ax\" ; " \ - "0725: " \ - " stac " ;" \ - "0726: " \ - " .popsection " \ - " .pushsection set_selfpatch_set, \"a\" ; " \ - " .quad 0723b ; " \ - " .quad 0725b ; " \ - " .int 0724b-0723b ; " \ - " .int 0726b-0725b ; " \ - " .int " KSP_CPUID_STDEXT " ; " \ - " .int " CPUID_STDEXT_SMAP " ; " \ - " .quad 0 ; " \ - " .popsection ; " + 0723: \ + KSP_INSTR_NOP3 ; \ + 0724: \ + .pushsection set_selfpatch_patch_set, "ax" ; \ + 0725: \ + stac ; \ + 0726: \ + .popsection \ + .pushsection set_selfpatch_set, "a" ; \ + .quad 0723b ; \ + .quad 0725b ; \ + .int 0724b-0723b ; \ + .int 0726b-0725b ; \ + .int KSP_CPUID_STDEXT ; \ + .int CPUID_STDEXT_SMAP ; \ + .quad 0 ; \ + .popsection ; +#ifndef _stac #define _stac KSP_INSTR_NOP3_STAC +#endif #endif /* __X86_SELFPATCH_ASMACROS_H__ */ From owner-svn-soc-all@FreeBSD.ORG Wed Jul 23 13:06:43 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C582B45C for ; Wed, 23 Jul 2014 13:06:43 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 97E2D28E2 for ; Wed, 23 Jul 2014 13:06:43 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6ND6hZg068329 for ; Wed, 23 Jul 2014 13:06:43 GMT (envelope-from op@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s6ND6gUJ068326 for svn-soc-all@FreeBSD.org; Wed, 23 Jul 2014 13:06:42 GMT (envelope-from op@FreeBSD.org) Date: Wed, 23 Jul 2014 13:06:42 GMT Message-Id: <201407231306.s6ND6gUJ068326@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to op@FreeBSD.org using -f From: op@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r271272 - soc2014/op/freebsd-base/sys/amd64/amd64 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jul 2014 13:06:43 -0000 Author: op Date: Wed Jul 23 13:06:42 2014 New Revision: 271272 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271272 Log: KSP: convert xsave <-> xsaveopt hack to selfpatches Signed-off-by: Oliver Pinter git: https://github.com/opntr/opBSD/tree/op/gsoc2014/kpatch Modified: soc2014/op/freebsd-base/sys/amd64/amd64/cpu_switch.S soc2014/op/freebsd-base/sys/amd64/amd64/fpu.c Modified: soc2014/op/freebsd-base/sys/amd64/amd64/cpu_switch.S ============================================================================== --- soc2014/op/freebsd-base/sys/amd64/amd64/cpu_switch.S Wed Jul 23 13:06:31 2014 (r271271) +++ soc2014/op/freebsd-base/sys/amd64/amd64/cpu_switch.S Wed Jul 23 13:06:42 2014 (r271272) @@ -35,6 +35,7 @@ #include #include +#include #include "assym.s" #include "opt_sched.h" @@ -121,10 +122,7 @@ 1: movq %rdx,%rcx movl xsave_mask,%eax movl xsave_mask+4,%edx - .globl ctx_switch_xsave -ctx_switch_xsave: - /* This is patched to xsaveopt if supported, see fpuinit_bsp1() */ - xsave (%r8) + _xsave_xsaveopt( (%r8) ) movq %rcx,%rdx 2: smsw %ax orb $CR0_TS,%al Modified: soc2014/op/freebsd-base/sys/amd64/amd64/fpu.c ============================================================================== --- soc2014/op/freebsd-base/sys/amd64/amd64/fpu.c Wed Jul 23 13:06:31 2014 (r271271) +++ soc2014/op/freebsd-base/sys/amd64/amd64/fpu.c Wed Jul 23 13:06:42 2014 (r271272) @@ -203,16 +203,6 @@ xsave_mask &= ~XFEATURE_AVX512; if ((xsave_mask & XFEATURE_MPX) != XFEATURE_MPX) xsave_mask &= ~XFEATURE_MPX; - - cpuid_count(0xd, 0x1, cp); - if ((cp[0] & CPUID_EXTSTATE_XSAVEOPT) != 0) { - /* - * Patch the XSAVE instruction in the cpu_switch code - * to XSAVEOPT. We assume that XSAVE encoding used - * REX byte, and set the bit 4 of the r/m byte. - */ - ctx_switch_xsave[3] |= 0x10; - } } /* From owner-svn-soc-all@FreeBSD.ORG Wed Jul 23 13:06:52 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CEDDC46D for ; Wed, 23 Jul 2014 13:06:52 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BAD1828E3 for ; Wed, 23 Jul 2014 13:06:52 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6ND6qwc068408 for ; Wed, 23 Jul 2014 13:06:52 GMT (envelope-from op@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s6ND6qVF068392 for svn-soc-all@FreeBSD.org; Wed, 23 Jul 2014 13:06:52 GMT (envelope-from op@FreeBSD.org) Date: Wed, 23 Jul 2014 13:06:52 GMT Message-Id: <201407231306.s6ND6qVF068392@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to op@FreeBSD.org using -f From: op@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r271273 - in soc2014/op/freebsd-base/sys: amd64/amd64 x86/include MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jul 2014 13:06:52 -0000 Author: op Date: Wed Jul 23 13:06:51 2014 New Revision: 271273 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271273 Log: KSP: lower nesting level of round brackets Signed-off-by: Oliver Pinter git: https://github.com/opntr/opBSD/tree/op/gsoc2014/kpatch Modified: soc2014/op/freebsd-base/sys/amd64/amd64/cpu_switch.S soc2014/op/freebsd-base/sys/x86/include/selfpatch-asmacros.h Modified: soc2014/op/freebsd-base/sys/amd64/amd64/cpu_switch.S ============================================================================== --- soc2014/op/freebsd-base/sys/amd64/amd64/cpu_switch.S Wed Jul 23 13:06:42 2014 (r271272) +++ soc2014/op/freebsd-base/sys/amd64/amd64/cpu_switch.S Wed Jul 23 13:06:51 2014 (r271273) @@ -122,7 +122,7 @@ 1: movq %rdx,%rcx movl xsave_mask,%eax movl xsave_mask+4,%edx - _xsave_xsaveopt( (%r8) ) + _xsave_xsaveopt (%r8) movq %rcx,%rdx 2: smsw %ax orb $CR0_TS,%al Modified: soc2014/op/freebsd-base/sys/x86/include/selfpatch-asmacros.h ============================================================================== --- soc2014/op/freebsd-base/sys/x86/include/selfpatch-asmacros.h Wed Jul 23 13:06:42 2014 (r271272) +++ soc2014/op/freebsd-base/sys/x86/include/selfpatch-asmacros.h Wed Jul 23 13:06:51 2014 (r271273) @@ -64,11 +64,11 @@ #define KSP_INSTR_XSAVE_XSAVEOPT(_ARG) \ 0723: \ - xsave _ARG ; \ + xsave ( _ARG ) ; \ 0724: \ .pushsection set_selfpatch_patch_set, "ax" ; \ 0725: \ - xsaveopt _ARG ; \ + xsaveopt ( _ARG ) ; \ 0726: \ .popsection \ .pushsection set_selfpatch_set, "a" ; \ From owner-svn-soc-all@FreeBSD.ORG Wed Jul 23 13:07:02 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7EBA048B for ; Wed, 23 Jul 2014 13:07:02 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 50EAD28E8 for ; Wed, 23 Jul 2014 13:07:02 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6ND72QY068520 for ; Wed, 23 Jul 2014 13:07:02 GMT (envelope-from op@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s6ND713a068473 for svn-soc-all@FreeBSD.org; Wed, 23 Jul 2014 13:07:01 GMT (envelope-from op@FreeBSD.org) Date: Wed, 23 Jul 2014 13:07:01 GMT Message-Id: <201407231307.s6ND713a068473@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to op@FreeBSD.org using -f From: op@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r271274 - in soc2014/op/freebsd-base/sys: kern x86/include MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jul 2014 13:07:02 -0000 Author: op Date: Wed Jul 23 13:07:01 2014 New Revision: 271274 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271274 Log: KSP: fix xsaveopt NOTE: the cpuid_count part must be refactor, probably place into idencpu.c Signed-off-by: Oliver Pinter git: https://github.com/opntr/opBSD/tree/op/gsoc2014/kpatch Modified: soc2014/op/freebsd-base/sys/kern/kern_selfpatch.c soc2014/op/freebsd-base/sys/x86/include/selfpatch-asmacros.h Modified: soc2014/op/freebsd-base/sys/kern/kern_selfpatch.c ============================================================================== --- soc2014/op/freebsd-base/sys/kern/kern_selfpatch.c Wed Jul 23 13:06:51 2014 (r271273) +++ soc2014/op/freebsd-base/sys/kern/kern_selfpatch.c Wed Jul 23 13:07:01 2014 (r271274) @@ -100,6 +100,15 @@ if ((via_feature_xcrypt & p->feature) != 0) return (true); break; + case KSP_CPUID_EXTSTATE : + { + u_int cp[4]; + + cpuid_count(0xd, 0x1, cp); + if ((cp[0] & p->feature) != 0) + return (true); + } + break; case KSP_SELFTEST: if ((p->feature & KSP_FEATURE_SELFTEST) != 0) return (true); Modified: soc2014/op/freebsd-base/sys/x86/include/selfpatch-asmacros.h ============================================================================== --- soc2014/op/freebsd-base/sys/x86/include/selfpatch-asmacros.h Wed Jul 23 13:06:51 2014 (r271273) +++ soc2014/op/freebsd-base/sys/x86/include/selfpatch-asmacros.h Wed Jul 23 13:07:01 2014 (r271274) @@ -37,6 +37,7 @@ #define KSP_CPUID_STDEXT 5 #define KSP_VIA_CPUID 6 #define KSP_VIA_CRYPT_CWLO 7 +#define KSP_CPUID_EXTSTATE 8 /* * Intel Instruction Set Reference M-Z @@ -76,8 +77,8 @@ .quad 0725b ; \ .int 0724b-0723b ; \ .int 0726b-0725b ; \ - .int KSP_CPUID2 ; \ - .int CPUID2_OSXSAVE ; \ + .int KSP_CPUID_EXTSTATE ; \ + .int CPUID_EXTSTATE_XSAVEOPT ; \ .quad 0 ; \ .popsection ; From owner-svn-soc-all@FreeBSD.ORG Wed Jul 23 16:26:30 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2C965539 for ; Wed, 23 Jul 2014 16:26:30 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F30572F31 for ; Wed, 23 Jul 2014 16:26:29 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6NGQTTX060352 for ; Wed, 23 Jul 2014 16:26:29 GMT (envelope-from dpl@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s6NGQTvs060225 for svn-soc-all@FreeBSD.org; Wed, 23 Jul 2014 16:26:29 GMT (envelope-from dpl@FreeBSD.org) Date: Wed, 23 Jul 2014 16:26:29 GMT Message-Id: <201407231626.s6NGQTvs060225@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to dpl@FreeBSD.org using -f From: dpl@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r271282 - soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jul 2014 16:26:30 -0000 Author: dpl Date: Wed Jul 23 16:26:29 2014 New Revision: 271282 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271282 Log: Modularized the LLVM code. Modified: soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/jit.cc Modified: soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/jit.cc ============================================================================== --- soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/jit.cc Wed Jul 23 15:53:29 2014 (r271281) +++ soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/jit.cc Wed Jul 23 16:26:29 2014 (r271282) @@ -12,39 +12,39 @@ using namespace llvm; -struct funcdef { - string name; - int args; -} - -vector funcdefs = { - -Module *mod; -LLVMContext con; -LLVMContext &c = con; -OwningPtr buffer; +class jitCompiler { + private: + Module *mod; + LLVMContext con; + LLVMContext &c = con; + OwningPtr buffer; + public: + jitCompiler(std::string name) + { + /* We load the bc for JIT compilation */ + error_code ec = MemoryBuffer::getFile(name, buffer); + if (ec) { + std::cerr << "Failed to open bitcode: " << ec.message() << "\n"; + exit(EXIT_FAILURE); + } + + ErrorOr ptr = parseBitcodeFile(buffer.get(), con); + if ((ec = ptr.getError())) + { + std::cerr << "Failed to parse bitcode: " << ec.message() << "\n"; + exit(EXIT_FAILURE); + } + mod = ptr.get(); + ptr = parseBitcodeFile(buffer.get(), c); + } +} ; extern "C" void ipfw_jit_init() { - /* We load the bc for JIT compilation */ - error_code ec = MemoryBuffer::getFile("runtime.bc", buffer); - if (ec) { - std::cerr << "Failed to open runtime.bc: " << ec.message() << "\n"; - exit(EXIT_FAILURE); - } - - ErrorOr ptr = parseBitcodeFile(buffer.get(), con); - if ((ec = ptr.getError())) - { - std::cerr << "Failed to parse runtime.bc: " << ec.message() << "\n"; - exit(EXIT_FAILURE); - } - mod = ptr.get(); - ptr = parseBitcodeFile(buffer.get(), c); - + jitCompiler("ip_fw_rules.bc"); - // XXX - We have to automate this. + /* XXX - We have to understand what we have to here. // Get the stub (prototype) for the cell function F = Mod->getFunction("cell"); // Set it to have private linkage, so that it can be removed after being @@ -84,4 +84,5 @@ g[i] = B.CreateConstGEP1_32(gArg, i); } + */ } From owner-svn-soc-all@FreeBSD.ORG Wed Jul 23 16:27:03 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 894E5561 for ; Wed, 23 Jul 2014 16:27:03 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 759002F37 for ; Wed, 23 Jul 2014 16:27:03 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6NGR3E6066385 for ; Wed, 23 Jul 2014 16:27:03 GMT (envelope-from dpl@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s6NGR3dY066247 for svn-soc-all@FreeBSD.org; Wed, 23 Jul 2014 16:27:03 GMT (envelope-from dpl@FreeBSD.org) Date: Wed, 23 Jul 2014 16:27:03 GMT Message-Id: <201407231627.s6NGR3dY066247@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to dpl@FreeBSD.org using -f From: dpl@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r271283 - soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jul 2014 16:27:03 -0000 Author: dpl Date: Wed Jul 23 16:27:02 2014 New Revision: 271283 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271283 Log: Added more JIT compiling code. Modified: soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw2.c Modified: soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw2.c Wed Jul 23 16:26:29 2014 (r271282) +++ soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw2.c Wed Jul 23 16:27:02 2014 (r271283) @@ -232,7 +232,13 @@ static inline void rule_reass(struct ip_fw *, int, struct ip_fw_chain *, int, struct ip *, struct ip_fw_args *, struct mbuf *, int *, int *, int *); /* JIT compiling API */ +typedef int (*funcptr)(); + void ipfw_jit_init(); +funcptr compile_code(); + +/* Pointer to the actual compiled code */ +int (*compiledfuncptr)() = 0; /* * Each rule belongs to one of 32 different sets (0..31). @@ -365,6 +371,12 @@ int ipfw_chk(struct ip_fw_args *args) { + if (compiledfuncptr == 0) + compiledfuncptr = compile_code(); + + if ((int)compiledfuncptr != 0) { + return compiledfuncptr(); + } /* * Local variables holding state while processing a packet: @@ -1323,6 +1335,8 @@ default_fw_tables = IPFW_TABLES_MAX; ipfw_log_bpf(1); /* init */ + + /* Start JIT */ ipfw_jit_init(); return (error); From owner-svn-soc-all@FreeBSD.ORG Wed Jul 23 16:27:44 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 26293579 for ; Wed, 23 Jul 2014 16:27:44 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 117092F3B for ; Wed, 23 Jul 2014 16:27:44 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6NGRiwg073838 for ; Wed, 23 Jul 2014 16:27:44 GMT (envelope-from dpl@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s6NGRhC2073698 for svn-soc-all@FreeBSD.org; Wed, 23 Jul 2014 16:27:43 GMT (envelope-from dpl@FreeBSD.org) Date: Wed, 23 Jul 2014 16:27:43 GMT Message-Id: <201407231627.s6NGRhC2073698@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to dpl@FreeBSD.org using -f From: dpl@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r271284 - soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jul 2014 16:27:44 -0000 Author: dpl Date: Wed Jul 23 16:27:43 2014 New Revision: 271284 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271284 Log: Taken out the inline type of the functions. Modified: soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw_rules.h Modified: soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw_rules.h ============================================================================== --- soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw_rules.h Wed Jul 23 16:27:02 2014 (r271283) +++ soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw_rules.h Wed Jul 23 16:27:43 2014 (r271284) @@ -656,13 +656,13 @@ * Actions executed per-rule. */ -static inline void +static void rule_nop(int *match) { *match = 1; } -static inline void +static void rule_forward_mac(int opcode) { printf("ipfw: opcode %d unimplemented\n", @@ -670,7 +670,7 @@ } -static inline void +static void rule_jail(int * match, u_short offset, uint8_t proto, ipfw_insn *cmd, struct ip_fw_args *args, int ucred_lookup, void *ucred_cache) { /* @@ -693,25 +693,25 @@ #endif } -static inline void +static void rule_recv(int *match, ipfw_insn *cmd, struct mbuf *m, struct ip_fw_chain *chain, uint32_t *tablearg) { *match = iface_match(m->m_pkthdr.rcvif, (ipfw_insn_if *)cmd, chain, tablearg); } -static inline void +static void rule_xmit(int *match, struct ifnet *oif, ipfw_insn *cmd, struct ip_fw_chain *chain, uint32_t *tablearg) { *match = iface_match(oif, (ipfw_insn_if *)cmd, chain, tablearg); } -static inline void +static void rule_via(int *match, struct ifnet *oif, struct mbuf *m, ipfw_insn *cmd, struct ip_fw_chain *chain, uint32_t *tablearg) { *match = iface_match(oif ? oif : m->m_pkthdr.rcvif, (ipfw_insn_if *)cmd, chain, tablearg); } -static inline void +static void rule_macaddr2(int *match, struct ip_fw_args *args, ipfw_insn *cmd) { if (args->eh != NULL) { /* have MAC header */ @@ -729,7 +729,7 @@ } -static inline void +static void rule_mac_type(int *match, struct ip_fw_args *args, ipfw_insn *cmd, int cmdlen, uint16_t etype) { if (args->eh != NULL) { @@ -745,26 +745,26 @@ } -static inline void +static void rule_frag(int *match, u_short offset) { *match = (offset != 0); } -static inline void +static void rule_in(int *match, struct ifnet *oif) { /* "out" is "not in" */ *match = (oif == NULL); } -static inline void +static void rule_layer2(int *match, struct ip_fw_args * args) { *match = (args->eh != NULL); } -static inline void +static void rule_diverted(int *match, struct ip_fw_args * args, ipfw_insn *cmd) { /* For diverted packets, args->rule.info @@ -776,7 +776,7 @@ cmd->arg1 & ((i & IPFW_INFO_IN) ? 1 : 2); } -static inline void +static void rule_proto(int *match, uint8_t proto, ipfw_insn *cmd) { /* @@ -786,7 +786,7 @@ *match = (proto == cmd->arg1); } -static inline void +static void rule_ip_src(int *match, int is_ipv4, ipfw_insn *cmd, struct in_addr *src_ip) { *match = is_ipv4 && @@ -794,7 +794,7 @@ src_ip->s_addr); } -static inline void +static void rule_ip_dst_lookup(int *match, ipfw_insn *cmd, int cmdlen, struct ip_fw_args *args, uint32_t *tablearg, int is_ipv4, int is_ipv6, struct ip *ip, struct in_addr *dst_ip, struct in_addr *src_ip, uint16_t dst_port, uint16_t src_port, u_short offset, uint8_t proto, int ucred_lookup, void *ucred_cache, struct ip_fw_chain *chain) { if (is_ipv4) { @@ -869,7 +869,7 @@ } } -static inline void +static void rule_ip_dst_mask(int *match, int is_ipv4, ipfw_insn *cmd, int cmdlen, struct in_addr *dst_ip, struct in_addr *src_ip) { if (is_ipv4) { @@ -884,7 +884,7 @@ } } -static inline void +static void rule_ip_src_me(int *match, int is_ipv4, int is_ipv6, struct in_addr *src_ip, struct ip_fw_args *args) { if (is_ipv4) { @@ -901,14 +901,14 @@ } #ifdef INET6 -static inline void +static void rule_ip6_src_me(int *match, int is_ipv6, struct ip_fw_args *args) { *match= is_ipv6 && search_ip6_addr_net(&args->f_id.src_ip6); } #endif /* INET6 */ -static inline void +static void rule_ip_src_set(int *match, int is_ipv4, ipfw_insn *cmd, struct ip_fw_args *args) { if (is_ipv4) { @@ -927,7 +927,7 @@ } } -static inline void +static void rule_ip_dst(int *match, int is_ipv4, ipfw_insn *cmd, struct in_addr *dst_ip) { *match = is_ipv4 && @@ -935,7 +935,7 @@ dst_ip->s_addr); } -static inline void +static void rule_ip_dst_me(int *match, struct ip_fw_args *args, int is_ipv4, int is_ipv6, struct in_addr *dst_ip) { if (is_ipv4) { @@ -951,14 +951,14 @@ } #ifdef INET6 -static inline void +static void rule_ip6_dst_me(int *match, struct ip_fw_args *args, int is_ipv6) { *match= is_ipv6 && search_ip6_addr_net(&args->f_id.dst_ip6); } #endif /* INET6 */ -static inline void +static void rule_ip_dstport(int *match, uint8_t proto, u_short offset, ipfw_insn *cmd, int cmdlen, uint16_t dst_port, uint16_t src_port) { /* @@ -981,7 +981,7 @@ } } -static inline void +static void rule_icmptype(int *match, u_short offset, uint8_t proto, void *ulp, ipfw_insn *cmd ) { *match = (offset == 0 && proto==IPPROTO_ICMP && @@ -989,7 +989,7 @@ } #ifdef INET6 -static inline void +static void rule_icmp6type(int *match, u_short offset, int is_ipv6, uint8_t proto, void *ulp, ipfw_insn *cmd) { *match = is_ipv6 && offset == 0 && @@ -1001,7 +1001,7 @@ #endif /* INET6 */ -static inline void +static void rule_ipopt(int *match, int is_ipv4, struct ip *ip, ipfw_insn *cmd) { *match = (is_ipv4 && @@ -1009,14 +1009,14 @@ } -static inline void +static void rule_ipver(int *match, int is_ipv4, ipfw_insn *cmd, struct ip *ip) { *match = (is_ipv4 && cmd->arg1 == ip->ip_v); } -static inline void +static void rule_ipttl(int *match, int is_ipv4, ipfw_insn *cmd, int cmdlen, struct ip *ip, uint16_t iplen) { if (is_ipv4) { /* only for IP packets */ @@ -1042,21 +1042,21 @@ } } -static inline void +static void rule_ipprecedence(int *match, int is_ipv4, ipfw_insn *cmd, struct ip *ip) { *match = (is_ipv4 && (cmd->arg1 == (ip->ip_tos & 0xe0)) ); } -static inline void +static void rule_iptos(int *match, int is_ipv4, ipfw_insn *cmd, struct ip *ip) { *match = (is_ipv4 && flags_match(cmd, ip->ip_tos)); } -static inline void +static void rule_dscp(int *match, int is_ipv4, int is_ipv6, ipfw_insn *cmd, struct ip *ip) { uint32_t *p; @@ -1082,7 +1082,7 @@ *match = *p & (1 << x); } -static inline void +static void rule_tcpdatalen(int *match, uint8_t proto, u_short offset, void *ulp, uint16_t iplen, int cmdlen, ipfw_insn *cmd, struct ip *ip) { if (proto == IPPROTO_TCP && offset == 0) { @@ -1106,14 +1106,14 @@ } } -static inline void +static void rule_tcpflags(int *match, uint8_t proto, u_short offset, ipfw_insn *cmd, void *ulp) { *match = (proto == IPPROTO_TCP && offset == 0 && flags_match(cmd, TCP(ulp)->th_flags)); } -static inline int +static int rule_tcpopts(int *match, u_int hlen, void *ulp, uint8_t proto, u_short offset, ipfw_insn *cmd, struct mbuf *m, struct ip_fw_args *args) { /* @@ -1137,7 +1137,7 @@ return (0); } -static inline void +static void rule_tcpseq(int *match, uint8_t proto, u_short offset, ipfw_insn *cmd, void *ulp) { *match = (proto == IPPROTO_TCP && offset == 0 && @@ -1145,7 +1145,7 @@ TCP(ulp)->th_seq); } -static inline void +static void rule_tcpack(int *match, uint8_t proto, u_short offset, ipfw_insn *cmd, void *ulp) { *match = (proto == IPPROTO_TCP && offset == 0 && @@ -1153,7 +1153,7 @@ TCP(ulp)->th_ack); } -static inline void +static void rule_tcpwin(int *match, uint8_t proto, u_short offset, ipfw_insn *cmd, int cmdlen, void *ulp) { if (proto == IPPROTO_TCP && offset == 0) { @@ -1174,7 +1174,7 @@ } } -static inline void +static void rule_estab(int *match, uint8_t proto, u_short offset, void *ulp) { /* reject packets which have SYN only */ @@ -1184,7 +1184,7 @@ (TH_RST | TH_ACK | TH_SYN)) != TH_SYN); } -static inline void +static void rule_altq(int *match, ipfw_insn *cmd, struct mbuf *m, struct ip *ip) { struct pf_mtag *at; @@ -1216,7 +1216,7 @@ at->hdr = ip; } -static inline void +static void rule_log(int *match, struct ip_fw *f, u_int hlen, struct ip_fw_args *args, struct mbuf *m, struct ifnet *oif, u_short offset, u_short ip6f_mf, uint32_t tablearg, struct ip *ip) { ipfw_log(f, hlen, args, m, @@ -1224,14 +1224,14 @@ *match = 1; } -static inline void +static void rule_prob(int *match, ipfw_insn *cmd) { *match = (random()<((ipfw_insn_u32 *)cmd)->d[0]); return; } -static inline void +static void rule_verrevpath(int *match, struct ifnet *oif, struct mbuf *m, int is_ipv6, struct ip_fw_args *args, struct in_addr *src_ip) { /* Outgoing packets automatically pass/match */ @@ -1247,7 +1247,7 @@ args->f_id.fib))); } -static inline void +static void rule_versrcreach(int *match, u_int hlen, struct ifnet *oif, int is_ipv6, struct ip_fw_args *args, struct in_addr *src_ip) { /* Outgoing packets automatically pass/match */ @@ -1261,7 +1261,7 @@ } /* dpl XXX We could pass pointers to struct in_addr at in_localaddr() */ -static inline void +static void rule_antispoof(int *match, struct ifnet *oif, u_int hlen, int is_ipv4, int is_ipv6, struct in_addr *src_ip, struct ip_fw_args *args, struct mbuf *m) { /* Outgoing packets automatically pass/match */ @@ -1287,7 +1287,7 @@ } #ifdef IPSEC -static inline void +static void rule_ipsec(int *match, struct mbuf *) { *match = (m_tag_find(m, @@ -1296,7 +1296,7 @@ #endif /* IPSEC */ #ifdef INET6 -static inline void +static void rule_ip6_src(int *match, int is_ipv6, struct ip_fw_args *args, ipfw_insn *cmd) { *match = is_ipv6 && @@ -1304,7 +1304,7 @@ &((ipfw_insn_ip6 *)cmd)->addr6); } -static inline void +static void rule_ip6_dst(int *match, int is_ipv6, struct ip_fw_args *args, ipfw_insn *cmd) { *match = is_ipv6 && @@ -1312,7 +1312,7 @@ &((ipfw_insn_ip6 *)cmd)->addr6); } -static inline void +static void rule_ip6_dst_mask(int *match, struct ip_fw_args *args, ipfw_insn *cmd, int cmdlen, int is_ipv6) { if (is_ipv6) { @@ -1336,7 +1336,7 @@ } } -static inline void +static void rule_flow6id(int *match, int is_ipv6, struct ip_fw_args *args, ipfw_insn *cmd) { *match = is_ipv6 && @@ -1344,27 +1344,27 @@ (ipfw_insn_u32 *) cmd); } -static inline void +static void rule_ext_hdr(int *match, int is_ipv6, uint16_t ext_hd, ipfw_insn *cmd) { *match = is_ipv6 && (ext_hd & ((ipfw_insn *) cmd)->arg1); } -static inline void +static void rule_ip6(int *match, int is_ipv6) { *match = is_ipv6; } #endif /* INET6 */ -static inline void +static void rule_ip4(int *match, int is_ipv4) { *match = is_ipv4; } -static inline void +static void rule_tag(int *match, ipfw_insn *cmd, struct mbuf *m, uint32_t tablearg) { struct m_tag *mtag; @@ -1395,14 +1395,14 @@ } } -static inline void +static void rule_fib(int *match, struct ip_fw_args *args, ipfw_insn *cmd) { if (args->f_id.fib == cmd->arg1) *match = 1; } -static inline void +static void rule_sockarg(int *match, int is_ipv6, uint8_t proto, struct in_addr *dst_ip, struct in_addr *src_ip, uint16_t dst_port, uint16_t src_port, struct ip_fw_args *args, uint32_t *tablearg) { #ifndef USERSPACE /* not supported in userspace */ @@ -1449,7 +1449,7 @@ #endif /* !USERSPACE */ } -static inline void +static void rule_tagged(int *match, ipfw_insn *cmd, int cmdlen, struct mbuf *m, uint32_t tablearg) { struct m_tag *mtag; @@ -1483,7 +1483,7 @@ /* * The second sets of opcodes. They represent the actions of a rule. */ -static inline void +static void rule_keep_state(int *match, struct ip_fw *f, ipfw_insn *cmd, struct ip_fw_args *args, uint32_t tablearg, int *retval, int *l, int *done) { if (ipfw_install_state(f, @@ -1496,7 +1496,7 @@ *match = 1; } -static inline void +static void rule_check_state(int *match, int *dyn_dir, ipfw_dyn_rule *q, struct ip_fw_args *args, uint8_t proto, void *ulp, int pktlen, struct ip_fw *f, int *f_pos, struct ip_fw_chain *chain, ipfw_insn *cmd, int *cmdlen, int *l) { /* @@ -1545,7 +1545,7 @@ *match = 1; } -static inline void +static void rule_accept(int *retval, int *l, int *done) { *retval = 0; /* accept */ @@ -1553,7 +1553,7 @@ *done = 1; /* exit outer loop */ } -static inline void +static void rule_queue(struct ip_fw_args *args, int f_pos, struct ip_fw_chain *chain, ipfw_insn *cmd, uint32_t tablearg, int *retval, int *l, int *done) { set_match(args, f_pos, chain); @@ -1567,7 +1567,7 @@ *done = 1; /* exit outer loop */ } -static inline void +static void rule_tee(int *l, int *done, int *retval, ipfw_insn *cmd, struct ip_fw_args *args, int f_pos, uint32_t tablearg, struct ip_fw_chain *chain) { if (args->eh) /* not on layer 2 */ @@ -1581,14 +1581,14 @@ args->rule.info = IP_FW_ARG_TABLEARG(cmd->arg1); } -static inline void +static void rule_count(int *l, struct ip_fw *f, int pktlen) { IPFW_INC_RULE_COUNTER(f, pktlen); *l = 0; /* exit inner loop */ } -static inline void +static void rule_skipto(int *match, int *l, ipfw_insn *cmd, int *cmdlen, int *skip_or, int *f_pos, struct ip_fw *f, int pktlen, struct ip_fw_chain *chain, uint32_t tablearg) { IPFW_INC_RULE_COUNTER(f, pktlen); @@ -1613,7 +1613,7 @@ *skip_or = 0; } -static inline void +static void rule_callreturn(ipfw_insn *cmd, struct mbuf *m, struct ip_fw *f, struct ip_fw_chain *chain, uint32_t tablearg, int pktlen, int *skip_or, int *cmdlen, int *f_pos, int *l) { /* @@ -1710,7 +1710,7 @@ #undef IS_RETURN } -static inline void +static void rule_reject(u_int hlen, int is_ipv4, u_short offset, uint8_t proto, void *ulp, struct mbuf *m, struct in_addr *dst_ip, struct ip_fw_args *args, ipfw_insn *cmd, uint16_t iplen, struct ip *ip) { /* @@ -1729,7 +1729,7 @@ } #ifdef INET6 -static inline void +static void rule_unreach6(u_int hlen, int is_ipv6, u_short offset, uint8_t proto, uint8_t icmp6_type, struct mbuf *m, struct ip_fw_args *args, ipfw_insn *cmd, struct ip *ip) { if (hlen > 0 && is_ipv6 && @@ -1747,7 +1747,7 @@ #endif /* INET6 */ -static inline void +static void rule_deny(int *l, int *done, int *retval) { *retval = IP_FW_DENY; @@ -1755,7 +1755,7 @@ *done = 1; /* exit outer loop */ } -static inline void +static void rule_forward_ip(struct ip_fw_args *args, ipfw_dyn_rule *q, struct ip_fw *f, int dyn_dir, ipfw_insn *cmd, uint32_t tablearg, int *retval, int *l, int *done) { if (args->eh) /* not valid on layer2 pkts */ @@ -1780,7 +1780,7 @@ } #ifdef INET6 -static inline void +static void rule_forward_ip6(struct ip_fw_args *args, ipfw_dyn_rule *q, struct ip_fw *f, int dyn_dir, ipfw_insn *cmd, int *retval, int *l, int *done) { if (args->eh) /* not valid on layer2 pkts */ @@ -1798,7 +1798,7 @@ } #endif /* INET6 */ -static inline void +static void rule_ngtee(struct ip_fw_args *args, int f_pos, struct ip_fw_chain *chain, ipfw_insn *cmd, uint32_t tablearg, int *retval, int *l, int *done) { set_match(args, f_pos, chain); @@ -1811,7 +1811,7 @@ *done = 1; /* exit outer loop */ } -static inline void +static void rule_setfib(struct ip_fw *f, int pktlen, uint32_t tablearg, ipfw_insn *cmd, struct mbuf *m, struct ip_fw_args *args, int *l) { uint32_t fib; @@ -1825,7 +1825,7 @@ *l = 0; /* exit inner loop */ } -static inline void +static void rule_setdscp(ipfw_insn *cmd, struct ip *ip, int is_ipv4, int is_ipv6, uint32_t tablearg, struct ip_fw *f, int pktlen, int *l) { uint16_t code; @@ -1852,7 +1852,7 @@ IPFW_INC_RULE_COUNTER(f, pktlen); } -static inline void +static void rule_nat(struct ip_fw_args *args, int f_pos, struct ip_fw_chain *chain, ipfw_insn *cmd, struct mbuf *m, uint32_t tablearg, int *retval, int *done, int *l) { *l = 0; /* exit inner loop */ @@ -1886,7 +1886,7 @@ *retval = ipfw_nat_ptr(args, t, m); } -static inline void rule_reass(struct ip_fw *f, int f_pos, struct ip_fw_chain *chain, int pktlen, struct ip *ip, struct ip_fw_args *args, struct mbuf *m, int *retval, int *done, int *l) +static void rule_reass(struct ip_fw *f, int f_pos, struct ip_fw_chain *chain, int pktlen, struct ip *ip, struct ip_fw_args *args, struct mbuf *m, int *retval, int *done, int *l) { int ip_off; From owner-svn-soc-all@FreeBSD.ORG Wed Jul 23 16:28:58 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 48CA95E0 for ; Wed, 23 Jul 2014 16:28:58 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 19BAE2F48 for ; Wed, 23 Jul 2014 16:28:58 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6NGSwPP086887 for ; Wed, 23 Jul 2014 16:28:58 GMT (envelope-from dpl@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s6NGSvlN086763 for svn-soc-all@FreeBSD.org; Wed, 23 Jul 2014 16:28:57 GMT (envelope-from dpl@FreeBSD.org) Date: Wed, 23 Jul 2014 16:28:57 GMT Message-Id: <201407231628.s6NGSvlN086763@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to dpl@FreeBSD.org using -f From: dpl@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r271285 - soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jul 2014 16:28:58 -0000 Author: dpl Date: Wed Jul 23 16:28:57 2014 New Revision: 271285 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271285 Log: Properly inline the functions. We want them inlined here. Modified: soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw2.c Modified: soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw2.c Wed Jul 23 16:27:43 2014 (r271284) +++ soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw2.c Wed Jul 23 16:28:57 2014 (r271285) @@ -127,109 +127,109 @@ static unsigned int default_fw_tables = IPFW_TABLES_DEFAULT; /* Rule functions, ordered by appereance in the code */ -static inline void rule_nop(int *); -static inline void rule_forward_mac(int); -static inline void rule_jail(int *, u_short, uint8_t, ipfw_insn *, struct ip_fw_args *, int, void *); -static inline void rule_recv(int *, ipfw_insn *, struct mbuf *, struct ip_fw_chain *, uint32_t *); -static inline void rule_xmit(int *, struct ifnet *, ipfw_insn *, struct ip_fw_chain *, uint32_t *); -static inline void rule_via(int *, struct ifnet *, struct mbuf *, ipfw_insn *, struct ip_fw_chain *, uint32_t *); -static inline void rule_macaddr2(int *, struct ip_fw_args *, ipfw_insn *); -static inline void rule_mac_type(int *, struct ip_fw_args *, ipfw_insn *, int, uint16_t); -static inline void rule_frag(int *, u_short); -static inline void rule_in(int *, struct ifnet *); -static inline void rule_layer2(int *, struct ip_fw_args *); -static inline void rule_diverted(int *, struct ip_fw_args *, ipfw_insn *); -static inline void rule_proto(int *, uint8_t, ipfw_insn *); -static inline void rule_ip_src(int *, int, ipfw_insn *, struct in_addr *); -static inline void rule_ip_dst_lookup(int *, ipfw_insn *, int, struct ip_fw_args *, uint32_t *, int, int, struct ip *, struct in_addr *, struct in_addr *, uint16_t, uint16_t, u_short, uint8_t, int, void *, struct ip_fw_chain *); -static inline void rule_ip_dst_mask(int *, int, ipfw_insn *, int, struct in_addr *, struct in_addr *); -static inline void rule_ip_src_me(int *, int, int, struct in_addr *, struct ip_fw_args *); +static __always_inline void rule_nop(int *); +static __always_inline void rule_forward_mac(int); +static __always_inline void rule_jail(int *, u_short, uint8_t, ipfw_insn *, struct ip_fw_args *, int, void *); +static __always_inline void rule_recv(int *, ipfw_insn *, struct mbuf *, struct ip_fw_chain *, uint32_t *); +static __always_inline void rule_xmit(int *, struct ifnet *, ipfw_insn *, struct ip_fw_chain *, uint32_t *); +static __always_inline void rule_via(int *, struct ifnet *, struct mbuf *, ipfw_insn *, struct ip_fw_chain *, uint32_t *); +static __always_inline void rule_macaddr2(int *, struct ip_fw_args *, ipfw_insn *); +static __always_inline void rule_mac_type(int *, struct ip_fw_args *, ipfw_insn *, int, uint16_t); +static __always_inline void rule_frag(int *, u_short); +static __always_inline void rule_in(int *, struct ifnet *); +static __always_inline void rule_layer2(int *, struct ip_fw_args *); +static __always_inline void rule_diverted(int *, struct ip_fw_args *, ipfw_insn *); +static __always_inline void rule_proto(int *, uint8_t, ipfw_insn *); +static __always_inline void rule_ip_src(int *, int, ipfw_insn *, struct in_addr *); +static __always_inline void rule_ip_dst_lookup(int *, ipfw_insn *, int, struct ip_fw_args *, uint32_t *, int, int, struct ip *, struct in_addr *, struct in_addr *, uint16_t, uint16_t, u_short, uint8_t, int, void *, struct ip_fw_chain *); +static __always_inline void rule_ip_dst_mask(int *, int, ipfw_insn *, int, struct in_addr *, struct in_addr *); +static __always_inline void rule_ip_src_me(int *, int, int, struct in_addr *, struct ip_fw_args *); #ifdef INET6 -static inline void rule_ip6_src_me(int *, int, struct ip_fw_args *); +static __always_inline void rule_ip6_src_me(int *, int, struct ip_fw_args *); #endif /* INET6 */ -static inline void rule_ip_src_set(int *, int, ipfw_insn *, struct ip_fw_args *); -static inline void rule_ip_dst(int *, int, ipfw_insn *, struct in_addr *); -static inline void rule_ip_dst_me(int *, struct ip_fw_args *, int, int, struct in_addr *); +static __always_inline void rule_ip_src_set(int *, int, ipfw_insn *, struct ip_fw_args *); +static __always_inline void rule_ip_dst(int *, int, ipfw_insn *, struct in_addr *); +static __always_inline void rule_ip_dst_me(int *, struct ip_fw_args *, int, int, struct in_addr *); #ifdef INET6 -static inline void rule_ip6_dst_me(int *, struct ip_fw_args *args, int is_ipv6); +static __always_inline void rule_ip6_dst_me(int *, struct ip_fw_args *args, int is_ipv6); #endif /* INET6 */ -static inline void rule_ip_dstport(int *, uint8_t, u_short , ipfw_insn *, int , uint16_t , uint16_t); -static inline void rule_icmptype(int *, u_short, uint8_t , void *, ipfw_insn *); +static __always_inline void rule_ip_dstport(int *, uint8_t, u_short , ipfw_insn *, int , uint16_t , uint16_t); +static __always_inline void rule_icmptype(int *, u_short, uint8_t , void *, ipfw_insn *); #ifdef INET6 -static inline void rule_icmp6type(int *, u_short, int, uint8_t, void *, ipfw_insn *); +static __always_inline void rule_icmp6type(int *, u_short, int, uint8_t, void *, ipfw_insn *); #endif /* INET6 */ -static inline void rule_ipopt(int *, int, struct ip *, ipfw_insn *); -static inline void rule_ipver(int *, int, ipfw_insn *, struct ip *); -static inline void rule_ipttl(int *, int, ipfw_insn *, int, struct ip *, uint16_t); -static inline void rule_ipprecedence(int *, int, ipfw_insn *, struct ip *); -static inline void rule_iptos(int *, int, ipfw_insn *, struct ip *); -static inline void rule_dscp(int *, int, int, ipfw_insn *, struct ip *); -static inline void rule_tcpdatalen(int *, uint8_t, u_short, void *, uint16_t, int, ipfw_insn *, struct ip *); -static inline void rule_tcpflags(int *, uint8_t, u_short, ipfw_insn *, void *); -static inline int rule_tcpopts(int *, u_int, void *, uint8_t, u_short, ipfw_insn *, struct mbuf *, struct ip_fw_args *); -static inline void rule_tcpseq(int *, uint8_t, u_short, ipfw_insn *, void *); -static inline void rule_tcpack(int *, uint8_t, u_short, ipfw_insn *, void *); -static inline void rule_tcpwin(int *, uint8_t, u_short, ipfw_insn *, int, void *); -static inline void rule_estab(int *, uint8_t, u_short, void *); -static inline void rule_altq(int *, ipfw_insn *, struct mbuf *, struct ip *); -static inline void rule_log(int *, struct ip_fw *, u_int, struct ip_fw_args *, struct mbuf *, struct ifnet *, u_short, u_short, uint32_t, struct ip *); -static inline void rule_prob(int *, ipfw_insn *); -static inline void rule_verrevpath(int *, struct ifnet *, struct mbuf *, int, struct ip_fw_args *, struct in_addr *); -static inline void rule_versrcreach(int *, u_int, struct ifnet *, int, struct ip_fw_args *, struct in_addr *); -static inline void rule_antispoof(int *, struct ifnet *, u_int, int, int, struct in_addr *, struct ip_fw_args *, struct mbuf *); +static __always_inline void rule_ipopt(int *, int, struct ip *, ipfw_insn *); +static __always_inline void rule_ipver(int *, int, ipfw_insn *, struct ip *); +static __always_inline void rule_ipttl(int *, int, ipfw_insn *, int, struct ip *, uint16_t); +static __always_inline void rule_ipprecedence(int *, int, ipfw_insn *, struct ip *); +static __always_inline void rule_iptos(int *, int, ipfw_insn *, struct ip *); +static __always_inline void rule_dscp(int *, int, int, ipfw_insn *, struct ip *); +static __always_inline void rule_tcpdatalen(int *, uint8_t, u_short, void *, uint16_t, int, ipfw_insn *, struct ip *); +static __always_inline void rule_tcpflags(int *, uint8_t, u_short, ipfw_insn *, void *); +static __always_inline int rule_tcpopts(int *, u_int, void *, uint8_t, u_short, ipfw_insn *, struct mbuf *, struct ip_fw_args *); +static __always_inline void rule_tcpseq(int *, uint8_t, u_short, ipfw_insn *, void *); +static __always_inline void rule_tcpack(int *, uint8_t, u_short, ipfw_insn *, void *); +static __always_inline void rule_tcpwin(int *, uint8_t, u_short, ipfw_insn *, int, void *); +static __always_inline void rule_estab(int *, uint8_t, u_short, void *); +static __always_inline void rule_altq(int *, ipfw_insn *, struct mbuf *, struct ip *); +static __always_inline void rule_log(int *, struct ip_fw *, u_int, struct ip_fw_args *, struct mbuf *, struct ifnet *, u_short, u_short, uint32_t, struct ip *); +static __always_inline void rule_prob(int *, ipfw_insn *); +static __always_inline void rule_verrevpath(int *, struct ifnet *, struct mbuf *, int, struct ip_fw_args *, struct in_addr *); +static __always_inline void rule_versrcreach(int *, u_int, struct ifnet *, int, struct ip_fw_args *, struct in_addr *); +static __always_inline void rule_antispoof(int *, struct ifnet *, u_int, int, int, struct in_addr *, struct ip_fw_args *, struct mbuf *); #ifdef IPSEC -static inline void rule_ipsec(int *match, struct mbuf *); +static __always_inline void rule_ipsec(int *match, struct mbuf *); #endif /* IPSEC */ #ifdef INET6 -static inline void rule_ip6_src(int *, int, struct ip_fw_args *, ipfw_insn *); -static inline void rule_ip6_dst(int *, int, struct ip_fw_args *, ipfw_insn *); -static inline void rule_ip6_dst_mask(int *, struct ip_fw_args *, ipfw_insn *, int, int); -static inline void rule_flow6id(int *, int, struct ip_fw_args *, ipfw_insn *); -static inline void rule_ext_hdr(int *, int, uint16_t, ipfw_insn *); -static inline void rule_ip6(int *, int); +static __always_inline void rule_ip6_src(int *, int, struct ip_fw_args *, ipfw_insn *); +static __always_inline void rule_ip6_dst(int *, int, struct ip_fw_args *, ipfw_insn *); +static __always_inline void rule_ip6_dst_mask(int *, struct ip_fw_args *, ipfw_insn *, int, int); +static __always_inline void rule_flow6id(int *, int, struct ip_fw_args *, ipfw_insn *); +static __always_inline void rule_ext_hdr(int *, int, uint16_t, ipfw_insn *); +static __always_inline void rule_ip6(int *, int); #endif /* INET6 */ -static inline void rule_ip4(int *, int); -static inline void rule_tag(int *, ipfw_insn *, struct mbuf *, uint32_t); -static inline void rule_fib(int *, struct ip_fw_args *, ipfw_insn *); -static inline void rule_sockarg(int *, int, uint8_t, struct in_addr *, struct in_addr *, uint16_t, uint16_t, struct ip_fw_args *, uint32_t *); -static inline void rule_tagged(int *, ipfw_insn *, int, struct mbuf *, uint32_t); +static __always_inline void rule_ip4(int *, int); +static __always_inline void rule_tag(int *, ipfw_insn *, struct mbuf *, uint32_t); +static __always_inline void rule_fib(int *, struct ip_fw_args *, ipfw_insn *); +static __always_inline void rule_sockarg(int *, int, uint8_t, struct in_addr *, struct in_addr *, uint16_t, uint16_t, struct ip_fw_args *, uint32_t *); +static __always_inline void rule_tagged(int *, ipfw_insn *, int, struct mbuf *, uint32_t); /* The second sets of opcodes. They represent the actions of a rule. */ -static inline void rule_keep_state(int *, struct ip_fw *f, ipfw_insn *, struct ip_fw_args *, uint32_t, int *, int *, int *); -static inline void rule_check_state(int *, int *, ipfw_dyn_rule *, struct ip_fw_args *, uint8_t, void *, int, struct ip_fw *, int *, struct ip_fw_chain *, ipfw_insn *, int *, int *); -static inline void rule_accept(int *, int *, int *); -static inline void rule_queue(struct ip_fw_args *, int, struct ip_fw_chain *, ipfw_insn *, uint32_t, int *, int *, int *); -static inline void rule_tee(int *, int *, int *, ipfw_insn *, struct ip_fw_args *, int, uint32_t, struct ip_fw_chain *); -static inline void rule_count(int *, struct ip_fw *, int); -static inline void rule_skipto(int *, int *, ipfw_insn *, int *, int *, int *, struct ip_fw *, int, struct ip_fw_chain *, uint32_t); -static inline void rule_callreturn(ipfw_insn *, struct mbuf *, struct ip_fw *, struct ip_fw_chain *, uint32_t, int, int *, int *, int *, int *); -static inline void rule_reject(u_int, int, u_short, uint8_t, void *, struct mbuf *, struct in_addr *, struct ip_fw_args *, ipfw_insn *, uint16_t, struct ip *); +static __always_inline void rule_keep_state(int *, struct ip_fw *f, ipfw_insn *, struct ip_fw_args *, uint32_t, int *, int *, int *); +static __always_inline void rule_check_state(int *, int *, ipfw_dyn_rule *, struct ip_fw_args *, uint8_t, void *, int, struct ip_fw *, int *, struct ip_fw_chain *, ipfw_insn *, int *, int *); +static __always_inline void rule_accept(int *, int *, int *); +static __always_inline void rule_queue(struct ip_fw_args *, int, struct ip_fw_chain *, ipfw_insn *, uint32_t, int *, int *, int *); +static __always_inline void rule_tee(int *, int *, int *, ipfw_insn *, struct ip_fw_args *, int, uint32_t, struct ip_fw_chain *); +static __always_inline void rule_count(int *, struct ip_fw *, int); +static __always_inline void rule_skipto(int *, int *, ipfw_insn *, int *, int *, int *, struct ip_fw *, int, struct ip_fw_chain *, uint32_t); +static __always_inline void rule_callreturn(ipfw_insn *, struct mbuf *, struct ip_fw *, struct ip_fw_chain *, uint32_t, int, int *, int *, int *, int *); +static __always_inline void rule_reject(u_int, int, u_short, uint8_t, void *, struct mbuf *, struct in_addr *, struct ip_fw_args *, ipfw_insn *, uint16_t, struct ip *); #ifdef INET6 -static inline void rule_unreach6(u_int, int, u_short, uint8_t, uint8_t, struct mbuf *, struct ip_fw_args *, ipfw_insn *, struct ip *); +static __always_inline void rule_unreach6(u_int, int, u_short, uint8_t, uint8_t, struct mbuf *, struct ip_fw_args *, ipfw_insn *, struct ip *); #endif /* INET6 */ -static inline void rule_deny(int *, int *, int *); -static inline void rule_forward_ip(struct ip_fw_args *, ipfw_dyn_rule *, struct ip_fw *, int, ipfw_insn *, uint32_t, int *, int *, int *); +static __always_inline void rule_deny(int *, int *, int *); +static __always_inline void rule_forward_ip(struct ip_fw_args *, ipfw_dyn_rule *, struct ip_fw *, int, ipfw_insn *, uint32_t, int *, int *, int *); #ifdef INET6 -static inline void rule_forward_ip6(struct ip_fw_args *, ipfw_dyn_rule *, struct ip_fw *, int, ipfw_insn *, int *, int *, int *); +static __always_inline void rule_forward_ip6(struct ip_fw_args *, ipfw_dyn_rule *, struct ip_fw *, int, ipfw_insn *, int *, int *, int *); #endif /* INET6 */ -static inline void rule_ngtee(struct ip_fw_args *, int, struct ip_fw_chain *, ipfw_insn *, uint32_t, int *, int *, int *); -static inline void rule_setfib(struct ip_fw *, int, uint32_t, ipfw_insn *, struct mbuf *, struct ip_fw_args *, int *); -static inline void rule_setdscp(ipfw_insn *, struct ip *, int, int, uint32_t, struct ip_fw *, int, int *); -static inline void rule_nat(struct ip_fw_args *, int, struct ip_fw_chain *, ipfw_insn *, struct mbuf *, uint32_t, int *, int *, int *); -static inline void rule_reass(struct ip_fw *, int, struct ip_fw_chain *, int, struct ip *, struct ip_fw_args *, struct mbuf *, int *, int *, int *); +static __always_inline void rule_ngtee(struct ip_fw_args *, int, struct ip_fw_chain *, ipfw_insn *, uint32_t, int *, int *, int *); +static __always_inline void rule_setfib(struct ip_fw *, int, uint32_t, ipfw_insn *, struct mbuf *, struct ip_fw_args *, int *); +static __always_inline void rule_setdscp(ipfw_insn *, struct ip *, int, int, uint32_t, struct ip_fw *, int, int *); +static __always_inline void rule_nat(struct ip_fw_args *, int, struct ip_fw_chain *, ipfw_insn *, struct mbuf *, uint32_t, int *, int *, int *); +static __always_inline void rule_reass(struct ip_fw *, int, struct ip_fw_chain *, int, struct ip *, struct ip_fw_args *, struct mbuf *, int *, int *, int *); /* JIT compiling API */ typedef int (*funcptr)(); From owner-svn-soc-all@FreeBSD.ORG Thu Jul 24 17:15:42 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BAA36916 for ; Thu, 24 Jul 2014 17:15:42 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A57FF2681 for ; Thu, 24 Jul 2014 17:15:42 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6OHFggF053533 for ; Thu, 24 Jul 2014 17:15:42 GMT (envelope-from dpl@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s6OHFeDw052877 for svn-soc-all@FreeBSD.org; Thu, 24 Jul 2014 17:15:40 GMT (envelope-from dpl@FreeBSD.org) Date: Thu, 24 Jul 2014 17:15:40 GMT Message-Id: <201407241715.s6OHFeDw052877@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to dpl@FreeBSD.org using -f From: dpl@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r271342 - in soc2014/dpl/netmap-ipfwjit: . sys/netpfil/ipfw MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Jul 2014 17:15:42 -0000 Author: dpl Date: Thu Jul 24 17:15:40 2014 New Revision: 271342 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271342 Log: Make it compile. Modified: soc2014/dpl/netmap-ipfwjit/Makefile.kipfw soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw2.c soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw_rules.h soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/jit.cc soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/jit.h Modified: soc2014/dpl/netmap-ipfwjit/Makefile.kipfw ============================================================================== --- soc2014/dpl/netmap-ipfwjit/Makefile.kipfw Thu Jul 24 16:33:29 2014 (r271341) +++ soc2014/dpl/netmap-ipfwjit/Makefile.kipfw Thu Jul 24 17:15:40 2014 (r271342) @@ -152,7 +152,7 @@ #Generate the actual bytecode to be used ../ip_fw_rules.bc: - @$(CC) $(CFLAGS) $(BCFLAGS) -o ../ip_fw_rules.bc ../sys/netpfil/ipfw/ip_fw_rules.h + @$(CC) $(CFLAGS) $(BCFLAGS) -o ../ip_fw_rules.bc ../sys/netpfil/ipfw/ip_fw_rules.c radix.o:# CFLAGS += -U_KERNEL Modified: soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw2.c Thu Jul 24 16:33:29 2014 (r271341) +++ soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw2.c Thu Jul 24 17:15:40 2014 (r271342) @@ -38,6 +38,7 @@ #endif /* INET */ #include "opt_inet6.h" #include "opt_ipsec.h" +#define IPFW_RULES_INLINE __always_inline #include "ip_fw_rules.h" #include "jit.h" @@ -126,114 +127,7 @@ /* Use 128 tables by default */ static unsigned int default_fw_tables = IPFW_TABLES_DEFAULT; -/* Rule functions, ordered by appereance in the code */ -static __always_inline void rule_nop(int *); -static __always_inline void rule_forward_mac(int); -static __always_inline void rule_jail(int *, u_short, uint8_t, ipfw_insn *, struct ip_fw_args *, int, void *); -static __always_inline void rule_recv(int *, ipfw_insn *, struct mbuf *, struct ip_fw_chain *, uint32_t *); -static __always_inline void rule_xmit(int *, struct ifnet *, ipfw_insn *, struct ip_fw_chain *, uint32_t *); -static __always_inline void rule_via(int *, struct ifnet *, struct mbuf *, ipfw_insn *, struct ip_fw_chain *, uint32_t *); -static __always_inline void rule_macaddr2(int *, struct ip_fw_args *, ipfw_insn *); -static __always_inline void rule_mac_type(int *, struct ip_fw_args *, ipfw_insn *, int, uint16_t); -static __always_inline void rule_frag(int *, u_short); -static __always_inline void rule_in(int *, struct ifnet *); -static __always_inline void rule_layer2(int *, struct ip_fw_args *); -static __always_inline void rule_diverted(int *, struct ip_fw_args *, ipfw_insn *); -static __always_inline void rule_proto(int *, uint8_t, ipfw_insn *); -static __always_inline void rule_ip_src(int *, int, ipfw_insn *, struct in_addr *); -static __always_inline void rule_ip_dst_lookup(int *, ipfw_insn *, int, struct ip_fw_args *, uint32_t *, int, int, struct ip *, struct in_addr *, struct in_addr *, uint16_t, uint16_t, u_short, uint8_t, int, void *, struct ip_fw_chain *); -static __always_inline void rule_ip_dst_mask(int *, int, ipfw_insn *, int, struct in_addr *, struct in_addr *); -static __always_inline void rule_ip_src_me(int *, int, int, struct in_addr *, struct ip_fw_args *); - -#ifdef INET6 -static __always_inline void rule_ip6_src_me(int *, int, struct ip_fw_args *); -#endif /* INET6 */ - -static __always_inline void rule_ip_src_set(int *, int, ipfw_insn *, struct ip_fw_args *); -static __always_inline void rule_ip_dst(int *, int, ipfw_insn *, struct in_addr *); -static __always_inline void rule_ip_dst_me(int *, struct ip_fw_args *, int, int, struct in_addr *); - -#ifdef INET6 -static __always_inline void rule_ip6_dst_me(int *, struct ip_fw_args *args, int is_ipv6); -#endif /* INET6 */ - -static __always_inline void rule_ip_dstport(int *, uint8_t, u_short , ipfw_insn *, int , uint16_t , uint16_t); -static __always_inline void rule_icmptype(int *, u_short, uint8_t , void *, ipfw_insn *); - -#ifdef INET6 -static __always_inline void rule_icmp6type(int *, u_short, int, uint8_t, void *, ipfw_insn *); -#endif /* INET6 */ - -static __always_inline void rule_ipopt(int *, int, struct ip *, ipfw_insn *); -static __always_inline void rule_ipver(int *, int, ipfw_insn *, struct ip *); -static __always_inline void rule_ipttl(int *, int, ipfw_insn *, int, struct ip *, uint16_t); -static __always_inline void rule_ipprecedence(int *, int, ipfw_insn *, struct ip *); -static __always_inline void rule_iptos(int *, int, ipfw_insn *, struct ip *); -static __always_inline void rule_dscp(int *, int, int, ipfw_insn *, struct ip *); -static __always_inline void rule_tcpdatalen(int *, uint8_t, u_short, void *, uint16_t, int, ipfw_insn *, struct ip *); -static __always_inline void rule_tcpflags(int *, uint8_t, u_short, ipfw_insn *, void *); -static __always_inline int rule_tcpopts(int *, u_int, void *, uint8_t, u_short, ipfw_insn *, struct mbuf *, struct ip_fw_args *); -static __always_inline void rule_tcpseq(int *, uint8_t, u_short, ipfw_insn *, void *); -static __always_inline void rule_tcpack(int *, uint8_t, u_short, ipfw_insn *, void *); -static __always_inline void rule_tcpwin(int *, uint8_t, u_short, ipfw_insn *, int, void *); -static __always_inline void rule_estab(int *, uint8_t, u_short, void *); -static __always_inline void rule_altq(int *, ipfw_insn *, struct mbuf *, struct ip *); -static __always_inline void rule_log(int *, struct ip_fw *, u_int, struct ip_fw_args *, struct mbuf *, struct ifnet *, u_short, u_short, uint32_t, struct ip *); -static __always_inline void rule_prob(int *, ipfw_insn *); -static __always_inline void rule_verrevpath(int *, struct ifnet *, struct mbuf *, int, struct ip_fw_args *, struct in_addr *); -static __always_inline void rule_versrcreach(int *, u_int, struct ifnet *, int, struct ip_fw_args *, struct in_addr *); -static __always_inline void rule_antispoof(int *, struct ifnet *, u_int, int, int, struct in_addr *, struct ip_fw_args *, struct mbuf *); - -#ifdef IPSEC -static __always_inline void rule_ipsec(int *match, struct mbuf *); -#endif /* IPSEC */ - -#ifdef INET6 -static __always_inline void rule_ip6_src(int *, int, struct ip_fw_args *, ipfw_insn *); -static __always_inline void rule_ip6_dst(int *, int, struct ip_fw_args *, ipfw_insn *); -static __always_inline void rule_ip6_dst_mask(int *, struct ip_fw_args *, ipfw_insn *, int, int); -static __always_inline void rule_flow6id(int *, int, struct ip_fw_args *, ipfw_insn *); -static __always_inline void rule_ext_hdr(int *, int, uint16_t, ipfw_insn *); -static __always_inline void rule_ip6(int *, int); -#endif /* INET6 */ - -static __always_inline void rule_ip4(int *, int); -static __always_inline void rule_tag(int *, ipfw_insn *, struct mbuf *, uint32_t); -static __always_inline void rule_fib(int *, struct ip_fw_args *, ipfw_insn *); -static __always_inline void rule_sockarg(int *, int, uint8_t, struct in_addr *, struct in_addr *, uint16_t, uint16_t, struct ip_fw_args *, uint32_t *); -static __always_inline void rule_tagged(int *, ipfw_insn *, int, struct mbuf *, uint32_t); - -/* The second sets of opcodes. They represent the actions of a rule. */ -static __always_inline void rule_keep_state(int *, struct ip_fw *f, ipfw_insn *, struct ip_fw_args *, uint32_t, int *, int *, int *); -static __always_inline void rule_check_state(int *, int *, ipfw_dyn_rule *, struct ip_fw_args *, uint8_t, void *, int, struct ip_fw *, int *, struct ip_fw_chain *, ipfw_insn *, int *, int *); -static __always_inline void rule_accept(int *, int *, int *); -static __always_inline void rule_queue(struct ip_fw_args *, int, struct ip_fw_chain *, ipfw_insn *, uint32_t, int *, int *, int *); -static __always_inline void rule_tee(int *, int *, int *, ipfw_insn *, struct ip_fw_args *, int, uint32_t, struct ip_fw_chain *); -static __always_inline void rule_count(int *, struct ip_fw *, int); -static __always_inline void rule_skipto(int *, int *, ipfw_insn *, int *, int *, int *, struct ip_fw *, int, struct ip_fw_chain *, uint32_t); -static __always_inline void rule_callreturn(ipfw_insn *, struct mbuf *, struct ip_fw *, struct ip_fw_chain *, uint32_t, int, int *, int *, int *, int *); -static __always_inline void rule_reject(u_int, int, u_short, uint8_t, void *, struct mbuf *, struct in_addr *, struct ip_fw_args *, ipfw_insn *, uint16_t, struct ip *); - -#ifdef INET6 -static __always_inline void rule_unreach6(u_int, int, u_short, uint8_t, uint8_t, struct mbuf *, struct ip_fw_args *, ipfw_insn *, struct ip *); -#endif /* INET6 */ - -static __always_inline void rule_deny(int *, int *, int *); -static __always_inline void rule_forward_ip(struct ip_fw_args *, ipfw_dyn_rule *, struct ip_fw *, int, ipfw_insn *, uint32_t, int *, int *, int *); - -#ifdef INET6 -static __always_inline void rule_forward_ip6(struct ip_fw_args *, ipfw_dyn_rule *, struct ip_fw *, int, ipfw_insn *, int *, int *, int *); -#endif /* INET6 */ - -static __always_inline void rule_ngtee(struct ip_fw_args *, int, struct ip_fw_chain *, ipfw_insn *, uint32_t, int *, int *, int *); -static __always_inline void rule_setfib(struct ip_fw *, int, uint32_t, ipfw_insn *, struct mbuf *, struct ip_fw_args *, int *); -static __always_inline void rule_setdscp(ipfw_insn *, struct ip *, int, int, uint32_t, struct ip_fw *, int, int *); -static __always_inline void rule_nat(struct ip_fw_args *, int, struct ip_fw_chain *, ipfw_insn *, struct mbuf *, uint32_t, int *, int *, int *); -static __always_inline void rule_reass(struct ip_fw *, int, struct ip_fw_chain *, int, struct ip *, struct ip_fw_args *, struct mbuf *, int *, int *, int *); - /* JIT compiling API */ -typedef int (*funcptr)(); - void ipfw_jit_init(); funcptr compile_code(); Modified: soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw_rules.h ============================================================================== --- soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw_rules.h Thu Jul 24 16:33:29 2014 (r271341) +++ soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/ip_fw_rules.h Thu Jul 24 17:15:40 2014 (r271342) @@ -656,13 +656,13 @@ * Actions executed per-rule. */ -static void +static IPFW_RULES_INLINE void rule_nop(int *match) { *match = 1; } -static void +static IPFW_RULES_INLINE void rule_forward_mac(int opcode) { printf("ipfw: opcode %d unimplemented\n", @@ -670,7 +670,7 @@ } -static void +static IPFW_RULES_INLINE void rule_jail(int * match, u_short offset, uint8_t proto, ipfw_insn *cmd, struct ip_fw_args *args, int ucred_lookup, void *ucred_cache) { /* @@ -693,25 +693,25 @@ #endif } -static void +static IPFW_RULES_INLINE void rule_recv(int *match, ipfw_insn *cmd, struct mbuf *m, struct ip_fw_chain *chain, uint32_t *tablearg) { *match = iface_match(m->m_pkthdr.rcvif, (ipfw_insn_if *)cmd, chain, tablearg); } -static void +static IPFW_RULES_INLINE void rule_xmit(int *match, struct ifnet *oif, ipfw_insn *cmd, struct ip_fw_chain *chain, uint32_t *tablearg) { *match = iface_match(oif, (ipfw_insn_if *)cmd, chain, tablearg); } -static void +static IPFW_RULES_INLINE void rule_via(int *match, struct ifnet *oif, struct mbuf *m, ipfw_insn *cmd, struct ip_fw_chain *chain, uint32_t *tablearg) { *match = iface_match(oif ? oif : m->m_pkthdr.rcvif, (ipfw_insn_if *)cmd, chain, tablearg); } -static void +static IPFW_RULES_INLINE void rule_macaddr2(int *match, struct ip_fw_args *args, ipfw_insn *cmd) { if (args->eh != NULL) { /* have MAC header */ @@ -729,7 +729,7 @@ } -static void +static IPFW_RULES_INLINE void rule_mac_type(int *match, struct ip_fw_args *args, ipfw_insn *cmd, int cmdlen, uint16_t etype) { if (args->eh != NULL) { @@ -745,26 +745,26 @@ } -static void +static IPFW_RULES_INLINE void rule_frag(int *match, u_short offset) { *match = (offset != 0); } -static void +static IPFW_RULES_INLINE void rule_in(int *match, struct ifnet *oif) { /* "out" is "not in" */ *match = (oif == NULL); } -static void +static IPFW_RULES_INLINE void rule_layer2(int *match, struct ip_fw_args * args) { *match = (args->eh != NULL); } -static void +static IPFW_RULES_INLINE void rule_diverted(int *match, struct ip_fw_args * args, ipfw_insn *cmd) { /* For diverted packets, args->rule.info @@ -776,7 +776,7 @@ cmd->arg1 & ((i & IPFW_INFO_IN) ? 1 : 2); } -static void +static IPFW_RULES_INLINE void rule_proto(int *match, uint8_t proto, ipfw_insn *cmd) { /* @@ -786,7 +786,7 @@ *match = (proto == cmd->arg1); } -static void +static IPFW_RULES_INLINE void rule_ip_src(int *match, int is_ipv4, ipfw_insn *cmd, struct in_addr *src_ip) { *match = is_ipv4 && @@ -794,7 +794,7 @@ src_ip->s_addr); } -static void +static IPFW_RULES_INLINE void rule_ip_dst_lookup(int *match, ipfw_insn *cmd, int cmdlen, struct ip_fw_args *args, uint32_t *tablearg, int is_ipv4, int is_ipv6, struct ip *ip, struct in_addr *dst_ip, struct in_addr *src_ip, uint16_t dst_port, uint16_t src_port, u_short offset, uint8_t proto, int ucred_lookup, void *ucred_cache, struct ip_fw_chain *chain) { if (is_ipv4) { @@ -869,7 +869,7 @@ } } -static void +static IPFW_RULES_INLINE void rule_ip_dst_mask(int *match, int is_ipv4, ipfw_insn *cmd, int cmdlen, struct in_addr *dst_ip, struct in_addr *src_ip) { if (is_ipv4) { @@ -884,7 +884,7 @@ } } -static void +static IPFW_RULES_INLINE void rule_ip_src_me(int *match, int is_ipv4, int is_ipv6, struct in_addr *src_ip, struct ip_fw_args *args) { if (is_ipv4) { @@ -901,14 +901,14 @@ } #ifdef INET6 -static void +static IPFW_RULES_INLINE void rule_ip6_src_me(int *match, int is_ipv6, struct ip_fw_args *args) { *match= is_ipv6 && search_ip6_addr_net(&args->f_id.src_ip6); } #endif /* INET6 */ -static void +static IPFW_RULES_INLINE void rule_ip_src_set(int *match, int is_ipv4, ipfw_insn *cmd, struct ip_fw_args *args) { if (is_ipv4) { @@ -927,7 +927,7 @@ } } -static void +static IPFW_RULES_INLINE void rule_ip_dst(int *match, int is_ipv4, ipfw_insn *cmd, struct in_addr *dst_ip) { *match = is_ipv4 && @@ -935,7 +935,7 @@ dst_ip->s_addr); } -static void +static IPFW_RULES_INLINE void rule_ip_dst_me(int *match, struct ip_fw_args *args, int is_ipv4, int is_ipv6, struct in_addr *dst_ip) { if (is_ipv4) { @@ -951,14 +951,14 @@ } #ifdef INET6 -static void +static IPFW_RULES_INLINE void rule_ip6_dst_me(int *match, struct ip_fw_args *args, int is_ipv6) { *match= is_ipv6 && search_ip6_addr_net(&args->f_id.dst_ip6); } #endif /* INET6 */ -static void +static IPFW_RULES_INLINE void rule_ip_dstport(int *match, uint8_t proto, u_short offset, ipfw_insn *cmd, int cmdlen, uint16_t dst_port, uint16_t src_port) { /* @@ -981,7 +981,7 @@ } } -static void +static IPFW_RULES_INLINE void rule_icmptype(int *match, u_short offset, uint8_t proto, void *ulp, ipfw_insn *cmd ) { *match = (offset == 0 && proto==IPPROTO_ICMP && @@ -989,7 +989,7 @@ } #ifdef INET6 -static void +static IPFW_RULES_INLINE void rule_icmp6type(int *match, u_short offset, int is_ipv6, uint8_t proto, void *ulp, ipfw_insn *cmd) { *match = is_ipv6 && offset == 0 && @@ -1001,7 +1001,7 @@ #endif /* INET6 */ -static void +static IPFW_RULES_INLINE void rule_ipopt(int *match, int is_ipv4, struct ip *ip, ipfw_insn *cmd) { *match = (is_ipv4 && @@ -1009,14 +1009,14 @@ } -static void +static IPFW_RULES_INLINE void rule_ipver(int *match, int is_ipv4, ipfw_insn *cmd, struct ip *ip) { *match = (is_ipv4 && cmd->arg1 == ip->ip_v); } -static void +static IPFW_RULES_INLINE void rule_ipttl(int *match, int is_ipv4, ipfw_insn *cmd, int cmdlen, struct ip *ip, uint16_t iplen) { if (is_ipv4) { /* only for IP packets */ @@ -1042,21 +1042,21 @@ } } -static void +static IPFW_RULES_INLINE void rule_ipprecedence(int *match, int is_ipv4, ipfw_insn *cmd, struct ip *ip) { *match = (is_ipv4 && (cmd->arg1 == (ip->ip_tos & 0xe0)) ); } -static void +static IPFW_RULES_INLINE void rule_iptos(int *match, int is_ipv4, ipfw_insn *cmd, struct ip *ip) { *match = (is_ipv4 && flags_match(cmd, ip->ip_tos)); } -static void +static IPFW_RULES_INLINE void rule_dscp(int *match, int is_ipv4, int is_ipv6, ipfw_insn *cmd, struct ip *ip) { uint32_t *p; @@ -1082,7 +1082,7 @@ *match = *p & (1 << x); } -static void +static IPFW_RULES_INLINE void rule_tcpdatalen(int *match, uint8_t proto, u_short offset, void *ulp, uint16_t iplen, int cmdlen, ipfw_insn *cmd, struct ip *ip) { if (proto == IPPROTO_TCP && offset == 0) { @@ -1106,14 +1106,14 @@ } } -static void +static IPFW_RULES_INLINE void rule_tcpflags(int *match, uint8_t proto, u_short offset, ipfw_insn *cmd, void *ulp) { *match = (proto == IPPROTO_TCP && offset == 0 && flags_match(cmd, TCP(ulp)->th_flags)); } -static int +static IPFW_RULES_INLINE int rule_tcpopts(int *match, u_int hlen, void *ulp, uint8_t proto, u_short offset, ipfw_insn *cmd, struct mbuf *m, struct ip_fw_args *args) { /* @@ -1137,7 +1137,7 @@ return (0); } -static void +static IPFW_RULES_INLINE void rule_tcpseq(int *match, uint8_t proto, u_short offset, ipfw_insn *cmd, void *ulp) { *match = (proto == IPPROTO_TCP && offset == 0 && @@ -1145,7 +1145,7 @@ TCP(ulp)->th_seq); } -static void +static IPFW_RULES_INLINE void rule_tcpack(int *match, uint8_t proto, u_short offset, ipfw_insn *cmd, void *ulp) { *match = (proto == IPPROTO_TCP && offset == 0 && @@ -1153,7 +1153,7 @@ TCP(ulp)->th_ack); } -static void +static IPFW_RULES_INLINE void rule_tcpwin(int *match, uint8_t proto, u_short offset, ipfw_insn *cmd, int cmdlen, void *ulp) { if (proto == IPPROTO_TCP && offset == 0) { @@ -1174,7 +1174,7 @@ } } -static void +static IPFW_RULES_INLINE void rule_estab(int *match, uint8_t proto, u_short offset, void *ulp) { /* reject packets which have SYN only */ @@ -1184,7 +1184,7 @@ (TH_RST | TH_ACK | TH_SYN)) != TH_SYN); } -static void +static IPFW_RULES_INLINE void rule_altq(int *match, ipfw_insn *cmd, struct mbuf *m, struct ip *ip) { struct pf_mtag *at; @@ -1216,7 +1216,7 @@ at->hdr = ip; } -static void +static IPFW_RULES_INLINE void rule_log(int *match, struct ip_fw *f, u_int hlen, struct ip_fw_args *args, struct mbuf *m, struct ifnet *oif, u_short offset, u_short ip6f_mf, uint32_t tablearg, struct ip *ip) { ipfw_log(f, hlen, args, m, @@ -1224,14 +1224,14 @@ *match = 1; } -static void +static IPFW_RULES_INLINE void rule_prob(int *match, ipfw_insn *cmd) { *match = (random()<((ipfw_insn_u32 *)cmd)->d[0]); return; } -static void +static IPFW_RULES_INLINE void rule_verrevpath(int *match, struct ifnet *oif, struct mbuf *m, int is_ipv6, struct ip_fw_args *args, struct in_addr *src_ip) { /* Outgoing packets automatically pass/match */ @@ -1247,7 +1247,7 @@ args->f_id.fib))); } -static void +static IPFW_RULES_INLINE void rule_versrcreach(int *match, u_int hlen, struct ifnet *oif, int is_ipv6, struct ip_fw_args *args, struct in_addr *src_ip) { /* Outgoing packets automatically pass/match */ @@ -1261,7 +1261,7 @@ } /* dpl XXX We could pass pointers to struct in_addr at in_localaddr() */ -static void +static IPFW_RULES_INLINE void rule_antispoof(int *match, struct ifnet *oif, u_int hlen, int is_ipv4, int is_ipv6, struct in_addr *src_ip, struct ip_fw_args *args, struct mbuf *m) { /* Outgoing packets automatically pass/match */ @@ -1287,7 +1287,7 @@ } #ifdef IPSEC -static void +static IPFW_RULES_INLINE void rule_ipsec(int *match, struct mbuf *) { *match = (m_tag_find(m, @@ -1296,7 +1296,7 @@ #endif /* IPSEC */ #ifdef INET6 -static void +static IPFW_RULES_INLINE void rule_ip6_src(int *match, int is_ipv6, struct ip_fw_args *args, ipfw_insn *cmd) { *match = is_ipv6 && @@ -1304,7 +1304,7 @@ &((ipfw_insn_ip6 *)cmd)->addr6); } -static void +static IPFW_RULES_INLINE void rule_ip6_dst(int *match, int is_ipv6, struct ip_fw_args *args, ipfw_insn *cmd) { *match = is_ipv6 && @@ -1312,7 +1312,7 @@ &((ipfw_insn_ip6 *)cmd)->addr6); } -static void +static IPFW_RULES_INLINE void rule_ip6_dst_mask(int *match, struct ip_fw_args *args, ipfw_insn *cmd, int cmdlen, int is_ipv6) { if (is_ipv6) { @@ -1336,7 +1336,7 @@ } } -static void +static IPFW_RULES_INLINE void rule_flow6id(int *match, int is_ipv6, struct ip_fw_args *args, ipfw_insn *cmd) { *match = is_ipv6 && @@ -1344,27 +1344,27 @@ (ipfw_insn_u32 *) cmd); } -static void +static IPFW_RULES_INLINE void rule_ext_hdr(int *match, int is_ipv6, uint16_t ext_hd, ipfw_insn *cmd) { *match = is_ipv6 && (ext_hd & ((ipfw_insn *) cmd)->arg1); } -static void +static IPFW_RULES_INLINE void rule_ip6(int *match, int is_ipv6) { *match = is_ipv6; } #endif /* INET6 */ -static void +static IPFW_RULES_INLINE void rule_ip4(int *match, int is_ipv4) { *match = is_ipv4; } -static void +static IPFW_RULES_INLINE void rule_tag(int *match, ipfw_insn *cmd, struct mbuf *m, uint32_t tablearg) { struct m_tag *mtag; @@ -1395,14 +1395,14 @@ } } -static void +static IPFW_RULES_INLINE void rule_fib(int *match, struct ip_fw_args *args, ipfw_insn *cmd) { if (args->f_id.fib == cmd->arg1) *match = 1; } -static void +static IPFW_RULES_INLINE void rule_sockarg(int *match, int is_ipv6, uint8_t proto, struct in_addr *dst_ip, struct in_addr *src_ip, uint16_t dst_port, uint16_t src_port, struct ip_fw_args *args, uint32_t *tablearg) { #ifndef USERSPACE /* not supported in userspace */ @@ -1449,7 +1449,7 @@ #endif /* !USERSPACE */ } -static void +static IPFW_RULES_INLINE void rule_tagged(int *match, ipfw_insn *cmd, int cmdlen, struct mbuf *m, uint32_t tablearg) { struct m_tag *mtag; @@ -1483,7 +1483,7 @@ /* * The second sets of opcodes. They represent the actions of a rule. */ -static void +static IPFW_RULES_INLINE void rule_keep_state(int *match, struct ip_fw *f, ipfw_insn *cmd, struct ip_fw_args *args, uint32_t tablearg, int *retval, int *l, int *done) { if (ipfw_install_state(f, @@ -1496,7 +1496,7 @@ *match = 1; } -static void +static IPFW_RULES_INLINE void rule_check_state(int *match, int *dyn_dir, ipfw_dyn_rule *q, struct ip_fw_args *args, uint8_t proto, void *ulp, int pktlen, struct ip_fw *f, int *f_pos, struct ip_fw_chain *chain, ipfw_insn *cmd, int *cmdlen, int *l) { /* @@ -1545,7 +1545,7 @@ *match = 1; } -static void +static IPFW_RULES_INLINE void rule_accept(int *retval, int *l, int *done) { *retval = 0; /* accept */ @@ -1553,7 +1553,7 @@ *done = 1; /* exit outer loop */ } -static void +static IPFW_RULES_INLINE void rule_queue(struct ip_fw_args *args, int f_pos, struct ip_fw_chain *chain, ipfw_insn *cmd, uint32_t tablearg, int *retval, int *l, int *done) { set_match(args, f_pos, chain); @@ -1567,7 +1567,7 @@ *done = 1; /* exit outer loop */ } -static void +static IPFW_RULES_INLINE void rule_tee(int *l, int *done, int *retval, ipfw_insn *cmd, struct ip_fw_args *args, int f_pos, uint32_t tablearg, struct ip_fw_chain *chain) { if (args->eh) /* not on layer 2 */ @@ -1581,14 +1581,14 @@ args->rule.info = IP_FW_ARG_TABLEARG(cmd->arg1); } -static void +static IPFW_RULES_INLINE void rule_count(int *l, struct ip_fw *f, int pktlen) { IPFW_INC_RULE_COUNTER(f, pktlen); *l = 0; /* exit inner loop */ } -static void +static IPFW_RULES_INLINE void rule_skipto(int *match, int *l, ipfw_insn *cmd, int *cmdlen, int *skip_or, int *f_pos, struct ip_fw *f, int pktlen, struct ip_fw_chain *chain, uint32_t tablearg) { IPFW_INC_RULE_COUNTER(f, pktlen); @@ -1613,7 +1613,7 @@ *skip_or = 0; } -static void +static IPFW_RULES_INLINE void rule_callreturn(ipfw_insn *cmd, struct mbuf *m, struct ip_fw *f, struct ip_fw_chain *chain, uint32_t tablearg, int pktlen, int *skip_or, int *cmdlen, int *f_pos, int *l) { /* @@ -1710,7 +1710,7 @@ #undef IS_RETURN } -static void +static IPFW_RULES_INLINE void rule_reject(u_int hlen, int is_ipv4, u_short offset, uint8_t proto, void *ulp, struct mbuf *m, struct in_addr *dst_ip, struct ip_fw_args *args, ipfw_insn *cmd, uint16_t iplen, struct ip *ip) { /* @@ -1729,7 +1729,7 @@ } #ifdef INET6 -static void +static IPFW_RULES_INLINE void rule_unreach6(u_int hlen, int is_ipv6, u_short offset, uint8_t proto, uint8_t icmp6_type, struct mbuf *m, struct ip_fw_args *args, ipfw_insn *cmd, struct ip *ip) { if (hlen > 0 && is_ipv6 && @@ -1747,7 +1747,7 @@ #endif /* INET6 */ -static void +static IPFW_RULES_INLINE void rule_deny(int *l, int *done, int *retval) { *retval = IP_FW_DENY; @@ -1755,7 +1755,7 @@ *done = 1; /* exit outer loop */ } -static void +static IPFW_RULES_INLINE void rule_forward_ip(struct ip_fw_args *args, ipfw_dyn_rule *q, struct ip_fw *f, int dyn_dir, ipfw_insn *cmd, uint32_t tablearg, int *retval, int *l, int *done) { if (args->eh) /* not valid on layer2 pkts */ @@ -1780,7 +1780,7 @@ } #ifdef INET6 -static void +static IPFW_RULES_INLINE void rule_forward_ip6(struct ip_fw_args *args, ipfw_dyn_rule *q, struct ip_fw *f, int dyn_dir, ipfw_insn *cmd, int *retval, int *l, int *done) { if (args->eh) /* not valid on layer2 pkts */ @@ -1798,7 +1798,7 @@ } #endif /* INET6 */ -static void +static IPFW_RULES_INLINE void rule_ngtee(struct ip_fw_args *args, int f_pos, struct ip_fw_chain *chain, ipfw_insn *cmd, uint32_t tablearg, int *retval, int *l, int *done) { set_match(args, f_pos, chain); @@ -1811,7 +1811,7 @@ *done = 1; /* exit outer loop */ } -static void +static IPFW_RULES_INLINE void rule_setfib(struct ip_fw *f, int pktlen, uint32_t tablearg, ipfw_insn *cmd, struct mbuf *m, struct ip_fw_args *args, int *l) { uint32_t fib; @@ -1825,7 +1825,7 @@ *l = 0; /* exit inner loop */ } -static void +static IPFW_RULES_INLINE void rule_setdscp(ipfw_insn *cmd, struct ip *ip, int is_ipv4, int is_ipv6, uint32_t tablearg, struct ip_fw *f, int pktlen, int *l) { uint16_t code; @@ -1852,7 +1852,7 @@ IPFW_INC_RULE_COUNTER(f, pktlen); } -static void +static IPFW_RULES_INLINE void rule_nat(struct ip_fw_args *args, int f_pos, struct ip_fw_chain *chain, ipfw_insn *cmd, struct mbuf *m, uint32_t tablearg, int *retval, int *done, int *l) { *l = 0; /* exit inner loop */ @@ -1886,7 +1886,8 @@ *retval = ipfw_nat_ptr(args, t, m); } -static void rule_reass(struct ip_fw *f, int f_pos, struct ip_fw_chain *chain, int pktlen, struct ip *ip, struct ip_fw_args *args, struct mbuf *m, int *retval, int *done, int *l) +static IPFW_RULES_INLINE void +rule_reass(struct ip_fw *f, int f_pos, struct ip_fw_chain *chain, int pktlen, struct ip *ip, struct ip_fw_args *args, struct mbuf *m, int *retval, int *done, int *l) { int ip_off; Modified: soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/jit.cc ============================================================================== --- soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/jit.cc Thu Jul 24 16:33:29 2014 (r271341) +++ soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/jit.cc Thu Jul 24 17:15:40 2014 (r271342) @@ -10,6 +10,7 @@ #include #include +typedef int (*funcptr)(); using namespace llvm; class jitCompiler { @@ -35,7 +36,6 @@ exit(EXIT_FAILURE); } mod = ptr.get(); - ptr = parseBitcodeFile(buffer.get(), c); } } ; @@ -86,3 +86,10 @@ */ } + +/* The mother of all functions! */ +extern "C" funcptr +compile_code() +{ + return 0; +} Modified: soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/jit.h ============================================================================== --- soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/jit.h Thu Jul 24 16:33:29 2014 (r271341) +++ soc2014/dpl/netmap-ipfwjit/sys/netpfil/ipfw/jit.h Thu Jul 24 17:15:40 2014 (r271342) @@ -1,2 +1,4 @@ -/* JIT code headers */ +typedef int (*funcptr)(); + void ipfw_jit_init(); +funcptr compile_code(); From owner-svn-soc-all@FreeBSD.ORG Fri Jul 25 00:07:12 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0B03FB4F for ; Fri, 25 Jul 2014 00:07:12 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB27E28C8 for ; Fri, 25 Jul 2014 00:07:11 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6P07B2k090050 for ; Fri, 25 Jul 2014 00:07:11 GMT (envelope-from seiya@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s6P07Bu4089994 for svn-soc-all@FreeBSD.org; Fri, 25 Jul 2014 00:07:11 GMT (envelope-from seiya@FreeBSD.org) Date: Fri, 25 Jul 2014 00:07:11 GMT Message-Id: <201407250007.s6P07Bu4089994@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to seiya@FreeBSD.org using -f From: seiya@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r271351 - soc2014/seiya/bootsplash/sys/dev/fb MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jul 2014 00:07:12 -0000 Author: seiya Date: Fri Jul 25 00:07:11 2014 New Revision: 271351 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271351 Log: tiny enhancement Modified: soc2014/seiya/bootsplash/sys/dev/fb/bsplash.c Modified: soc2014/seiya/bootsplash/sys/dev/fb/bsplash.c ============================================================================== --- soc2014/seiya/bootsplash/sys/dev/fb/bsplash.c Thu Jul 24 23:14:03 2014 (r271350) +++ soc2014/seiya/bootsplash/sys/dev/fb/bsplash.c Fri Jul 25 00:07:11 2014 (r271351) @@ -52,20 +52,14 @@ static video_adapter_t *adp = NULL; static BMP_INFO bmp_info; -static int background_y_origin = -1; -static int background_enabled = 1; -static int animation_y_origin = -1; -static int animation_y = -1; -static int animation_x = -1; -static int animation_width = -1; -static int animation_height = -1; +static int background_enabled = 1; // 1:enabled, 0:disabled +static int background_y_origin; static int animation_enabled = 1; // 1:enabled, 0:disabled -static int progress_bar_y_origin = -1; -static int progress_bar_y = -1; -static int progress_bar_x = -1; -static int progress_bar_width = -1; -static int progress_bar_height = -1; +static int animation_y_origin, animation_y, animation_x; +static int animation_width, animation_height; static int progress_bar_enabled = 1; // 1:enabled, 0:disabled +static int progress_bar_y_origin, progress_bar_y, progress_bar_x; +static int progress_bar_width, progress_bar_height; int From owner-svn-soc-all@FreeBSD.ORG Fri Jul 25 00:21:43 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B6C9BE9D for ; Fri, 25 Jul 2014 00:21:43 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 88FD02A42 for ; Fri, 25 Jul 2014 00:21:43 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6P0LhCK064543 for ; Fri, 25 Jul 2014 00:21:43 GMT (envelope-from seiya@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s6P0Lhak064312 for svn-soc-all@FreeBSD.org; Fri, 25 Jul 2014 00:21:43 GMT (envelope-from seiya@FreeBSD.org) Date: Fri, 25 Jul 2014 00:21:43 GMT Message-Id: <201407250021.s6P0Lhak064312@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to seiya@FreeBSD.org using -f From: seiya@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r271352 - soc2014/seiya/bootsplash/sys/dev/fb MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jul 2014 00:21:43 -0000 Author: seiya Date: Fri Jul 25 00:21:42 2014 New Revision: 271352 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271352 Log: support --repeat-animation Modified: soc2014/seiya/bootsplash/sys/dev/fb/bsplash.c Modified: soc2014/seiya/bootsplash/sys/dev/fb/bsplash.c ============================================================================== --- soc2014/seiya/bootsplash/sys/dev/fb/bsplash.c Fri Jul 25 00:07:11 2014 (r271351) +++ soc2014/seiya/bootsplash/sys/dev/fb/bsplash.c Fri Jul 25 00:21:42 2014 (r271352) @@ -52,12 +52,13 @@ static video_adapter_t *adp = NULL; static BMP_INFO bmp_info; -static int background_enabled = 1; // 1:enabled, 0:disabled +static int background_enabled = 1; // 1:enabled, 0:disabled static int background_y_origin; -static int animation_enabled = 1; // 1:enabled, 0:disabled +static int animation_enabled = 1; // 1:enabled, 0:disabled +static int repeat_animation; // 1:repeat, 0:don't repeat static int animation_y_origin, animation_y, animation_x; static int animation_width, animation_height; -static int progress_bar_enabled = 1; // 1:enabled, 0:disabled +static int progress_bar_enabled = 1; // 1:enabled, 0:disabled static int progress_bar_y_origin, progress_bar_y, progress_bar_x; static int progress_bar_width, progress_bar_height; @@ -92,6 +93,19 @@ } freeenv(s); + // load "bsplash_repeat_animation" + if ((s = getenv("bsplash_repeat_animation")) == NULL) { + if (bootverbose) + printf("bsplash: cannot load \"bsplash_repeat_animation\"\n"); + animation_enabled = 0; + } else { + if(strcmp(s, "YES") == 0) + repeat_animation = 1; + else + repeat_animation = 0; + } + freeenv(s); + // load "bsplash_animation_y_origin" if ((s = getenv("bsplash_animation_y_origin")) == NULL) { if (bootverbose) @@ -263,16 +277,26 @@ static int iy; char *s; int progress = 0; + int stop_animation = 0; iy = animation_y_origin; for (;;){ // update animation - if (draw_bmp(iy, animation_y, animation_x, animation_width, animation_height) == 0){ - iy += animation_height; - }else{ - iy = animation_y_origin; - if (draw_bmp(iy, animation_y, animation_x, animation_width, animation_height) == 0) + if(!stop_animation){ + if (draw_bmp(iy, animation_y, animation_x, animation_width, + animation_height) == 0){ iy += animation_height; + } else { + if (!repeat_animation){ + stop_animation = 1; + } else { + iy = animation_y_origin; + // try again + if (draw_bmp(iy, animation_y, animation_x, animation_width, + animation_height) == 0) + iy += animation_height; + } + } } // get the progress of boot From owner-svn-soc-all@FreeBSD.ORG Fri Jul 25 10:35:23 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 176EC865 for ; Fri, 25 Jul 2014 10:35:23 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F29F72029 for ; Fri, 25 Jul 2014 10:35:22 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6PAZMJg077811 for ; Fri, 25 Jul 2014 10:35:22 GMT (envelope-from op@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s6PAZ10Z073212 for svn-soc-all@FreeBSD.org; Fri, 25 Jul 2014 10:35:01 GMT (envelope-from op@FreeBSD.org) Date: Fri, 25 Jul 2014 10:35:01 GMT Message-Id: <201407251035.s6PAZ10Z073212@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to op@FreeBSD.org using -f From: op@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r271358 - in soc2014/op/freebsd-base: . bin/csh bin/ls bin/sh bin/sh/tests/builtins cddl cddl/contrib/opensolaris cddl/contrib/opensolaris/cmd/zpool cddl/contrib/opensolaris/cmd/ztes... MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jul 2014 10:35:23 -0000 Author: op Date: Fri Jul 25 10:35:00 2014 New Revision: 271358 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271358 Log: MFH @20140725 - Merging r270886 through r271357 Signed-off-by: Oliver Pinter Added: soc2014/op/freebsd-base/bin/sh/tests/builtins/break6.0 - copied unchanged from r271357, mirror/FreeBSD/head/bin/sh/tests/builtins/break6.0 soc2014/op/freebsd-base/contrib/libucl/ChangeLog.md - copied unchanged from r271357, mirror/FreeBSD/head/contrib/libucl/ChangeLog.md soc2014/op/freebsd-base/contrib/libucl/src/ucl_emitter_streamline.c - copied unchanged from r271357, mirror/FreeBSD/head/contrib/libucl/src/ucl_emitter_streamline.c soc2014/op/freebsd-base/contrib/libucl/src/ucl_emitter_utils.c - copied unchanged from r271357, mirror/FreeBSD/head/contrib/libucl/src/ucl_emitter_utils.c soc2014/op/freebsd-base/contrib/libucl/tests/basic/11.in - copied unchanged from r271357, mirror/FreeBSD/head/contrib/libucl/tests/basic/11.in soc2014/op/freebsd-base/contrib/libucl/tests/basic/11.res - copied unchanged from r271357, mirror/FreeBSD/head/contrib/libucl/tests/basic/11.res soc2014/op/freebsd-base/contrib/libucl/tests/streamline.res - copied unchanged from r271357, mirror/FreeBSD/head/contrib/libucl/tests/streamline.res soc2014/op/freebsd-base/contrib/libucl/tests/streamline.test - copied unchanged from r271357, mirror/FreeBSD/head/contrib/libucl/tests/streamline.test soc2014/op/freebsd-base/contrib/libucl/tests/test_streamline.c - copied unchanged from r271357, mirror/FreeBSD/head/contrib/libucl/tests/test_streamline.c soc2014/op/freebsd-base/lib/libc/arm/aeabi/aeabi_unwind_exidx.c - copied unchanged from r271357, mirror/FreeBSD/head/lib/libc/arm/aeabi/aeabi_unwind_exidx.c soc2014/op/freebsd-base/share/man/man9/PCBGROUP.9 - copied unchanged from r271357, mirror/FreeBSD/head/share/man/man9/PCBGROUP.9 soc2014/op/freebsd-base/share/man/man9/pmap_protect.9 - copied unchanged from r271357, mirror/FreeBSD/head/share/man/man9/pmap_protect.9 soc2014/op/freebsd-base/share/man/man9/pmap_unwire.9 - copied unchanged from r271357, mirror/FreeBSD/head/share/man/man9/pmap_unwire.9 soc2014/op/freebsd-base/sys/arm/conf/APALIS-IMX6 - copied unchanged from r271357, mirror/FreeBSD/head/sys/arm/conf/APALIS-IMX6 soc2014/op/freebsd-base/sys/arm/freescale/imx/imx_gpio.c - copied unchanged from r271357, mirror/FreeBSD/head/sys/arm/freescale/imx/imx_gpio.c soc2014/op/freebsd-base/sys/arm/freescale/imx/imx_i2c.c - copied unchanged from r271357, mirror/FreeBSD/head/sys/arm/freescale/imx/imx_i2c.c soc2014/op/freebsd-base/sys/boot/fdt/dts/arm/apalis-imx6.dts - copied unchanged from r271357, mirror/FreeBSD/head/sys/boot/fdt/dts/arm/apalis-imx6.dts soc2014/op/freebsd-base/sys/cam/ctl/ctl_tpc.c - copied unchanged from r271357, mirror/FreeBSD/head/sys/cam/ctl/ctl_tpc.c soc2014/op/freebsd-base/sys/cam/ctl/ctl_tpc.h - copied unchanged from r271357, mirror/FreeBSD/head/sys/cam/ctl/ctl_tpc.h soc2014/op/freebsd-base/sys/cam/ctl/ctl_tpc_local.c - copied unchanged from r271357, mirror/FreeBSD/head/sys/cam/ctl/ctl_tpc_local.c soc2014/op/freebsd-base/tools/build/options/WITHOUT_TESTS - copied unchanged from r271357, mirror/FreeBSD/head/tools/build/options/WITHOUT_TESTS soc2014/op/freebsd-base/usr.bin/timeout/ - copied from r271357, mirror/FreeBSD/head/usr.bin/timeout/ soc2014/op/freebsd-base/usr.bin/units/tests/ - copied from r271357, mirror/FreeBSD/head/usr.bin/units/tests/ soc2014/op/freebsd-base/usr.bin/yacc/tests/yacc_tests.sh - copied unchanged from r271357, mirror/FreeBSD/head/usr.bin/yacc/tests/yacc_tests.sh soc2014/op/freebsd-base/usr.sbin/bhyve/task_switch.c - copied unchanged from r271357, mirror/FreeBSD/head/usr.sbin/bhyve/task_switch.c soc2014/op/freebsd-base/usr.sbin/bsdconfig/examples/add_some_packages.sh - copied unchanged from r271357, mirror/FreeBSD/head/usr.sbin/bsdconfig/examples/add_some_packages.sh soc2014/op/freebsd-base/usr.sbin/bsdconfig/share/packages/musthavepkg.subr - copied unchanged from r271357, mirror/FreeBSD/head/usr.sbin/bsdconfig/share/packages/musthavepkg.subr Deleted: soc2014/op/freebsd-base/contrib/byacc/NOTES-btyacc-Changes soc2014/op/freebsd-base/contrib/byacc/NOTES-btyacc-Disposition soc2014/op/freebsd-base/contrib/unbound/util/configlexer.c soc2014/op/freebsd-base/contrib/unbound/util/configparser.c soc2014/op/freebsd-base/contrib/unbound/util/configparser.h soc2014/op/freebsd-base/share/man/man9/pmap_page_protect.9 soc2014/op/freebsd-base/share/man/man9/zero_copy.9 soc2014/op/freebsd-base/sys/arm/freescale/imx/i2c.c soc2014/op/freebsd-base/sys/arm/freescale/imx/imx51_gpio.c soc2014/op/freebsd-base/tools/build/options/WITH_TESTS soc2014/op/freebsd-base/usr.bin/yacc/tests/calc.y soc2014/op/freebsd-base/usr.bin/yacc/tests/calc1.y soc2014/op/freebsd-base/usr.bin/yacc/tests/calc2.y soc2014/op/freebsd-base/usr.bin/yacc/tests/calc3.y soc2014/op/freebsd-base/usr.bin/yacc/tests/code_calc.y soc2014/op/freebsd-base/usr.bin/yacc/tests/code_error.y soc2014/op/freebsd-base/usr.bin/yacc/tests/error.y soc2014/op/freebsd-base/usr.bin/yacc/tests/ftp.y soc2014/op/freebsd-base/usr.bin/yacc/tests/grammar.y soc2014/op/freebsd-base/usr.bin/yacc/tests/legacy_test.sh soc2014/op/freebsd-base/usr.bin/yacc/tests/pure_calc.y soc2014/op/freebsd-base/usr.bin/yacc/tests/pure_error.y soc2014/op/freebsd-base/usr.bin/yacc/tests/quote_calc.y soc2014/op/freebsd-base/usr.bin/yacc/tests/quote_calc2.y soc2014/op/freebsd-base/usr.bin/yacc/tests/quote_calc3.y soc2014/op/freebsd-base/usr.bin/yacc/tests/quote_calc4.y soc2014/op/freebsd-base/usr.bin/yacc/tests/regress.00.out soc2014/op/freebsd-base/usr.bin/yacc/tests/regress.01.out soc2014/op/freebsd-base/usr.bin/yacc/tests/regress.02.out soc2014/op/freebsd-base/usr.bin/yacc/tests/regress.03.out soc2014/op/freebsd-base/usr.bin/yacc/tests/regress.04.out soc2014/op/freebsd-base/usr.bin/yacc/tests/regress.05.out soc2014/op/freebsd-base/usr.bin/yacc/tests/regress.06.out soc2014/op/freebsd-base/usr.bin/yacc/tests/regress.07.out soc2014/op/freebsd-base/usr.bin/yacc/tests/regress.08.out soc2014/op/freebsd-base/usr.bin/yacc/tests/regress.09.out soc2014/op/freebsd-base/usr.bin/yacc/tests/regress.10.out soc2014/op/freebsd-base/usr.bin/yacc/tests/regress.11.out soc2014/op/freebsd-base/usr.bin/yacc/tests/regress.12.out soc2014/op/freebsd-base/usr.bin/yacc/tests/regress.13.out soc2014/op/freebsd-base/usr.bin/yacc/tests/regress.14.out soc2014/op/freebsd-base/usr.bin/yacc/tests/regress.sh soc2014/op/freebsd-base/usr.bin/yacc/tests/undefined.y soc2014/op/freebsd-base/usr.sbin/bsdconfig/examples/browse_packages_ftp.sh Modified: soc2014/op/freebsd-base/ (props changed) soc2014/op/freebsd-base/Makefile soc2014/op/freebsd-base/Makefile.inc1 soc2014/op/freebsd-base/ObsoleteFiles.inc soc2014/op/freebsd-base/UPDATING soc2014/op/freebsd-base/bin/csh/Makefile soc2014/op/freebsd-base/bin/ls/Makefile soc2014/op/freebsd-base/bin/sh/Makefile soc2014/op/freebsd-base/bin/sh/eval.c soc2014/op/freebsd-base/bin/sh/exec.c soc2014/op/freebsd-base/bin/sh/jobs.c soc2014/op/freebsd-base/bin/sh/miscbltin.c soc2014/op/freebsd-base/bin/sh/mystring.c soc2014/op/freebsd-base/bin/sh/mystring.h soc2014/op/freebsd-base/bin/sh/tests/builtins/Makefile soc2014/op/freebsd-base/cddl/ (props changed) soc2014/op/freebsd-base/cddl/contrib/opensolaris/ (props changed) soc2014/op/freebsd-base/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c soc2014/op/freebsd-base/cddl/contrib/opensolaris/cmd/ztest/ztest.c soc2014/op/freebsd-base/contrib/byacc/ (props changed) soc2014/op/freebsd-base/contrib/byacc/CHANGES soc2014/op/freebsd-base/contrib/byacc/MANIFEST soc2014/op/freebsd-base/contrib/byacc/VERSION soc2014/op/freebsd-base/contrib/byacc/aclocal.m4 soc2014/op/freebsd-base/contrib/byacc/main.c soc2014/op/freebsd-base/contrib/byacc/package/byacc.spec soc2014/op/freebsd-base/contrib/byacc/package/debian/changelog soc2014/op/freebsd-base/contrib/byacc/package/mingw-byacc.spec soc2014/op/freebsd-base/contrib/byacc/package/pkgsrc/Makefile soc2014/op/freebsd-base/contrib/byacc/test/btyacc/big_b.output soc2014/op/freebsd-base/contrib/byacc/test/btyacc/big_l.output soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_inherit1.error soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_inherit2.error soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_inherit3.error soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_inherit4.error soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_inherit5.error soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax1.error soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax10.error soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax11.error soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax12.error soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax13.error soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax14.error soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax15.error soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax16.error soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax17.error soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax18.error soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax19.error soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax2.error soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax21.error soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax22.error soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax23.error soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax24.error soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax25.error soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax26.error soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax27.error soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax3.error soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax4.error soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax5.error soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax6.error soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax7.error soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax7a.error soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax7b.error soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax8.error soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax8a.error soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax9.error soc2014/op/freebsd-base/contrib/byacc/test/btyacc/help.output soc2014/op/freebsd-base/contrib/byacc/test/btyacc/no_b_opt.output soc2014/op/freebsd-base/contrib/byacc/test/btyacc/no_output2.output soc2014/op/freebsd-base/contrib/byacc/test/btyacc/no_p_opt.output soc2014/op/freebsd-base/contrib/byacc/test/btyacc/nostdin.output soc2014/op/freebsd-base/contrib/byacc/test/run_test.sh soc2014/op/freebsd-base/contrib/byacc/test/yacc/big_b.output soc2014/op/freebsd-base/contrib/byacc/test/yacc/big_l.output soc2014/op/freebsd-base/contrib/byacc/test/yacc/err_syntax1.error soc2014/op/freebsd-base/contrib/byacc/test/yacc/err_syntax10.error soc2014/op/freebsd-base/contrib/byacc/test/yacc/err_syntax11.error soc2014/op/freebsd-base/contrib/byacc/test/yacc/err_syntax12.error soc2014/op/freebsd-base/contrib/byacc/test/yacc/err_syntax13.error soc2014/op/freebsd-base/contrib/byacc/test/yacc/err_syntax14.error soc2014/op/freebsd-base/contrib/byacc/test/yacc/err_syntax15.error soc2014/op/freebsd-base/contrib/byacc/test/yacc/err_syntax16.error soc2014/op/freebsd-base/contrib/byacc/test/yacc/err_syntax17.error soc2014/op/freebsd-base/contrib/byacc/test/yacc/err_syntax18.error soc2014/op/freebsd-base/contrib/byacc/test/yacc/err_syntax19.error soc2014/op/freebsd-base/contrib/byacc/test/yacc/err_syntax2.error soc2014/op/freebsd-base/contrib/byacc/test/yacc/err_syntax21.error soc2014/op/freebsd-base/contrib/byacc/test/yacc/err_syntax22.error soc2014/op/freebsd-base/contrib/byacc/test/yacc/err_syntax23.error soc2014/op/freebsd-base/contrib/byacc/test/yacc/err_syntax24.error soc2014/op/freebsd-base/contrib/byacc/test/yacc/err_syntax25.error soc2014/op/freebsd-base/contrib/byacc/test/yacc/err_syntax26.error soc2014/op/freebsd-base/contrib/byacc/test/yacc/err_syntax27.error soc2014/op/freebsd-base/contrib/byacc/test/yacc/err_syntax3.error soc2014/op/freebsd-base/contrib/byacc/test/yacc/err_syntax4.error soc2014/op/freebsd-base/contrib/byacc/test/yacc/err_syntax5.error soc2014/op/freebsd-base/contrib/byacc/test/yacc/err_syntax6.error soc2014/op/freebsd-base/contrib/byacc/test/yacc/err_syntax7.error soc2014/op/freebsd-base/contrib/byacc/test/yacc/err_syntax7a.error soc2014/op/freebsd-base/contrib/byacc/test/yacc/err_syntax7b.error soc2014/op/freebsd-base/contrib/byacc/test/yacc/err_syntax8.error soc2014/op/freebsd-base/contrib/byacc/test/yacc/err_syntax8a.error soc2014/op/freebsd-base/contrib/byacc/test/yacc/err_syntax9.error soc2014/op/freebsd-base/contrib/byacc/test/yacc/help.output soc2014/op/freebsd-base/contrib/byacc/test/yacc/no_b_opt.output soc2014/op/freebsd-base/contrib/byacc/test/yacc/no_output2.output soc2014/op/freebsd-base/contrib/byacc/test/yacc/no_p_opt.output soc2014/op/freebsd-base/contrib/byacc/test/yacc/nostdin.output soc2014/op/freebsd-base/contrib/gcc/ (props changed) soc2014/op/freebsd-base/contrib/gcc/config/arm/unwind-arm.h soc2014/op/freebsd-base/contrib/libstdc++/ (props changed) soc2014/op/freebsd-base/contrib/libstdc++/libsupc++/unwind-cxx.h soc2014/op/freebsd-base/contrib/libucl/ (props changed) soc2014/op/freebsd-base/contrib/libucl/configure.ac soc2014/op/freebsd-base/contrib/libucl/doc/api.md soc2014/op/freebsd-base/contrib/libucl/doc/libucl.3 soc2014/op/freebsd-base/contrib/libucl/doc/pandoc.template soc2014/op/freebsd-base/contrib/libucl/include/ucl.h soc2014/op/freebsd-base/contrib/libucl/src/Makefile.am soc2014/op/freebsd-base/contrib/libucl/src/ucl_emitter.c soc2014/op/freebsd-base/contrib/libucl/src/ucl_internal.h soc2014/op/freebsd-base/contrib/libucl/src/ucl_parser.c soc2014/op/freebsd-base/contrib/libucl/tests/Makefile.am soc2014/op/freebsd-base/contrib/libucl/tests/test_basic.c soc2014/op/freebsd-base/contrib/libucl/uthash/utstring.h soc2014/op/freebsd-base/contrib/serf/ (props changed) soc2014/op/freebsd-base/contrib/serf/CHANGES soc2014/op/freebsd-base/contrib/serf/auth/auth.c soc2014/op/freebsd-base/contrib/serf/outgoing.c soc2014/op/freebsd-base/contrib/serf/serf.h soc2014/op/freebsd-base/contrib/unbound/ (props changed) soc2014/op/freebsd-base/contrib/unbound/doc/example.conf.in soc2014/op/freebsd-base/contrib/unbound/doc/unbound.conf.5 soc2014/op/freebsd-base/contrib/unbound/doc/unbound.conf.5.in soc2014/op/freebsd-base/contrib/unbound/freebsd-configure.sh soc2014/op/freebsd-base/contrib/unbound/services/localzone.c soc2014/op/freebsd-base/contrib/unbound/util/config_file.c soc2014/op/freebsd-base/contrib/unbound/util/config_file.h soc2014/op/freebsd-base/contrib/unbound/util/configlexer.lex soc2014/op/freebsd-base/contrib/unbound/util/configparser.y soc2014/op/freebsd-base/etc/ (props changed) soc2014/op/freebsd-base/etc/mtree/BSD.tests.dist soc2014/op/freebsd-base/games/grdc/Makefile soc2014/op/freebsd-base/gnu/lib/ (props changed) soc2014/op/freebsd-base/gnu/lib/libreadline/readline/Makefile soc2014/op/freebsd-base/gnu/usr.bin/gdb/ (props changed) soc2014/op/freebsd-base/gnu/usr.bin/gdb/gdb/Makefile soc2014/op/freebsd-base/gnu/usr.bin/gdb/gdbtui/Makefile soc2014/op/freebsd-base/gnu/usr.bin/gdb/kgdb/Makefile soc2014/op/freebsd-base/gnu/usr.bin/texinfo/info/Makefile soc2014/op/freebsd-base/include/ (props changed) soc2014/op/freebsd-base/include/search.h soc2014/op/freebsd-base/kerberos5/usr.bin/kadmin/Makefile soc2014/op/freebsd-base/lib/libc/ (props changed) soc2014/op/freebsd-base/lib/libc/arm/Symbol.map soc2014/op/freebsd-base/lib/libc/arm/aeabi/Makefile.inc soc2014/op/freebsd-base/lib/libc/gen/rewinddir.c soc2014/op/freebsd-base/lib/libc/gen/ttyname.3 soc2014/op/freebsd-base/lib/libc/net/sourcefilter.c soc2014/op/freebsd-base/lib/libc/stdio/fflush.c soc2014/op/freebsd-base/lib/libc/stdio/fputs.c soc2014/op/freebsd-base/lib/libc/stdio/fputws.c soc2014/op/freebsd-base/lib/libc/stdio/freopen.c soc2014/op/freebsd-base/lib/libc/stdio/ftell.c soc2014/op/freebsd-base/lib/libc/stdio/gets.c soc2014/op/freebsd-base/lib/libc/stdio/puts.c soc2014/op/freebsd-base/lib/libc/stdio/putw.c soc2014/op/freebsd-base/lib/libc/stdio/rewind.c soc2014/op/freebsd-base/lib/libc/stdio/vfprintf.c soc2014/op/freebsd-base/lib/libc/stdio/vfwprintf.c soc2014/op/freebsd-base/lib/libc/stdio/wbuf.c soc2014/op/freebsd-base/lib/libc/stdlib/Makefile.inc soc2014/op/freebsd-base/lib/libc/stdlib/Symbol.map soc2014/op/freebsd-base/lib/libc/stdlib/hcreate.3 soc2014/op/freebsd-base/lib/libc/stdlib/hcreate.c soc2014/op/freebsd-base/lib/libc/sys/kqueue.2 soc2014/op/freebsd-base/lib/libedit/Makefile soc2014/op/freebsd-base/lib/libedit/TEST/tc1.c soc2014/op/freebsd-base/lib/libfetch/common.c soc2014/op/freebsd-base/lib/libpam/modules/pam_group/pam_group.8 soc2014/op/freebsd-base/lib/libpam/modules/pam_group/pam_group.c soc2014/op/freebsd-base/lib/libstand/qdivrem.c soc2014/op/freebsd-base/lib/libstand/quad.h soc2014/op/freebsd-base/lib/libucl/Makefile soc2014/op/freebsd-base/lib/libunbound/Makefile soc2014/op/freebsd-base/lib/libutil/ (props changed) soc2014/op/freebsd-base/lib/libutil/fparseln.c soc2014/op/freebsd-base/lib/libvmmapi/ (props changed) soc2014/op/freebsd-base/lib/libvmmapi/vmmapi.c soc2014/op/freebsd-base/lib/libvmmapi/vmmapi.h soc2014/op/freebsd-base/libexec/rtld-elf/tests/libpythagoras/Makefile soc2014/op/freebsd-base/libexec/save-entropy/save-entropy.sh soc2014/op/freebsd-base/libexec/telnetd/Makefile soc2014/op/freebsd-base/release/arm/release.sh soc2014/op/freebsd-base/rescue/rescue/Makefile soc2014/op/freebsd-base/sbin/ (props changed) soc2014/op/freebsd-base/sbin/fsdb/Makefile soc2014/op/freebsd-base/sbin/gvinum/Makefile soc2014/op/freebsd-base/secure/usr.bin/sftp/Makefile soc2014/op/freebsd-base/share/ (props changed) soc2014/op/freebsd-base/share/man/man4/ (props changed) soc2014/op/freebsd-base/share/man/man4/ddb.4 soc2014/op/freebsd-base/share/man/man5/src.conf.5 soc2014/op/freebsd-base/share/man/man9/Makefile soc2014/op/freebsd-base/share/man/man9/kthread.9 soc2014/op/freebsd-base/share/man/man9/pmap.9 soc2014/op/freebsd-base/share/man/man9/pmap_clear_modify.9 soc2014/op/freebsd-base/share/man/man9/pmap_is_modified.9 soc2014/op/freebsd-base/share/man/man9/rman.9 soc2014/op/freebsd-base/share/man/man9/socket.9 soc2014/op/freebsd-base/share/man/man9/timeout.9 soc2014/op/freebsd-base/share/man/man9/usbdi.9 soc2014/op/freebsd-base/share/mk/bsd.dep.mk soc2014/op/freebsd-base/share/mk/bsd.lib.mk soc2014/op/freebsd-base/share/mk/bsd.obj.mk soc2014/op/freebsd-base/share/mk/src.opts.mk soc2014/op/freebsd-base/sys/ (props changed) soc2014/op/freebsd-base/sys/amd64/acpica/acpi_wakecode.S soc2014/op/freebsd-base/sys/amd64/amd64/exception.S soc2014/op/freebsd-base/sys/amd64/amd64/machdep.c soc2014/op/freebsd-base/sys/amd64/amd64/mpboot.S soc2014/op/freebsd-base/sys/amd64/amd64/pmap.c soc2014/op/freebsd-base/sys/amd64/amd64/trap.c soc2014/op/freebsd-base/sys/amd64/include/vmm.h (contents, props changed) soc2014/op/freebsd-base/sys/amd64/include/vmm_dev.h (contents, props changed) soc2014/op/freebsd-base/sys/amd64/include/vmm_instruction_emul.h (contents, props changed) soc2014/op/freebsd-base/sys/amd64/vmm/ (props changed) soc2014/op/freebsd-base/sys/amd64/vmm/intel/vmcs.c soc2014/op/freebsd-base/sys/amd64/vmm/intel/vmcs.h soc2014/op/freebsd-base/sys/amd64/vmm/intel/vmx.c soc2014/op/freebsd-base/sys/amd64/vmm/vmm.c soc2014/op/freebsd-base/sys/amd64/vmm/vmm_dev.c soc2014/op/freebsd-base/sys/amd64/vmm/vmm_instruction_emul.c soc2014/op/freebsd-base/sys/arm/arm/pmap-v6.c soc2014/op/freebsd-base/sys/arm/arm/pmap.c soc2014/op/freebsd-base/sys/arm/conf/IMX6 soc2014/op/freebsd-base/sys/arm/freescale/imx/files.imx51 soc2014/op/freebsd-base/sys/arm/freescale/imx/files.imx53 soc2014/op/freebsd-base/sys/arm/freescale/imx/files.imx6 soc2014/op/freebsd-base/sys/arm/freescale/vybrid/vf_i2c.c soc2014/op/freebsd-base/sys/arm/include/elf.h soc2014/op/freebsd-base/sys/boot/ (props changed) soc2014/op/freebsd-base/sys/boot/amd64/boot1.efi/Makefile soc2014/op/freebsd-base/sys/boot/efi/libefi/Makefile soc2014/op/freebsd-base/sys/boot/fdt/dts/arm/imx6.dtsi soc2014/op/freebsd-base/sys/boot/fdt/dts/arm/wandboard-dual.dts soc2014/op/freebsd-base/sys/boot/fdt/dts/arm/wandboard-quad.dts soc2014/op/freebsd-base/sys/boot/fdt/dts/arm/wandboard-solo.dts soc2014/op/freebsd-base/sys/boot/i386/libi386/Makefile soc2014/op/freebsd-base/sys/boot/i386/libi386/amd64_tramp.S soc2014/op/freebsd-base/sys/boot/i386/loader/Makefile soc2014/op/freebsd-base/sys/boot/libstand32/Makefile soc2014/op/freebsd-base/sys/boot/userboot/test/test.c soc2014/op/freebsd-base/sys/cam/ctl/ctl.c soc2014/op/freebsd-base/sys/cam/ctl/ctl_backend_ramdisk.c soc2014/op/freebsd-base/sys/cam/ctl/ctl_cmd_table.c soc2014/op/freebsd-base/sys/cam/ctl/ctl_frontend.c soc2014/op/freebsd-base/sys/cam/ctl/ctl_frontend.h soc2014/op/freebsd-base/sys/cam/ctl/ctl_frontend_iscsi.c soc2014/op/freebsd-base/sys/cam/ctl/ctl_io.h soc2014/op/freebsd-base/sys/cam/ctl/ctl_ioctl.h soc2014/op/freebsd-base/sys/cam/ctl/ctl_private.h soc2014/op/freebsd-base/sys/cam/ctl/ctl_ser_table.c soc2014/op/freebsd-base/sys/cam/ctl/scsi_ctl.c soc2014/op/freebsd-base/sys/cam/scsi/scsi_all.h soc2014/op/freebsd-base/sys/cddl/contrib/opensolaris/ (props changed) soc2014/op/freebsd-base/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c soc2014/op/freebsd-base/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c soc2014/op/freebsd-base/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c soc2014/op/freebsd-base/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c soc2014/op/freebsd-base/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c soc2014/op/freebsd-base/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c soc2014/op/freebsd-base/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c soc2014/op/freebsd-base/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/rrwlock.c soc2014/op/freebsd-base/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c soc2014/op/freebsd-base/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c soc2014/op/freebsd-base/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c soc2014/op/freebsd-base/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h soc2014/op/freebsd-base/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/rrwlock.h soc2014/op/freebsd-base/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h soc2014/op/freebsd-base/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/txg.h soc2014/op/freebsd-base/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h soc2014/op/freebsd-base/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_vfsops.h soc2014/op/freebsd-base/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h soc2014/op/freebsd-base/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h soc2014/op/freebsd-base/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_compress.h soc2014/op/freebsd-base/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c soc2014/op/freebsd-base/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c soc2014/op/freebsd-base/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_debug.c soc2014/op/freebsd-base/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c soc2014/op/freebsd-base/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c soc2014/op/freebsd-base/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c soc2014/op/freebsd-base/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c soc2014/op/freebsd-base/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_compress.c soc2014/op/freebsd-base/sys/cddl/dev/dtrace/amd64/dtrace_subr.c soc2014/op/freebsd-base/sys/cddl/dev/fbt/fbt.c soc2014/op/freebsd-base/sys/conf/ (props changed) soc2014/op/freebsd-base/sys/conf/files soc2014/op/freebsd-base/sys/conf/kern.mk soc2014/op/freebsd-base/sys/conf/kmod.mk soc2014/op/freebsd-base/sys/dev/bge/if_bge.c soc2014/op/freebsd-base/sys/dev/bxe/bxe.c soc2014/op/freebsd-base/sys/dev/bxe/bxe.h soc2014/op/freebsd-base/sys/dev/bxe/bxe_stats.c soc2014/op/freebsd-base/sys/dev/bxe/ecore_reg.h soc2014/op/freebsd-base/sys/dev/bxe/ecore_sp.h soc2014/op/freebsd-base/sys/dev/cxgbe/adapter.h soc2014/op/freebsd-base/sys/dev/cxgbe/offload.h soc2014/op/freebsd-base/sys/dev/cxgbe/t4_main.c soc2014/op/freebsd-base/sys/dev/cxgbe/t4_sge.c soc2014/op/freebsd-base/sys/dev/cxgbe/tom/t4_cpl_io.c soc2014/op/freebsd-base/sys/dev/cxgbe/tom/t4_ddp.c soc2014/op/freebsd-base/sys/dev/cxgbe/tom/t4_tom.h soc2014/op/freebsd-base/sys/dev/drm2/drm_fb_helper.c soc2014/op/freebsd-base/sys/dev/drm2/i915/intel_fb.c soc2014/op/freebsd-base/sys/dev/drm2/radeon/rs690.c soc2014/op/freebsd-base/sys/dev/drm2/radeon/rv515.c soc2014/op/freebsd-base/sys/dev/e1000/if_em.c soc2014/op/freebsd-base/sys/dev/e1000/if_igb.c soc2014/op/freebsd-base/sys/dev/fb/fbd.c soc2014/op/freebsd-base/sys/dev/ixgbe/ixgbe.c soc2014/op/freebsd-base/sys/dev/usb/controller/xhci_pci.c soc2014/op/freebsd-base/sys/dev/usb/serial/u3g.c soc2014/op/freebsd-base/sys/dev/usb/usbdevs soc2014/op/freebsd-base/sys/dev/vt/hw/efifb/efifb.c soc2014/op/freebsd-base/sys/dev/vt/hw/fb/vt_fb.c soc2014/op/freebsd-base/sys/dev/vt/hw/fb/vt_fb.h soc2014/op/freebsd-base/sys/dev/vt/vt_core.c soc2014/op/freebsd-base/sys/fs/ext2fs/ext2_vnops.c soc2014/op/freebsd-base/sys/fs/nandfs/nandfs_vnops.c soc2014/op/freebsd-base/sys/fs/nfsclient/nfs_clvnops.c soc2014/op/freebsd-base/sys/fs/nullfs/null_vnops.c soc2014/op/freebsd-base/sys/fs/tmpfs/tmpfs_vnops.c soc2014/op/freebsd-base/sys/geom/uzip/g_uzip.c soc2014/op/freebsd-base/sys/i386/i386/pmap.c soc2014/op/freebsd-base/sys/kern/kern_descrip.c soc2014/op/freebsd-base/sys/kern/kern_event.c soc2014/op/freebsd-base/sys/kern/kern_proc.c soc2014/op/freebsd-base/sys/kern/subr_rman.c soc2014/op/freebsd-base/sys/kern/sys_capability.c soc2014/op/freebsd-base/sys/kern/uipc_mbuf.c soc2014/op/freebsd-base/sys/kern/uipc_usrreq.c soc2014/op/freebsd-base/sys/kern/vfs_syscalls.c soc2014/op/freebsd-base/sys/modules/ctl/Makefile soc2014/op/freebsd-base/sys/net/if.c soc2014/op/freebsd-base/sys/net/if_spppsubr.c soc2014/op/freebsd-base/sys/netinet/in.h soc2014/op/freebsd-base/sys/netinet/in_gif.c soc2014/op/freebsd-base/sys/netinet/in_pcbgroup.c soc2014/op/freebsd-base/sys/netinet/in_rss.c soc2014/op/freebsd-base/sys/netinet/in_rss.h soc2014/op/freebsd-base/sys/netinet/sctp_uio.h soc2014/op/freebsd-base/sys/netinet/sctputil.c soc2014/op/freebsd-base/sys/netinet6/in6_gif.c soc2014/op/freebsd-base/sys/netinet6/in6_pcbgroup.c soc2014/op/freebsd-base/sys/powerpc/aim/trap.c soc2014/op/freebsd-base/sys/powerpc/powerpc/mem.c soc2014/op/freebsd-base/sys/powerpc/ps3/platform_ps3.c soc2014/op/freebsd-base/sys/powerpc/ps3/ps3_syscons.c soc2014/op/freebsd-base/sys/sys/capsicum.h soc2014/op/freebsd-base/sys/sys/event.h soc2014/op/freebsd-base/sys/sys/fbio.h soc2014/op/freebsd-base/sys/sys/link_elf.h soc2014/op/freebsd-base/sys/sys/mbuf.h soc2014/op/freebsd-base/sys/sys/param.h soc2014/op/freebsd-base/sys/sys/rman.h soc2014/op/freebsd-base/sys/ufs/ufs/ufs_vnops.c soc2014/op/freebsd-base/sys/vm/vm_object.c soc2014/op/freebsd-base/sys/x86/x86/mca.c soc2014/op/freebsd-base/sys/x86/xen/pv.c soc2014/op/freebsd-base/sys/x86/xen/xen_apic.c soc2014/op/freebsd-base/tools/bsdbox/Makefile soc2014/op/freebsd-base/tools/build/mk/OptionalObsoleteFiles.inc soc2014/op/freebsd-base/tools/tools/net80211/stumbler/Makefile soc2014/op/freebsd-base/usr.bin/Makefile soc2014/op/freebsd-base/usr.bin/clang/clang.prog.mk soc2014/op/freebsd-base/usr.bin/ee/Makefile soc2014/op/freebsd-base/usr.bin/ftp/Makefile soc2014/op/freebsd-base/usr.bin/grep/grep.c soc2014/op/freebsd-base/usr.bin/grep/queue.c soc2014/op/freebsd-base/usr.bin/grep/util.c soc2014/op/freebsd-base/usr.bin/iscsictl/iscsictl.8 soc2014/op/freebsd-base/usr.bin/less/Makefile soc2014/op/freebsd-base/usr.bin/make/Makefile soc2014/op/freebsd-base/usr.bin/mkimg/ (props changed) soc2014/op/freebsd-base/usr.bin/mkimg/vhd.c soc2014/op/freebsd-base/usr.bin/msgs/Makefile soc2014/op/freebsd-base/usr.bin/ncal/Makefile soc2014/op/freebsd-base/usr.bin/procstat/ (props changed) soc2014/op/freebsd-base/usr.bin/procstat/procstat.1 soc2014/op/freebsd-base/usr.bin/procstat/procstat_files.c soc2014/op/freebsd-base/usr.bin/procstat/procstat_vm.c soc2014/op/freebsd-base/usr.bin/tabs/Makefile soc2014/op/freebsd-base/usr.bin/telnet/Makefile soc2014/op/freebsd-base/usr.bin/tftp/Makefile soc2014/op/freebsd-base/usr.bin/tput/Makefile soc2014/op/freebsd-base/usr.bin/tset/Makefile soc2014/op/freebsd-base/usr.bin/ul/Makefile soc2014/op/freebsd-base/usr.bin/units/Makefile soc2014/op/freebsd-base/usr.bin/units/units.1 soc2014/op/freebsd-base/usr.bin/units/units.c soc2014/op/freebsd-base/usr.bin/vi/Makefile soc2014/op/freebsd-base/usr.bin/vtfontcvt/vtfontcvt.8 soc2014/op/freebsd-base/usr.bin/vtfontcvt/vtfontcvt.c soc2014/op/freebsd-base/usr.bin/yacc/tests/Makefile soc2014/op/freebsd-base/usr.sbin/bhyve/ (props changed) soc2014/op/freebsd-base/usr.sbin/bhyve/Makefile soc2014/op/freebsd-base/usr.sbin/bhyve/bhyverun.c soc2014/op/freebsd-base/usr.sbin/bhyve/bhyverun.h soc2014/op/freebsd-base/usr.sbin/bhyve/inout.c soc2014/op/freebsd-base/usr.sbin/bhyve/mem.c soc2014/op/freebsd-base/usr.sbin/bhyve/mem.h soc2014/op/freebsd-base/usr.sbin/bhyvectl/ (props changed) soc2014/op/freebsd-base/usr.sbin/bhyvectl/bhyvectl.c soc2014/op/freebsd-base/usr.sbin/bsdconfig/dot/dot soc2014/op/freebsd-base/usr.sbin/bsdconfig/dot/include/messages.subr soc2014/op/freebsd-base/usr.sbin/bsdconfig/examples/Makefile soc2014/op/freebsd-base/usr.sbin/bsdconfig/examples/browse_packages_http.sh soc2014/op/freebsd-base/usr.sbin/bsdconfig/include/messages.subr soc2014/op/freebsd-base/usr.sbin/bsdconfig/share/common.subr soc2014/op/freebsd-base/usr.sbin/bsdconfig/share/media/http.subr soc2014/op/freebsd-base/usr.sbin/bsdconfig/share/media/httpproxy.subr soc2014/op/freebsd-base/usr.sbin/bsdconfig/share/packages/Makefile soc2014/op/freebsd-base/usr.sbin/bsdconfig/share/packages/categories.subr (props changed) soc2014/op/freebsd-base/usr.sbin/bsdconfig/share/packages/index.subr (contents, props changed) soc2014/op/freebsd-base/usr.sbin/bsdconfig/share/packages/packages.subr (contents, props changed) soc2014/op/freebsd-base/usr.sbin/bsdinstall/scripts/mirrorselect soc2014/op/freebsd-base/usr.sbin/cdcontrol/Makefile soc2014/op/freebsd-base/usr.sbin/chown/tests/chown-f_test.sh soc2014/op/freebsd-base/usr.sbin/ctladm/ctladm.8 soc2014/op/freebsd-base/usr.sbin/ctld/ctl.conf.5 soc2014/op/freebsd-base/usr.sbin/ctld/ctld.8 soc2014/op/freebsd-base/usr.sbin/ctld/kernel.c soc2014/op/freebsd-base/usr.sbin/lpr/lpc/Makefile soc2014/op/freebsd-base/usr.sbin/ndp/ndp.c soc2014/op/freebsd-base/usr.sbin/nfsd/nfsd.8 soc2014/op/freebsd-base/usr.sbin/ngctl/Makefile soc2014/op/freebsd-base/usr.sbin/ntp/ntpdc/Makefile soc2014/op/freebsd-base/usr.sbin/ntp/ntpq/Makefile soc2014/op/freebsd-base/usr.sbin/pkg/pkg.c soc2014/op/freebsd-base/usr.sbin/pmcstat/Makefile soc2014/op/freebsd-base/usr.sbin/pppctl/Makefile soc2014/op/freebsd-base/usr.sbin/service/service.sh soc2014/op/freebsd-base/usr.sbin/sysrc/sysrc soc2014/op/freebsd-base/usr.sbin/sysrc/sysrc.8 soc2014/op/freebsd-base/usr.sbin/unbound/local-setup/local-unbound-setup.sh soc2014/op/freebsd-base/usr.sbin/watch/Makefile soc2014/op/freebsd-base/usr.sbin/wpa/wpa_cli/Makefile Modified: soc2014/op/freebsd-base/Makefile ============================================================================== --- soc2014/op/freebsd-base/Makefile Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/Makefile Fri Jul 25 10:35:00 2014 (r271358) @@ -174,6 +174,13 @@ .if defined(TARGET_ARCH) && !defined(_TARGET_ARCH) _TARGET_ARCH=${TARGET_ARCH} .endif +# for historical compatibility for xdev targets +.if defined(XDEV) +_TARGET= ${XDEV} +.endif +.if defined(XDEV_ARCH) +_TARGET_ARCH= ${XDEV_ARCH} +.endif # Otherwise, default to current machine type and architecture. _TARGET?= ${MACHINE} _TARGET_ARCH?= ${MACHINE_ARCH} Modified: soc2014/op/freebsd-base/Makefile.inc1 ============================================================================== --- soc2014/op/freebsd-base/Makefile.inc1 Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/Makefile.inc1 Fri Jul 25 10:35:00 2014 (r271358) @@ -1366,9 +1366,6 @@ # # cross-tools: Build cross-building tools # -.if !defined(TARGET_ARCH) && defined(XDEV_ARCH) -TARGET_ARCH= ${XDEV_ARCH} -.endif .if ${TARGET_ARCH} != ${MACHINE_ARCH} .if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386" _btxld= usr.sbin/btxld @@ -1497,6 +1494,7 @@ .if ${MK_GNUCXX} != "no" _prebuild_libs+= gnu/lib/libstdc++ gnu/lib/libsupc++ gnu/lib/libstdc++__L: lib/msun__L +gnu/lib/libsupc++__L: gnu/lib/libstdc++__L .endif .if defined(WITH_ATF) || ${MK_TESTS} != "no" @@ -1853,9 +1851,9 @@ ############### -.if defined(XDEV) && defined(XDEV_ARCH) +.if defined(TARGET) && defined(TARGET_ARCH) -.if ${XDEV} == ${MACHINE} && ${XDEV_ARCH} == ${MACHINE_ARCH} +.if ${TARGET} == ${MACHINE} && ${TARGET_ARCH} == ${MACHINE_ARCH} XDEV_CPUTYPE?=${CPUTYPE} .else XDEV_CPUTYPE?=${TARGET_CPUTYPE} @@ -1864,10 +1862,10 @@ NOFUN=-DNO_FSCHG MK_HTML=no MK_INFO=no -DNO_LINT \ MK_MAN=no MK_NLS=no MK_PROFILE=no \ MK_KERBEROS=no MK_RESCUE=no MK_TESTS=no MK_WARNS=no \ - TARGET=${XDEV} TARGET_ARCH=${XDEV_ARCH} \ + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ CPUTYPE=${XDEV_CPUTYPE} -XDDIR=${XDEV_ARCH}-freebsd +XDDIR=${TARGET_ARCH}-freebsd XDTP?=/usr/${XDDIR} .if ${XDTP:N/*} .error XDTP variable should be an absolute path @@ -1883,7 +1881,7 @@ -B${XDDESTDIR}/usr/bin -B${XDDESTDIR}/usr/lib CD2ENV=${CDENV} CC="${CC} ${CD2CFLAGS}" CXX="${CXX} ${CD2CFLAGS}" \ CPP="${CPP} ${CD2CFLAGS}" \ - MACHINE=${XDEV} MACHINE_ARCH=${XDEV_ARCH} + MACHINE=${TARGET} MACHINE_ARCH=${TARGET_ARCH} CDTMP= ${MAKEOBJDIRPREFIX}/${XDDIR}/${.CURDIR}/tmp CDMAKE=${CDENV} PATH=${CDTMP}/usr/bin:${PATH} ${MAKE} ${NOFUN} @@ -1942,6 +1940,10 @@ -p ${XDDESTDIR}/usr >/dev/null mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ -p ${XDDESTDIR}/usr/include >/dev/null +.if ${MK_TESTS} != "no" + mtree -deU -f ${.CURDIR}/etc/mtree/BSD.tests.dist \ + -p ${XDDESTDIR}/usr >/dev/null +.endif .ORDER: xdev-build _xi-mtree _xi-cross-tools _xi-includes _xi-libraries xdev-install: xdev-build _xi-mtree _xi-cross-tools _xi-includes _xi-libraries @@ -1978,5 +1980,5 @@ done .else xdev xdev-build xdev-install xdev-links: - @echo "*** Error: Both XDEV and XDEV_ARCH must be defined for \"${.TARGET}\" target" + @echo "*** Error: Both TARGET and TARGET_ARCH must be defined for \"${.TARGET}\" target" .endif Modified: soc2014/op/freebsd-base/ObsoleteFiles.inc ============================================================================== --- soc2014/op/freebsd-base/ObsoleteFiles.inc Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/ObsoleteFiles.inc Fri Jul 25 10:35:00 2014 (r271358) @@ -38,6 +38,19 @@ # xargs -n1 | sort | uniq -d; # done +# 20140723: renamed to PCBGROUP.9 +OLD_FILES+=usr/share/man/man9/PCBGROUPS.9.gz +# 20140719: libsbuf version bump +OLD_LIBS+=lib/libsbuf.so.6 +# 20140718: Remove obsolete man pages +OLD_FILES+=usr/share/man/man9/zero_copy.9.gz +OLD_FILES+=usr/share/man/man9/zero_copy_sockets.9.gz +# 20140718: Remove an obsolete man page +OLD_FILES+=usr/share/man/man9/pmap_page_protect.9.gz +# 20140717: Remove an obsolete man page +OLD_FILES+=usr/share/man/man9/pmap_clear_reference.9.gz +# 20140716: Remove an incorrectly named man page +OLD_FILES+=usr/share/man/man9/pmap_ts_modified.9.gz # 20140712: Removal of bsd.dtrace.mk OLD_FILES+=usr/share/mk/bsd.dtrace.mk # 20140705: turn libreadline into an internal lib @@ -70,8 +83,10 @@ OLD_FILES+=usr/share/examples/cvsup/standard-supfile OLD_DIRS+=usr/share/examples/cvsup # 20140614: send-pr removal +OLD_FILES+=usr/bin/sendbug OLD_FILES+=usr/share/info/send-pr.info.gz OLD_FILES+=usr/share/man/man1/send-pr.1.gz +OLD_FILES+=usr/share/man/man1/sendbug.1.gz OLD_FILES+=etc/gnats/freefall OLD_DIRS+=etc/gnats # 20140512: new clang import which bumps version from 3.4 to 3.4.1. Modified: soc2014/op/freebsd-base/UPDATING ============================================================================== --- soc2014/op/freebsd-base/UPDATING Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/UPDATING Fri Jul 25 10:35:00 2014 (r271358) @@ -31,6 +31,18 @@ disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20140723: + The xdev targets have been converted to using TARGET and + TARGET_ARCH instead of XDEV and XDEV_ARCH. + +20140719: + The default unbound configuration has been modified to address + issues with reverse lookups on networks that use private + address ranges. If you use the local_unbound service, run + "service local_unbound setup" as root to regenerate your + configuration, then "service local_unbound reload" to load the + new configuration. + 20140709: The GNU texinfo and GNU info pages are not built and installed anymore, WITH_INFO knob has been added to allow to built and install Modified: soc2014/op/freebsd-base/bin/csh/Makefile ============================================================================== --- soc2014/op/freebsd-base/bin/csh/Makefile Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/bin/csh/Makefile Fri Jul 25 10:35:00 2014 (r271358) @@ -40,8 +40,8 @@ # utilities of the same name are handled with the associated manpage, # builtin.1 in share/man/man1/. -DPADD= ${LIBTERMCAP} ${LIBCRYPT} -LDADD= -ltermcap -lcrypt +DPADD= ${LIBTERMCAPW} ${LIBCRYPT} +LDADD= -ltermcapw -lcrypt LINKS= ${BINDIR}/csh ${BINDIR}/tcsh Modified: soc2014/op/freebsd-base/bin/ls/Makefile ============================================================================== --- soc2014/op/freebsd-base/bin/ls/Makefile Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/bin/ls/Makefile Fri Jul 25 10:35:00 2014 (r271358) @@ -11,8 +11,8 @@ .if !defined(RELEASE_CRUNCH) && \ ${MK_LS_COLORS} != no CFLAGS+= -DCOLORLS -DPADD+= ${LIBTERMCAP} -LDADD+= -ltermcap +DPADD+= ${LIBTERMCAPW} +LDADD+= -ltermcapw .endif .include Modified: soc2014/op/freebsd-base/bin/sh/Makefile ============================================================================== --- soc2014/op/freebsd-base/bin/sh/Makefile Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/bin/sh/Makefile Fri Jul 25 10:35:00 2014 (r271358) @@ -18,8 +18,8 @@ # utilities of the same name are handled with the associated manpage, # builtin.1 in share/man/man1/. -DPADD= ${LIBEDIT} ${LIBTERMCAP} -LDADD= -ledit -ltermcap +DPADD= ${LIBEDIT} ${LIBTERMCAPW} +LDADD= -ledit -ltermcapw CFLAGS+=-DSHELL -I. -I${.CURDIR} # for debug: Modified: soc2014/op/freebsd-base/bin/sh/eval.c ============================================================================== --- soc2014/op/freebsd-base/bin/sh/eval.c Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/bin/sh/eval.c Fri Jul 25 10:35:00 2014 (r271358) @@ -1250,8 +1250,16 @@ int breakcmd(int argc, char **argv) { - int n = argc > 1 ? number(argv[1]) : 1; + long n; + char *end; + if (argc > 1) { + /* Allow arbitrarily large numbers. */ + n = strtol(argv[1], &end, 10); + if (!is_digit(argv[1][0]) || *end != '\0') + error("Illegal number: %s", argv[1]); + } else + n = 1; if (n > loopnest) n = loopnest; if (n > 0) { Modified: soc2014/op/freebsd-base/bin/sh/exec.c ============================================================================== --- soc2014/op/freebsd-base/bin/sh/exec.c Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/bin/sh/exec.c Fri Jul 25 10:35:00 2014 (r271358) @@ -365,7 +365,7 @@ for (;(fullname = padvance(&path, name)) != NULL; stunalloc(fullname)) { idx++; if (pathopt) { - if (prefix("func", pathopt)) { + if (strncmp(pathopt, "func", 4) == 0) { /* handled below */ } else { continue; /* ignore unimplemented options */ Modified: soc2014/op/freebsd-base/bin/sh/jobs.c ============================================================================== --- soc2014/op/freebsd-base/bin/sh/jobs.c Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/bin/sh/jobs.c Fri Jul 25 10:35:00 2014 (r271358) @@ -562,6 +562,7 @@ { int jobno; struct job *found, *jp; + size_t namelen; pid_t pid; int i; @@ -603,10 +604,12 @@ if (found != NULL) return (found); } else { + namelen = strlen(name); found = NULL; for (jp = jobtab, i = njobs ; --i >= 0 ; jp++) { if (jp->used && jp->nprocs > 0 - && prefix(name + 1, jp->ps[0].cmd)) { + && strncmp(jp->ps[0].cmd, name + 1, + namelen - 1) == 0) { if (found) error("%s: ambiguous", name); found = jp; Modified: soc2014/op/freebsd-base/bin/sh/miscbltin.c ============================================================================== --- soc2014/op/freebsd-base/bin/sh/miscbltin.c Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/bin/sh/miscbltin.c Fri Jul 25 10:35:00 2014 (r271358) @@ -411,12 +411,32 @@ { (char *) 0, (char *)0, 0, 0, '\0' } }; +enum limithow { SOFT = 0x1, HARD = 0x2 }; + +static void +printlimit(enum limithow how, const struct rlimit *limit, + const struct limits *l) +{ + rlim_t val = 0; + + if (how & SOFT) + val = limit->rlim_cur; + else if (how & HARD) + val = limit->rlim_max; + if (val == RLIM_INFINITY) + out1str("unlimited\n"); + else + { + val /= l->factor; + out1fmt("%jd\n", (intmax_t)val); + } +} + int ulimitcmd(int argc __unused, char **argv __unused) { rlim_t val = 0; - enum { SOFT = 0x1, HARD = 0x2 } - how = SOFT | HARD; + enum limithow how = SOFT | HARD; const struct limits *l; int set, all = 0; int optc, what; @@ -475,10 +495,6 @@ char optbuf[40]; if (getrlimit(l->cmd, &limit) < 0) error("can't get limit: %s", strerror(errno)); - if (how & SOFT) - val = limit.rlim_cur; - else if (how & HARD) - val = limit.rlim_max; if (l->units) snprintf(optbuf, sizeof(optbuf), @@ -487,13 +503,7 @@ snprintf(optbuf, sizeof(optbuf), "(-%c) ", l->option); out1fmt("%-18s %18s ", l->name, optbuf); - if (val == RLIM_INFINITY) - out1str("unlimited\n"); - else - { - val /= l->factor; - out1fmt("%jd\n", (intmax_t)val); - } + printlimit(how, &limit, l); } return 0; } @@ -507,19 +517,7 @@ limit.rlim_max = val; if (setrlimit(l->cmd, &limit) < 0) error("bad limit: %s", strerror(errno)); - } else { - if (how & SOFT) - val = limit.rlim_cur; - else if (how & HARD) - val = limit.rlim_max; - - if (val == RLIM_INFINITY) - out1str("unlimited\n"); - else - { - val /= l->factor; - out1fmt("%jd\n", (intmax_t)val); - } - } + } else + printlimit(how, &limit, l); return 0; } Modified: soc2014/op/freebsd-base/bin/sh/mystring.c ============================================================================== --- soc2014/op/freebsd-base/bin/sh/mystring.c Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/bin/sh/mystring.c Fri Jul 25 10:35:00 2014 (r271358) @@ -61,21 +61,6 @@ /* - * prefix -- see if pfx is a prefix of string. - */ - -int -prefix(const char *pfx, const char *string) -{ - while (*pfx) { - if (*pfx++ != *string++) - return 0; - } - return 1; -} - - -/* * Convert a string of digits to an integer, printing an error message on * failure. */ Modified: soc2014/op/freebsd-base/bin/sh/mystring.h ============================================================================== --- soc2014/op/freebsd-base/bin/sh/mystring.h Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/bin/sh/mystring.h Fri Jul 25 10:35:00 2014 (r271358) @@ -35,7 +35,6 @@ #include -int prefix(const char *, const char *); int number(const char *); int is_number(const char *); Modified: soc2014/op/freebsd-base/bin/sh/tests/builtins/Makefile ============================================================================== --- soc2014/op/freebsd-base/bin/sh/tests/builtins/Makefile Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/bin/sh/tests/builtins/Makefile Fri Jul 25 10:35:00 2014 (r271358) @@ -14,6 +14,7 @@ FILES+= break3.0 FILES+= break4.4 FILES+= break5.4 +FILES+= break6.0 FILES+= builtin1.0 FILES+= case1.0 FILES+= case2.0 Copied: soc2014/op/freebsd-base/bin/sh/tests/builtins/break6.0 (from r271357, mirror/FreeBSD/head/bin/sh/tests/builtins/break6.0) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2014/op/freebsd-base/bin/sh/tests/builtins/break6.0 Fri Jul 25 10:35:00 2014 (r271358, copy of r271357, mirror/FreeBSD/head/bin/sh/tests/builtins/break6.0) @@ -0,0 +1,8 @@ +# $FreeBSD$ +# Per POSIX, this need only work if LONG_MAX > 4294967295. + +while :; do + break 4294967296 + echo bad + exit 3 +done Modified: soc2014/op/freebsd-base/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c ============================================================================== --- soc2014/op/freebsd-base/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Fri Jul 25 10:35:00 2014 (r271358) @@ -22,7 +22,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2011, 2014 by Delphix. All rights reserved. * Copyright (c) 2012 by Frederik Wessels. All rights reserved. * Copyright (c) 2012 Martin Matuska . All rights reserved. * Copyright (c) 2013 by Prasad Joshi (sTec). All rights reserved. @@ -2033,7 +2033,7 @@ break; case 'T': errno = 0; - txg = strtoull(optarg, &endptr, 10); + txg = strtoull(optarg, &endptr, 0); if (errno != 0 || *endptr != '\0') { (void) fprintf(stderr, gettext("invalid txg value\n")); Modified: soc2014/op/freebsd-base/cddl/contrib/opensolaris/cmd/ztest/ztest.c ============================================================================== --- soc2014/op/freebsd-base/cddl/contrib/opensolaris/cmd/ztest/ztest.c Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/cddl/contrib/opensolaris/cmd/ztest/ztest.c Fri Jul 25 10:35:00 2014 (r271358) @@ -810,7 +810,7 @@ ztest_get_ashift(void) { if (ztest_opts.zo_ashift == 0) - return (SPA_MINBLOCKSHIFT + ztest_random(3)); + return (SPA_MINBLOCKSHIFT + ztest_random(5)); return (ztest_opts.zo_ashift); } @@ -969,11 +969,28 @@ return (version); } +/* + * Find the largest ashift used + */ +static uint64_t +ztest_spa_get_ashift() { + uint64_t i; + uint64_t ashift = SPA_MINBLOCKSHIFT; + vdev_t *rvd = ztest_spa->spa_root_vdev; + + for (i = 0; i < rvd->vdev_children; i++) { + ashift = MAX(ashift, rvd->vdev_child[i]->vdev_ashift); + } + return (ashift); +} + static int ztest_random_blocksize(void) { - return (1 << (SPA_MINBLOCKSHIFT + - ztest_random(SPA_MAXBLOCKSHIFT - SPA_MINBLOCKSHIFT + 1))); + // Choose a block size >= the ashift. + uint64_t block_shift = + ztest_random(SPA_MAXBLOCKSHIFT - ztest_spa_get_ashift() + 1); + return (1 << (SPA_MINBLOCKSHIFT + block_shift)); } static int @@ -5768,16 +5785,30 @@ spa_freeze(spa); /* + * Because it is hard to predict how much space a write will actually + * require beforehand, we leave ourselves some fudge space to write over + * capacity. + */ + uint64_t capacity = metaslab_class_get_space(spa_normal_class(spa)) / 2; + + /* * Run tests that generate log records but don't alter the pool config * or depend on DSL sync tasks (snapshots, objset create/destroy, etc). * We do a txg_wait_synced() after each iteration to force the txg * to increase well beyond the last synced value in the uberblock. * The ZIL should be OK with that. + * + * Run a random number of times less than zo_maxloops and ensure we do + * not run out of space on the pool. */ while (ztest_random(10) != 0 && - numloops++ < ztest_opts.zo_maxloops) { - ztest_dmu_write_parallel(zd, 0); - ztest_dmu_object_alloc_free(zd, 0); + numloops++ < ztest_opts.zo_maxloops && + metaslab_class_get_alloc(spa_normal_class(spa)) < capacity) { + ztest_od_t od; + ztest_od_init(&od, 0, FTAG, 0, DMU_OT_UINT64_OTHER, 0, 0); + VERIFY0(ztest_object_init(zd, &od, sizeof (od), B_FALSE)); + ztest_io(zd, od.od_object, + ztest_random(ZTEST_RANGE_LOCKS) << SPA_MAXBLOCKSHIFT); txg_wait_synced(spa_get_dsl(spa), 0); } Modified: soc2014/op/freebsd-base/contrib/byacc/CHANGES ============================================================================== --- soc2014/op/freebsd-base/contrib/byacc/CHANGES Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/contrib/byacc/CHANGES Fri Jul 25 10:35:00 2014 (r271358) @@ -1,3 +1,38 @@ +2014-07-15 Thomas E. Dickey + + * aclocal.m4: resync with my-autoconf (no change to configure script) + + * VERSION, package/byacc.spec, package/debian/changelog, package/mingw-byacc.spec, package/pkgsrc/Makefile: + bump + + * test/run_test.sh: + make top-level "make check" work again, by adding another step to filtering + the test results. + +2014-07-14 Thomas E. Dickey + + * test/run_test.sh: changes from Garrett Cooper's patch: + a) ensure that the script returns an error-code if there are differences + b) escape "." character in left side of sed expression for $YACC + c) ensure that $ifBTYACC has a value + + * test/btyacc/big_b.output, test/btyacc/big_l.output, test/btyacc/help.output, test/btyacc/no_b_opt.output, test/btyacc/no_output2.output, test/btyacc/no_p_opt.output, test/btyacc/nostdin.output: + regen (reminder by Garrett Cooper) + +2014-07-14 Garrett.Cooper + + * test/btyacc/err_inherit1.error, test/btyacc/err_inherit2.error, test/btyacc/err_inherit3.error, test/btyacc/err_inherit4.error, test/btyacc/err_inherit5.error, test/btyacc/err_syntax1.error, test/btyacc/err_syntax10.error, test/btyacc/err_syntax11.error, test/btyacc/err_syntax12.error, test/btyacc/err_syntax13.error, test/btyacc/err_syntax14.error, test/btyacc/err_syntax15.error, test/btyacc/err_syntax16.error, test/btyacc/err_syntax17.error, test/btyacc/err_syntax18.error, test/btyacc/err_syntax19.error, test/btyacc/err_syntax2.error, test/btyacc/err_syntax21.error, test/btyacc/err_syntax22.error, test/btyacc/err_syntax23.error, test/btyacc/err_syntax24.error, test/btyacc/err_syntax25.error, test/btyacc/err_syntax26.error, test/btyacc/err_syntax27.error, test/btyacc/err_syntax3.error, test/btyacc/err_syntax4.error, test/btyacc/err_syntax5.error, test/btyacc/err_syntax6.error, test/btyacc/err_syntax7.error, test/btyacc/err_syntax7a.error, test/btyacc/err_syntax7b.error, test/btya cc/err_syntax8.error, test/btyacc/err_syntax8a.error, test/btyacc/err_syntax9.error, test/yacc/err_syntax1.error, test/yacc/err_syntax10.error, test/yacc/err_syntax11.error, test/yacc/err_syntax12.error, test/yacc/err_syntax13.error, test/yacc/err_syntax14.error, test/yacc/err_syntax15.error, test/yacc/err_syntax16.error, test/yacc/err_syntax17.error, test/yacc/err_syntax18.error, test/yacc/err_syntax19.error, test/yacc/err_syntax2.error, test/yacc/err_syntax21.error, test/yacc/err_syntax22.error, test/yacc/err_syntax23.error, test/yacc/err_syntax24.error, test/yacc/err_syntax25.error, test/yacc/err_syntax26.error, test/yacc/err_syntax27.error, test/yacc/err_syntax3.error, test/yacc/err_syntax4.error, test/yacc/err_syntax5.error, test/yacc/err_syntax6.error, test/yacc/err_syntax7.error, test/yacc/err_syntax7a.error, test/yacc/err_syntax7b.error, test/yacc/err_syntax8.error, test/yacc/err_syntax8a.error, test/yacc/err_syntax9.error: + regen + +2014-05-27 Tom.Shields + + * main.c: remove obsolete -D option from usage message + +2014-05-27 Thomas E. Dickey + + * VERSION, package/byacc.spec, package/debian/changelog, test/yacc/big_b.output, test/yacc/big_l.output, test/yacc/help.output, test/yacc/no_b_opt.output, test/yacc/no_output2.output, test/yacc/no_p_opt.output, test/yacc/nostdin.output: + bump + 2014-04-22 Thomas E. Dickey * mstring.c: Modified: soc2014/op/freebsd-base/contrib/byacc/MANIFEST ============================================================================== --- soc2014/op/freebsd-base/contrib/byacc/MANIFEST Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/contrib/byacc/MANIFEST Fri Jul 25 10:35:00 2014 (r271358) @@ -1,4 +1,4 @@ -MANIFEST for byacc-20140422, version t20140422 +MANIFEST for byacc-20140715, version t20140715 -------------------------------------------------------------------------------- MANIFEST this file ACKNOWLEDGEMENTS original version of byacc - 1993 Modified: soc2014/op/freebsd-base/contrib/byacc/VERSION ============================================================================== --- soc2014/op/freebsd-base/contrib/byacc/VERSION Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/contrib/byacc/VERSION Fri Jul 25 10:35:00 2014 (r271358) @@ -1 +1 @@ -20140422 +20140715 Modified: soc2014/op/freebsd-base/contrib/byacc/aclocal.m4 ============================================================================== --- soc2014/op/freebsd-base/contrib/byacc/aclocal.m4 Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/contrib/byacc/aclocal.m4 Fri Jul 25 10:35:00 2014 (r271358) @@ -1,4 +1,4 @@ -dnl $Id: aclocal.m4,v 1.34 2014/04/06 19:16:18 tom Exp $ +dnl $Id: aclocal.m4,v 1.35 2014/07/15 19:38:05 tom Exp $ dnl Macros for byacc configure script (Thomas E. Dickey) dnl --------------------------------------------------------------------------- dnl Copyright 2004-2013,2014 Thomas E. Dickey @@ -28,7 +28,7 @@ dnl authorization. dnl --------------------------------------------------------------------------- dnl --------------------------------------------------------------------------- -dnl CF_ACVERSION_CHECK version: 4 updated: 2013/03/04 19:52:56 +dnl CF_ACVERSION_CHECK version: 5 updated: 2014/06/04 19:11:49 dnl ------------------ dnl Conditionally generate script according to whether we're using a given autoconf. dnl @@ -37,7 +37,7 @@ dnl $3 = code to use if AC_ACVERSION is older than $1. define([CF_ACVERSION_CHECK], [ -ifdef([AC_ACVERSION], ,[m4_copy([m4_PACKAGE_VERSION],[AC_ACVERSION])])dnl +ifdef([AC_ACVERSION], ,[ifdef([AC_AUTOCONF_VERSION],[m4_copy([AC_AUTOCONF_VERSION],[AC_ACVERSION])],[m4_copy([m4_PACKAGE_VERSION],[AC_ACVERSION])])])dnl ifdef([m4_version_compare], [m4_if(m4_version_compare(m4_defn([AC_ACVERSION]), [$1]), -1, [$3], [$2])], [CF_ACVERSION_COMPARE( @@ -930,7 +930,7 @@ test -z "$AWK" && AC_MSG_ERROR(No awk program found) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_PROG_CC version: 3 updated: 2012/10/06 15:31:55 +dnl CF_PROG_CC version: 4 updated: 2014/07/12 18:57:58 dnl ---------- dnl standard check for CC, plus followup sanity checks dnl $1 = optional parameter to pass to AC_PROG_CC to specify compiler name @@ -940,7 +940,7 @@ CF_ACVERSION_CHECK(2.52, [AC_PROG_CC_STDC], [CF_ANSI_CC_REQD]) -CF_CC_ENV_FLAGS +CF_CC_ENV_FLAGS ])dnl dnl --------------------------------------------------------------------------- dnl CF_PROG_LINT version: 2 updated: 2009/08/12 04:43:14 Modified: soc2014/op/freebsd-base/contrib/byacc/main.c ============================================================================== --- soc2014/op/freebsd-base/contrib/byacc/main.c Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/contrib/byacc/main.c Fri Jul 25 10:35:00 2014 (r271358) @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.50 2014/04/22 23:34:47 tom Exp $ */ +/* $Id: main.c,v 1.51 2014/05/28 02:01:55 Tom.Shields Exp $ */ #include #ifndef _WIN32 @@ -208,7 +208,6 @@ ," -b file_prefix set filename prefix (default \"y.\")" ," -B create a backtracking parser" ," -d write definitions (" DEFINES_SUFFIX ")" - ," -D enable value stack memory reclamation" ," -i write interface (y.tab.i)" ," -g write a graphical description" ," -l suppress #line directives" Modified: soc2014/op/freebsd-base/contrib/byacc/package/byacc.spec ============================================================================== --- soc2014/op/freebsd-base/contrib/byacc/package/byacc.spec Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/contrib/byacc/package/byacc.spec Fri Jul 25 10:35:00 2014 (r271358) @@ -1,8 +1,8 @@ Summary: byacc - public domain Berkeley LALR Yacc parser generator %define AppProgram byacc -%define AppVersion 20140422 +%define AppVersion 20140715 %define UseProgram yacc -# $XTermId: byacc.spec,v 1.20 2014/04/22 08:13:20 tom Exp $ +# $XTermId: byacc.spec,v 1.22 2014/07/15 19:36:54 tom Exp $ Name: %{AppProgram} Version: %{AppVersion} Release: 1 Modified: soc2014/op/freebsd-base/contrib/byacc/package/debian/changelog ============================================================================== --- soc2014/op/freebsd-base/contrib/byacc/package/debian/changelog Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/contrib/byacc/package/debian/changelog Fri Jul 25 10:35:00 2014 (r271358) @@ -1,3 +1,15 @@ +byacc (20140715) unstable; urgency=low + + * maintenance updates + + -- Thomas E. Dickey Tue, 15 Jul 2014 15:36:54 -0400 + +byacc (20140527) unstable; urgency=low + + * remove obsolete option from usage message + + -- Thomas E. Dickey Tue, 27 May 2014 22:01:55 -0400 + byacc (20140422) unstable; urgency=low * maintenance updates Modified: soc2014/op/freebsd-base/contrib/byacc/package/mingw-byacc.spec ============================================================================== --- soc2014/op/freebsd-base/contrib/byacc/package/mingw-byacc.spec Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/contrib/byacc/package/mingw-byacc.spec Fri Jul 25 10:35:00 2014 (r271358) @@ -1,8 +1,8 @@ Summary: byacc - public domain Berkeley LALR Yacc parser generator %define AppProgram byacc -%define AppVersion 20140422 +%define AppVersion 20140715 %define UseProgram yacc -# $XTermId: mingw-byacc.spec,v 1.3 2014/04/22 08:13:20 tom Exp $ +# $XTermId: mingw-byacc.spec,v 1.4 2014/07/15 19:36:54 tom Exp $ Name: %{AppProgram} Version: %{AppVersion} Release: 1 Modified: soc2014/op/freebsd-base/contrib/byacc/package/pkgsrc/Makefile ============================================================================== --- soc2014/op/freebsd-base/contrib/byacc/package/pkgsrc/Makefile Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/contrib/byacc/package/pkgsrc/Makefile Fri Jul 25 10:35:00 2014 (r271358) @@ -1,7 +1,7 @@ # $NetBSD: Makefile,v 1.9 2008/07/24 17:13:00 tonnerre Exp $ # -DISTNAME= byacc-20140422 +DISTNAME= byacc-20140715 PKGREVISION= 1 CATEGORIES= devel MASTER_SITES= ftp://invisible-island.net/byacc/ Modified: soc2014/op/freebsd-base/contrib/byacc/test/btyacc/big_b.output ============================================================================== --- soc2014/op/freebsd-base/contrib/byacc/test/btyacc/big_b.output Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/contrib/byacc/test/btyacc/big_b.output Fri Jul 25 10:35:00 2014 (r271358) @@ -4,7 +4,6 @@ -b file_prefix set filename prefix (default "y.") -B create a backtracking parser -d write definitions (.tab.h) - -D enable value stack memory reclamation -i write interface (y.tab.i) -g write a graphical description -l suppress #line directives Modified: soc2014/op/freebsd-base/contrib/byacc/test/btyacc/big_l.output ============================================================================== --- soc2014/op/freebsd-base/contrib/byacc/test/btyacc/big_l.output Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/contrib/byacc/test/btyacc/big_l.output Fri Jul 25 10:35:00 2014 (r271358) @@ -4,7 +4,6 @@ -b file_prefix set filename prefix (default "y.") -B create a backtracking parser -d write definitions (.tab.h) - -D enable value stack memory reclamation -i write interface (y.tab.i) -g write a graphical description -l suppress #line directives Modified: soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_inherit1.error ============================================================================== --- soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_inherit1.error Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_inherit1.error Fri Jul 25 10:35:00 2014 (r271358) @@ -1,3 +1,3 @@ -YACC: e - line 64 of "./test/err_inherit1.y", unterminated argument list +YACC: e - line 64 of "./err_inherit1.y", unterminated argument list namelist($c, $t ^ Modified: soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_inherit2.error ============================================================================== --- soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_inherit2.error Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_inherit2.error Fri Jul 25 10:35:00 2014 (r271358) @@ -1,5 +1,5 @@ -YACC: w - line 64 of "./test/err_inherit2.y", number of arguments of namelist doesn't agree with previous declaration -YACC: w - line 64 of "./test/err_inherit2.y", type of argument 1 to namelist doesn't agree with previous declaration -YACC: e - line 64 of "./test/err_inherit2.y", bad formal argument list +YACC: w - line 64 of "./err_inherit2.y", number of arguments of namelist doesn't agree with previous declaration +YACC: w - line 64 of "./err_inherit2.y", type of argument 1 to namelist doesn't agree with previous declaration +YACC: e - line 64 of "./err_inherit2.y", bad formal argument list namelist($c, $t, extra): namelist NAME ^ Modified: soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_inherit3.error ============================================================================== --- soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_inherit3.error Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_inherit3.error Fri Jul 25 10:35:00 2014 (r271358) @@ -1,23 +1,23 @@ -YACC: w - line 64 of "./test/err_inherit3.y", number of arguments of namelist doesn't agree with previous declaration -YACC: w - line 64 of "./test/err_inherit3.y", wrong number of arguments for namelist +YACC: w - line 64 of "./err_inherit3.y", number of arguments of namelist doesn't agree with previous declaration +YACC: w - line 64 of "./err_inherit3.y", wrong number of arguments for namelist namelist: namelist($c) NAME ^ -YACC: w - line 64 of "./test/err_inherit3.y", unknown argument $c -YACC: w - line 64 of "./test/err_inherit3.y", untyped argument $c -YACC: w - line 65 of "./test/err_inherit3.y", unknown argument $t +YACC: w - line 64 of "./err_inherit3.y", unknown argument $c +YACC: w - line 64 of "./err_inherit3.y", untyped argument $c +YACC: w - line 65 of "./err_inherit3.y", unknown argument $t { $$->s = mksymbol($t, $c, $2); ^ -YACC: w - line 65 of "./test/err_inherit3.y", unknown argument $c +YACC: w - line 65 of "./err_inherit3.y", unknown argument $c { $$->s = mksymbol($t, $c, $2); ^ -YACC: w - line 69 of "./test/err_inherit3.y", unknown argument $t +YACC: w - line 69 of "./err_inherit3.y", unknown argument $t { $$->s = mksymbol($t, $c, $1); ^ -YACC: w - line 69 of "./test/err_inherit3.y", untyped argument $t -YACC: w - line 69 of "./test/err_inherit3.y", unknown argument $c +YACC: w - line 69 of "./err_inherit3.y", untyped argument $t +YACC: w - line 69 of "./err_inherit3.y", unknown argument $c { $$->s = mksymbol($t, $c, $1); ^ -YACC: w - line 69 of "./test/err_inherit3.y", untyped argument $c -YACC: w - line 0 of "./test/err_inherit3.y", start symbol declaration requires arguments +YACC: w - line 69 of "./err_inherit3.y", untyped argument $c +YACC: w - line 0 of "./err_inherit3.y", start symbol declaration requires arguments YACC: 1 rule never reduced YACC: 3 shift/reduce conflicts. Modified: soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_inherit4.error ============================================================================== --- soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_inherit4.error Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_inherit4.error Fri Jul 25 10:35:00 2014 (r271358) @@ -1,13 +1,13 @@ -YACC: w - line 32 of "./test/err_inherit4.y", destructor redeclared +YACC: w - line 32 of "./err_inherit4.y", destructor redeclared %destructor { ^ -YACC: w - line 77 of "./test/err_inherit4.y", wrong number of default arguments for namelist +YACC: w - line 77 of "./err_inherit4.y", wrong number of default arguments for namelist { $$ = $1; @$ = @2; } ^ -YACC: w - line 77 of "./test/err_inherit4.y", wrong type for default argument 2 to namelist +YACC: w - line 77 of "./err_inherit4.y", wrong type for default argument 2 to namelist { $$ = $1; @$ = @2; } ^ -YACC: w - line 77 of "./test/err_inherit4.y", wrong type for default argument 1 to namelist +YACC: w - line 77 of "./err_inherit4.y", wrong type for default argument 1 to namelist { $$ = $1; @$ = @2; } ^ -YACC: w - line 77 of "./test/err_inherit4.y", @2 references beyond the end of the current rule +YACC: w - line 77 of "./err_inherit4.y", @2 references beyond the end of the current rule Modified: soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_inherit5.error ============================================================================== --- soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_inherit5.error Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_inherit5.error Fri Jul 25 10:35:00 2014 (r271358) @@ -1 +1 @@ -YACC: e - line 74 of "./test/err_inherit5.y", illegal @$ or @N reference +YACC: e - line 74 of "./err_inherit5.y", illegal @$ or @N reference Modified: soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax1.error ============================================================================== --- soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax1.error Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax1.error Fri Jul 25 10:35:00 2014 (r271358) @@ -1,3 +1,3 @@ -YACC: e - line 1 of "./test/err_syntax1.y", syntax error +YACC: e - line 1 of "./err_syntax1.y", syntax error ?% { ^ Modified: soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax10.error ============================================================================== --- soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax10.error Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax10.error Fri Jul 25 10:35:00 2014 (r271358) @@ -1,3 +1,3 @@ -YACC: w - line 7 of "./test/err_syntax10.y", the type of '(' has been redeclared -YACC: w - line 7 of "./test/err_syntax10.y", the type of '*' has been redeclared -YACC: w - line 7 of "./test/err_syntax10.y", the type of '&' has been redeclared +YACC: w - line 7 of "./err_syntax10.y", the type of '(' has been redeclared +YACC: w - line 7 of "./err_syntax10.y", the type of '*' has been redeclared +YACC: w - line 7 of "./err_syntax10.y", the type of '&' has been redeclared Modified: soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax11.error ============================================================================== --- soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax11.error Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax11.error Fri Jul 25 10:35:00 2014 (r271358) @@ -1 +1 @@ -YACC: w - line 7 of "./test/err_syntax11.y", the precedence of '|' has been redeclared +YACC: w - line 7 of "./err_syntax11.y", the precedence of '|' has been redeclared Modified: soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax12.error ============================================================================== --- soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax12.error Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax12.error Fri Jul 25 10:35:00 2014 (r271358) @@ -1 +1 @@ -YACC: w - line 7 of "./test/err_syntax12.y", the value of text has been redeclared +YACC: w - line 7 of "./err_syntax12.y", the value of text has been redeclared Modified: soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax13.error ============================================================================== --- soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax13.error Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax13.error Fri Jul 25 10:35:00 2014 (r271358) @@ -1 +1 @@ -YACC: e - line 7 of "./test/err_syntax13.y", the start symbol text is a token +YACC: e - line 7 of "./err_syntax13.y", the start symbol text is a token Modified: soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax14.error ============================================================================== --- soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax14.error Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax14.error Fri Jul 25 10:35:00 2014 (r271358) @@ -1,2 +1,2 @@ -YACC: w - line 7 of "./test/err_syntax14.y", the start symbol has been redeclared +YACC: w - line 7 of "./err_syntax14.y", the start symbol has been redeclared YACC: e - the start symbol text2 is undefined Modified: soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax15.error ============================================================================== --- soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax15.error Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax15.error Fri Jul 25 10:35:00 2014 (r271358) @@ -1 +1 @@ -YACC: e - line 9 of "./test/err_syntax15.y", no grammar has been specified +YACC: e - line 9 of "./err_syntax15.y", no grammar has been specified Modified: soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax16.error ============================================================================== --- soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax16.error Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax16.error Fri Jul 25 10:35:00 2014 (r271358) @@ -1 +1 @@ -YACC: e - line 14 of "./test/err_syntax16.y", a token appears on the lhs of a production +YACC: e - line 14 of "./err_syntax16.y", a token appears on the lhs of a production Modified: soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax17.error ============================================================================== --- soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax17.error Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax17.error Fri Jul 25 10:35:00 2014 (r271358) @@ -1,3 +1,3 @@ -YACC: e - line 8 of "./test/err_syntax17.y", unterminated action +YACC: e - line 8 of "./err_syntax17.y", unterminated action S: { error ^ Modified: soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax18.error ============================================================================== --- soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax18.error Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax18.error Fri Jul 25 10:35:00 2014 (r271358) @@ -1 +1 @@ -YACC: w - line 9 of "./test/err_syntax18.y", $4 references beyond the end of the current rule +YACC: w - line 9 of "./err_syntax18.y", $4 references beyond the end of the current rule Modified: soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax19.error ============================================================================== --- soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax19.error Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax19.error Fri Jul 25 10:35:00 2014 (r271358) @@ -1,3 +1,3 @@ -YACC: e - line 9 of "./test/err_syntax19.y", illegal $-name +YACC: e - line 9 of "./err_syntax19.y", illegal $-name { $$ = $; } ^ Modified: soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax2.error ============================================================================== --- soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax2.error Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax2.error Fri Jul 25 10:35:00 2014 (r271358) @@ -1,3 +1,3 @@ -YACC: e - line 1 of "./test/err_syntax2.y", unmatched /* +YACC: e - line 1 of "./err_syntax2.y", unmatched /* %{ /* ^ Modified: soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax21.error ============================================================================== --- soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax21.error Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax21.error Fri Jul 25 10:35:00 2014 (r271358) @@ -1 +1 @@ -YACC: e - line 12 of "./test/err_syntax21.y", $0 is untyped +YACC: e - line 12 of "./err_syntax21.y", $0 is untyped Modified: soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax22.error ============================================================================== --- soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax22.error Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax22.error Fri Jul 25 10:35:00 2014 (r271358) @@ -1 +1 @@ -YACC: e - line 17 of "./test/err_syntax22.y", $2 (recur) is untyped +YACC: e - line 17 of "./err_syntax22.y", $2 (recur) is untyped Modified: soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax23.error ============================================================================== --- soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax23.error Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax23.error Fri Jul 25 10:35:00 2014 (r271358) @@ -1 +1 @@ -YACC: e - line 18 of "./test/err_syntax23.y", $$ is untyped +YACC: e - line 18 of "./err_syntax23.y", $$ is untyped Modified: soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax24.error ============================================================================== --- soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax24.error Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax24.error Fri Jul 25 10:35:00 2014 (r271358) @@ -1,2 +1,2 @@ -YACC: w - line 21 of "./test/err_syntax24.y", the default action assigns an undefined value to $$ -YACC: e - line 22 of "./test/err_syntax24.y", $$ is untyped +YACC: w - line 21 of "./err_syntax24.y", the default action assigns an undefined value to $$ +YACC: e - line 22 of "./err_syntax24.y", $$ is untyped Modified: soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax25.error ============================================================================== --- soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax25.error Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax25.error Fri Jul 25 10:35:00 2014 (r271358) @@ -1,3 +1,3 @@ -YACC: e - line 11 of "./test/err_syntax25.y", too many %union declarations +YACC: e - line 11 of "./err_syntax25.y", too many %union declarations %union { ^ Modified: soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax26.error ============================================================================== --- soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax26.error Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax26.error Fri Jul 25 10:35:00 2014 (r271358) @@ -1 +1 @@ -YACC: e - line 6 of "./test/err_syntax26.y", unexpected end-of-file +YACC: e - line 6 of "./err_syntax26.y", unexpected end-of-file Modified: soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax27.error ============================================================================== --- soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax27.error Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax27.error Fri Jul 25 10:35:00 2014 (r271358) @@ -1 +1 @@ -YACC: e - line 3 of "./test/err_syntax27.y", missing '}' +YACC: e - line 3 of "./err_syntax27.y", missing '}' Modified: soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax3.error ============================================================================== --- soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax3.error Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax3.error Fri Jul 25 10:35:00 2014 (r271358) @@ -1,3 +1,3 @@ -YACC: e - line 6 of "./test/err_syntax3.y", unterminated string +YACC: e - line 6 of "./err_syntax3.y", unterminated string %token '(' '*' '& ^ Modified: soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax4.error ============================================================================== --- soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax4.error Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax4.error Fri Jul 25 10:35:00 2014 (r271358) @@ -1,3 +1,3 @@ -YACC: e - line 1 of "./test/err_syntax4.y", unmatched %{ +YACC: e - line 1 of "./err_syntax4.y", unmatched %{ %{ ^ Modified: soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax5.error ============================================================================== --- soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax5.error Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax5.error Fri Jul 25 10:35:00 2014 (r271358) @@ -1,3 +1,3 @@ -YACC: e - line 6 of "./test/err_syntax5.y", unterminated %union declaration +YACC: e - line 6 of "./err_syntax5.y", unterminated %union declaration %union { ^ Modified: soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax6.error ============================================================================== --- soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax6.error Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax6.error Fri Jul 25 10:35:00 2014 (r271358) @@ -1,3 +1,3 @@ -YACC: e - line 6 of "./test/err_syntax6.y", illegal tag +YACC: e - line 6 of "./err_syntax6.y", illegal tag %token '\777' ^ Modified: soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax7a.error ============================================================================== --- soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax7a.error Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax7a.error Fri Jul 25 10:35:00 2014 (r271358) @@ -1,3 +1,3 @@ -YACC: e - line 6 of "./test/err_syntax7a.y", illegal character +YACC: e - line 6 of "./err_syntax7a.y", illegal character %token '\xfff' ^ Modified: soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax7b.error ============================================================================== --- soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax7b.error Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax7b.error Fri Jul 25 10:35:00 2014 (r271358) @@ -1,3 +1,3 @@ -YACC: e - line 6 of "./test/err_syntax7b.y", illegal character +YACC: e - line 6 of "./err_syntax7b.y", illegal character %token '\x.' ^ Modified: soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax8.error ============================================================================== --- soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax8.error Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax8.error Fri Jul 25 10:35:00 2014 (r271358) @@ -1 +1 @@ -YACC: e - line 6 of "./test/err_syntax8.y", illegal use of reserved symbol . +YACC: e - line 6 of "./err_syntax8.y", illegal use of reserved symbol . Modified: soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax8a.error ============================================================================== --- soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax8a.error Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax8a.error Fri Jul 25 10:35:00 2014 (r271358) @@ -1 +1 @@ -YACC: e - line 6 of "./test/err_syntax8a.y", illegal use of reserved symbol $$123 +YACC: e - line 6 of "./err_syntax8a.y", illegal use of reserved symbol $$123 Modified: soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax9.error ============================================================================== --- soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax9.error Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/contrib/byacc/test/btyacc/err_syntax9.error Fri Jul 25 10:35:00 2014 (r271358) @@ -1 +1 @@ -YACC: e - line 7 of "./test/err_syntax9.y", the start symbol text cannot be declared to be a token +YACC: e - line 7 of "./err_syntax9.y", the start symbol text cannot be declared to be a token Modified: soc2014/op/freebsd-base/contrib/byacc/test/btyacc/help.output ============================================================================== --- soc2014/op/freebsd-base/contrib/byacc/test/btyacc/help.output Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/contrib/byacc/test/btyacc/help.output Fri Jul 25 10:35:00 2014 (r271358) @@ -4,7 +4,6 @@ -b file_prefix set filename prefix (default "y.") -B create a backtracking parser -d write definitions (.tab.h) - -D enable value stack memory reclamation -i write interface (y.tab.i) -g write a graphical description -l suppress #line directives Modified: soc2014/op/freebsd-base/contrib/byacc/test/btyacc/no_b_opt.output ============================================================================== --- soc2014/op/freebsd-base/contrib/byacc/test/btyacc/no_b_opt.output Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/contrib/byacc/test/btyacc/no_b_opt.output Fri Jul 25 10:35:00 2014 (r271358) @@ -4,7 +4,6 @@ -b file_prefix set filename prefix (default "y.") -B create a backtracking parser -d write definitions (.tab.h) - -D enable value stack memory reclamation -i write interface (y.tab.i) -g write a graphical description -l suppress #line directives Modified: soc2014/op/freebsd-base/contrib/byacc/test/btyacc/no_output2.output ============================================================================== --- soc2014/op/freebsd-base/contrib/byacc/test/btyacc/no_output2.output Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/contrib/byacc/test/btyacc/no_output2.output Fri Jul 25 10:35:00 2014 (r271358) @@ -4,7 +4,6 @@ -b file_prefix set filename prefix (default "y.") -B create a backtracking parser -d write definitions (.tab.h) - -D enable value stack memory reclamation -i write interface (y.tab.i) -g write a graphical description -l suppress #line directives Modified: soc2014/op/freebsd-base/contrib/byacc/test/btyacc/no_p_opt.output ============================================================================== --- soc2014/op/freebsd-base/contrib/byacc/test/btyacc/no_p_opt.output Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/contrib/byacc/test/btyacc/no_p_opt.output Fri Jul 25 10:35:00 2014 (r271358) @@ -4,7 +4,6 @@ -b file_prefix set filename prefix (default "y.") -B create a backtracking parser -d write definitions (.tab.h) - -D enable value stack memory reclamation -i write interface (y.tab.i) -g write a graphical description -l suppress #line directives Modified: soc2014/op/freebsd-base/contrib/byacc/test/btyacc/nostdin.output ============================================================================== --- soc2014/op/freebsd-base/contrib/byacc/test/btyacc/nostdin.output Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/contrib/byacc/test/btyacc/nostdin.output Fri Jul 25 10:35:00 2014 (r271358) @@ -4,7 +4,6 @@ -b file_prefix set filename prefix (default "y.") -B create a backtracking parser -d write definitions (.tab.h) - -D enable value stack memory reclamation -i write interface (y.tab.i) -g write a graphical description -l suppress #line directives Modified: soc2014/op/freebsd-base/contrib/byacc/test/run_test.sh ============================================================================== --- soc2014/op/freebsd-base/contrib/byacc/test/run_test.sh Fri Jul 25 06:53:20 2014 (r271357) +++ soc2014/op/freebsd-base/contrib/byacc/test/run_test.sh Fri Jul 25 10:35:00 2014 (r271358) @@ -1,7 +1,9 @@ #!/bin/sh -# $Id: run_test.sh,v 1.22 2014/04/09 11:00:45 tom Exp $ +# $Id: run_test.sh,v 1.24 2014/07/15 19:21:10 tom Exp $ # vi:ts=4 sw=4: +errors=0 + # NEW is the file created by the testcase # REF is the reference file against which to compare test_diffs() { @@ -11,13 +13,15 @@ if test ! -f $CMP then echo "...not found $CMP" + errors=1 else sed -e s,$NEW,$REF, \ - -e "s%$YACC%YACC%" \ + -e "s%$YACC_escaped%YACC%" \ -e '/YYPATCH/s/[0-9][0-9]*/"yyyymmdd"/' \ -e '/#define YYPATCH/s/PATCH/CHECK/' \ -e 's,#line \([1-9][0-9]*\) "'$REF_DIR'/,#line \1 ",' \ -e 's,#line \([1-9][0-9]*\) "'$TEST_DIR'/,#line \1 ",' \ + -e 's,\(YACC:.* line [0-9][0-9]* of "\)'$TEST_DIR/',\1./,' \ < $CMP >$tmpfile \ && mv $tmpfile $CMP if test ! -f $REF @@ -31,6 +35,7 @@ else *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-soc-all@FreeBSD.ORG Fri Jul 25 10:36:13 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6B6FE885 for ; Fri, 25 Jul 2014 10:36:13 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4C0492033 for ; Fri, 25 Jul 2014 10:36:13 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6PAaDJ8086335 for ; Fri, 25 Jul 2014 10:36:13 GMT (envelope-from op@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s6PAaBLM085974 for svn-soc-all@FreeBSD.org; Fri, 25 Jul 2014 10:36:11 GMT (envelope-from op@FreeBSD.org) Date: Fri, 25 Jul 2014 10:36:11 GMT Message-Id: <201407251036.s6PAaBLM085974@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to op@FreeBSD.org using -f From: op@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r271359 - in soc2014/op/freebsd-base/sys: amd64/amd64 amd64/include kern MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jul 2014 10:36:13 -0000 Author: op Date: Fri Jul 25 10:36:11 2014 New Revision: 271359 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271359 Log: KSP: move cpu_extstate to common place Signed-off-by: Oliver Pinter git: https://github.com/opntr/opBSD/tree/op/gsoc2014/kpatch Modified: soc2014/op/freebsd-base/sys/amd64/amd64/identcpu.c soc2014/op/freebsd-base/sys/amd64/amd64/initcpu.c soc2014/op/freebsd-base/sys/amd64/include/md_var.h soc2014/op/freebsd-base/sys/kern/kern_selfpatch.c Modified: soc2014/op/freebsd-base/sys/amd64/amd64/identcpu.c ============================================================================== --- soc2014/op/freebsd-base/sys/amd64/amd64/identcpu.c Fri Jul 25 10:35:00 2014 (r271358) +++ soc2014/op/freebsd-base/sys/amd64/amd64/identcpu.c Fri Jul 25 10:36:11 2014 (r271359) @@ -568,6 +568,14 @@ cpu_stdext_feature &= ~cpu_stdext_disable; } + if (cpu_high >= 13) { + if (cpu_feature2 & CPUID2_OSXSAVE) { + cpuid_count(13, 1, regs); + cpu_extstate = regs[0]; + } else + cpu_extstate = 0; + } + if (cpu_vendor_id == CPU_VENDOR_INTEL || cpu_vendor_id == CPU_VENDOR_AMD || cpu_vendor_id == CPU_VENDOR_CENTAUR) { Modified: soc2014/op/freebsd-base/sys/amd64/amd64/initcpu.c ============================================================================== --- soc2014/op/freebsd-base/sys/amd64/amd64/initcpu.c Fri Jul 25 10:35:00 2014 (r271358) +++ soc2014/op/freebsd-base/sys/amd64/amd64/initcpu.c Fri Jul 25 10:36:11 2014 (r271359) @@ -78,6 +78,7 @@ u_int cpu_mon_mwait_flags; /* MONITOR/MWAIT flags (CPUID.05H.ECX) */ u_int cpu_mon_min_size; /* MONITOR minimum range size, bytes */ u_int cpu_mon_max_size; /* MONITOR minimum range size, bytes */ +u_int cpu_extstate; /* Extended State features */ SYSCTL_UINT(_hw, OID_AUTO, via_feature_rng, CTLFLAG_RD, &via_feature_rng, 0, "VIA RNG feature available in CPU"); Modified: soc2014/op/freebsd-base/sys/amd64/include/md_var.h ============================================================================== --- soc2014/op/freebsd-base/sys/amd64/include/md_var.h Fri Jul 25 10:35:00 2014 (r271358) +++ soc2014/op/freebsd-base/sys/amd64/include/md_var.h Fri Jul 25 10:36:11 2014 (r271359) @@ -61,6 +61,7 @@ extern u_int cpu_mon_mwait_flags; extern u_int cpu_mon_min_size; extern u_int cpu_mon_max_size; +extern u_int cpu_extstate; extern char ctx_switch_xsave[]; extern char kstack[]; extern char sigcode[]; Modified: soc2014/op/freebsd-base/sys/kern/kern_selfpatch.c ============================================================================== --- soc2014/op/freebsd-base/sys/kern/kern_selfpatch.c Fri Jul 25 10:35:00 2014 (r271358) +++ soc2014/op/freebsd-base/sys/kern/kern_selfpatch.c Fri Jul 25 10:36:11 2014 (r271359) @@ -101,13 +101,8 @@ return (true); break; case KSP_CPUID_EXTSTATE : - { - u_int cp[4]; - - cpuid_count(0xd, 0x1, cp); - if ((cp[0] & p->feature) != 0) - return (true); - } + if ((cpu_extstate & p->feature) != 0) + return (true); break; case KSP_SELFTEST: if ((p->feature & KSP_FEATURE_SELFTEST) != 0) From owner-svn-soc-all@FreeBSD.ORG Fri Jul 25 10:36:32 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C9997897 for ; Fri, 25 Jul 2014 10:36:32 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B512E2039 for ; Fri, 25 Jul 2014 10:36:32 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6PAaWvx089740 for ; Fri, 25 Jul 2014 10:36:32 GMT (envelope-from op@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s6PAaWXm089602 for svn-soc-all@FreeBSD.org; Fri, 25 Jul 2014 10:36:32 GMT (envelope-from op@FreeBSD.org) Date: Fri, 25 Jul 2014 10:36:32 GMT Message-Id: <201407251036.s6PAaWXm089602@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to op@FreeBSD.org using -f From: op@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r271360 - soc2014/op/freebsd-base/sys/amd64/amd64 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jul 2014 10:36:32 -0000 Author: op Date: Fri Jul 25 10:36:31 2014 New Revision: 271360 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271360 Log: KSP: as Intel SDM Vol3B 13.2 say, we must check against XSAVE instead of OSXSAVE Signed-off-by: Oliver Pinter git: https://github.com/opntr/opBSD/tree/op/gsoc2014/kpatch Modified: soc2014/op/freebsd-base/sys/amd64/amd64/identcpu.c Modified: soc2014/op/freebsd-base/sys/amd64/amd64/identcpu.c ============================================================================== --- soc2014/op/freebsd-base/sys/amd64/amd64/identcpu.c Fri Jul 25 10:36:11 2014 (r271359) +++ soc2014/op/freebsd-base/sys/amd64/amd64/identcpu.c Fri Jul 25 10:36:31 2014 (r271360) @@ -569,7 +569,7 @@ } if (cpu_high >= 13) { - if (cpu_feature2 & CPUID2_OSXSAVE) { + if (cpu_feature2 & CPUID2_XSAVE) { cpuid_count(13, 1, regs); cpu_extstate = regs[0]; } else From owner-svn-soc-all@FreeBSD.ORG Fri Jul 25 10:36:46 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8F8948AD for ; Fri, 25 Jul 2014 10:36:46 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7BA33203C for ; Fri, 25 Jul 2014 10:36:46 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6PAak8Y092074 for ; Fri, 25 Jul 2014 10:36:46 GMT (envelope-from op@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s6PAak4s091942 for svn-soc-all@FreeBSD.org; Fri, 25 Jul 2014 10:36:46 GMT (envelope-from op@FreeBSD.org) Date: Fri, 25 Jul 2014 10:36:46 GMT Message-Id: <201407251036.s6PAak4s091942@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to op@FreeBSD.org using -f From: op@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r271361 - soc2014/op/freebsd-base/sys/amd64/include MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jul 2014 10:36:46 -0000 Author: op Date: Fri Jul 25 10:36:45 2014 New Revision: 271361 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271361 Log: KSP: removed unneeded extern variable Signed-off-by: Oliver Pinter git: https://github.com/opntr/opBSD/tree/op/gsoc2014/kpatch Modified: soc2014/op/freebsd-base/sys/amd64/include/md_var.h Modified: soc2014/op/freebsd-base/sys/amd64/include/md_var.h ============================================================================== --- soc2014/op/freebsd-base/sys/amd64/include/md_var.h Fri Jul 25 10:36:31 2014 (r271360) +++ soc2014/op/freebsd-base/sys/amd64/include/md_var.h Fri Jul 25 10:36:45 2014 (r271361) @@ -62,7 +62,6 @@ extern u_int cpu_mon_min_size; extern u_int cpu_mon_max_size; extern u_int cpu_extstate; -extern char ctx_switch_xsave[]; extern char kstack[]; extern char sigcode[]; extern int szsigcode; From owner-svn-soc-all@FreeBSD.ORG Fri Jul 25 12:20:32 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2AC81279 for ; Fri, 25 Jul 2014 12:20:32 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F143E2A40 for ; Fri, 25 Jul 2014 12:20:31 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6PCKVJL065955 for ; Fri, 25 Jul 2014 12:20:31 GMT (envelope-from op@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s6PCKVoW065446 for svn-soc-all@FreeBSD.org; Fri, 25 Jul 2014 12:20:31 GMT (envelope-from op@FreeBSD.org) Date: Fri, 25 Jul 2014 12:20:31 GMT Message-Id: <201407251220.s6PCKVoW065446@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to op@FreeBSD.org using -f From: op@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r271364 - soc2014/op/tools MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jul 2014 12:20:32 -0000 Author: op Date: Fri Jul 25 12:20:30 2014 New Revision: 271364 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271364 Log: added tools/run_smap_test_vm_64bit_with{,out}_smap.csh test Signed-off-by: Oliver Pinter Added: soc2014/op/tools/run_smap_test_vm_64bit_with_smap.csh - copied unchanged from r271357, soc2014/op/tools/run_smap_test_vm_64bit.csh soc2014/op/tools/run_smap_test_vm_64bit_without_smap.csh - copied, changed from r271357, soc2014/op/tools/run_smap_test_vm_64bit.csh Copied: soc2014/op/tools/run_smap_test_vm_64bit_with_smap.csh (from r271357, soc2014/op/tools/run_smap_test_vm_64bit.csh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ soc2014/op/tools/run_smap_test_vm_64bit_with_smap.csh Fri Jul 25 12:20:30 2014 (r271364, copy of r271357, soc2014/op/tools/run_smap_test_vm_64bit.csh) @@ -0,0 +1,21 @@ +#!/bin/csh + +set TARGET="amd64" + +if ( ${TARGET} == "amd64" ) then + set QTARGET="x86_64" + set QCPU="Haswell" +else + set QTARGET=${TARGET} + set QCPU="qemu32" +endif +set FREEBSD_PREFIX="/usr/data/sys/freebsd/" +set QEMU_PREFIX="/usr/local" + +set QEMU="${QEMU_PREFIX}/bin/qemu" +set QEMU_BIN="${QEMU_PREFIX}/bin/qemu-system-${QTARGET}" +set QEMU_OPTIONS="-cpu ${QCPU},enforce,+smap,+smep,-hypervisor -m 1024M" + +set FREEBSD_VMIMAGE="freebsd-${TARGET}.raw" + +${QEMU_BIN} ${QEMU_OPTIONS} -hda ${FREEBSD_PREFIX}/${FREEBSD_VMIMAGE} Copied and modified: soc2014/op/tools/run_smap_test_vm_64bit_without_smap.csh (from r271357, soc2014/op/tools/run_smap_test_vm_64bit.csh) ============================================================================== --- soc2014/op/tools/run_smap_test_vm_64bit.csh Fri Jul 25 06:53:20 2014 (r271357, copy source) +++ soc2014/op/tools/run_smap_test_vm_64bit_without_smap.csh Fri Jul 25 12:20:30 2014 (r271364) @@ -14,7 +14,7 @@ set QEMU="${QEMU_PREFIX}/bin/qemu" set QEMU_BIN="${QEMU_PREFIX}/bin/qemu-system-${QTARGET}" -set QEMU_OPTIONS="-cpu ${QCPU},enforce,+smap,+smep,-hypervisor -m 1024M" +set QEMU_OPTIONS="-cpu ${QCPU},enforce,-smap,+smep,-hypervisor -m 1024M" set FREEBSD_VMIMAGE="freebsd-${TARGET}.raw" From owner-svn-soc-all@FreeBSD.ORG Fri Jul 25 15:12:50 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 59899C33 for ; Fri, 25 Jul 2014 15:12:50 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4672E2C1A for ; Fri, 25 Jul 2014 15:12:50 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6PFCo7S086901 for ; Fri, 25 Jul 2014 15:12:50 GMT (envelope-from op@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s6PFCnYT086675 for svn-soc-all@FreeBSD.org; Fri, 25 Jul 2014 15:12:49 GMT (envelope-from op@FreeBSD.org) Date: Fri, 25 Jul 2014 15:12:49 GMT Message-Id: <201407251512.s6PFCnYT086675@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to op@FreeBSD.org using -f From: op@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r271366 - soc2014/op/freebsd-base/sys/amd64/amd64 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jul 2014 15:12:50 -0000 Author: op Date: Fri Jul 25 15:12:49 2014 New Revision: 271366 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271366 Log: KSP SMAP: use selfpatch for stac, clac in sys/amd64/amd64/exception.S Signed-off-by: Oliver Pinter git: https://github.com/opntr/opBSD/tree/op/gsoc2014/kpatch Modified: soc2014/op/freebsd-base/sys/amd64/amd64/exception.S Modified: soc2014/op/freebsd-base/sys/amd64/amd64/exception.S ============================================================================== --- soc2014/op/freebsd-base/sys/amd64/amd64/exception.S Fri Jul 25 14:47:44 2014 (r271365) +++ soc2014/op/freebsd-base/sys/amd64/amd64/exception.S Fri Jul 25 15:12:49 2014 (r271366) @@ -42,6 +42,7 @@ #include #include #include +#include #include "assym.s" @@ -198,7 +199,7 @@ movq %r14,TF_R14(%rsp) movq %r15,TF_R15(%rsp) movl $TF_HASSEGS,TF_FLAGS(%rsp) - clac + _clac cld FAKE_MCOUNT(TF_RIP(%rsp)) #ifdef KDTRACE_HOOKS @@ -279,7 +280,7 @@ movw %es,TF_ES(%rsp) movw %ds,TF_DS(%rsp) movl $TF_HASSEGS,TF_FLAGS(%rsp) - clac + _clac cld testb $SEL_RPL_MASK,TF_CS(%rsp) /* Did we come from kernel? */ jz 1f /* already running with kernel GS.base */ @@ -383,7 +384,7 @@ movq %r14,TF_R14(%rsp) /* C preserved */ movq %r15,TF_R15(%rsp) /* C preserved */ movl $TF_HASSEGS,TF_FLAGS(%rsp) - clac + _clac cld FAKE_MCOUNT(TF_RIP(%rsp)) movq PCPU(CURTHREAD),%rdi @@ -455,7 +456,7 @@ */ IDTVEC(nmi) - clac /* XXXOP */ + _clac subq $TF_RIP,%rsp movl $(T_NMI),TF_TRAPNO(%rsp) movq $0,TF_ADDR(%rsp) @@ -539,7 +540,7 @@ movq %rdx,%rdi /* destination stack pointer */ shrq $3,%rcx /* trap frame size in long words */ - clac /* XXXOP */ + _clac cld rep movsq /* copy trapframe */ From owner-svn-soc-all@FreeBSD.ORG Fri Jul 25 15:21:31 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A5AA5E96 for ; Fri, 25 Jul 2014 15:21:31 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8712D2C9E for ; Fri, 25 Jul 2014 15:21:31 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6PFLVdl065924 for ; Fri, 25 Jul 2014 15:21:31 GMT (envelope-from op@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s6PFLVuV065663 for svn-soc-all@FreeBSD.org; Fri, 25 Jul 2014 15:21:31 GMT (envelope-from op@FreeBSD.org) Date: Fri, 25 Jul 2014 15:21:31 GMT Message-Id: <201407251521.s6PFLVuV065663@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to op@FreeBSD.org using -f From: op@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r271367 - soc2014/op/freebsd-base/sys/amd64/amd64 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jul 2014 15:21:31 -0000 Author: op Date: Fri Jul 25 15:21:30 2014 New Revision: 271367 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271367 Log: KSP SMAP: use selfpatch for stac, clac in amd64/support.S Signed-off-by: Oliver Pinter git: https://github.com/opntr/opBSD/tree/op/gsoc2014/smap+kpatch Modified: soc2014/op/freebsd-base/sys/amd64/amd64/support.S Modified: soc2014/op/freebsd-base/sys/amd64/amd64/support.S ============================================================================== --- soc2014/op/freebsd-base/sys/amd64/amd64/support.S Fri Jul 25 15:12:49 2014 (r271366) +++ soc2014/op/freebsd-base/sys/amd64/amd64/support.S Fri Jul 25 15:21:30 2014 (r271367) @@ -35,6 +35,8 @@ #include #include #include +#include +#include #include "assym.s" @@ -247,16 +249,16 @@ shrq $3,%rcx cld - stac /* open user-space */ + _stac /* open user-space */ rep movsq - clac /* close user-space */ + _clac /* close user-space */ movb %dl,%cl andb $7,%cl - stac /* open user-space */ + _stac /* open user-space */ rep movsb - clac /* close user-space */ + _clac /* close user-space */ done_copyout: xorl %eax,%eax @@ -300,16 +302,16 @@ movb %cl,%al shrq $3,%rcx /* copy longword-wise */ cld - stac /* open user-space */ + _stac /* open user-space */ rep movsq - clac /* close user-space */ + _clac /* close user-space */ movb %al,%cl andb $7,%cl /* copy remaining bytes */ - stac /* open user-space */ + _stac /* open user-space */ rep movsb - clac /* close user-space */ + _clac /* close user-space */ done_copyin: xorl %eax,%eax @@ -341,12 +343,12 @@ ja fusufault movl %esi,%eax /* old */ - stac /* open user-space */ + _stac /* open user-space */ #ifdef SMP lock #endif cmpxchgl %edx,(%rdi) /* new = %edx */ - clac /* close user-space */ + _clac /* close user-space */ /* * The old value is in %eax. If the store succeeded it will be the @@ -372,12 +374,12 @@ ja fusufault movq %rsi,%rax /* old */ - stac /* open user-space */ + _stac /* open user-space */ #ifdef SMP lock #endif cmpxchgq %rdx,(%rdi) /* new = %rdx */ - clac /* close user-space */ + _clac /* close user-space */ /* * The old value is in %eax. If the store succeeded it will be the @@ -406,9 +408,9 @@ cmpq %rax,%rdi /* verify address is valid */ ja fusufault - stac /* open user-space */ + _stac /* open user-space */ movq (%rdi),%rax - clac /* close user-space */ + _clac /* close user-space */ movq $0,PCB_ONFAULT(%rcx) ret END(fuword64) @@ -422,9 +424,9 @@ cmpq %rax,%rdi /* verify address is valid */ ja fusufault - stac /* open user-space */ + _stac /* open user-space */ movl (%rdi),%eax - clac /* close user-space */ + _clac /* close user-space */ movq $0,PCB_ONFAULT(%rcx) ret END(fuword32) @@ -451,9 +453,9 @@ cmpq %rax,%rdi ja fusufault - stac /* open user-space */ + _stac /* open user-space */ movzwl (%rdi),%eax - clac /* close user-space */ + _clac /* close user-space */ movq $0,PCB_ONFAULT(%rcx) ret END(fuword16) @@ -466,9 +468,9 @@ cmpq %rax,%rdi ja fusufault - stac /* open user-space */ + _stac /* open user-space */ movzbl (%rdi),%eax - clac /* close user-space */ + _clac /* close user-space */ movq $0,PCB_ONFAULT(%rcx) ret END(fubyte) @@ -498,9 +500,9 @@ cmpq %rax,%rdi /* verify address validity */ ja fusufault - stac /* open user-space */ + _stac /* open user-space */ movq %rsi,(%rdi) - clac /* close user-space */ + _clac /* close user-space */ xorl %eax,%eax movq PCPU(CURPCB),%rcx movq %rax,PCB_ONFAULT(%rcx) @@ -516,9 +518,9 @@ cmpq %rax,%rdi /* verify address validity */ ja fusufault - stac /* open user-space */ + _stac /* open user-space */ movl %esi,(%rdi) - clac /* close user-space */ + _clac /* close user-space */ xorl %eax,%eax movq PCPU(CURPCB),%rcx movq %rax,PCB_ONFAULT(%rcx) @@ -533,9 +535,9 @@ cmpq %rax,%rdi /* verify address validity */ ja fusufault - stac /* open user-space */ + _stac /* open user-space */ movw %si,(%rdi) - clac /* close user-space */ + _clac /* close user-space */ xorl %eax,%eax movq PCPU(CURPCB),%rcx /* restore trashed register */ movq %rax,PCB_ONFAULT(%rcx) @@ -551,9 +553,9 @@ ja fusufault movl %esi,%eax - stac /* open user-space */ + _stac /* open user-space */ movb %al,(%rdi) - clac /* close user-space */ + _clac /* close user-space */ xorl %eax,%eax movq PCPU(CURPCB),%rcx /* restore trashed register */ movq %rax,PCB_ONFAULT(%rcx) @@ -595,9 +597,9 @@ decq %rdx jz 3f - stac /* open user-space */ + _stac /* open user-space */ lodsb - clac /* close user-space */ + _clac /* close user-space */ stosb orb %al,%al jnz 2b @@ -626,9 +628,9 @@ testq %r9,%r9 jz 1f subq %rdx,%r8 - stac /* open user-space */ + _stac /* open user-space */ movq %r8,(%r9) - clac /* close user-space */ + _clac /* close user-space */ 1: ret END(copyinstr) From owner-svn-soc-all@FreeBSD.ORG Fri Jul 25 15:22:02 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7F1F8EB1 for ; Fri, 25 Jul 2014 15:22:02 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C38D2D13 for ; Fri, 25 Jul 2014 15:22:02 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6PFM2LB077649 for ; Fri, 25 Jul 2014 15:22:02 GMT (envelope-from op@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s6PFM14A077401 for svn-soc-all@FreeBSD.org; Fri, 25 Jul 2014 15:22:01 GMT (envelope-from op@FreeBSD.org) Date: Fri, 25 Jul 2014 15:22:01 GMT Message-Id: <201407251522.s6PFM14A077401@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to op@FreeBSD.org using -f From: op@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r271368 - soc2014/op/freebsd-base/sys/amd64/ia32 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jul 2014 15:22:02 -0000 Author: op Date: Fri Jul 25 15:22:01 2014 New Revision: 271368 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271368 Log: KSP SMAP: use selfpatch for stac, clac in ia32/ia32_exception.S Signed-off-by: Oliver Pinter git: https://github.com/opntr/opBSD/tree/op/gsoc2014/smap+kpatch Modified: soc2014/op/freebsd-base/sys/amd64/ia32/ia32_exception.S Modified: soc2014/op/freebsd-base/sys/amd64/ia32/ia32_exception.S ============================================================================== --- soc2014/op/freebsd-base/sys/amd64/ia32/ia32_exception.S Fri Jul 25 15:21:30 2014 (r271367) +++ soc2014/op/freebsd-base/sys/amd64/ia32/ia32_exception.S Fri Jul 25 15:22:01 2014 (r271368) @@ -27,6 +27,8 @@ */ #include +#include +#include #include "assym.s" @@ -67,7 +69,7 @@ movq %r14,TF_R14(%rsp) movq %r15,TF_R15(%rsp) movl $TF_HASSEGS,TF_FLAGS(%rsp) - clac + _clac cld FAKE_MCOUNT(TF_RIP(%rsp)) movq %rsp, %rdi From owner-svn-soc-all@FreeBSD.ORG Fri Jul 25 15:22:11 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C0F8BED2 for ; Fri, 25 Jul 2014 15:22:11 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE0852D21 for ; Fri, 25 Jul 2014 15:22:11 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6PFMBnc081021 for ; Fri, 25 Jul 2014 15:22:11 GMT (envelope-from op@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s6PFMB9C080796 for svn-soc-all@FreeBSD.org; Fri, 25 Jul 2014 15:22:11 GMT (envelope-from op@FreeBSD.org) Date: Fri, 25 Jul 2014 15:22:11 GMT Message-Id: <201407251522.s6PFMB9C080796@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to op@FreeBSD.org using -f From: op@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r271369 - soc2014/op/freebsd-base/sys/amd64/include MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jul 2014 15:22:11 -0000 Author: op Date: Fri Jul 25 15:22:10 2014 New Revision: 271369 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271369 Log: KSP SMAP: use selfpatch for stac, clac in include/asmacros.h Signed-off-by: Oliver Pinter git: https://github.com/opntr/opBSD/tree/op/gsoc2014/smap+kpatch Modified: soc2014/op/freebsd-base/sys/amd64/include/asmacros.h Modified: soc2014/op/freebsd-base/sys/amd64/include/asmacros.h ============================================================================== --- soc2014/op/freebsd-base/sys/amd64/include/asmacros.h Fri Jul 25 15:22:01 2014 (r271368) +++ soc2014/op/freebsd-base/sys/amd64/include/asmacros.h Fri Jul 25 15:22:10 2014 (r271369) @@ -33,6 +33,8 @@ #define _MACHINE_ASMACROS_H_ #include +#include +#include /* XXX too much duplication in various asm*.h's. */ @@ -167,7 +169,7 @@ movw %es,TF_ES(%rsp) ; \ movw %ds,TF_DS(%rsp) ; \ movl $TF_HASSEGS,TF_FLAGS(%rsp) ; \ - clac; \ + _clac; \ cld #define POP_FRAME \ From owner-svn-soc-all@FreeBSD.ORG Fri Jul 25 15:22:21 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C4257EEA for ; Fri, 25 Jul 2014 15:22:21 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B0A6E2D25 for ; Fri, 25 Jul 2014 15:22:21 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6PFMLH2084913 for ; Fri, 25 Jul 2014 15:22:21 GMT (envelope-from op@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s6PFML7f084689 for svn-soc-all@FreeBSD.org; Fri, 25 Jul 2014 15:22:21 GMT (envelope-from op@FreeBSD.org) Date: Fri, 25 Jul 2014 15:22:21 GMT Message-Id: <201407251522.s6PFML7f084689@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to op@FreeBSD.org using -f From: op@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r271370 - soc2014/op/freebsd-base/sys/amd64/include MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jul 2014 15:22:21 -0000 Author: op Date: Fri Jul 25 15:22:20 2014 New Revision: 271370 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271370 Log: KSP SMAP: use selfpatch for stac, clac in amd64/include/cpufunc.h Signed-off-by: Oliver Pinter git: https://github.com/opntr/opBSD/tree/op/gsoc2014/smap+kpatch Modified: soc2014/op/freebsd-base/sys/amd64/include/cpufunc.h Modified: soc2014/op/freebsd-base/sys/amd64/include/cpufunc.h ============================================================================== --- soc2014/op/freebsd-base/sys/amd64/include/cpufunc.h Fri Jul 25 15:22:10 2014 (r271369) +++ soc2014/op/freebsd-base/sys/amd64/include/cpufunc.h Fri Jul 25 15:22:20 2014 (r271370) @@ -43,6 +43,9 @@ #error this file needs sys/cdefs.h as a prerequisite #endif +#include +#include + struct region_descriptor; #define readb(va) (*(volatile uint8_t *) (va)) @@ -594,14 +597,50 @@ clac(void) { - __asm __volatile("clac" : : : "memory"); + __asm __volatile( + "0723: " + " " KSP_INSTR_NOP3_C "; " + "0724: " + " .pushsection set_selfpatch_patch_set, \"ax\" ; " + "0725: " + " clac ; " + "0726: " + " .popsection " + " .pushsection set_selfpatch_set, \"a\" ; " + " .quad 0723b ; " + " .quad 0725b ; " + " .int 0724b-0723b ; " + " .int 0726b-0725b ; " + " .int " __XSTRING(KSP_CPUID_STDEXT) " ; " + " .int " __XSTRING(CPUID_STDEXT_SMAP) " ; " + " .quad 0 ; " + " .popsection ; " + : : : "memory"); } static __inline void stac(void) { - __asm __volatile("stac" : : : "memory"); + __asm __volatile( + "0723: " + " " KSP_INSTR_NOP3_C "; " + "0724: " + " .pushsection set_selfpatch_patch_set, \"ax\" ; " + "0725: " + " stac ; " + "0726: " + " .popsection " + " .pushsection set_selfpatch_set, \"a\" ; " + " .quad 0723b ; " + " .quad 0725b ; " + " .int 0724b-0723b ; " + " .int 0726b-0725b ; " + " .int " __XSTRING(KSP_CPUID_STDEXT) " ; " + " .int " __XSTRING(CPUID_STDEXT_SMAP) " ; " + " .quad 0 ; " + " .popsection ; " + : : : "memory"); } #ifdef _KERNEL From owner-svn-soc-all@FreeBSD.ORG Fri Jul 25 15:22:36 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B4635EFF for ; Fri, 25 Jul 2014 15:22:36 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 878772D28 for ; Fri, 25 Jul 2014 15:22:36 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6PFMaWG090350 for ; Fri, 25 Jul 2014 15:22:36 GMT (envelope-from op@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s6PFMaZo090166 for svn-soc-all@FreeBSD.org; Fri, 25 Jul 2014 15:22:36 GMT (envelope-from op@FreeBSD.org) Date: Fri, 25 Jul 2014 15:22:36 GMT Message-Id: <201407251522.s6PFMaZo090166@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to op@FreeBSD.org using -f From: op@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r271371 - soc2014/op/freebsd-base/sys/x86/include MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jul 2014 15:22:36 -0000 Author: op Date: Fri Jul 25 15:22:35 2014 New Revision: 271371 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271371 Log: KSP: added stringified version of NOPs, required by C inline assembly Signed-off-by: Oliver Pinter git: https://github.com/opntr/opBSD/tree/op/gsoc2014/smap+kpatch Modified: soc2014/op/freebsd-base/sys/x86/include/selfpatch-asmacros.h Modified: soc2014/op/freebsd-base/sys/x86/include/selfpatch-asmacros.h ============================================================================== --- soc2014/op/freebsd-base/sys/x86/include/selfpatch-asmacros.h Fri Jul 25 15:22:20 2014 (r271370) +++ soc2014/op/freebsd-base/sys/x86/include/selfpatch-asmacros.h Fri Jul 25 15:22:35 2014 (r271371) @@ -63,6 +63,30 @@ #define KSP_INSTR_NOP8 KSP_INSTR_INTEL_NOP8 #define KSP_INSTR_NOP9 KSP_INSTR_INTEL_NOP9 +/* + * stringified version needed by C sources, because __STRING and __XSTRING failed + */ +#define KSP_INSTR_INTEL_NOP1_C ".byte 0x90" +#define KSP_INSTR_INTEL_NOP2_C ".byte 0x66,0x90" +#define KSP_INSTR_INTEL_NOP3_C ".byte 0x0f,0x1f,0x00" +#define KSP_INSTR_INTEL_NOP4_C ".byte 0x0f,0x1f,0x40,0x00" +#define KSP_INSTR_INTEL_NOP5_C ".byte 0x0f,0x1f,0x44,0x00,0x00" +#define KSP_INSTR_INTEL_NOP6_C ".byte 0x66,0x0f,0x1f,0x44,0x00,0x00" +#define KSP_INSTR_INTEL_NOP7_C ".byte 0x0f,0x1f,0x80,0x00,0x00,0x00,0x00" +#define KSP_INSTR_INTEL_NOP8_C ".byte 0x0f,0x1f,0x84,0x00,0x00,0x00,0x00,0x00" +#define KSP_INSTR_INTEL_NOP9_C ".byte 0x66,0x0f,0x1f,0x84,0x00,0x00,0x00,0x00,0x00" + +#define KSP_INSTR_NOP1_C KSP_INSTR_INTEL_NOP1_C +#define KSP_INSTR_NOP2_C KSP_INSTR_INTEL_NOP2_C +#define KSP_INSTR_NOP3_C KSP_INSTR_INTEL_NOP3_C +#define KSP_INSTR_NOP4_C KSP_INSTR_INTEL_NOP4_C +#define KSP_INSTR_NOP5_C KSP_INSTR_INTEL_NOP5_C +#define KSP_INSTR_NOP6_C KSP_INSTR_INTEL_NOP6_C +#define KSP_INSTR_NOP7_C KSP_INSTR_INTEL_NOP7_C +#define KSP_INSTR_NOP8_C KSP_INSTR_INTEL_NOP8_C +#define KSP_INSTR_NOP9_C KSP_INSTR_INTEL_NOP9_C + + #define KSP_INSTR_XSAVE_XSAVEOPT(_ARG) \ 0723: \ xsave ( _ARG ) ; \ From owner-svn-soc-all@FreeBSD.ORG Fri Jul 25 15:22:49 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 51C61F14 for ; Fri, 25 Jul 2014 15:22:49 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3EDCC2D2B for ; Fri, 25 Jul 2014 15:22:49 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6PFMngi093628 for ; Fri, 25 Jul 2014 15:22:49 GMT (envelope-from op@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s6PFMmXH093474 for svn-soc-all@FreeBSD.org; Fri, 25 Jul 2014 15:22:48 GMT (envelope-from op@FreeBSD.org) Date: Fri, 25 Jul 2014 15:22:48 GMT Message-Id: <201407251522.s6PFMmXH093474@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to op@FreeBSD.org using -f From: op@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r271372 - soc2014/op/freebsd-base/sys/amd64/amd64 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jul 2014 15:22:49 -0000 Author: op Date: Fri Jul 25 15:22:48 2014 New Revision: 271372 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271372 Log: KSP SMAP: removed safety check, after the KSP merge Signed-off-by: Oliver Pinter git: https://github.com/opntr/opBSD/tree/op/gsoc2014/smap+kpatch Modified: soc2014/op/freebsd-base/sys/amd64/amd64/pmap.c Modified: soc2014/op/freebsd-base/sys/amd64/amd64/pmap.c ============================================================================== --- soc2014/op/freebsd-base/sys/amd64/amd64/pmap.c Fri Jul 25 15:22:35 2014 (r271371) +++ soc2014/op/freebsd-base/sys/amd64/amd64/pmap.c Fri Jul 25 15:22:48 2014 (r271372) @@ -834,15 +834,12 @@ load_cr3(KPML4phys); if (cpu_stdext_feature & CPUID_STDEXT_SMEP) load_cr4(rcr4() | CR4_SMEP); - /* - * XXXOP - handle properly the situation, when the kernel - * compiled with SMAP, but the CPU does not support it - */ + if (cpu_stdext_feature & CPUID_STDEXT_SMAP) { printf("Intel SMAP: enable\n"); load_cr4(rcr4() | CR4_SMAP); } else { - panic("Intel SMAP: not supported..."); + printf("Intel SMAP: not supported or disabled\n"); } /* From owner-svn-soc-all@FreeBSD.ORG Fri Jul 25 15:23:50 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 354D1F4C for ; Fri, 25 Jul 2014 15:23:50 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 22A3B2D3F for ; Fri, 25 Jul 2014 15:23:50 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6PFNoco008332 for ; Fri, 25 Jul 2014 15:23:50 GMT (envelope-from op@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s6PFNntL008125 for svn-soc-all@FreeBSD.org; Fri, 25 Jul 2014 15:23:49 GMT (envelope-from op@FreeBSD.org) Date: Fri, 25 Jul 2014 15:23:49 GMT Message-Id: <201407251523.s6PFNntL008125@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to op@FreeBSD.org using -f From: op@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r271373 - soc2014/op/tools MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jul 2014 15:23:50 -0000 Author: op Date: Fri Jul 25 15:23:49 2014 New Revision: 271373 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271373 Log: added branch name support to tools/svn-cherry-pick-from-git.csh Signed-off-by: Oliver Pinter Modified: soc2014/op/tools/svn-cherry-pick-from-git.csh Modified: soc2014/op/tools/svn-cherry-pick-from-git.csh ============================================================================== --- soc2014/op/tools/svn-cherry-pick-from-git.csh Fri Jul 25 15:22:48 2014 (r271372) +++ soc2014/op/tools/svn-cherry-pick-from-git.csh Fri Jul 25 15:23:49 2014 (r271373) @@ -7,6 +7,7 @@ set svndir="/usr/data/source/svn/op/freebsd-base" git format-patch -o ${td} ${ver} +set git_branch=`git branch | awk '/\*/{print $2}'` cd ${svndir} @@ -26,7 +27,7 @@ echo "press ENTER to continue" $< set git_id=`sed -n -e '/From/s/From \([0-9a-f]*\) .*/\1/p' ${i}` - git --git-dir=${GIT_DIR} show --format="%s%n%n%b%ngit: https://github.com/opntr/opBSD/tree/op/gsoc2014/kpatch" -s ${git_id} > /tmp/svn-commit-message-${git_id}.txt + git --git-dir=${GIT_DIR} show --format="%s%n%n%b%ngit: https://github.com/opntr/opBSD/tree/${git_branch}" -s ${git_id} > /tmp/svn-commit-message-${git_id}.txt echo cat /tmp/svn-commit-message-${git_id}.txt echo "press ENTER to continue" From owner-svn-soc-all@FreeBSD.ORG Fri Jul 25 15:25:23 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DA9A41A2 for ; Fri, 25 Jul 2014 15:25:23 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C77FC2D6C for ; Fri, 25 Jul 2014 15:25:23 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6PFPNZ2043688 for ; Fri, 25 Jul 2014 15:25:23 GMT (envelope-from op@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s6PFPNSV043418 for svn-soc-all@FreeBSD.org; Fri, 25 Jul 2014 15:25:23 GMT (envelope-from op@FreeBSD.org) Date: Fri, 25 Jul 2014 15:25:23 GMT Message-Id: <201407251525.s6PFPNSV043418@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to op@FreeBSD.org using -f From: op@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r271374 - soc2014/op/freebsd-base/sys/amd64/amd64 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jul 2014 15:25:23 -0000 Author: op Date: Fri Jul 25 15:25:22 2014 New Revision: 271374 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271374 Log: SMAP: change enable to enabled in warning message Signed-off-by: Oliver Pinter git: https://github.com/opntr/opBSD/tree/op/gsoc2014/smap+kpatch Modified: soc2014/op/freebsd-base/sys/amd64/amd64/pmap.c Modified: soc2014/op/freebsd-base/sys/amd64/amd64/pmap.c ============================================================================== --- soc2014/op/freebsd-base/sys/amd64/amd64/pmap.c Fri Jul 25 15:23:49 2014 (r271373) +++ soc2014/op/freebsd-base/sys/amd64/amd64/pmap.c Fri Jul 25 15:25:22 2014 (r271374) @@ -836,7 +836,7 @@ load_cr4(rcr4() | CR4_SMEP); if (cpu_stdext_feature & CPUID_STDEXT_SMAP) { - printf("Intel SMAP: enable\n"); + printf("Intel SMAP: enabled\n"); load_cr4(rcr4() | CR4_SMAP); } else { printf("Intel SMAP: not supported or disabled\n"); From owner-svn-soc-all@FreeBSD.ORG Fri Jul 25 15:35:52 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 530E5325 for ; Fri, 25 Jul 2014 15:35:52 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 401772E7C for ; Fri, 25 Jul 2014 15:35:52 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6PFZqeu048411 for ; Fri, 25 Jul 2014 15:35:52 GMT (envelope-from op@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s6PFZpuR048299 for svn-soc-all@FreeBSD.org; Fri, 25 Jul 2014 15:35:51 GMT (envelope-from op@FreeBSD.org) Date: Fri, 25 Jul 2014 15:35:51 GMT Message-Id: <201407251535.s6PFZpuR048299@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to op@FreeBSD.org using -f From: op@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r271375 - soc2014/op/freebsd-base/sys/kern MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jul 2014 15:35:52 -0000 Author: op Date: Fri Jul 25 15:35:51 2014 New Revision: 271375 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271375 Log: KSP: added debug output Signed-off-by: Oliver Pinter git: https://github.com/opntr/opBSD/tree/op/gsoc2014/smap+kpatch Modified: soc2014/op/freebsd-base/sys/kern/kern_selfpatch.c Modified: soc2014/op/freebsd-base/sys/kern/kern_selfpatch.c ============================================================================== --- soc2014/op/freebsd-base/sys/kern/kern_selfpatch.c Fri Jul 25 15:25:22 2014 (r271374) +++ soc2014/op/freebsd-base/sys/kern/kern_selfpatch.c Fri Jul 25 15:35:51 2014 (r271375) @@ -169,8 +169,11 @@ DBG("patch size: %d\n", p->patch_size); DBG("comment: %s\n", p->comment); - if (!lf_selfpatch_patch_needed(p)) + if (!lf_selfpatch_patch_needed(p)) { + DBG("not needed.\n"); + return; + } KASSERT(p->patch_size == p->patchable_size, ("%s: patch_size != patchable_size", __func__)); From owner-svn-soc-all@FreeBSD.ORG Fri Jul 25 15:40:50 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2C551753 for ; Fri, 25 Jul 2014 15:40:50 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 19E652F46 for ; Fri, 25 Jul 2014 15:40:50 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6PFenwQ004511 for ; Fri, 25 Jul 2014 15:40:49 GMT (envelope-from op@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s6PFenhN004387 for svn-soc-all@FreeBSD.org; Fri, 25 Jul 2014 15:40:49 GMT (envelope-from op@FreeBSD.org) Date: Fri, 25 Jul 2014 15:40:49 GMT Message-Id: <201407251540.s6PFenhN004387@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to op@FreeBSD.org using -f From: op@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r271376 - soc2014/op/freebsd-base/sys/kern MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jul 2014 15:40:50 -0000 Author: op Date: Fri Jul 25 15:40:49 2014 New Revision: 271376 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271376 Log: KSP: convert KASSERT to panic Signed-off-by: Oliver Pinter git: https://github.com/opntr/opBSD/tree/op/gsoc2014/smap+kpatch Modified: soc2014/op/freebsd-base/sys/kern/kern_selfpatch.c Modified: soc2014/op/freebsd-base/sys/kern/kern_selfpatch.c ============================================================================== --- soc2014/op/freebsd-base/sys/kern/kern_selfpatch.c Fri Jul 25 15:35:51 2014 (r271375) +++ soc2014/op/freebsd-base/sys/kern/kern_selfpatch.c Fri Jul 25 15:40:49 2014 (r271376) @@ -175,8 +175,8 @@ return; } - KASSERT(p->patch_size == p->patchable_size, - ("%s: patch_size != patchable_size", __func__)); + if (p->patch_size != p->patchable_size) + panic("%s: patch_size != patchable_size", __func__); page_offset = (vm_offset_t)p->patchable & (vm_offset_t)PAGE_MASK; page_number = (p->patchable_size >> PAGE_SHIFT) + From owner-svn-soc-all@FreeBSD.ORG Fri Jul 25 19:10:31 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 29504CEF for ; Fri, 25 Jul 2014 19:10:31 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 145A222F5 for ; Fri, 25 Jul 2014 19:10:31 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6PJAU5P063352 for ; Fri, 25 Jul 2014 19:10:30 GMT (envelope-from op@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s6PJATrg063097 for svn-soc-all@FreeBSD.org; Fri, 25 Jul 2014 19:10:29 GMT (envelope-from op@FreeBSD.org) Date: Fri, 25 Jul 2014 19:10:29 GMT Message-Id: <201407251910.s6PJATrg063097@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to op@FreeBSD.org using -f From: op@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r271381 - in soc2014/op/freebsd-base/sys: amd64/amd64 kern sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jul 2014 19:10:31 -0000 Author: op Date: Fri Jul 25 19:10:29 2014 New Revision: 271381 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271381 Log: KSP: fix module patching in preloaded case Signed-off-by: Oliver Pinter git: https://github.com/opntr/opBSD/tree/op/gsoc2014/smap+kpatch Modified: soc2014/op/freebsd-base/sys/amd64/amd64/machdep.c soc2014/op/freebsd-base/sys/kern/kern_linker.c soc2014/op/freebsd-base/sys/kern/kern_selfpatch.c soc2014/op/freebsd-base/sys/sys/selfpatch.h Modified: soc2014/op/freebsd-base/sys/amd64/amd64/machdep.c ============================================================================== --- soc2014/op/freebsd-base/sys/amd64/amd64/machdep.c Fri Jul 25 18:41:56 2014 (r271380) +++ soc2014/op/freebsd-base/sys/amd64/amd64/machdep.c Fri Jul 25 19:10:29 2014 (r271381) @@ -2000,7 +2000,7 @@ initializecpucache(); /* selfmodify kernel text, when needed */ - lf_selfpatch(linker_kernel_file); + lf_selfpatch(linker_kernel_file, 0); /* doublefault stack space, runs on ist1 */ common_tss[0].tss_ist1 = (long)&dblfault_stack[sizeof(dblfault_stack)]; Modified: soc2014/op/freebsd-base/sys/kern/kern_linker.c ============================================================================== --- soc2014/op/freebsd-base/sys/kern/kern_linker.c Fri Jul 25 18:41:56 2014 (r271380) +++ soc2014/op/freebsd-base/sys/kern/kern_linker.c Fri Jul 25 19:10:29 2014 (r271381) @@ -421,7 +421,7 @@ return (error); } modules = !TAILQ_EMPTY(&lf->modules); - lf_selfpatch(lf); + lf_selfpatch(lf, 0); linker_file_register_sysctls(lf); linker_file_sysinit(lf); lf->flags |= LINKER_FILE_LINKED; @@ -1609,9 +1609,9 @@ lf->filename); goto fail; } - /* XXXOP - linker_kernel_file double patched?*/ - lf_selfpatch(lf); linker_file_register_modules(lf); + /* XXXOP */ + lf_selfpatch(lf, KSP_PRELOAD); if (linker_file_lookup_set(lf, "sysinit_set", &si_start, &si_stop, NULL) == 0) sysinit_add(si_start, si_stop); Modified: soc2014/op/freebsd-base/sys/kern/kern_selfpatch.c ============================================================================== --- soc2014/op/freebsd-base/sys/kern/kern_selfpatch.c Fri Jul 25 18:41:56 2014 (r271380) +++ soc2014/op/freebsd-base/sys/kern/kern_selfpatch.c Fri Jul 25 19:10:29 2014 (r271381) @@ -116,11 +116,13 @@ } void -lf_selfpatch(linker_file_t lf) +lf_selfpatch(linker_file_t lf, int preload) { struct lf_selfpatch *patch, *start, *stop; int count, ret; + DBG("lf: %p %s\n", lf, preload ? "(preloaded)" : ""); + if (lf != NULL) { DBG("module: %s\n", lf->filename); ret = linker_file_lookup_set(lf, "selfpatch_set", &start, &stop, NULL); @@ -141,7 +143,10 @@ for (patch = start; patch != stop; patch++) { DBG("apply: %p\n", patch); - lf_selfpatch_apply(lf, patch); + if (preload == KSP_PRELOAD) + lf_selfpatch_apply_preload(lf, patch); + else + lf_selfpatch_apply(lf, patch); } /* @@ -217,6 +222,31 @@ #endif } +void +lf_selfpatch_apply_preload(linker_file_t lf, struct lf_selfpatch *p) +{ + + DBG("patchable: %p\n", p->patchable); + DBG("patch: %p\n", p->patch); + DBG("feature selector: %d\n", p->feature_selector); + DBG("feature: %d\n", p->feature); + DBG("patchable size: %d\n", p->patchable_size); + DBG("patch size: %d\n", p->patch_size); + DBG("comment: %s\n", p->comment); + + if (!lf_selfpatch_patch_needed(p)) { + DBG("not needed.\n"); + + return; + } + + if (p->patch_size != p->patchable_size) + panic("%s: patch_size != patchable_size", __func__); + + memcpy(p->patchable, p->patch, p->patchable_size); + + DBG("patched.\n"); +} __noinline void lf_selfpatch_selftest(void) Modified: soc2014/op/freebsd-base/sys/sys/selfpatch.h ============================================================================== --- soc2014/op/freebsd-base/sys/sys/selfpatch.h Fri Jul 25 18:41:56 2014 (r271380) +++ soc2014/op/freebsd-base/sys/sys/selfpatch.h Fri Jul 25 19:10:29 2014 (r271381) @@ -29,11 +29,14 @@ #ifndef __SELFPATH_H__ #define __SELFPATH_H__ +#include + #define KSP_SELFTEST 0 #define KSP_FEATURE_SELFTEST 1 #include -#include + +#define KSP_PRELOAD 1 struct linker_file_t; @@ -49,7 +52,8 @@ extern char *selfpatch_nop_table[]; -void lf_selfpatch(linker_file_t lf); +void lf_selfpatch(linker_file_t lf, int preload); void lf_selfpatch_apply(linker_file_t lf, struct lf_selfpatch *patch); +void lf_selfpatch_apply_preload(linker_file_t lf, struct lf_selfpatch *patch); #endif /* __SELFPATH_H__ */ From owner-svn-soc-all@FreeBSD.ORG Sat Jul 26 00:02:33 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 649C2DAE for ; Sat, 26 Jul 2014 00:02:33 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 504202D50 for ; Sat, 26 Jul 2014 00:02:33 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6Q02XMF041332 for ; Sat, 26 Jul 2014 00:02:33 GMT (envelope-from pedrosouza@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s6Q02WA3041133 for svn-soc-all@FreeBSD.org; Sat, 26 Jul 2014 00:02:32 GMT (envelope-from pedrosouza@FreeBSD.org) Date: Sat, 26 Jul 2014 00:02:32 GMT Message-Id: <201407260002.s6Q02WA3041133@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to pedrosouza@FreeBSD.org using -f From: pedrosouza@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r271394 - soc2014/pedrosouza/lua_loader/head/sys/boot/lua MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Jul 2014 00:02:33 -0000 Author: pedrosouza Date: Sat Jul 26 00:02:32 2014 New Revision: 271394 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=271394 Log: Improve kernel loading to match .4th script Modified: soc2014/pedrosouza/lua_loader/head/sys/boot/lua/config.lua soc2014/pedrosouza/lua_loader/head/sys/boot/lua/lutils.c Modified: soc2014/pedrosouza/lua_loader/head/sys/boot/lua/config.lua ============================================================================== --- soc2014/pedrosouza/lua_loader/head/sys/boot/lua/config.lua Fri Jul 25 23:52:53 2014 (r271393) +++ soc2014/pedrosouza/lua_loader/head/sys/boot/lua/config.lua Sat Jul 26 00:02:32 2014 (r271394) @@ -166,9 +166,10 @@ function config.loadkernel() local flags = loader.getenv("kernel_options") or ""; - + local kernel = loader.getenv("kernel"); - local doload = function (names) + + local try_load = function (names) for name in names:gmatch("([^;]+)%s*;?") do r = loader.perform("load "..flags.." "..name); if r == 0 then @@ -178,19 +179,59 @@ return nil; end; - local envs = {"bootfile", "kernel"}; + local load_bootfile = function() + local bootfile = loader.getenv("bootfile"); + local res = nil; + if bootfile ~= nil then + return try_load(bootfile); + end + print("Kernel loading failed: null bootfile!\n"); + return nil; + end; - for k, v in pairs(envs) do - local names = loader.getenv(v) or ""; - local ret = doload(names); - if ret ~= nil then - print("Kernel '"..ret.."' loaded!\n"); + -- kernel not set, try load from default module_path + if kernel == nil then + local res = load_bootfile(); + + if res ~= nil then + return true; + else + print("Failed to load kernel '"..res.."'\n"); + return false; + end + else + local module_path = loader.getenv("module_path"); + local res = nil; + + -- first try load kernel with module_path = /boot/${kernel} + -- then try load with module_path=${kernel} + local paths = {"/boot/"..kernel, kernel}; + + for k,v in pairs(paths) do + + loader.perform("set module_path="..v); + res = load_bootfile(); + + -- succeeded add path to module_path + if res ~= nil then + loader.perform("set module_path="..v..";"..module_path); + return true; + end + end + + -- failed to load with ${kernel} as a directory + -- try as a file + res = try_load(kernel); + if res ~= nil then return true; + else + print("Failed to load kernel '"..res.."'\n"); + return false; end end - return false; end + function config.load(file) if not file then file = "/boot/defaults/loader.conf"; end Modified: soc2014/pedrosouza/lua_loader/head/sys/boot/lua/lutils.c ============================================================================== --- soc2014/pedrosouza/lua_loader/head/sys/boot/lua/lutils.c Fri Jul 25 23:52:53 2014 (r271393) +++ soc2014/pedrosouza/lua_loader/head/sys/boot/lua/lutils.c Sat Jul 26 00:02:32 2014 (r271394) @@ -343,4 +343,4 @@ } ++f; } -} +} \ No newline at end of file