search for: lo32

Displaying 8 results from an estimated 8 matches for "lo32".

Did you mean: le32
2012 Jul 18
1
[LLVMdev] Instructions working on 64bit registers without true support for 64bit operations
...of mine (who originally implemented the TriCore-backend) suggested to use a pattern that replaces 64bit-constants by tow INSERT_SUBREG-nodes. I ended up having the following pattern: def : Pat<(i64 imm:$imm), (INSERT_SUBREG (INSERT_SUBREG (i64 (IMPLICIT_DEF)), (i32 (LO32 imm:$imm)), sub_even), (i32 (HI32 imm:$imm)), sub_odd)>; OK, this leaves a DAG where all i64-Constant-nodes are replaced by to nested INSERT_SUBREG-nodes, but how do I get rid of that INSERT_SUBREG-stuff. Do I have to lower it separately? Should there be some magic that elimina...
2011 Aug 03
1
[PATCH v2] kinit: Add drop_capabilities support.
...("Error dropping capability %s from bset\n", + capabilities[cap_ordinal].cap_name); + } else if (ret < 0) + fail("Kernel doesn't recognize capability %d\n", cap_ordinal); +} + +static void do_usermodehelper_file(const char *filename, int cap_ordinal) +{ + uint32_t lo32, hi32; + FILE *file; + static const size_t buf_size = 80; + char buf[buf_size]; + char tail; + size_t bytes_read; + int ret; + + /* Try and open the file */ + file = fopen(filename, "r+"); + if (!file && errno == ENOENT) + fail("Could not disable usermode helpers capabilitie...
2013 May 29
1
[PATCH] klibc: fix capability dropping
...4 --- a/usr/kinit/capabilities.c +++ b/usr/kinit/capabilities.c @@ -172,9 +172,9 @@ static void do_usermodehelper_file(const char *filename, int cap_ordinal) ret = fflush(file); if (ret != 0) fail("Failed on file %s to fflush %d\n", filename, ret); - sprintf(buf, "%u %u", lo32, hi32); - ret = fwrite(buf, 1, strlen(buf) + 1, file); - if (ret != 0) + sprintf(buf, "%u %u\n", lo32, hi32); + ret = fwrite(buf, 1, strlen(buf), file); + if (ret != strlen(buf)) fail("Failed to commit usermode helper bitmasks: %d\n", ret); /* Cleanup */ -- 1.8.2.1
2012 Jul 12
0
[LLVMdev] Instructions working on 64bit registers without true support for 64bit operations
On Thu, Jul 12, 2012 at 01:22:39PM +0200, Fabian Scheler wrote: > Hi Micah, > > > We have a very similar setup with the AMDIL backend(some operations support 64bit some don't). > > > > What we do is we enable MVT::i64, set legal to all operands that are legal and then set everything else to expand. > > thanks for your hint. Unfortunately, I didn't find any
2011 Jul 19
4
[PATCH v1 0/2] Support dropping of capabilities from early userspace.
This patchset applies to klibc mainline. As is it will probably collide with Maximilian's recent patch to rename run-init to switch_root posted last week. To boot an untrusted environment with certain capabilities locked out, we'd like to be able to drop the capabilities up front from early userspace, before we actually transition onto the root volume. This patchset implements this by
2012 Jul 12
2
[LLVMdev] Instructions working on 64bit registers without true support for 64bit operations
Hi Micah, > We have a very similar setup with the AMDIL backend(some operations support 64bit some don't). > > What we do is we enable MVT::i64, set legal to all operands that are legal and then set everything else to expand. thanks for your hint. Unfortunately, I didn't find any time to work on my problem in the meantime as I was busy preparing lectures. However, the summer
2012 May 27
1
[klibc:master] kinit: Fix capabilities alternate read/ write io without flush
...lper_file(const char *filename, int cap_ordinal) hi32 &= ~(1 << (cap_ordinal - 32)); /* Commit the new bit masks to the kernel */ + ret = fseek(file, 0L, SEEK_SET); + if (ret != 0) + fail("Failed on file %s to seek %d\n", filename, ret); sprintf(buf, "%u %u", lo32, hi32); ret = fwrite(buf, 1, strlen(buf) + 1, file); if (ret != 0)
2012 May 29
0
[klibc:master] capabilities: Use fflush() instead of fseek ()
...32)); /* Commit the new bit masks to the kernel */ - ret = fseek(file, 0L, SEEK_SET); + ret = fflush(file); if (ret != 0) - fail("Failed on file %s to seek %d\n", filename, ret); + fail("Failed on file %s to fflush %d\n", filename, ret); sprintf(buf, "%u %u", lo32, hi32); ret = fwrite(buf, 1, strlen(buf) + 1, file); if (ret != 0)