message
stringlengths
6
474
diff
stringlengths
8
5.22k
LPC55xx: fix validate_bin_nvic_base().
@@ -41,7 +41,7 @@ uint8_t validate_bin_nvic(const uint8_t *buf) uint8_t validate_bin_nvic_base(const uint8_t *buf) { - if (!g_board_info.target_cfg) { + if (g_board_info.target_cfg) { uint32_t i = 4, nvic_val = 0; uint8_t in_range = 0; // test the initial SP value
examples/buttons: fix strange code in buttons_main
@@ -143,7 +143,7 @@ static bool g_button_daemon_started; static int button_daemon(int argc, char *argv[]) { #ifdef CONFIG_EXAMPLES_BUTTONS_POLL - struct pollfd fds[CONFIG_INPUT_BUTTONS_NPOLLWAITERS]; + struct pollfd fds[1]; #endif #ifdef CONFIG_EXAMPLES_BUTTONS_SIGNAL @@ -232,7 +232,6 @@ static int button_daemon(int argc, char *argv[]) #ifdef CONFIG_EXAMPLES_BUTTONS_POLL bool timeout; - bool pollin; int nbytes; #endif @@ -256,17 +255,14 @@ static int button_daemon(int argc, char *argv[]) #ifdef CONFIG_EXAMPLES_BUTTONS_POLL /* Prepare the File Descriptor for poll */ - memset(fds, 0, - sizeof(struct pollfd)*CONFIG_INPUT_BUTTONS_NPOLLWAITERS); + memset(fds, 0, sizeof(fds)); fds[0].fd = fd; fds[0].events = POLLIN; timeout = false; - pollin = false; - ret = poll(fds, CONFIG_INPUT_BUTTONS_NPOLLWAITERS, - CONFIG_INPUT_BUTTONS_POLL_DELAY); + ret = poll(fds, 1, CONFIG_INPUT_BUTTONS_POLL_DELAY); printf("\nbutton_daemon: poll returned: %d\n", ret); if (ret < 0) @@ -283,34 +279,25 @@ static int button_daemon(int argc, char *argv[]) { printf("button_daemon: ERROR poll reported: %d\n", errno); } - else - { - pollin = true; - } /* In any event, read until the pipe is empty */ - for (i = 0; i < CONFIG_INPUT_BUTTONS_NPOLLWAITERS; i++) - { do { - nbytes = read(fds[i].fd, (void *)&sample, - sizeof(btn_buttonset_t)); + nbytes = read(fds[0].fd, (void *)&sample, sizeof(btn_buttonset_t)); if (nbytes <= 0) { if (nbytes == 0 || errno == EAGAIN) { - if ((fds[i].revents & POLLIN) != 0) + if ((fds[0].revents & POLLIN) != 0) { - printf("button_daemon: ERROR no read data[%d]\n", - i); + printf("button_daemon: ERROR no read data\n"); } } else if (errno != EINTR) { - printf("button_daemon: read[%d] failed: %d\n", i, - errno); + printf("button_daemon: read failed: %d\n", errno); } nbytes = 0; @@ -320,7 +307,7 @@ static int button_daemon(int argc, char *argv[]) if (timeout) { printf("button_daemon: ERROR? Poll timeout, " - "but data read[%d]\n", i); + "but data read\n"); printf(" (might just be a race " "condition)\n"); } @@ -330,10 +317,9 @@ static int button_daemon(int argc, char *argv[]) * through */ - fds[i].revents = 0; + fds[0].revents = 0; } while (nbytes > 0); - } #endif #ifdef CONFIG_EXAMPLES_BUTTONS_NAMES
chip/mchp/pwm.c: Format with clang-format BRANCH=none TEST=none
@@ -23,15 +23,9 @@ static uint32_t pwm_keep_awake_mask; /* Table of PWM PCR sleep enable register index and bit position. */ static const uint16_t pwm_pcr[] = { - MCHP_PCR_PWM0, - MCHP_PCR_PWM1, - MCHP_PCR_PWM2, - MCHP_PCR_PWM3, - MCHP_PCR_PWM4, - MCHP_PCR_PWM5, - MCHP_PCR_PWM6, - MCHP_PCR_PWM7, - MCHP_PCR_PWM8, + MCHP_PCR_PWM0, MCHP_PCR_PWM1, MCHP_PCR_PWM2, + MCHP_PCR_PWM3, MCHP_PCR_PWM4, MCHP_PCR_PWM5, + MCHP_PCR_PWM6, MCHP_PCR_PWM7, MCHP_PCR_PWM8, }; BUILD_ASSERT(ARRAY_SIZE(pwm_pcr) == MCHP_PWM_ID_MAX); @@ -90,8 +84,8 @@ void pwm_keep_awake(void) static void pwm_configure(int ch, int active_low, int clock_low) { MCHP_PWM_CFG(ch) = (15 << 3) /* divider = 16 */ - | (active_low ? BIT(2) : 0) - | (clock_low ? BIT(1) : 0); + | (active_low ? BIT(2) : 0) | + (clock_low ? BIT(1) : 0); } static void pwm_slp_en(int pwm_id, int sleep_en)
netutils/netlib/netlib_getdevs.c: Add comments and a placeholder for the RTM_NEWROUTE response.
@@ -203,10 +203,14 @@ ssize_t netlib_get_devices(FAR struct netlib_device_s *devlist, switch (resp.hdr.nlmsg_type) { + /* NLMSG_DONE means that the entire list of devices has been returned */ + case NLMSG_DONE: enddump = true; break; + /* RTM_NEWLINK provides information about one device */ + case RTM_NEWLINK: { FAR struct rtattr *attr; @@ -252,6 +256,17 @@ ssize_t netlib_get_devices(FAR struct netlib_device_s *devlist, } break; + /* RTM_NEWROUTE provides routing information for the device + * (address, gateway, etc.) + */ + + case RTM_NEWROUTE: + { + fprintf(stderr, "WARNING: RTM_NEWLINK Message type not " + "implemented\n"); + } + break; + default: fprintf(stderr, "ERROR: Message type %u, length %lu\n", resp.hdr.nlmsg_type, (unsigned long)resp.hdr.nlmsg_len);
spresense: fix setup processed flag
@@ -329,6 +329,7 @@ bool dcd_edpt_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t *buffer, uint16_t to { if (total_bytes == 0) { + usbdcd_driver.setup_processed = true; dcd_event_xfer_complete(0, ep_addr, 0, XFER_RESULT_SUCCESS, false); } else if (ep_addr == 0x00 && total_bytes == usbdcd_driver.outlen) @@ -350,14 +351,17 @@ bool dcd_edpt_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t *buffer, uint16_t to } } - usbdcd_driver.setup_processed = true; struct usb_ctrlreq_s ctrl; + if (usbdcd_driver.setup_processed) + { if (osal_queue_receive(usbdcd_driver.setup_queue, &ctrl)) { + usbdcd_driver.setup_processed = false; dcd_event_setup_received(0, (uint8_t *)&ctrl, false); } } + } else { usbdcd_driver.req[epnum]->len = total_bytes;
virtio: update FEATURE.yaml to include description for vhost-user Add features supported by vhost-user Type: docs
--- name: Virtio PCI Device -maintainer: Mohsin Kazmi <[email protected]> +maintainer: [email protected] [email protected] features: - - connection to the emulated pci interface presented to vpp from + - driver mode to emulate PCI interface presented to VPP from the host interface. -description: "Create a virtio-backed PCI device interface" + - device mode to emulate vhost-user interface presented to VPP from the + guest VM. + - support multi-queue, GSO, checksum offload, indirect descriptor, + and jumbo frame. +description: "Virtio v1.0 implementation" missing: - API dump filtering by sw_if_index state: production
common: adc: Add units to the ADC reading output Improved readability for people newly looking at these values. BRANCH=none TEST=build/flash volteer and run adc command.
@@ -38,7 +38,7 @@ static int print_one_adc(int channel) v = adc_read_channel(channel); if (v == ADC_READ_ERROR) return EC_ERROR_UNKNOWN; - ccprintf(" %s = %d\n", adc_channels[channel].name, v); + ccprintf(" %s = %d mV\n", adc_channels[channel].name, v); return EC_SUCCESS; }
Spill rather than compact tiny interior nodes to avoid asserts in the cn tree management logic...
#include "cn_tree_internal.h" #include "kvset.h" -#define SIZE_128MIB ((size_t)128 << 20) #define SIZE_1GIB ((size_t)1 << 30) /* The bonus count limits bonus work (scatter and idle) @@ -145,7 +144,6 @@ sp3_work_estimate(struct cn_compaction_work *w, uint internal_children, uint lea static uint sp3_work_ispill_find_kvsets(struct sp3_node *spn, uint n_max, struct kvset_list_entry **mark) { - struct list_head * head; uint n_kvsets; struct kvset_list_entry *le; struct cn_tree_node * tn; @@ -154,10 +152,7 @@ sp3_work_ispill_find_kvsets(struct sp3_node *spn, uint n_max, struct kvset_list_ tn = spn2tn(spn); /* walk from tail (oldest), skip kvsets that are busy */ - head = &tn->tn_kvset_list; - for (le = list_last_entry(head, typeof(*le), le_link); &le->le_link != head; - le = list_prev_entry(le, le_link)) { - + list_for_each_entry_reverse(le, &tn->tn_kvset_list, le_link) { if (kvset_get_workid(le->le_kvset) == 0) { *mark = le; break; @@ -170,9 +165,7 @@ sp3_work_ispill_find_kvsets(struct sp3_node *spn, uint n_max, struct kvset_list_ n_kvsets = 1; /* look for sequence of non-busy kvsets */ - for (le = list_prev_entry(le, le_link); &le->le_link != head; - le = list_prev_entry(le, le_link)) { - + while ((le = list_prev_entry_or_null(le, le_link, &tn->tn_kvset_list))) { if (n_kvsets == n_max) break; @@ -228,19 +221,15 @@ sp3_work_ispill( cn_node_stats_get(tn, &stats); clen = cn_ns_clen(&stats); - if (clen < SIZE_128MIB) { - if (cnt < cnt_min) - return 0; - - /* Don't let tiny interior nodes grow too long, they might - * never be large enough to spill. + /* Resist spilling tiny interior nodes, but don't let them grow too long. + * The downside here is that with a fanout of 16 we may potentially spill + * 8 tiny kvsets into 16 very tiny kvsets, worsening as we spill down the + * tree. In this case it is probably better to kv-compact. Unfortunately, + * the scheduler logic currently does not permit interior node compaction. */ - *action = CN_ACTION_COMPACT_KV; - *rule = CN_CR_ILONG_LW; - return cnt; - } else if (clen < SIZE_1GIB) { + if (clen < SIZE_1GIB) { *rule = CN_CR_SPILL_TINY; - return cnt; + return (cnt < cnt_max) ? 0 : cnt; } else if (kvset_get_compc((*mark)->le_kvset) > 1) { *rule = CN_CR_SPILL_ONE; return 1;
Platform for coordinated changes to type system.
:::: /sys/hoon :: :: :: =< ride -=> %143 => +=> %142 => :: :: :::: 0: version stub :: :: :: -~% %k.143 ~ ~ :: +~% %k.142 ~ ~ :: |% -++ hoon-version + +++ hoon-version 142 -- => ~% %one + ~ :> # %base :> # %math :> unsigned arithmetic +| +++ foo-142 !! ++ add ~/ %add :> unsigned addition :: ~% %two + ~ |% +++ foo-142 !! :: :: :::: 2a: unit logic :: :: :: :: :: ~% %tri + ~ |% +++ foo-142 !! :: :::: 3a: signed and modular ints :: :: :: :: :::: 4a: exotic bases :: +++ foo-142 !! ++ po :: phonetic base ~/ %po =+ :- ^= sis :: prefix syllables :: :::: 5aa: new partial nock interpreter :: +++ foo-142 !! ++ musk !. :: nock with block set |% ++ abet
fskmodem/autotest: printing function information if verbose
@@ -28,6 +28,9 @@ void fskmodem_test_mod_demod(unsigned int _m, unsigned int _k, float _bandwidth) { + if (liquid_autotest_verbose) + printf("fskmodem_test_mod_demod(m=%u, k=%u, bandwidth=%g)\n", _m, _k, _bandwidth); + // create modulator/demodulator pair fskmod mod = fskmod_create(_m,_k,_bandwidth); fskdem dem = fskdem_create(_m,_k,_bandwidth);
tup: rm cc override;
config = { - cc = false, - cxx = false, target = 'native', debug = true, optimize = false, @@ -51,7 +49,6 @@ config = { } -- config notes: --- cc and cxx are the C/C++ compilers to use, or false to use the default ones -- target can be native or win32/macos/linux/android/wasm -- supercharge adds dangerous/aggressive optimizations that may reduce stability -- sanitize adds checks for memory leaks and undefined behavior (reduces performance) @@ -84,6 +81,8 @@ merge(config) ---> setup +cc = 'clang' +cxx = 'clang++' host = tup.getconfig('TUP_PLATFORM'):gsub('macosx', 'macos') target = config.target == 'native' and host or config.target @@ -116,8 +115,6 @@ lflags += config.optimize and (target == 'macos' and '-Wl,-dead_strip' or '-Wl,- lflags += '-rdynamic' if target == 'win32' then - cc = config.cc or 'clang' - cxx = config.cxx or 'clang++' cflags += '-D_CRT_SECURE_NO_WARNINGS' cflags += '-DWINVER=0x0600' -- Vista cflags += '-D_WIN32_WINNT=0x0600' @@ -132,8 +129,6 @@ if target == 'win32' then end if target == 'macos' then - cc = config.cc or 'clang' - cxx = config.cxx or 'clang++' cflags_os_macos += '-xobjective-c' lflags += '-Wl,-rpath,@executable_path' lflags += '-lobjc' @@ -141,8 +136,6 @@ if target == 'macos' then end if target == 'linux' then - cc = config.cc or 'clang' - cxx = config.cxx or 'clang++' cflags += '-D_POSIX_C_SOURCE=200809L' cflags += '-D_DEFAULT_SOURCE' lflags += '-lm -lpthread -ldl' @@ -150,8 +143,6 @@ if target == 'linux' then end if target == 'wasm' then - cc = config.cc or 'emcc' - cxx = config.cxx or 'em++' cflags += '-std=gnu11' cflags += '-D_POSIX_C_SOURCE=200809L' lflags += '-s FORCE_FILESYSTEM' @@ -176,8 +167,8 @@ end if target == 'android' then assert(config.headsets.openxr, 'You probably want to enable OpenXR') hosts = { win32 = 'windows-x86_64', macos = 'darwin-x86_64', linux = 'linux-x86_64' } - cc = config.cc or ('%s/toolchains/llvm/prebuilt/%s/bin/clang'):format(config.android.ndk, hosts[host]) - cxx = config.cxx or (cc .. '++') + cc = ('%s/toolchains/llvm/prebuilt/%s/bin/clang'):format(config.android.ndk, hosts[host]) + cxx = cc .. '++' flags += '--target=aarch64-linux-android' .. config.android.version flags += config.debug and '-funwind-tables' or '' cflags += '-D_POSIX_C_SOURCE=200809L'
shim/runtime: Clean up unused remote attestation codes in service.go
@@ -367,20 +367,11 @@ func (s *service) Create(ctx context.Context, r *taskAPI.CreateTaskRequest) (_ * v, err := typeurl.UnmarshalAny(r.Options) if err != nil { logrus.Errorf("Get rune options error: %v", err) - } - if err != nil { return nil, err } opts = *v.(*options.Options) } - //result := make(chan bool, 1) - // start remote attestation - if opts.BinaryName == constants.RuneOCIRuntime { - logrus.Infof("Attestation Start") - //go attestation.Attestation_main(ctx, result) - } - ns, err := namespaces.NamespaceRequired(ctx) if err != nil { return nil, err @@ -417,15 +408,6 @@ func (s *service) Create(ctx context.Context, r *taskAPI.CreateTaskRequest) (_ * logrus.Infof("TaskCreate sent: %s %d", r.ID, container.Pid()) - if opts.BinaryName == constants.RuneOCIRuntime { - //// judge remote attestation result - //switch <-result { - //case true: - // log.G(ctx).Infof("Attestation Success!") - //case false: - // log.G(ctx).Infof("Attestation Failed!") - //} - } logrus.Debugf("Create: total time cost: %d", (time.Now().Sub(timeStart))/time.Second) logrus.Debugf("Create: total time cost: %d", (time.Now().Sub(ts))/time.Second) return &taskAPI.CreateTaskResponse{
enclave-tls/README: add the description of error messages occurring on non-sgx enviroment In non-sgx environment, when running the command "enclave-tls-client -a sgx_ecdsa", some error info will be printed, but it can be ignored and has no impact on final attestation result. Fixes:
@@ -35,7 +35,7 @@ make install `{enclave-tls-server,enclave-tls-client}` will be installed to `/opt/enclave-tls/bin/{enclave-tls-server,enclave-tls-client}` on your system. All instances are placed in `/opt/enclave-tls/lib`. -If you want to build instances related to sgx(wolfssl\_sgx, sgx\_ecdsa, sgx\_la, wolfcrypt\_sgx), please type the following command. +If you want to build instances related to sgx(wolfssl\_sgx, sgx\_ecdsa, sgx\_ecdsa\_qve, sgx\_la, wolfcrypt\_sgx), please type the following command. ```shell make SGX=1 @@ -48,10 +48,10 @@ Note that [SGX LVI mitigation](https://software.intel.com/security-software-guid Right now, Enclave TLS supports the following instance types: | Priority | Tls Wrapper instances | Encalve Quote instances | Crypto Wrapper Instance | -| -------- | --------------------- | ----------------------- | ----------------------- | +| -------- | --------------------- | -------------------------- | ----------------------- | | low | nulltls | nullquote | nullcrypto | | Medium | wolfssl | sgx\_la | wolfcrypt | -| High | wolfssl\_sgx | sgx\_ecdsa | wolfcrypt\_sgx | +| High | wolfssl\_sgx | sgx\_ecdsa sgx\_ecdsa\_qve | wolfcrypt\_sgx | By default, Enclave TLS will select the **highest priority** instance to use. @@ -92,6 +92,7 @@ For example: ./enclave-tls-server --tls wolfssl ./enclave-tls-server --tls wolfssl_sgx ./enclave-tls-server --attester sgx_ecdsa +./enclave-tls-server --attester sgx_ecdsa_qve ./enclave-tls-server --attester sgx_la ./enclave-tls-server run --crypto wolfcrypt ``` @@ -128,3 +129,13 @@ In the early bootstrap of enclave-tls, the debug message is mute by default. In ## Occlum LibOS Please refer to [this guide](docs/run_enclave_tls_with_occlum.md) to run Enclave Tls with [Occlum](https://github.com/occlum/occlum) and [rune](https://github.com/alibaba/inclavare-containers/tree/master/rune). + +## Non-SGX Enviroment + +In non-sgx enviroment, it's possible to show the error messages as below when running the command `./enclave-tls-client --attester sgx_ecdsa`. According to Intel DCAP's implementation, when calling to sgx_qv_get_quote_supplemental_data_size(), +if the libsgx_urts library is present, it will try to load QvE firstly. If failed, the verification will be launched by QVL. So the error info can be ignored and have no impact on the final attestation result. + +``` +[load_qve ../sgx_dcap_quoteverify.cpp:209] Error, call sgx_create_enclave for QvE fail [load_qve], SGXError:2006. +[sgx_qv_get_quote_supplemental_data_size ../sgx_dcap_quoteverify.cpp:527] Error, failed to load QvE. +```
[numerics] update naming with last commit
@@ -234,7 +234,7 @@ static int test_CSparseMatrix_spsolve_unit(CSparseMatrix *M ) CSparseMatrix_factors* cs_lu_M = (CSparseMatrix_factors*) malloc(sizeof(CSparseMatrix_factors)); - int info = 1-CSparsematrix_lu_factorization(1, M, 1e-14, cs_lu_M); + int info = 1-CSparseMatrix_lu_factorization(1, M, 1e-14, cs_lu_M); if (info) { @@ -271,12 +271,13 @@ static int test_CSparseMatrix_spsolve_unit(CSparseMatrix *M ) } + static int test_CSparseMatrix_spsolve(void) { CSparseMatrix *m_triplet = cs_spalloc(3,3,3,1,1); /* coo format */ - CS_INT info1 = 1-cs_entry(m_triplet, 0, 0, 1.0); - CS_INT info2 = 1-cs_entry(m_triplet, 1, 1, 2.0); - CS_INT info3 = 1-cs_entry(m_triplet, 2, 2, 4.0); + cs_entry(m_triplet, 0, 0, 1.0); + cs_entry(m_triplet, 1, 1, 2.0); + cs_entry(m_triplet, 2, 2, 4.0); // CS_INT info4 = 1-cs_print(m_triplet, 0); CSparseMatrix *M = cs_compress(m_triplet);
Tiny OOM fix
@@ -215,6 +215,8 @@ redisSSLContext *redisCreateSSLContext(const char *cacert_filename, const char * const char *server_name, redisSSLContextError *error) { redisSSLContext *ctx = hi_calloc(1, sizeof(redisSSLContext)); + if (ctx == NULL) + goto error; ctx->ssl_ctx = SSL_CTX_new(SSLv23_client_method()); if (!ctx->ssl_ctx) {
Fix translate_columns[] arrays in opfamily-related psql functions Make number of translate_columns elements match the number of output columns. The only "true" value, which was previously specified, seems to be intended for opfamily operator "purpose" column. But that column has already translated values substituted. So, all elements in translate_columns[] should be "false".
@@ -6060,8 +6060,7 @@ listOperatorClasses(const char *access_method_pattern, PGresult *res; printQueryOpt myopt = pset.popt; bool have_where = false; - static const bool translate_columns[] = {false, false, false, false, false, - false, false, false}; + static const bool translate_columns[] = {false, false, false, false, false, false, false}; initPQExpBuffer(&buf); @@ -6149,8 +6148,7 @@ listOperatorFamilies(const char *access_method_pattern, PGresult *res; printQueryOpt myopt = pset.popt; bool have_where = false; - static const bool translate_columns[] = {false, false, false, false, false, - false, false, false}; + static const bool translate_columns[] = {false, false, false, false}; initPQExpBuffer(&buf); @@ -6230,8 +6228,7 @@ listOpFamilyOperators(const char *access_method_pattern, printQueryOpt myopt = pset.popt; bool have_where = false; - static const bool translate_columns[] = {false, false, false, false, false, - false, false, true, false}; + static const bool translate_columns[] = {false, false, false, false, false, false}; initPQExpBuffer(&buf); @@ -6326,7 +6323,7 @@ listOpFamilyProcedures(const char *access_method_pattern, PGresult *res; printQueryOpt myopt = pset.popt; bool have_where = false; - static const bool translate_columns[] = {false, false, false, false, false, false, false}; + static const bool translate_columns[] = {false, false, false, false, false, false}; initPQExpBuffer(&buf);
[core] clarify error message in gw_backend.c clarify error message in gw_backend.c if connect() to unix socket fails
@@ -489,7 +489,7 @@ static int gw_spawn_connection(gw_host * const host, gw_proc * const proc, log_e if (-1 == status && errno != ENOENT && proc->unixsocket) { log_perror(errh, __FILE__, __LINE__, - "unlink %s after connect failed", proc->unixsocket->ptr); + "connect %s", proc->unixsocket->ptr); unlink(proc->unixsocket->ptr); }
api: add prefix matcher typedef There is a need to be able to specifiy whether a prefix in a request is to match exactly or if more specific prefixes are also desired. Todo: Uncomment defaults, once supported in vppapigen. Type: feature
@@ -106,3 +106,14 @@ typedef ip4_prefix { vl_api_ip4_address_t address; u8 len; }; + +/** \brief A context for matching prefixes against. (Think ip prefix list.) + The meaning (exact match / want subnets) of an unset matcher is left to the implementer. + @param le - le mut be <= to prefix.len. Default: 255 (not set). + @param ge - ge must be greater than le and <= max_size of prefix. Default: 255 (not set). + +*/ +typedef prefix_matcher { + u8 le; /* [default=255] */ + u8 ge; /* [default=255] */ +};
jvpp: log error output of Java process on test failure helps troubleshooting JVpp test failures.
@@ -124,9 +124,12 @@ class TestJVpp(VppTestCase): out, err = self.process.communicate() self.logger.info("Process output : {0}{1}".format(os.linesep, out)) - self.logger.info("Process error output : {0}{1}" - .format(os.linesep, err)) - self.assert_equal(self.process.returncode, 0, "process return code") + + if self.process.returncode != 0: + raise Exception( + "Command {0} failed with return code: {1}.{2}" + "Process error output: {2}{3}" + .format(command, self.process.returncode, os.linesep, err)) def tearDown(self): self.logger.info("Tearing down jvpp test")
boot: Fix IS_ENCRYPTED macro definition The previous definition did not work as setting any type of flag would make IS_ENCRYPTED true.
@@ -149,8 +149,8 @@ struct image_tlv { uint16_t it_len; /* Data length (not including TLV header). */ }; -#define IS_ENCRYPTED(hdr) (((hdr)->ih_flags && IMAGE_F_ENCRYPTED_AES128) \ - || ((hdr)->ih_flags && IMAGE_F_ENCRYPTED_AES256)) +#define IS_ENCRYPTED(hdr) (((hdr)->ih_flags & IMAGE_F_ENCRYPTED_AES128) \ + || ((hdr)->ih_flags & IMAGE_F_ENCRYPTED_AES256)) #define MUST_DECRYPT(fap, idx, hdr) \ (flash_area_get_id(fap) == FLASH_AREA_IMAGE_SECONDARY(idx) && IS_ENCRYPTED(hdr))
enable OVERLAY_FS
@@ -9,7 +9,7 @@ diff -rupN old/linux-xlnx-xilinx-v2016.4/arch/arm/configs/xilinx_zynq_defconfig CONFIG_MDIO_BITBANG=y CONFIG_INPUT_SPARSEKMAP=y CONFIG_INPUT_EVDEV=y -@@ -239,3 +240,126 @@ CONFIG_RCU_CPU_STALL_TIMEOUT=60 +@@ -239,3 +240,127 @@ CONFIG_RCU_CPU_STALL_TIMEOUT=60 CONFIG_FONTS=y CONFIG_FONT_8x8=y CONFIG_FONT_8x16=y @@ -136,6 +136,7 @@ diff -rupN old/linux-xlnx-xilinx-v2016.4/arch/arm/configs/xilinx_zynq_defconfig +CONFIG_FB_TFT_FBTFT_DEVICE=y +CONFIG_USB_ACM=y +CONFIG_USB_TMC=y ++CONFIG_OVERLAY_FS=y diff -rupN old/linux-xlnx-xilinx-v2016.4/drivers/iio/adc/xilinx-xadc-core.c linux-xlnx-xilinx-v2016.4/drivers/iio/adc/xilinx-xadc-core.c --- old/linux-xlnx-xilinx-v2016.4/drivers/iio/adc/xilinx-xadc-core.c +++ linux-xlnx-xilinx-v2016.4/drivers/iio/adc/xilinx-xadc-core.c
vm/map: don't amap_page physical addresses
@@ -589,7 +589,7 @@ int vm_mapForce(vm_map_t *map, void *paddr, int prot) static int _map_force(vm_map_t *map, map_entry_t *e, void *paddr, int prot) { int attr = 0, offs; - page_t *p; + page_t *p = NULL; if (prot & PROT_WRITE && !(e->prot & PROT_WRITE)) return PROT_WRITE; @@ -614,7 +614,7 @@ static int _map_force(vm_map_t *map, map_entry_t *e, void *paddr, int prot) if (e->amap == NULL) p = vm_objectPage(map, NULL, e->object, paddr, (e->offs < 0) ? e->offs : e->offs + offs); - else + else if (e->object != (void *)-1) p = amap_page(map, e->amap, e->object, paddr, e->aoffs + offs, (e->offs < 0) ? e->offs : e->offs + offs, prot); if (prot & PROT_WRITE)
CoreValidation: Fixed include path case for Cortex-A targets.
@@ -94,7 +94,7 @@ targets: include: - ./config/core_a - ../../Core_A/Include - - ../../../Device/ARM/${device}/config + - ../../../Device/ARM/${device}/Config source: - ./config/core_a/mmu.c - ../Source/CV_CoreAFunc.c
HV: trusty: remove unused HC ID The security information will not pass to HV through Hypercall, so remove the unused HC_GET_SEC_INFO. Acked-by: Eddie Dong
#define HC_ID_TRUSTY_BASE 0x70UL #define HC_INITIALIZE_TRUSTY BASE_HC_ID(HC_ID, HC_ID_TRUSTY_BASE + 0x00UL) #define HC_WORLD_SWITCH BASE_HC_ID(HC_ID, HC_ID_TRUSTY_BASE + 0x01UL) -#define HC_GET_SEC_INFO BASE_HC_ID(HC_ID, HC_ID_TRUSTY_BASE + 0x02UL) /* Power management */ #define HC_ID_PM_BASE 0x80UL
Audio requirements
@@ -116,9 +116,9 @@ make -j4 run the following commands in the Terminal ``` sudo dnf -y groupinstall "Development Tools" "Development Libraries" -sudo dnf -y install ruby rubygem-{tk{,-doc},rake,test-unit} cmake libglvnd-devel libglvnd-gles freeglut-devel clang libXext-devel SDL_sound +sudo dnf -y install ruby rubygem-{tk{,-doc},rake,test-unit} cmake libglvnd-devel libglvnd-gles freeglut-devel clang libXext-devel SDL_sound pipewire-devel pipewire-jack-audio-connection-kit-devel pulseaudio-libs-devel git clone --recursive https://github.com/nesbox/TIC-80 && cd TIC-80/build -cmake .. -DCMAKE_CXX_COMPILER=clang++ +cmake .. -DCMAKE_CXX_COMPILER=clang++ -DSDL_ALSA=On make -j4 ```
[fix] Fix the problem of an error when opening menuconfig after the project is dist.
@@ -105,6 +105,18 @@ def bsp_update_sconstruct(dist_dir): f.write('if not os.getenv("RTT_ROOT"): \n RTT_ROOT="rt-thread"\n\n') f.write(line) +def bsp_update_kconfig_testcases(dist_dir): + # delete testcases in rt-thread/Kconfig + if not os.path.isfile(os.path.join(dist_dir, 'rt-thread/Kconfig')): + return + + with open(os.path.join(dist_dir, 'rt-thread/Kconfig'), 'r') as f: + data = f.readlines() + with open(os.path.join(dist_dir, 'rt-thread/Kconfig'), 'w') as f: + for line in data: + if line.find('examples/utest/testcases/Kconfig') == -1: + f.write(line) + def bsp_update_kconfig(dist_dir): # change RTT_ROOT in Kconfig if not os.path.isfile(os.path.join(dist_dir, 'Kconfig')): @@ -307,11 +319,14 @@ def MkDist_Strip(program, BSP_ROOT, RTT_ROOT, Env): do_copy_file(os.path.join(RTT_ROOT, 'libcpu', 'Kconfig'), os.path.join(target_path, 'libcpu', 'Kconfig')) do_copy_file(os.path.join(RTT_ROOT, 'libcpu', 'SConscript'), os.path.join(target_path, 'libcpu', 'SConscript')) + print('Update configuration files...') # change RTT_ROOT in SConstruct bsp_update_sconstruct(dist_dir) # change RTT_ROOT in Kconfig bsp_update_kconfig(dist_dir) bsp_update_kconfig_library(dist_dir) + # delete testcases in Kconfig + bsp_update_kconfig_testcases(dist_dir) # update all project files bs_update_ide_project(dist_dir, target_path) @@ -374,12 +389,14 @@ def MkDist(program, BSP_ROOT, RTT_ROOT, Env, rttide = None): do_copy_file(os.path.join(RTT_ROOT, 'README.md'), os.path.join(target_path, 'README.md')) do_copy_file(os.path.join(RTT_ROOT, 'README_zh.md'), os.path.join(target_path, 'README_zh.md')) + print('Update configuration files...') # change RTT_ROOT in SConstruct bsp_update_sconstruct(dist_dir) # change RTT_ROOT in Kconfig bsp_update_kconfig(dist_dir) bsp_update_kconfig_library(dist_dir) - + # delete testcases in Kconfig + bsp_update_kconfig_testcases(dist_dir) # update all project files if rttide == None: bs_update_ide_project(dist_dir, target_path)
adding libc __signbit and __signbitf
@@ -1530,8 +1530,8 @@ GO(sigfillset, iFp) GOM(siglongjmp, pFEip) GOM(signal, pFEip) // Weak // signalfd -// __signbit -// __signbitf +GO(__signbit, iFd) +GO(__signbitf, iFf) // sigorset // sigpause // Weak // __sigpause
rewrite the ifdef as Windows cl failed to parse it
#include "lapacke_utils.h" +#ifdef __EMSCRIPTEN__ lapack_logical LAPACKE_lsame( char ca, char cb ) { - return (lapack_logical) LAPACK_lsame( &ca, &cb -#ifndef __EMSCRIPTEN__ -, 1, 1 -#endif - ); + return (lapack_logical) LAPACK_lsame( &ca, &cb ); } +#else +lapack_logical LAPACKE_lsame( char ca, char cb ) +{ + return (lapack_logical) LAPACK_lsame( &ca, &cb, 1, 1 ); +} +#endif
added more information about netlink (libnl)
@@ -52,7 +52,7 @@ Requirements * Operatingsystem: Arch Linux (strict), Kernel >= 4.19 (strict). It may work on other Linux systems (notebooks, desktops) and distributions, too (no support for other distributions, no support for other operating systems). Don't use Kernel 4.4 (rt2x00 driver regression) -* Chipset must be able to run in monitor mode and driver must support monitor mode (strict by: ip and iw). Recommended: MEDIATEK (MT7601) or RALINK (RT2870, RT3070, RT5370) chipset +* Chipset must be able to run in monitor mode and driver must support monitor mode. Recommended: MEDIATEK (MT7601) or RALINK (RT2870, RT3070, RT5370) chipset * Raspberry Pi A, B, A+, B+, Zero (WH). (Recommended: Zero (WH) or A+, because of a very low power consumption), but notebooks and desktops may work, too. @@ -66,6 +66,8 @@ hcxdumptool need full (monitor mode and full packet injection running all packet The driver must support monitor mode and full packet injection, as well as ioctl() calls! +Netlink (libnl) interfaces are not supported! + Get information about VENDOR, model, chipset and driver here: https://wikidevi.com Manufacturers do change chipsets without changing model numbers. Sometimes they add (v)ersion or (rev)vision.
tune performance options with longer reset delay
@@ -81,12 +81,14 @@ static mi_option_desc_t options[_mi_option_last] = { 0, UNINIT, MI_OPTION(segment_reset) }, // reset segment memory on free (needs eager commit) #if defined(__NetBSD__) { 0, UNINIT, MI_OPTION(eager_commit_delay) }, // the first N segments per thread are not eagerly committed -#else +#elif defined(_WIN32) { 4, UNINIT, MI_OPTION(eager_commit_delay) }, // the first N segments per thread are not eagerly committed (but per page in the segment on demand) +#else + { 1, UNINIT, MI_OPTION(eager_commit_delay) }, // the first N segments per thread are not eagerly committed (but per page in the segment on demand) #endif - { 1, UNINIT, MI_OPTION(allow_decommit) }, // decommit pages when not eager committed - { 250, UNINIT, MI_OPTION(reset_delay) }, // reset delay in milli-seconds - { 500, UNINIT, MI_OPTION(arena_reset_delay) }, // reset delay in milli-seconds + { 1, UNINIT, MI_OPTION(allow_decommit) }, // decommit slices when no longer used (after reset_delay milli-seconds) + { 500, UNINIT, MI_OPTION(reset_delay) }, // reset delay in milli-seconds + { 1000, UNINIT, MI_OPTION(arena_reset_delay) }, // reset delay in milli-seconds for freed segments { 0, UNINIT, MI_OPTION(use_numa_nodes) }, // 0 = use available numa nodes, otherwise use at most N nodes. { 100, UNINIT, MI_OPTION(os_tag) }, // only apple specific for now but might serve more or less related purpose { 16, UNINIT, MI_OPTION(max_errors) } // maximum errors that are output
esp32/machine_pin: Add Pin.off() and Pin.on() methods.
@@ -221,6 +221,22 @@ STATIC mp_obj_t machine_pin_value(size_t n_args, const mp_obj_t *args) { } STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(machine_pin_value_obj, 1, 2, machine_pin_value); +// pin.off() +STATIC mp_obj_t machine_pin_off(mp_obj_t self_in) { + machine_pin_obj_t *self = MP_OBJ_TO_PTR(self_in); + gpio_set_level(self->id, 0); + return mp_const_none; +} +STATIC MP_DEFINE_CONST_FUN_OBJ_1(machine_pin_off_obj, machine_pin_off); + +// pin.on() +STATIC mp_obj_t machine_pin_on(mp_obj_t self_in) { + machine_pin_obj_t *self = MP_OBJ_TO_PTR(self_in); + gpio_set_level(self->id, 1); + return mp_const_none; +} +STATIC MP_DEFINE_CONST_FUN_OBJ_1(machine_pin_on_obj, machine_pin_on); + // pin.irq(handler=None, trigger=IRQ_FALLING|IRQ_RISING) STATIC mp_obj_t machine_pin_irq(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum { ARG_handler, ARG_trigger, ARG_wake }; @@ -290,6 +306,8 @@ STATIC const mp_rom_map_elem_t machine_pin_locals_dict_table[] = { // instance methods { MP_ROM_QSTR(MP_QSTR_init), MP_ROM_PTR(&machine_pin_init_obj) }, { MP_ROM_QSTR(MP_QSTR_value), MP_ROM_PTR(&machine_pin_value_obj) }, + { MP_ROM_QSTR(MP_QSTR_off), MP_ROM_PTR(&machine_pin_off_obj) }, + { MP_ROM_QSTR(MP_QSTR_on), MP_ROM_PTR(&machine_pin_on_obj) }, { MP_ROM_QSTR(MP_QSTR_irq), MP_ROM_PTR(&machine_pin_irq_obj) }, // class constants
libhfuzz: missing free()
@@ -106,10 +106,12 @@ static int HonggfuzzRunFromFile(int argc, char** argv) { ssize_t len = files_readFromFd(in_fd, buf, _HF_INPUT_MAX_SIZE); if (len < 0) { LOG_E("Couldn't read data from stdin: %s", strerror(errno)); + free(buf); return -1; } HonggfuzzRunOneInput(buf, len); + free(buf); return 0; }
feat(docs): Link to outputs page in troubleshooting re: BT output
@@ -3,9 +3,7 @@ title: Troubleshooting sidebar_title: Troubleshooting --- -### Summary - -The following page provides suggestions for common errors that may occur during firmware compilation. If the information provided is insufficient to resolve the issue, feel free to seek out help from the [ZMK Discord](https://zmk.dev/community/discord/invite). +The following page provides suggestions for common errors that may occur during firmware compilation or other issues with keyboard usage. If the information provided is insufficient to resolve the issue, feel free to seek out help from the [ZMK Discord](https://zmk.dev/community/discord/invite). ### File Transfer Error @@ -76,3 +74,7 @@ CONFIG_BT_CTLR_TX_PWR_PLUS_8=y ``` For the `nRF52840`, the value `PLUS_8` can be set to any multiple of four between `MINUS_20` and `PLUS_8`. The default value for this config is `0`, but if you are having connection issues it is recommended to set it to `PLUS_8` because the power consumption difference is negligible. For more information on changing the transmit power of your BLE device, please refer to [the Zephyr docs.](https://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_BT_CTLR_TX_PWR_PLUS_8.html) + +### Other notes and warnings + +- If you want to test bluetooth output on your keyboard and are powering it through the USB connection rather than a battery, you will be able to pair with a host device but may not see keystrokes sent. In this case you need to use the [output selection behavior](../docs/behaviors/outputs.md) to prefer sending keystrokes over bluetooth rather than USB. This might be necessary even if you are not powering from a device capable of receiving USB inputs, such as a USB charger.
Update README.md We require 2017.4 now. Thanks
@@ -46,7 +46,7 @@ Access to CAPI from the FPGA card requires the Power Service Layer (PSL). For th * https://www.ibm.com/systems/power/openpower Download the required files under "PSL Checkpoint Files for the CAPI SNAP Design Kit". -SNAP currently supports Xilinx FPGA devices, exclusively. For synthesis, simulation model and image build, SNAP requires the Xilinx Vivado 2016.4 tool suite. +SNAP currently supports Xilinx FPGA devices, exclusively. For synthesis, simulation model and image build, SNAP requires the Xilinx Vivado 2017.4 tool suite. * https://www.xilinx.com/products/design-tools/hardware-zone.html As of now, three FPGA cards can be used with SNAP:
ap_pwrseq: Add signal range checking Add power signal range checking. TEST=zmake test test-ap_power BRANCH=none
@@ -150,8 +150,12 @@ int power_wait_mask_signals_timeout(power_signal_mask_t mask, int power_signal_get(enum power_signal signal) { - const struct ps_config *cp = &sig_config[signal]; + const struct ps_config *cp; + if (signal < 0 || signal >= POWER_SIGNAL_COUNT) { + return -EINVAL; + } + cp = &sig_config[signal]; switch (cp->source) { default: return -EINVAL; /* should never happen */ @@ -180,9 +184,13 @@ int power_signal_get(enum power_signal signal) int power_signal_set(enum power_signal signal, int value) { - const struct ps_config *cp = &sig_config[signal]; + const struct ps_config *cp; int ret; + if (signal < 0 || signal >= POWER_SIGNAL_COUNT) { + return -EINVAL; + } + cp = &sig_config[signal]; LOG_DBG("Set %s to %d", power_signal_name(signal), value); switch (cp->source) { default: @@ -220,8 +228,12 @@ int power_signal_set(enum power_signal signal, int value) int power_signal_enable_interrupt(enum power_signal signal) { - const struct ps_config *cp = &sig_config[signal]; + const struct ps_config *cp; + if (signal < 0 || signal >= POWER_SIGNAL_COUNT) { + return -EINVAL; + } + cp = &sig_config[signal]; switch (cp->source) { default: /* @@ -239,8 +251,12 @@ int power_signal_enable_interrupt(enum power_signal signal) int power_signal_disable_interrupt(enum power_signal signal) { - const struct ps_config *cp = &sig_config[signal]; + const struct ps_config *cp; + if (signal < 0 || signal >= POWER_SIGNAL_COUNT) { + return -EINVAL; + } + cp = &sig_config[signal]; switch (cp->source) { default: return -EINVAL;
machinarium: sort timers after removal
@@ -118,11 +118,10 @@ int mm_clock_step(mm_clock_t *clock) list[j] = list[i]; j++; } - qsort(list, clock->timers_count, sizeof(mm_timer_t*), - mm_clock_cmp); - clock->timers.pos -= sizeof(mm_timer_t*) * timers_hit; clock->timers_count -= timers_hit; + qsort(list, clock->timers_count, sizeof(mm_timer_t*), + mm_clock_cmp); return timers_hit; }
rms/slurm: updating logic for pmi enablement
@@ -72,7 +72,7 @@ Source1: slurm.epilog.clean %bcond_with hdf5 %bcond_with lua %bcond_with numa -%bcond_without pmix +%bcond_with pmix %bcond_with nvml # 4/11/18 [email protected] - enable lua bindings @@ -161,7 +161,7 @@ BuildRequires: numactl-devel %endif %endif -%if %{with pmix} && "%{_with_pmix}" == "--with-pmix" +%if %{with pmix} BuildRequires: pmix%{PROJ_DELIM} Requires: pmix%{PROJ_DELIM} %endif @@ -256,7 +256,7 @@ Summary: Slurm compute node daemon Group: %{PROJ_NAME}/rms Requires: %{pname}%{PROJ_DELIM} = %{version}-%{release} %description -n %{pname}-slurmd%{PROJ_DELIM} -%if %{with pmix} && "%{_with_pmix}" == "--with-pmix" +%if %{with pmix} Requires: pmix%{PROJ_DELIM} %endif %if %{with ucx} && "%{_with_ucx}" == "--with-ucx"
fix against slow client fragmentation
@@ -408,7 +408,7 @@ re_eval: /* headers */ case 1: do { - if (start + 1 >= stop) + if (start >= stop) return CONSUMED; /* buffer ended on header line */ if (*start == '\r' || *start == '\n') { goto finished_headers; /* empty line, end of headers */
Badger2040: List load/save
@@ -5,19 +5,9 @@ import time # **** Put your list title and contents here ***** list_title = "Checklist" list_content = ["Badger", "Badger", "Badger", "Badger", "Badger", "Mushroom", "Mushroom", "Snake"] - list_states = [False] * len(list_content) +list_file = "checklist.txt" -try: - with open("checklist.txt", "r") as f: - list_content = f.read().split("\n") - list_title = list_content.pop(0) - for i in range(len(list_content)): - if list_content[i].endswith(" X"): - list_states[i] = True - list_content[i] = list_content[i][:-2] -except OSError: - pass # Global Constants WIDTH = badger2040.WIDTH @@ -39,6 +29,16 @@ LIST_WIDTH = WIDTH - LIST_PADDING - LIST_PADDING - ARROW_WIDTH LIST_HEIGHT = HEIGHT - LIST_START - LIST_PADDING - ARROW_HEIGHT +def save_list(): + with open(list_file, "w") as f: + f.write(list_title + "\n") + for i in range(len(list_content)): + list_item = list_content[i] + if list_states[i]: + list_item += " X" + f.write(list_item + "\n") + + # ------------------------------ # Drawing functions # ------------------------------ @@ -137,6 +137,7 @@ def draw_checkbox(x, y, size, background, foreground, thickness, tick, padding): # Global variables update = True +needs_save = False current_item = 0 items_per_page = 0 @@ -174,8 +175,7 @@ items_per_page = ((LIST_HEIGHT // ITEM_SPACING) + 1) * list_columns # Button handling function def button(pin): - global update - global current_item + global update, current_item, needs_save if len(list_content) > 0 and not update: if pin == button_a: @@ -185,6 +185,7 @@ def button(pin): return if pin == button_b: list_states[current_item] = not list_states[current_item] + needs_save = True update = True return if pin == button_c: @@ -216,7 +217,26 @@ button_down.irq(trigger=machine.Pin.IRQ_RISING, handler=button) # Main program loop # ------------------------------ +try: + with open(list_file, "r") as f: + list_content = f.read().strip().split("\n") + list_title = list_content.pop(0) + list_states = [False] * len(list_content) + for i in range(len(list_content)): + list_content[i] = list_content[i].strip() + if list_content[i].endswith(" X"): + list_states[i] = True + list_content[i] = list_content[i][:-2] + +except OSError: + save_list() + + while True: + if needs_save: + save_list() + needs_save = False + if update: display.pen(15) display.clear()
config_tools: add error icon for hypervisor tab add error icon for hypervisor tab
<template> <div class="p-2 w-100 d-flex align-items-center TabBox"> - <div class="d-inline-block p-3 pt-2 Tab" + <div class="d-inline-block p-3 pt-2 Tab position-relative" :class="{Active:activeVMID===-1}" @click="active(-1)"> + <div class="position-absolute" style="right: 3px;top:5px;" v-if="errors.hasOwnProperty(-1)"> + <Icon size="18px" color="red" style="cursor: pointer;"> + <ExclamationCircle/> + </Icon> + </div> <div style="font-size: 22px;">Hypervisor</div> <div>Global Settings</div> </div>
removed home brew gradle since gradle seems to be available before (if I'm interpreting the output correctly)
@@ -44,7 +44,6 @@ jobs: brew install discount brew install flex brew install gpgme - brew install gradle brew install libev brew install libgcrypt brew install libgit2
ames: remove cork wire from state
:: ++ on-pump-cork ^+ peer-core + =/ =wire (make-pump-timer-wire her.channel bone) + =. corks.ames-state (~(del in corks.ames-state) wire) =. peer-state =, peer-state %_ peer-state
Meep: Set SYV682x high voltage path ilimit to 5.5A BRANCH=firmware-octopus-11297.B TEST=EC console ppc_dump <port> to make sure setting.
/* Additional PPC second source */ #define CONFIG_USBC_PPC_SYV682X #define CONFIG_USBC_PPC_DEDICATED_INT +#undef CONFIG_SYV682X_HV_ILIM +#define CONFIG_SYV682X_HV_ILIM SYV682X_HV_ILIM_5_50 /* Additional TCPC second source in Port 1 */ #define CONFIG_USB_PD_TCPM_MULTI_PS8XXX
move is_running into conf_check()
@@ -135,7 +135,6 @@ void conf_init( void ) { *gconf = ((struct gconf_t) { .dht_port = -1, .af = AF_UNSPEC, - .is_running = 1, #ifdef CMD .cmd_port = -1, #endif @@ -189,6 +188,7 @@ void conf_check( void ) { // Store startup time gconf->time_now = time( NULL ); gconf->startup_time = time_now_sec(); + gconf->is_running = 1; } const char *verbosity_str( int verbosity ) {
[bsp][stm32] modify doc for atk-pandora
@@ -47,11 +47,6 @@ menu "On-chip Peripheral Drivers" select RT_USING_SERIAL default n - config BSP_USING_UART3 - bool "Enable UART3" - select RT_USING_SERIAL - default n - config BSP_UART_USING_DMA_RX bool "Enable UART RX DMA support" default n
README.md: fix wrong number on Windows steps
@@ -35,16 +35,12 @@ On __Windows__, - Exception: seh - Build revision: 1 - Destination Folder: Select a folder that your Windows user owns - 2. Install SDL2 http://libsdl.org/download-2.0.php - Extract the SDL2 folder from the archive using a tool like [7zip](http://7-zip.org) - Inside the folder, copy the `i686-w64-mingw32` and/or `x86_64-w64-mingw32` depending on the architecture you chose into your mingw-w64 folder e.g. `C:\Program Files\mingw-w64\x86_64-6.3.0-win32-seh-rt_v5-rev1\mingw64` - 3. Setup Path environment variable - Put your mingw-w64 binaries location into your system Path environment variable. e.g. `C:\Program Files\mingw-w64\x86_64-6.3.0-win32-seh-rt_v5-rev1\mingw64\bin` and `C:\Program Files\mingw-w64\x86_64-6.3.0-win32-seh-rt_v5-rev1\mingw64\x86_64-w64-mingw32\bin` - 4. Open up a terminal such as `Git Bash` and run `go get -v github.com/veandco/go-sdl2/sdl`. To prove that it's working correctly, you can change directory by running `cd go/src/github.com/veandco/go-sdl2/examples/events` and run `go run events.go`. A window should pop up and you can see event logs printed when moving your mouse over it or typing on your keyboard. - 5. (Optional) You can repeat __Step 2__ for [SDL_image](https://www.libsdl.org/projects/SDL_image), [SDL_mixer](https://www.libsdl.org/projects/SDL_mixer), [SDL_ttf](https://www.libsdl.org/projects/SDL_ttf) - NOTE: pre-build the libraries for faster compilation by running `go install github.com/veandco/go-sdl2/sdl_{image,mixer,ttf}`
Analysis workflow, fix mkdir.
@@ -284,7 +284,7 @@ jobs: #make install_sw make install_dev cd .. - make expat + mkdir expat echo "curl expat" curl -L -k -s -S -o expat-2.2.10.tar.gz https://github.com/libexpat/libexpat/releases/download/R_2_2_10/expat-2.2.10.tar.gz tar xzf expat-2.2.10.tar.gz
nvs: fix nvs_get_stats unit test Changed check for the returned parameter from ESP_ERR_NVS_PART_NOT_FOUND to ESP_ERR_NVS_NOT_INITIALIZED.
@@ -71,7 +71,7 @@ TEST_CASE("calculate used and free space", "[nvs]") TEST_ESP_ERR(nvs_get_stats(NULL, NULL), ESP_ERR_INVALID_ARG); nvs_stats_t stat1; nvs_stats_t stat2; - TEST_ESP_ERR(nvs_get_stats(NULL, &stat1), ESP_ERR_NVS_PART_NOT_FOUND); + TEST_ESP_ERR(nvs_get_stats(NULL, &stat1), ESP_ERR_NVS_NOT_INITIALIZED); TEST_ASSERT_TRUE(stat1.free_entries == 0); TEST_ASSERT_TRUE(stat1.namespace_count == 0); TEST_ASSERT_TRUE(stat1.total_entries == 0);
Squashed 'opae-libs/' changes from 9396453c..2e4366e6 opae-libs: xfpga: implement workarounds for lack of pr_id
@@ -223,9 +223,18 @@ fpga_result __XFPGA_API__ xfpga_fpgaUpdateProperties(fpga_token token, SET_FIELD_VALID(&_iprop, FPGA_PROPERTY_OBJTYPE); // get bitstream id result = sysfs_get_interface_id(_token, _iprop.guid); + // TODO: undo this hack. It was put in place to deal + // with the lack of pr_id in dfl-fme.x in N6000. +#if 0 if (FPGA_OK != result) return result; SET_FIELD_VALID(&_iprop, FPGA_PROPERTY_GUID); +#else + if (result == FPGA_OK) + SET_FIELD_VALID(&_iprop, FPGA_PROPERTY_GUID); + else + CLEAR_FIELD_VALID(&_iprop, FPGA_PROPERTY_GUID); +#endif resval = sysfs_parse_attribute64(_token->sysfspath, FPGA_SYSFS_NUM_SLOTS, &value);
servo_v4: enable usb port by default Set the USB mux and power enable to default to route the USB3 port to the DUT and enable VBUS. BRANCH=None TEST=ensure that blue port works on power on. Commit-Ready: Nick Sanders Tested-by: Nick Sanders
@@ -286,6 +286,17 @@ static void init_uservo_port(void) write_ioexpander(1, 0, 0); } +/* Enable blue USB port to DUT. */ +static void init_usb3_port(void) +{ + /* Write USB3.0_TYPEA_MUX_SEL */ + write_ioexpander(0, 3, 1); + /* Write USB3.0_TYPEA_MUX_EN_L */ + write_ioexpander(0, 4, 0); + /* Write USB3.0_TYPE_A_PWR_EN */ + write_ioexpander(0, 5, 1); +} + /* Enable all ioexpander outputs. */ static void init_ioexpander(void) { @@ -390,6 +401,7 @@ static void board_init(void) /* Enable uservo USB by default. */ init_ioexpander(); init_uservo_port(); + init_usb3_port(); /* * Enable SBU mux. The polarity is set each time a new PD attach event
feat(fsdrv): add posix lseek() error checking
@@ -176,8 +176,8 @@ static lv_fs_res_t fs_write(lv_fs_drv_t * drv, void * file_p, const void * buf, static lv_fs_res_t fs_seek(lv_fs_drv_t * drv, void * file_p, uint32_t pos, lv_fs_whence_t whence) { LV_UNUSED(drv); - lseek((lv_uintptr_t)file_p, pos, whence); - return LV_FS_RES_OK; + off_t offset = lseek((lv_uintptr_t)file_p, pos, whence); + return offset < 0 ? LV_FS_RES_FS_ERR : LV_FS_RES_OK; } /** @@ -191,8 +191,9 @@ static lv_fs_res_t fs_seek(lv_fs_drv_t * drv, void * file_p, uint32_t pos, lv_fs static lv_fs_res_t fs_tell(lv_fs_drv_t * drv, void * file_p, uint32_t * pos_p) { LV_UNUSED(drv); - *pos_p = lseek((lv_uintptr_t)file_p, 0, SEEK_CUR); - return LV_FS_RES_OK; + off_t offset = lseek((lv_uintptr_t)file_p, 0, SEEK_CUR); + *pos_p = offset; + return offset < 0 ? LV_FS_RES_FS_ERR : LV_FS_RES_OK; } #ifdef WIN32
api: Remove the useless code
@@ -568,7 +568,6 @@ finish_page83: case 0xb0: /* Block Limits */ { char data[64]; - int block_size; int max_xfer_length; uint16_t val16; uint32_t val32; @@ -600,12 +599,6 @@ finish_page83: */ data[5] = 0x01; - block_size = tcmu_get_attribute(dev, "hw_block_size"); - if (block_size <= 0) { - return tcmu_set_sense_data(sense, ILLEGAL_REQUEST, - ASC_INVALID_FIELD_IN_CDB, NULL); - } - /* * Daemons like runner may override the user requested * value due to device specific limits.
test: add ethereum test case test_001CreateWallet_0002CreateOneTimeWalletFailureNullConfig
@@ -85,6 +85,23 @@ START_TEST(test_001CreateWallet_0001CreateOneTimeWalletSuccess) } END_TEST +START_TEST(test_001CreateWallet_0002CreateOneTimeWalletFailureNullConfig) +{ + BSINT32 rtnVal; + extern BoatIotSdkContext g_boat_iot_sdk_context; + + /* 1. execute unit test */ + rtnVal = BoatWalletCreate(BOAT_PROTOCOL_ETHEREUM, NULL, NULL, sizeof(BoatEthWalletConfig)); + + /* 3. verify test result */ + /* 3-1. verify the return value */ + ck_assert_int_eq(rtnVal, BOAT_ERROR_COMMON_INVALID_ARGUMENT); + + /* 3-2. verify the global variables that be affected */ + ck_assert(g_boat_iot_sdk_context.wallet_list[0].is_used == false); +} +END_TEST + Suite *make_wallet_suite(void) { /* Create Suite */ @@ -97,6 +114,7 @@ Suite *make_wallet_suite(void) suite_add_tcase(s_wallet, tc_wallet_api); /* Test cases are added to the test set */ tcase_add_test(tc_wallet_api, test_001CreateWallet_0001CreateOneTimeWalletSuccess); + tcase_add_test(tc_wallet_api, test_001CreateWallet_0002CreateOneTimeWalletFailureNullConfig); return s_wallet; }
YAML CPP: Fix detection of parent keys
@@ -106,7 +106,10 @@ KeySet splitArrayParents (KeySet const & keys) ckdb::keySetBaseName (*directParent, NULL); if (isArrayParent (*directParent, keys)) arrayParents.append (directParent); } - if (isArrayParent (*previous, keys)) arrayParents.append (previous); + else if (isArrayParent (*previous, keys)) + { + arrayParents.append (previous); + } } }
Require Imath 3.1
@@ -258,7 +258,7 @@ set(IMATH_TAG "master" CACHE STRING if(NOT OPENEXR_FORCE_INTERNAL_IMATH) #TODO: ^^ Release should not clone from master, this is a place holder set(CMAKE_IGNORE_PATH "${CMAKE_CURRENT_BINARY_DIR}/_deps/imath-src/config;${CMAKE_CURRENT_BINARY_DIR}/_deps/imath-build/config") - find_package(Imath QUIET) + find_package(Imath 3.1) set(CMAKE_IGNORE_PATH) endif()
interface: fixed uxToHex bug
@@ -2,6 +2,8 @@ import React, { Component } from 'react'; import { Sigil } from '../../../../lib/sigil'; import ChatEditor from './chat-editor'; import { S3Upload } from './s3-upload'; +import { uxToHex } from '../../../../lib/util'; + const URL_REGEX = new RegExp(String(/^((\w+:\/\/)[-a-zA-Z0-9:@;?&=\/%\+\.\*!'\(\),\$_\{\}\^~\[\]`#|]+)/.source));
Fix coordinate handling in MetalANGLE build when UIScreen scale and nativeScale do not match
@@ -69,10 +69,13 @@ static const int NATIVE_NO_COORDINATE = -1; _active = YES; - _scale = 1; + _scale = [[UIScreen mainScreen] scale]; + // In case of MetalANGLE build, use the original scale value +#ifndef _CARTO_USE_METALANGLE if ([[UIScreen mainScreen] respondsToSelector:@selector(nativeScale)]) { _scale = [[UIScreen mainScreen] nativeScale]; } +#endif _baseMapView = [[NTBaseMapView alloc] init]; _nativeMapView = [_baseMapView getCptr];
Solve minor bugs in last version, related to require semantics in node loader.
@@ -42,19 +42,36 @@ function node_loader_trampoline_load_from_file_require(p) { /* First try to load the absolute path */ try { return require(p); - } catch (e) {} + } catch (e) { + if (e.code !== 'MODULE_NOT_FOUND') { + throw e; + } + } /* Then try to load without the path */ const basename = path.basename(p); try { return require(basename); - } catch (e) {} + } catch (e) { + if (e.code !== 'MODULE_NOT_FOUND') { + throw e; + } + } - /* Finally try to load without the path and extension */ + /* Try to load without the path and extension */ const { name } = path.parse(basename); + try { return require(name); + } catch (e) { + if (e.code !== 'MODULE_NOT_FOUND') { + throw e; + } + } + + /* Try to load base path without extension and with node modules */ + return require(path.join(path.dirname(p), 'node_modules', name)); } function node_loader_trampoline_load_from_file(paths) {
hongguzz.h: constify some vars
@@ -198,8 +198,8 @@ typedef struct { const char* const* cmdline; bool nullifyStdio; bool fuzzStdin; - char* externalCommand; - char* postExternalCommand; + const char* externalCommand; + const char* postExternalCommand; bool netDriver; bool persistent; uint64_t asLimit; @@ -232,7 +232,7 @@ typedef struct { struct { bool useVerifier; bool exitUponCrash; - char* reportFile; + const char* reportFile; pthread_mutex_t report_mutex; bool monitorSIGABRT; size_t dynFileIterExpire;
[fabric][tests]fix test case failed to run and error aitos-io#1354 aitos-io#1355 BoATE-1058
@@ -82,7 +82,7 @@ START_TEST(test_005Transaction_0003TxInvoke_Failure_Args_NULL) time(&timesec); rtnVal = BoatHlfabricTxSetTimestamp(&tx_ptr, timesec, 0); ck_assert_int_eq(rtnVal, BOAT_SUCCESS); - rtnVal = BoatHlfabricTxSetArgs(&tx_ptr, NULL); + rtnVal = BoatHlfabricTxSetArgs(&tx_ptr, NULL, NULL); ck_assert_int_eq(rtnVal, BOAT_SUCCESS); rtnVal = BoatHlfabricTxSubmit(&tx_ptr); ck_assert_int_eq(rtnVal, BOAT_ERROR_COMMON_INVALID_ARGUMENT); @@ -303,7 +303,13 @@ START_TEST(test_005Transaction_0013TxInvoke_Failure_Walleturl_Err) BoatHlfabricTx tx_ptr; BoatHlfabricWallet *g_fabric_wallet_ptr = NULL; g_fabric_wallet_ptr = fabric_get_wallet_ptr(); - g_fabric_wallet_ptr->network_info.nodesCfg.layoutCfg[0].groupCfg[0].endorser[0].nodeUrl = "121.4.178.74"; + + BoatFree(g_fabric_wallet_ptr->network_info.nodesCfg.layoutCfg[0].groupCfg[0].endorser[0].nodeUrl); + g_fabric_wallet_ptr->network_info.nodesCfg.layoutCfg[0].groupCfg[0].endorser[0].nodeUrl = NULL; + + BCHAR *fabric_demo_endorser_peer0Org1_url_err = "121.4.178.74"; + g_fabric_wallet_ptr->network_info.nodesCfg.layoutCfg[0].groupCfg[0].endorser[0].nodeUrl = BoatMalloc(strlen(fabric_demo_endorser_peer0Org1_url_err) + 1); + strcpy(g_fabric_wallet_ptr->network_info.nodesCfg.layoutCfg[0].groupCfg[0].endorser[0].nodeUrl, fabric_demo_endorser_peer0Org1_url_err); rtnVal = BoatHlfabricTxInit(&tx_ptr, g_fabric_wallet_ptr, NULL, "mycc", NULL, "mychannel", "Org1MSP"); ck_assert_int_eq(rtnVal, BOAT_SUCCESS);
Update issues.yml test part 1
@@ -3,7 +3,7 @@ on: types: [opened, reopened] jobs: check: - if: github.event.issue.user.login != 'zandbelt' + if: github.event.issue.user.login == 'zandbelt' runs-on: ubuntu-latest steps: - if: github.event.action == 'opened'
in_tail: if parser fails, pack raw text
@@ -237,6 +237,12 @@ static int process_content(struct flb_tail_file *file, off_t *bytes) (char**) &out_buf, &out_size, file); flb_free(out_buf); } + else { + /* Parser failed, pack raw text */ + flb_time_get(&out_time); + flb_tail_file_pack_line(out_sbuf, out_pck, &out_time, + data, len, file); + } } else if (ctx->multiline == FLB_TRUE) { ret = flb_tail_mult_process_content(now,
build.sh: add fedora dbus-devel Issue
@@ -62,7 +62,7 @@ dependencies() { "Fedora") MANAGER_QUERY="dnf list installed" MANAGER_INSTALL="dnf install" - DEPS="{meson,gcc,gcc-c++,libX11-devel,glslang,python3-mako,mesa-libGL-devel,libXNVCtrl-devel}" + DEPS="{meson,gcc,gcc-c++,libX11-devel,glslang,python3-mako,mesa-libGL-devel,libXNVCtrl-devel,dbus-devel}" dep_install unset INSTALL
pack: on msgpack2json, detect and skip quoted bytes
@@ -319,6 +319,7 @@ static inline int try_to_write_str(char *buf, int *off, size_t size, int required; size_t available; char c; + char n; char *p; available = (size - *off); @@ -335,36 +336,22 @@ static inline int try_to_write_str(char *buf, int *off, size_t size, } c = str[i]; - switch (c) { - case '\\': - case '"': - *p++ = '\\'; + if (c == '\\' && i + 1 < str_len) { + n = str[i + 1]; + if ((n >= '\a' && n <= '\r') || n == '"') { *p++ = c; - break; - case '\b': - *p++ = '\\'; - *p++ = '\b'; - break; - case '\t': - *p++ = '\\'; - *p++ = '\t'; - break; - case '\n': - *p++ = '\\'; - *p++ = '\n'; - break; - case '\f': - *p++ = '\\'; - *p++ = '\f'; - break; - case '\r': + *p++ = n; + i++; + written = (p - (buf + *off)); + continue; + } + } + + if ((c >= '\a' && c <= '\r') || c == '"') { *p++ = '\\'; - *p++ = '\r'; - break; - default: - *p++ = c; } + *p++ = c; written = (p - (buf + *off)); }
Uniformize ChangeLog entries.
@@ -4,5 +4,5 @@ API changes * Drop support for compatibility with our own previous buggy implementation of truncated HMAC (MBEDTLS_SSL_TRUNCATED_HMAC_COMPAT). * Drop support for TLS record-level compression (MBEDTLS_ZLIB_SUPPORT). * Drop support for RC4 TLS ciphersuites. - * Drop single-DES ciphersuites. + * Drop support for single-DES ciphersuites. * Drop support for MBEDTLS_SSL_HW_RECORD_ACCEL.
king: new mug
@@ -5,6 +5,7 @@ module Urbit.Noun.Mug where import ClassyPrelude import Data.Bits +import Data.ByteString.Builder import Urbit.Atom import Data.Hash.Murmur (murmur3) @@ -13,14 +14,7 @@ type Mug = Word32 {-# INLINE mugBS #-} mugBS :: ByteString -> Word32 -mugBS = go 0xcafebabe - where - go seed buf = - let haz = murmur3 seed buf - ham = shiftR haz 31 `xor` (haz .&. 0x7fff_ffff) - in if ham == 0 - then go (seed + 1) buf - else ham +mugBS = mum 0xcafe_babe 0x7fff -- XX is there a way to do this without copy? {-# INLINE mugAtom #-} @@ -29,4 +23,16 @@ mugAtom = mugBS . atomBytes {-# INLINE mugBoth #-} mugBoth :: Word32 -> Word32 -> Word32 -mugBoth m n = mugAtom $ fromIntegral $ m `xor` 0x7fff_ffff `xor` n +mugBoth m n = mum 0xdead_beef 0xfffe + $ toStrict $ toLazyByteString (word32LE m <> word32LE n) + +mum :: Word32 -> Word32 -> ByteString -> Word32 +mum syd fal key = go syd 0 + where + go syd 8 = fal + go syd i = + let haz = murmur3 syd key + ham = shiftR haz 31 `xor` (haz .&. 0x7fff_ffff) + in if ham /= 0 + then ham + else go (syd + 1) (i + 1) \ No newline at end of file
Handle unknown user in cachetop If running on a system that uses cgroups the process owner uid may not exist on the host system and `pwd.getpwuid` throws a KeyError. This patch defaults to a uid of `UNKNOWN(id)` when we're unable to look up the username.
@@ -222,11 +222,20 @@ def handle_loop(stdscr, args): ) (height, width) = stdscr.getmaxyx() for i, stat in enumerate(process_stats): + uid = int(stat[1]) + try: + username = pwd.getpwuid(uid)[0] + except KeyError as ex: + # `pwd` throws a KeyError if the user cannot be found. This can + # happen e.g. when the process is running in a cgroup that has + # different users from the host. + username = 'UNKNOWN({})'.format(uid) + stdscr.addstr( i + 2, 0, "{0:8} {username:8.8} {2:16} {3:8} {4:8} " "{5:8} {6:9.1f}% {7:9.1f}%".format( - *stat, username=pwd.getpwuid(int(stat[1]))[0] + *stat, username=username ) ) if i > height - 4:
lyb parser BUGFIX do not validate any content
@@ -730,7 +730,7 @@ lyb_parse_any_content(const struct ly_ctx *ctx, const char *data, struct lyd_nod /* turn logging off */ prev_lo = ly_log_options(0); - ret = _lyd_parse_lyb(ctx, NULL, NULL, tree, in, LYD_PARSE_OPAQ | LYD_PARSE_STRICT, 0, + ret = _lyd_parse_lyb(ctx, NULL, NULL, tree, in, LYD_PARSE_ONLY | LYD_PARSE_OPAQ | LYD_PARSE_STRICT, 0, LYD_INTOPT_ANY | LYD_INTOPT_WITH_SIBLINGS, NULL, &lydctx); /* turn logging on again */
Update behavior of 'P'
@@ -770,8 +770,8 @@ BEGIN_DUAL_PHASE_0(offset) coords[0] = 0; // y coords[1] = 1; // x if (IS_AWAKE && DUAL_IS_ACTIVE) { - coords[0] = (I32)usz_clamp(index_of(PEEK(0, -1)), 0, 16); - coords[1] = (I32)usz_clamp(index_of(PEEK(0, -2)) + 1, 1, 16); + coords[0] = (I32)index_of(PEEK(0, -1)); + coords[1] = (I32)index_of(PEEK(0, -2)) + 1; STORE(coords); } BEGIN_DUAL_PORTS @@ -797,12 +797,12 @@ BEGIN_DUAL_PHASE_0(push) I32 write_val_x[1]; write_val_x[0] = 0; if (IS_AWAKE && DUAL_IS_ACTIVE) { - Usz len = usz_clamp(index_of(PEEK(0, -1)), 1, 16); + Usz len = index_of(PEEK(0, -1)) + 1; Usz key = index_of(PEEK(0, -2)); write_val_x[0] = (I32)(key % len); STORE(write_val_x); - for (Isz i = 0; i < write_val_x[0]; ++i) { - LOCK(1, i); + for (Usz i = 0; i < len; ++i) { + LOCK(1, (Isz)i); } } BEGIN_DUAL_PORTS @@ -813,7 +813,8 @@ BEGIN_DUAL_PHASE_0(push) END_PORTS END_PHASE BEGIN_DUAL_PHASE_1(push) - STOP_IF_NOT_BANGED; + REALIZE_DUAL; + STOP_IF_DUAL_INACTIVE; I32 write_val_x[1]; if (!LOAD(write_val_x)) { write_val_x[0] = 0;
dev-tools/numpy: test removal of older pytyon34 build patch that was needed for rhel7/intel
@@ -38,10 +38,6 @@ BuildRequires: python3-Cython%{PROJ_DELIM} %if 0%{?suse_version} BuildRequires: fdupes #!BuildIgnore: post-build-checks -%else -%if "%{compiler_family}" == "intel" || "%{compiler_family}" == "arm" -BuildRequires: python34-build-patch%{PROJ_DELIM} -%endif %endif # Default library install path
Fix menu text positioning when using variable width fonts
@@ -310,6 +310,10 @@ const textCodeSetFont = (fontIndex: number): string => { return `\\002\\${decOct(fontIndex + 1)}`; }; +const textCodeGoto = (x: number, y: number): string => { + return `\\003\\${decOct(x)}\\${decOct(y)}`; +}; + const textCodeGotoRel = (x: number, y: number): string => { return `\\004\\${decOct(x)}\\${decOct(y)}`; }; @@ -2029,21 +2033,22 @@ class ScriptBuilder { ) => { const variableAlias = this.getVariableAlias(setVariable); const optionsText = options.map( - (option, index) => - " " + (trimlines(option || "", 6, 1) || `Item ${index + 1}`) + (option, index) => trimlines(option || "", 6, 1) || `Item ${index + 1}` ); const height = layout === "menu" ? options.length : Math.min(options.length, 4); const menuText = - "\\001\\001" + + textCodeSetSpeed(0) + + textCodeGoto(3, 2) + (layout === "menu" ? optionsText.join("\n") - : Array.from(Array(height)) - .map( - (_, i) => - optionsText[i].padEnd(9, " ") + - (optionsText[i + 4] ? optionsText[i + 4] : "") - ) + : optionsText + .map((text, i) => { + if (i === 4) { + return textCodeGoto(12, 2) + text; + } + return text; + }) .join("\n")); const numLines = options.length; const x = layout === "menu" ? 10 : 0;
Added missing MYNEWT_VAL_BLE_L2CAP_COC_MPS definition Merges
#define MYNEWT_VAL_BLE_L2CAP_COC_MAX_NUM CONFIG_BT_NIMBLE_L2CAP_COC_MAX_NUM #endif +#ifndef MYNEWT_VAL_BLE_L2CAP_COC_MPS +#define MYNEWT_VAL_BLE_L2CAP_COC_MPS (MYNEWT_VAL_MSYS_1_BLOCK_SIZE - 8) +#endif + #ifndef MYNEWT_VAL_BLE_L2CAP_JOIN_RX_FRAGS #define MYNEWT_VAL_BLE_L2CAP_JOIN_RX_FRAGS (1) #endif
Fix Non CF access to table in base64 decrypt
@@ -66,9 +66,9 @@ static const unsigned char base64_dec_map[128] = #define BASE64_SIZE_T_MAX ( (size_t) -1 ) /* SIZE_T_MAX is not standard */ /* - * Constant flow conditional assignment + * Constant flow conditional assignment to unsigned char */ -static void mbedtls_base64_cond_assign(unsigned char * dest, const unsigned char * const src, +static void mbedtls_base64_cond_assign_uchar(unsigned char * dest, const unsigned char * const src, unsigned char condition) { /* make sure assign is 0 or 1 in a time-constant manner */ @@ -77,6 +77,19 @@ static void mbedtls_base64_cond_assign(unsigned char * dest, const unsigned char *dest = ( *dest ) * ( 1 - condition ) + ( *src ) * condition; } +/* + * Constant flow conditional assignment to uint_32 +*/ +static void mbedtls_base64_cond_assign_uint32(uint32_t * dest, const uint32_t src, + unsigned char condition) +{ + /* make sure assign is 0 or 1 in a time-constant manner */ + condition = (condition | (unsigned char)-condition) >> 7; + + *dest = ( *dest ) * ( 1 - condition ) + ( src ) * condition; +} + + /* * Constant flow check for equality */ @@ -114,7 +127,7 @@ static unsigned char mbedtls_base64_table_lookup(const unsigned char * const tab for( i = 0; i < table_size; ++i ) { - mbedtls_base64_cond_assign(&result, &table[i], mbedtls_base64_eq(i, table_index)); + mbedtls_base64_cond_assign_uchar(&result, &table[i], mbedtls_base64_eq(i, table_index)); } return result; @@ -275,7 +288,7 @@ int mbedtls_base64_decode( unsigned char *dst, size_t dlen, size_t *olen, dec_map_lookup = mbedtls_base64_table_lookup(base64_dec_map, sizeof( base64_dec_map ), *src ); - j -= ( dec_map_lookup == 64 ); + mbedtls_base64_cond_assign_uint32( &j, j - 1, mbedtls_base64_eq( dec_map_lookup, 64 ) ); x = ( x << 6 ) | ( dec_map_lookup & 0x3F ); if( ++n == 4 )
Fix typo in contrib/pg_trgm/pg_trgm--1.4--1.5.sql Backpatch-through: 13
-/* contrib/pg_trgm/pg_trgm--1.5--1.5.sql */ +/* contrib/pg_trgm/pg_trgm--1.4--1.5.sql */ -- complain if script is sourced in psql, rather than via ALTER EXTENSION \echo Use "ALTER EXTENSION pg_trgm UPDATE TO '1.5'" to load this file. \quit
Show palette index prefix on sprite palette events
@@ -343,6 +343,7 @@ const ScriptEventFormInput = ({ name={id} value={String(value || "")} onChange={onChangeField} + prefix={`${(field.paletteIndex || 0) + 1}: `} optional optionalLabel={l10n("FIELD_GLOBAL_DEFAULT")} optionalDefaultPaletteId={
mINI: Simplify code for file reading and writing
@@ -13,6 +13,7 @@ oclint -p "@PROJECT_BINARY_DIR@" -enable-global-analysis -enable-clang-static-an "@CMAKE_SOURCE_DIR@/src/libs/ease/keyname.c" \ "@CMAKE_SOURCE_DIR@/src/libs/utility/text.c" \ "@CMAKE_SOURCE_DIR@/src/plugins/camel/camel.c" \ + "@CMAKE_SOURCE_DIR@/src/plugins/mini/mini.c" \ "@CMAKE_SOURCE_DIR@/src/plugins/yamlcpp/"*.{c,cpp} exit_if_fail "OCLint found problematic code"
arch/Kconfig : Select DEBUG_SYMBOLS when ARCH_STACKDUMP is enabled For debugging with dumped address in stack, DEBUG_SYMBOLS is required.
@@ -449,6 +449,7 @@ config ARCH_IRQPRIO config ARCH_STACKDUMP bool "Dump stack on assertions" default n + select DEBUG_SYMBOLS ---help--- Enable to do stack dumps after assertions. To see symbols on call stack dump, please enable DEBUG_DISPLAY_SYMBOL.
pico: Tweak ST7789 gamma
@@ -160,8 +160,10 @@ namespace pimoroni { command(reg::VRHS, 1, "\x12"); command(reg::VDVS, 1, "\x20"); command(reg::PWCTRL1, 2, "\xa4\xa1"); - command(reg::PVGAMCTRL, 14, "\xD0\x04\x0D\x11\x13\x2B\x3F\x54\x4C\x18\x0D\x0B\x1F\x23"); - command(reg::NVGAMCTRL, 14, "\xD0\x04\x0C\x11\x13\x2C\x3F\x44\x51\x2F\x1F\x1F\x20\x23"); + + command(reg::PVGAMCTRL, 14, "\xD0\x08\x11\x08\x0c\x15\x39\x33\x50\x36\x13\x14\x29\x2d"); + command(reg::NVGAMCTRL, 14, "\xD0\x08\x10\x08\x06\x06\x39\x44\x51\x0b\x16\x14\x2f\x31"); + // trigger "vsync" slightly earlier to avoid tearing while pixel-doubling // (this is still outside of the visible part of the screen)
Follow existing h2o_find_header call checks
@@ -549,7 +549,7 @@ static int fill_headers(h2o_req_t *req, struct phr_header *headers, size_t num_h } /* add date: if it's missing from the response */ - if (h2o_find_header(&req->res.headers, H2O_TOKEN_DATE, 0) < 0) + if (h2o_find_header(&req->res.headers, H2O_TOKEN_DATE, 0) == -1) h2o_resp_add_date_header(req); return 0;
set max_timeout outside loop
@@ -53,10 +53,12 @@ static context miscframe; void runloop() { + /* minimum runloop period - XXX move to a config header */ + time max_timeout = milliseconds(100); thunk t; while(1) { - u64 timeout = MIN(timer_check(), milliseconds(100)); + time timeout = MIN(timer_check(), max_timeout); hpet_timer(timeout, ignore); while((t = dequeue(runqueue))) { apply(t);
Reorder functions in util.lua (Purely aesthetic change)
local util = {} -function util.get_file_contents(filename) - local f, err = io.open(filename, "r") - if not f then - return false, err - end - local s = f:read("a") - f:close() - if not s then - return false, "unable to open file " .. filename - else - return s - end -end - -function util.set_file_contents(filename, contents) - local f, err = io.open(filename, "w") - if not f then - return false, err - end - f:write(contents) - f:close() - return true +function util.abort(msg) + io.stderr:write(msg, "\n") + os.exit(1) end -- Barebones string-based template function for generating C/Lua code. Replaces @@ -53,6 +34,39 @@ function util.render(code, substs) return out end +-- +-- Shell and filesystem stuff +-- + +function util.split_ext(filename) + local name, ext = string.match(filename, "(.*)%.(.*)") + return name, ext +end + +function util.get_file_contents(filename) + local f, err = io.open(filename, "r") + if not f then + return false, err + end + local s = f:read("a") + f:close() + if not s then + return false, "unable to open file " .. filename + else + return s + end +end + +function util.set_file_contents(filename, contents) + local f, err = io.open(filename, "w") + if not f then + return false, err + end + f:write(contents) + f:close() + return true +end + function util.shell(cmd) local p = io.popen(cmd) local out = p:read("*a") @@ -63,14 +77,4 @@ function util.shell(cmd) return out end -function util.abort(msg) - io.stderr:write(msg, "\n") - os.exit(1) -end - -function util.split_ext(filename) - local name, ext = string.match(filename, "(.*)%.(.*)") - return name, ext -end - return util
Introducing --lib-path options for Python module linkage. This option is useful when python-config does not setup path to libpython, which is non standard.
@@ -17,12 +17,14 @@ for nxt_option; do --config=*) NXT_PYTHON_CONFIG="$value" ;; --module=*) NXT_PYTHON_MODULE="$value" ;; + --lib-path=*) NXT_PYTHON_LIB_PATH="$value" ;; --help) cat << END --config=FILE set python-config filename --module=NAME set unit python module name + --lib-path=DIRECTORY set directory path to libpython.so library END exit 0 @@ -52,6 +54,7 @@ fi NXT_PYTHON_CONFIG=${NXT_PYTHON_CONFIG=python-config} NXT_PYTHON=${NXT_PYTHON_CONFIG%-config*} NXT_PYTHON_MODULE=${NXT_PYTHON_MODULE=${NXT_PYTHON##*/}} +NXT_PYTHON_LIB_PATH=${NXT_PYTHON_LIB_PATH=} $echo "configuring Python module" @@ -64,11 +67,18 @@ if /bin/sh -c "$NXT_PYTHON_CONFIG --prefix" >> $NXT_AUTOCONF_ERR 2>&1; then NXT_PYTHON_INCLUDE=`${NXT_PYTHON_CONFIG} --includes` NXT_PYTHON_LIBS=`${NXT_PYTHON_CONFIG} --ldflags` + if [ "$NXT_PYTHON_LIB_PATH" != "" ]; then + # "python-config --ldflags" may not contain path to libpython. + NXT_PYTHON_LDFLAGS="-L$NXT_PYTHON_LIB_PATH -Wl,-rpath $NXT_PYTHON_LIB_PATH" + else + NXT_PYTHON_LDFLAGS="" + fi + nxt_feature="Python" nxt_feature_name="" nxt_feature_run=no nxt_feature_incs="${NXT_PYTHON_INCLUDE}" - nxt_feature_libs="${NXT_PYTHON_LIBS}" + nxt_feature_libs="${NXT_PYTHON_LIBS} $NXT_PYTHON_LDFLAGS" nxt_feature_test=" #include <Python.h> @@ -95,7 +105,7 @@ nxt_feature="Python version" nxt_feature_name="" nxt_feature_run=value nxt_feature_incs="${NXT_PYTHON_INCLUDE}" -nxt_feature_libs="${NXT_PYTHON_LIBS}" +nxt_feature_libs="${NXT_PYTHON_LIBS} $NXT_PYTHON_LDFLAGS" nxt_feature_test=" #include <Python.h> #include <stdio.h> @@ -164,7 +174,7 @@ ${NXT_PYTHON_MODULE}: $NXT_BUILD_DIR/${NXT_PYTHON_MODULE}.unit.so $NXT_BUILD_DIR/${NXT_PYTHON_MODULE}.unit.so: $nxt_objs \$(NXT_MODULE_LINK) -o $NXT_BUILD_DIR/${NXT_PYTHON_MODULE}.unit.so \\ - $nxt_objs $NXT_PYTHON_LIBS $NXT_LD_OPT + $nxt_objs $NXT_PYTHON_LIBS $NXT_PYTHON_LDFLAGS $NXT_LD_OPT install: ${NXT_PYTHON_MODULE}-install
docker: apt-get update before each other apt command Each RUN command can be cached separately, so we can't depend on the cache to be up-to-date.
@@ -23,6 +23,7 @@ RUN \ # Common packages RUN \ + apt-get update -y && \ apt-get install -yq \ git build-essential \ cmake ninja-build \ @@ -40,6 +41,7 @@ RUN pip3 install meson==0.55.0 # GCC cross-compilers RUN \ + apt-get update -y && \ apt-get install -y apt-file && \ apt-file update && \ PACKAGES_TO_INSTALL=""; \ @@ -53,6 +55,7 @@ RUN \ # ICC RUN \ + apt-get update -y && \ apt-get install -yq curl gpg && \ curl -s "https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB" | gpg --dearmor > /etc/apt/trusted.gpg.d/intel.gpg && \ echo "deb [arch=amd64] https://apt.repos.intel.com/oneapi all main" > /etc/apt/sources.list.d/oneAPI.list && \
slightly improve special sam opcodes
@@ -1442,29 +1442,55 @@ _n_burn(c3_y* pog, u3_noun bus, c3_ys mov, c3_ys off) *top = u3i_vint(*top); BURN(); + do_sam0: + top = _n_peek(off); + if ( *top == 0 ) { + *top = c3y; + } + else { + u3z(*top); + *top = c3n; + } + BURN(); + do_sam1: - x = 1; - goto samd_in; + top = _n_peek(off); + if ( *top == 1 ) { + *top = c3y; + } + else { + u3z(*top); + *top = c3n; + } + BURN(); do_samb: - x = pog[ip_s++]; - goto samd_in; + top = _n_peek(off); + if ( *top == pog[ip_s++] ) { + *top = c3y; + } + else { + u3z(*top); + *top = c3n; + } + BURN(); do_sams: - x = _n_resh(pog, &ip_s); - goto samd_in; + top = _n_peek(off); + if ( *top == _n_resh(pog, &ip_s) ) { + *top = c3y; + } + else { + u3z(*top); + *top = c3n; + } + BURN(); do_samn: - x = _n_rean(pog, &ip_s); - goto samd_in; - - do_sam0: - x = 0; - samd_in: top = _n_peek(off); o = *top; - *top = u3r_sing(x, o); - u3z(o); // don't bother losing x + *top = u3r_sing(o, _n_rean(pog, &ip_s)); + u3z(o); BURN(); do_same: @@ -1865,6 +1891,7 @@ u3n_burn_on(u3_noun bus, u3_noun fol) } #endif +/* _n_take_narg(): helper for copying noun-parts of bytecode */ static void _n_take_narg(c3_y* pog, c3_y* gop, c3_s sip_s, c3_s* ip_s) {
Remove extraneous -O2 from C_FLAGS in kickit config site file.
@@ -16,8 +16,8 @@ SET(VISITARCH linux-x86_64_gcc-4.8) VISIT_OPTION_DEFAULT(VISIT_C_COMPILER gcc TYPE FILEPATH) VISIT_OPTION_DEFAULT(VISIT_CXX_COMPILER g++ TYPE FILEPATH) VISIT_OPTION_DEFAULT(VISIT_FORTRAN_COMPILER no TYPE FILEPATH) -VISIT_OPTION_DEFAULT(VISIT_C_FLAGS " -m64 -fPIC -O2 -fvisibility=hidden" TYPE STRING) -VISIT_OPTION_DEFAULT(VISIT_CXX_FLAGS " -m64 -fPIC -O2 -fvisibility=hidden" TYPE STRING) +VISIT_OPTION_DEFAULT(VISIT_C_FLAGS " -m64 -fPIC -fvisibility=hidden" TYPE STRING) +VISIT_OPTION_DEFAULT(VISIT_CXX_FLAGS " -m64 -fPIC -fvisibility=hidden" TYPE STRING) ## ## Parallel Build Setup.
godfather update fixes
@@ -158,7 +158,7 @@ void Init() static auto dw81A292 = hook::get_pattern("83 C4 14 5F 5E C2 04 00", 0); static auto dw81A3D2 = hook::get_pattern("D9 5F 6C 8B 15 ? ? ? ? FF 52 30 83 C4 14 5F 5E C2 04 00", 12); static auto dw81B4DC = hook::get_pattern("83 C4 0C 8B 54 24 30 8B 7C 24 4C", 0); - static auto dw7CEA9B = hook::get_pattern("83 C4 0C 66 89 7E 3C 8B 4C 24 68 D9 44 24 18", 0); + static auto dw7CEA9B = hook::get_pattern("83 C4 0C 66 89 7E 3C 8B", 0); static auto dw7CC347 = hook::get_pattern("83 C4 0C 66 C7 45 3C 00 00 8B 45 28 D9 44 24 10 D8 A0 90 00 00 00", 0); static auto dw79F715 = hook::get_pattern("8B 44 24 48 83 C4 14 3B F0", 0); static auto dw7CF68D = hook::get_pattern("A1 ? ? ? ? 83 C4 08 85 C0 89 44 24 20 89 74 24 24", 0);
add possibilty to agent to read password from file
#include "utils/crypt/passwordCrypt.h" #include "utils/db/password_db.h" #include "utils/deathUtils.h" +#include "utils/file_io/file_io.h" #include "utils/memory.h" #include "utils/oidc_error.h" #include "utils/password_entry.h" @@ -72,6 +73,13 @@ oidc_error_t savePassword(struct password_entry* pw) { } pwe_setCommand(pw, tmp); } + if (pw->filepath) { + char* tmp = encryptPassword(pw->filepath, pw->shortname); + if (tmp == NULL) { + return oidc_errno; + } + pwe_setFile(pw, tmp); + } if (pw->type & PW_TYPE_MNG) { #ifndef __APPLE__ keyring_savePasswordFor(pw->shortname, pw->password); @@ -171,6 +179,12 @@ char* getPasswordFor(const char* shortname) { res = getOutputFromCommand(cmd); secFree(cmd); } + if (!res && type & PW_TYPE_FILE) { + agent_log(DEBUG, "Try getting password from file"); + char* file = decryptPassword(pw->filepath, shortname); + res = getLineFromFile(file); + secFree(file); + } if (!res && type & PW_TYPE_PRMT) { agent_log(DEBUG, "Try getting password from user prompt"); res = askpass_getPasswordForUpdate(shortname);
only flush pending ssl when we're not waiting on async
@@ -1564,7 +1564,9 @@ static void proceed_handshake_picotls(h2o_socket_t *sock) if (wbuf.off != 0) { h2o_socket_read_stop(sock); write_ssl_bytes(sock, wbuf.base, wbuf.off); + if (ret != PTLS_ERROR_ASYNC_OPERATION) { flush_pending_ssl(sock, next_cb); + } } else if (ret == PTLS_ERROR_IN_PROGRESS) { h2o_socket_read_start(sock, next_cb); } else { @@ -1736,8 +1738,10 @@ static void proceed_handshake_undetermined(h2o_socket_t *sock) cb = on_handshake_fail_complete; break; } + if (ret != PTLS_ERROR_ASYNC_OPERATION) { flush_pending_ssl(sock, cb); } + } ptls_buffer_dispose(&wbuf); }
sysrepocfg CHANGE remove vfork ... as it is a rather junky function.
@@ -143,7 +143,7 @@ step_edit_input(const char *editor, const char *path) return EXIT_FAILURE; } - if ((pid = vfork()) == -1) { + if ((pid = fork()) == -1) { error_print(0, "Fork failed (%s)", strerror(errno)); return EXIT_FAILURE; } else if (pid == 0) {
odissey: remove frontend_stream_reset()
@@ -453,26 +453,6 @@ od_frontend_stream_hit_limit(od_client_t *client) return shapito_stream_used(client->stream) >= instance->scheme.readahead; } -static inline void -od_frontend_stream_reset(od_client_t *client) -{ - shapito_stream_t *stream = client->stream; -#if 0 - od_instance_t *instance = client->system->instance; - int watermark = (instance->scheme.readahead * 2); - if (od_unlikely(shapito_stream_used(stream) >= watermark)) { - od_debug(&instance->logger, "main", client, client->server, - "client buffer size: %d bytes, cleanup", - shapito_stream_used(stream)); - shapito_stream_free(stream); - shapito_stream_init(stream); - } else { - shapito_stream_reset(stream); - } -#endif - shapito_stream_reset(stream); -} - static od_frontend_rc_t od_frontend_local(od_client_t *client) { @@ -532,7 +512,7 @@ od_frontend_remote_client(od_client_t *client) shapito_stream_t *stream = client->stream; od_server_t *server = client->server; - od_frontend_stream_reset(client); + shapito_stream_reset(stream); int request_count = 0; int terminate = 0; @@ -573,7 +553,7 @@ od_frontend_remote_client(od_client_t *client) terminate = 1; if (request_count == server->deploy_sync) { - od_frontend_stream_reset(client); + shapito_stream_reset(stream); server->deploy_sync = 0; } break; @@ -645,7 +625,7 @@ od_frontend_remote_server(od_client_t *client) shapito_stream_t *stream = client->stream; od_server_t *server = client->server; - od_frontend_stream_reset(client); + shapito_stream_reset(stream); int rc; for (;;) { @@ -668,7 +648,7 @@ od_frontend_remote_server(od_client_t *client) rc = od_backend_deploy(server, "main", request, request_size); if (rc == -1) return OD_FE_ESERVER_CONFIGURE; - od_frontend_stream_reset(client); + shapito_stream_reset(stream); continue; }
dm: fix minor comment in acrn_create_e820_table 'pSRAM' is legacy name and replaced with 'SSRAM'
@@ -224,7 +224,7 @@ acrn_create_e820_table(struct vmctx *ctx, struct e820_entry *e820) memcpy(e820, e820_default_entries, sizeof(e820_default_entries)); - /* FIXME: Here wastes 8MB memory if pSRAM is enabled, and 64MB+16KB if + /* FIXME: Here wastes 8MB memory if SSRAM is enabled, and 64MB+16KB if * GPU reserved memory is exist. * * Determines the GPU region due to DSM identical mapping.
WIP Improve branch headers
@@ -197,9 +197,9 @@ export const ScriptEventBranchHeader = styled.div<ScriptEventBranchHeaderProps>` && { // background: red; - margin-top: -5px; + // margin-top: -5px; margin-right: -5px; - margin-bottom: -5px; + // margin-bottom: -5px; margin-left: -5px; flex-basis: 100%; } @@ -208,10 +208,54 @@ export const ScriptEventBranchHeader = styled.div<ScriptEventBranchHeaderProps>` color: ${(props) => props.theme.colors.scripting.header.text}; line-height: 12px; + ${(props) => + props.conditional && props.nestLevel % 4 === 0 + ? css` + background: linear-gradient( + 0deg, + ${props.theme.colors.scripting.header.nest1Background}, + ${props.theme.colors.scripting.header.nest1Background} + ); + ` + : ""} + ${(props) => + props.conditional && props.nestLevel % 4 === 1 + ? css` + background: linear-gradient( + 0deg, + ${props.theme.colors.scripting.header.nest2Background}, + ${props.theme.colors.scripting.header.nest2Background} + ); + ` + : ""} + ${(props) => + props.conditional && props.nestLevel % 4 === 2 + ? css` + background: linear-gradient( + 0deg, + ${props.theme.colors.scripting.header.nest3Background}, + ${props.theme.colors.scripting.header.nest3Background} + ); + ` + : ""} + ${(props) => + props.conditional && props.nestLevel % 4 === 3 + ? css` + background: linear-gradient( + 0deg, + ${props.theme.colors.scripting.header.nest4Background}, + ${props.theme.colors.scripting.header.nest4Background} + ); + ` + : ""} + + ${(props) => !props.open ? css` - margin-bottom: -10px; + && { + margin-bottom: -5px; + } ` : ""} `;
scheduler: dont rewake killed procs
@@ -110,8 +110,7 @@ static void sched_disable_kthread(struct thread *th) struct proc *p = th->p; th->active = false; - p->active_threads[th->at_idx] = - p->active_threads[--p->active_thread_count]; + p->active_threads[th->at_idx] = p->active_threads[--p->active_thread_count]; p->active_threads[th->at_idx]->at_idx = th->at_idx; list_add(&p->idle_threads, &th->idle_link); sched_steer_flows(p); @@ -548,7 +547,8 @@ void sched_poll(void) /* check if a core went idle */ if (!s->wait && !s->idle && ksched_poll_idle(core)) { if (s->cur_th) { - if (sched_try_fast_rewake(s->cur_th) == 0) + if (!s->cur_th->p->kill && + sched_try_fast_rewake(s->cur_th) == 0) continue; sched_disable_kthread(s->cur_th); proc_put(s->cur_th->p);
Don't attempt an RPZ delete for unsupported actions
@@ -292,8 +292,6 @@ rpz_insert_qname_trigger(struct rpz* r, uint8_t* dname, size_t dnamelen, return 0; } if(a == RPZ_LOCAL_DATA_ACTION) { - /* insert data. TODO synth wildcard cname target on - * lookup */ rrstr = sldns_wire2str_rr(rr, rr_len); /* TODO non region alloc so rrs can be free after IXFR deletion? * */ @@ -483,11 +481,10 @@ rpz_remove_rr(struct rpz* r, size_t aznamelen, uint8_t* dname, return; } t = rpz_dname_to_trigger(policydname); - if(t == RPZ_QNAME_TRIGGER) { + if(a != RPZ_INVALID_ACTION && t != RPZ_QNAME_TRIGGER) { z = rpz_find_zone(r, policydname, policydnamelen, rr_class, 1 /* only exact */, 1 /* wr lock */); if(!z) { - /* TODO, not for SOA, NS, DNSSEC related RR types */ verbose(VERB_ALGO, "RPZ: cannot remove RR from IXFR, " "RPZ domain not found"); free(policydname); @@ -501,11 +498,6 @@ rpz_remove_rr(struct rpz* r, size_t aznamelen, uint8_t* dname, local_zones_del_zone(r->local_zones, z); } } - else { - verbose(VERB_ALGO, "RPZ: skipping unusupported trigger: %s " - "while removing RPZ RRs", - rpz_trigger_to_string(t)); - } free(policydname); }
TLS 1.3: Add session test checks
@@ -4763,8 +4763,6 @@ void ssl_serialize_session_save_load( int ticket_len, char *crt_file, #if defined(MBEDTLS_SSL_ENCRYPT_THEN_MAC) TEST_ASSERT( original.encrypt_then_mac == restored.encrypt_then_mac ); -#endif - } #endif #if defined(MBEDTLS_SSL_SESSION_TICKETS) && defined(MBEDTLS_SSL_CLI_C) TEST_ASSERT( original.ticket_len == restored.ticket_len ); @@ -4777,6 +4775,52 @@ void ssl_serialize_session_save_load( int ticket_len, char *crt_file, } TEST_ASSERT( original.ticket_lifetime == restored.ticket_lifetime ); #endif + } +#endif /* MBEDTLS_SSL_PROTO_TLS1_2 */ + +#if defined(MBEDTLS_SSL_PROTO_TLS1_3) + if( tls_version == MBEDTLS_SSL_VERSION_TLS1_3 ) + { + TEST_ASSERT( original.endpoint == restored.endpoint ); + TEST_ASSERT( original.ciphersuite == restored.ciphersuite ); + TEST_ASSERT( original.ticket_age_add == restored.ticket_age_add ); + TEST_ASSERT( original.ticket_flags == restored.ticket_flags ); + TEST_ASSERT( original.resumption_key_len == restored.resumption_key_len ); + if( original.resumption_key_len != 0 ) + { + TEST_ASSERT( original.resumption_key != NULL ); + TEST_ASSERT( restored.resumption_key != NULL ); + TEST_ASSERT( memcmp( original.resumption_key, + restored.resumption_key, + original.resumption_key_len ) == 0 ); + } +#if defined(MBEDTLS_HAVE_TIME) && defined(MBEDTLS_SSL_SRV_C) + if( endpoint_type == MBEDTLS_SSL_IS_CLIENT) + { + TEST_ASSERT( original.start == restored.start ); + } +#endif +#if defined(MBEDTLS_SSL_SESSION_TICKETS) && defined(MBEDTLS_SSL_CLI_C) + if( endpoint_type == MBEDTLS_SSL_IS_CLIENT) + { +#if defined(MBEDTLS_HAVE_TIME) + TEST_ASSERT( original.ticket_received == restored.ticket_received ); +#endif + TEST_ASSERT( original.ticket_lifetime == restored.ticket_lifetime ); + TEST_ASSERT( original.ticket_len == restored.ticket_len ); + if( original.ticket_len != 0 ) + { + TEST_ASSERT( original.ticket != NULL ); + TEST_ASSERT( restored.ticket != NULL ); + TEST_ASSERT( memcmp( original.ticket, + restored.ticket, + original.ticket_len ) == 0 ); + } + + } +#endif + } +#endif /* MBEDTLS_SSL_PROTO_TLS1_3 */ exit: mbedtls_ssl_session_free( &original );
build: fixing linux target archive target program (ar), and ranlib
@@ -58,7 +58,7 @@ MV := mv -f RM := rm -f SED := @SED@ GREP := @GREP@ -ARTOOL := @ARTOOL@ +AR := @AR@ LIBTOOL := @LIBTOOL@ RANLIB := @RANLIB@ @@ -1184,7 +1184,8 @@ libliquid.dylib: $(objects) # linux, et al # libliquid.a: $(objects) - $(AR) r $@ $^ + ${AR} r $@ $^ + ${RANLIB} $@ libliquid.so: libliquid.a $(CC) $(CFLAGS) $(LDFLAGS) -shared -Xlinker -soname=$@ -o $@ -Wl,-whole-archive $^ -Wl,-no-whole-archive $(LIBS)
tests CHANGE use pipes instead of stdio Fixes
@@ -41,7 +41,7 @@ static int setup_write(void **state) { (void) state; /* unused */ - int fd; + int fd, pipes[2]; struct wr *w; w = malloc(sizeof *w); @@ -58,14 +58,16 @@ setup_write(void **state) lys_parse_fd(w->session->ctx, fd, LYS_IN_YIN); close(fd); + pipe(pipes); + w->session->status = NC_STATUS_RUNNING; w->session->version = NC_VERSION_10; w->session->opts.client.msgid = 999; w->session->ti_type = NC_TI_FD; w->session->io_lock = malloc(sizeof *w->session->io_lock); pthread_mutex_init(w->session->io_lock, NULL); - w->session->ti.fd.in = STDIN_FILENO; - w->session->ti.fd.out = STDOUT_FILENO; + w->session->ti.fd.in = pipes[0]; + w->session->ti.fd.out = pipes[1]; /* get rpc to write */ w->rpc = nc_rpc_lock(NC_DATASTORE_RUNNING); @@ -82,7 +84,9 @@ teardown_write(void **state) struct wr *w = (struct wr *)*state; nc_rpc_free(w->rpc); + close(w->session->ti.fd.in); w->session->ti.fd.in = -1; + close(w->session->ti.fd.out); w->session->ti.fd.out = -1; nc_session_free(w->session, NULL); free(w);
tests: Fix flaky test "multi-vtep SB Chassis encap updates" Acked-by: Ales Musil
@@ -28578,7 +28578,11 @@ ovs-vsctl add-br br-phys ovn_attach n1 br-phys 192.168.0.1 24 geneve # Get the encap rec, should be just one - with geneve/192.168.0.1 -encap_rec=$(ovn-sbctl --data=bare --no-heading --column encaps list chassis hv1) +# Skip initial null encap +OVS_WAIT_UNTIL( + [encap_rec=$(ovn-sbctl --bare --no-heading --columns encaps list chassis hv1) + echo "encap_rec = $encap_rec" + test $encap_rec]) # Set multiple IPs as hv1 @@ -28587,9 +28591,10 @@ ovs-vsctl \ # Check if the encap_rec changed - should have, no need to # compare the exact values. -encap_rec_mvtep=$(ovn-sbctl --data=bare --no-heading --column encaps list chassis hv1) - -AT_CHECK([test "$encap_rec" != "$encap_rec_mvtep"], [0], []) +OVS_WAIT_UNTIL( + [encap_rec_mvtep=$(ovn-sbctl --bare --no-heading --columns encaps list chassis hv1) + echo "encap_rec_mvtep = $encap_rec_mvtep" + test "$encap_rec" != "$encap_rec_mvtep"]) # now, wait for a couple of secs - should be enough time, I suppose. sleep 2
When apps_startup() fails, exit with a failure code and a message
@@ -144,8 +144,13 @@ int main(int argc, char *argv[]) return 1; } - if (!apps_startup()) + if (!apps_startup()) { + BIO_printf(bio_err, + "FATAL: Startup failure (dev note: apps_startup() failed)\n"); + ERR_print_errors(bio_err); + ret = 1; goto end; + } prog = prog_init(); pname = opt_progname(argv[0]);
Move where details of operating mode output.
@@ -3407,13 +3407,6 @@ def _cmd_setup_server(command, args, options): if options['startup_log']: print('Startup Log File :', options['startup_log_file']) - if options['debug_mode']: - print('Operating Mode : debug') - elif options['embedded_mode']: - print('Operating Mode : embedded') - else: - print('Operating Mode : daemon') - if options['enable_coverage']: print('Coverage Output :', os.path.join( options['coverage_directory'], 'index.html')) @@ -3437,6 +3430,13 @@ def _cmd_setup_server(command, args, options): print('Environ Variables :', options['server_root'] + '/envvars') print('Control Script :', options['server_root'] + '/apachectl') + if options['debug_mode']: + print('Operating Mode : debug') + elif options['embedded_mode']: + print('Operating Mode : embedded') + else: + print('Operating Mode : daemon') + if options['processes'] == 1: print('Request Capacity : %s (%s process * %s threads)' % ( options['processes']*options['threads'],