Make changes needed for new demo

This commit is contained in:
Justine Tunney 2023-06-15 23:22:49 -07:00
parent c3440d040c
commit e6b7c16a53
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
13 changed files with 96 additions and 47 deletions

View file

@ -419,6 +419,7 @@ int unveil(const char *path, const char *permissions) {
// if the host environment enables unveil() to impose true security // if the host environment enables unveil() to impose true security
// restrictions because the default behavior is to silently succeed // restrictions because the default behavior is to silently succeed
// so that programs will err on the side of working if distributed. // so that programs will err on the side of working if distributed.
if (permissions) return einval();
if (IsOpenbsd()) return 0; if (IsOpenbsd()) return 0;
if (landlock_abi_version != -1) { if (landlock_abi_version != -1) {
_unassert(landlock_abi_version >= 1); _unassert(landlock_abi_version >= 1);

View file

@ -19,7 +19,6 @@
#include "libc/calls/calls.h" #include "libc/calls/calls.h"
#include "libc/calls/struct/sched_param.h" #include "libc/calls/struct/sched_param.h"
#include "libc/errno.h" #include "libc/errno.h"
#include "libc/log/log.h"
#include "libc/sysv/consts/ioprio.h" #include "libc/sysv/consts/ioprio.h"
#include "libc/sysv/consts/prio.h" #include "libc/sysv/consts/prio.h"
#include "libc/sysv/consts/sched.h" #include "libc/sysv/consts/sched.h"
@ -30,7 +29,7 @@
* @return 0 on success, or -1 w/ errno * @return 0 on success, or -1 w/ errno
* @note error reporting currently not implemented * @note error reporting currently not implemented
*/ */
int MakeProcessNice(void) { int verynice(void) {
int e = errno; int e = errno;
setpriority(PRIO_PROCESS, 0, 10); setpriority(PRIO_PROCESS, 0, 10);
ioprio_set(IOPRIO_WHO_PROCESS, 0, IOPRIO_PRIO_VALUE(IOPRIO_CLASS_IDLE, 0)); ioprio_set(IOPRIO_WHO_PROCESS, 0, IOPRIO_PRIO_VALUE(IOPRIO_CLASS_IDLE, 0));

View file

@ -104,7 +104,7 @@ char *GetInterpreterExecutableName(char *, size_t);
int _OpenExecutable(void); int _OpenExecutable(void);
bool _IsDynamicExecutable(const char *); bool _IsDynamicExecutable(const char *);
/* execution control */ /* execution control */
int MakeProcessNice(void); int verynice(void);
axdx_t setlongerjmp(jmp_buf) axdx_t setlongerjmp(jmp_buf)
libcesque returnstwice paramsnonnull(); libcesque returnstwice paramsnonnull();
void longerjmp(jmp_buf, intptr_t) libcesque wontreturn paramsnonnull(); void longerjmp(jmp_buf, intptr_t) libcesque wontreturn paramsnonnull();

View file

@ -212,7 +212,7 @@ static int on_missing_feature(const char *name) {
int main(int argc, char ** argv) { int main(int argc, char ** argv) {
MakeProcessNice(); verynice();
ShowCrashReports(); ShowCrashReports();
setvbuf(stdin, NULL, _IONBF, 0); setvbuf(stdin, NULL, _IONBF, 0);

View file

@ -55,7 +55,7 @@ static const std::map<std::string, llama_ftype> LLAMA_FTYPE_MAP = {
// ./quantize models/llama/ggml-model.bin models/llama/ggml-model-quant.bin type [nthreads] // ./quantize models/llama/ggml-model.bin models/llama/ggml-model-quant.bin type [nthreads]
// //
int main(int argc, char ** argv) { int main(int argc, char ** argv) {
MakeProcessNice(); verynice();
ShowCrashReports(); ShowCrashReports();
ggjt_v3(); ggjt_v3();

View file

@ -359,6 +359,14 @@ class BaseServer:
""" """
pass pass
def forked_request(self, request, client_address):
"""Called in child after os.fork() is called.
May be overridden.
"""
pass
def finish_request(self, request, client_address): def finish_request(self, request, client_address):
"""Finish one request by instantiating RequestHandlerClass.""" """Finish one request by instantiating RequestHandlerClass."""
self.RequestHandlerClass(request, client_address, self) self.RequestHandlerClass(request, client_address, self)
@ -617,6 +625,7 @@ if hasattr(os, "fork"):
# This must never return, hence os._exit()! # This must never return, hence os._exit()!
status = 1 status = 1
try: try:
self.forked_request(request, client_address)
self.finish_request(request, client_address) self.finish_request(request, client_address)
status = 0 status = 0
except Exception: except Exception:

View file

@ -146,6 +146,18 @@ cosmo_crc32c(PyObject *self, PyObject *args)
return PyLong_FromUnsignedLong(crc); return PyLong_FromUnsignedLong(crc);
} }
PyDoc_STRVAR(verynice_doc,
"verynice($module)\n\
--\n\n\
Makes current process as low-priority as possible.");
static PyObject *
cosmo_verynice(PyObject *self, PyObject *args)
{
verynice();
Py_RETURN_NONE;
}
PyDoc_STRVAR(decimate_doc, PyDoc_STRVAR(decimate_doc,
"decimate($module, bytes)\n\ "decimate($module, bytes)\n\
--\n\n\ --\n\n\
@ -202,6 +214,7 @@ PyDoc_STRVAR(pledge_doc,
--\n\n\ --\n\n\
Permits syscall operations, e.g.\n\ Permits syscall operations, e.g.\n\
\n\ \n\
>>> cosmo.pledge(None, None) # assert support\n\
>>> cosmo.pledge('stdio rpath tty', None)\n\ >>> cosmo.pledge('stdio rpath tty', None)\n\
\n\ \n\
This function implements the OpenBSD pledge() API for\n\ This function implements the OpenBSD pledge() API for\n\
@ -213,7 +226,7 @@ cosmo_pledge(PyObject *self, PyObject *args)
{ {
int e = errno; int e = errno;
const char *x, *y; const char *x, *y;
if (!PyArg_ParseTuple(args, "sz:pledge", &x, &y)) return 0; if (!PyArg_ParseTuple(args, "zz:pledge", &x, &y)) return 0;
__pledge_mode = PLEDGE_PENALTY_RETURN_EPERM; __pledge_mode = PLEDGE_PENALTY_RETURN_EPERM;
if (!pledge(x, y)) { if (!pledge(x, y)) {
Py_RETURN_NONE; Py_RETURN_NONE;
@ -229,8 +242,9 @@ PyDoc_STRVAR(unveil_doc,
--\n\n\ --\n\n\
Permits filesystem operations, e.g.\n\ Permits filesystem operations, e.g.\n\
\n\ \n\
>>> cosmo.unveil('.', 'rwcx')\n\ >>> cosmo.unveil('', None) # assert support\n\
>>> cosmo.unveil(None, None)\n\ >>> cosmo.unveil('.', 'rwcx') # permit current dir\n\
>>> cosmo.unveil(None, None) # commit policy\n\
\n\ \n\
This function implements the OpenBSD unveil() API for\n\ This function implements the OpenBSD unveil() API for\n\
OpenBSD and Linux where we use Landlock LSM. Read the\n\ OpenBSD and Linux where we use Landlock LSM. Read the\n\
@ -239,11 +253,15 @@ Cosmopolitan Libc documentation to learn more.");
static PyObject * static PyObject *
cosmo_unveil(PyObject *self, PyObject *args) cosmo_unveil(PyObject *self, PyObject *args)
{ {
int e = errno;
const char *x, *y; const char *x, *y;
int abi, e = errno;
if (!PyArg_ParseTuple(args, "zz:unveil", &x, &y)) return 0; if (!PyArg_ParseTuple(args, "zz:unveil", &x, &y)) return 0;
if (!unveil(x, y)) { if ((abi = unveil(x, y)) != -1) {
Py_RETURN_NONE; if (abi) {
return PyLong_FromUnsignedLong(abi);
} else {
Py_RETURN_NONE;
}
} else { } else {
PyErr_SetString(PyExc_SystemError, strerror(errno)); PyErr_SetString(PyExc_SystemError, strerror(errno));
errno = e; errno = e;
@ -338,6 +356,7 @@ static PyMethodDef cosmo_methods[] = {
{"syscount", cosmo_syscount, METH_NOARGS, syscount_doc}, {"syscount", cosmo_syscount, METH_NOARGS, syscount_doc},
{"popcount", cosmo_popcount, METH_VARARGS, popcount_doc}, {"popcount", cosmo_popcount, METH_VARARGS, popcount_doc},
{"decimate", cosmo_decimate, METH_VARARGS, decimate_doc}, {"decimate", cosmo_decimate, METH_VARARGS, decimate_doc},
{"verynice", cosmo_verynice, METH_VARARGS, verynice_doc},
#ifdef __x86_64__ #ifdef __x86_64__
{"getcpucore", cosmo_getcpucore, METH_NOARGS, getcpucore_doc}, {"getcpucore", cosmo_getcpucore, METH_NOARGS, getcpucore_doc},
{"getcpunode", cosmo_getcpunode, METH_NOARGS, getcpunode_doc}, {"getcpunode", cosmo_getcpunode, METH_NOARGS, getcpunode_doc},

View file

@ -48,7 +48,7 @@ static const std::map<std::string, enum gptneox_ftype> GPTNEOX_FTYPE_MAP = {
// ./quantize models/llama/ggml-model.bin models/llama/ggml-model-quant.bin type // ./quantize models/llama/ggml-model.bin models/llama/ggml-model-quant.bin type
// //
int main(int argc, char ** argv) { int main(int argc, char ** argv) {
MakeProcessNice(); verynice();
ShowCrashReports(); ShowCrashReports();
ggjt_v1(); ggjt_v1();

View file

@ -99,7 +99,7 @@ int main(int argc, char ** argv) {
params.instruct = true; params.instruct = true;
params.interactive = true; params.interactive = true;
MakeProcessNice(); verynice();
ShowCrashReports(); ShowCrashReports();
if (gpt_params_parse(argc, argv, params) == false) { return 1; } if (gpt_params_parse(argc, argv, params) == false) { return 1; }
@ -137,7 +137,7 @@ int main(int argc, char ** argv) {
} }
} }
MakeProcessNice(); verynice();
ShowCrashReports(); ShowCrashReports();
// Always interactive for RedPajama chat model // Always interactive for RedPajama chat model

View file

@ -84,7 +84,7 @@ int main(int argc, char ** argv) {
gpt_params params; gpt_params params;
params.model = "./examples/redpajama/models/pythia/ggml-RedPajama-INCITE-Instruct-3B-v1-f16.bin"; params.model = "./examples/redpajama/models/pythia/ggml-RedPajama-INCITE-Instruct-3B-v1-f16.bin";
MakeProcessNice(); verynice();
ShowCrashReports(); ShowCrashReports();
if (gpt_params_parse(argc, argv, params) == false) { if (gpt_params_parse(argc, argv, params) == false) {

View file

@ -50,7 +50,7 @@ static const std::map<std::string, enum gptneox_ftype> GPTNEOX_FTYPE_MAP = {
// ./quantize models/llama/ggml-model.bin models/llama/ggml-model-quant.bin type // ./quantize models/llama/ggml-model.bin models/llama/ggml-model-quant.bin type
// //
int main(int argc, char ** argv) { int main(int argc, char ** argv) {
MakeProcessNice(); verynice();
ShowCrashReports(); ShowCrashReports();
ggjt_v2(); ggjt_v2();

View file

@ -576,8 +576,9 @@ int main(int argc, char *argv[]) {
NormalizeFileDescriptors(); NormalizeFileDescriptors();
} }
// set resource limits if (g_nice) {
MakeProcessNice(); verynice();
}
if (SetCpuLimit(g_cpuquota) == -1) { if (SetCpuLimit(g_cpuquota) == -1) {
kprintf("error: setrlimit(%s) failed: %m\n", "RLIMIT_CPU"); kprintf("error: setrlimit(%s) failed: %m\n", "RLIMIT_CPU");

View file

@ -105,6 +105,7 @@ static void printelfehdr(void) {
static void printelfsegmentheader(int i) { static void printelfsegmentheader(int i) {
Elf64_Phdr *phdr = GetElfSegmentHeaderAddress(elf, st->st_size, i); Elf64_Phdr *phdr = GetElfSegmentHeaderAddress(elf, st->st_size, i);
if (!phdr) return;
printf("/\tElf64_Phdr *phdr = GetElfSegmentHeaderAddress(elf, st->st_size, " printf("/\tElf64_Phdr *phdr = GetElfSegmentHeaderAddress(elf, st->st_size, "
"%d)\n", "%d)\n",
i); i);
@ -133,6 +134,7 @@ static void printelfsegmentheaders(void) {
static void printelfsectionheader(int i, char *shstrtab) { static void printelfsectionheader(int i, char *shstrtab) {
Elf64_Shdr *shdr; Elf64_Shdr *shdr;
shdr = GetElfSectionHeaderAddress(elf, st->st_size, i); shdr = GetElfSectionHeaderAddress(elf, st->st_size, i);
if (!shdr) return;
printf("/\tElf64_Shdr *shdr = GetElfSectionHeaderAddress(elf, st->st_size, " printf("/\tElf64_Shdr *shdr = GetElfSectionHeaderAddress(elf, st->st_size, "
"%d)\n", "%d)\n",
i); i);
@ -160,7 +162,11 @@ static void printelfsectionheader(int i, char *shstrtab) {
static void printelfsectionheaders(void) { static void printelfsectionheaders(void) {
Elf64_Half i; Elf64_Half i;
char *shstrtab; char *shstrtab;
const char *str;
Elf64_Shdr *shdr, *shshdr;
shshdr = GetElfSectionHeaderAddress(elf, st->st_size, elf->e_shstrndx);
shstrtab = GetElfSectionNameStringTable(elf, st->st_size); shstrtab = GetElfSectionNameStringTable(elf, st->st_size);
if (!shshdr || !shstrtab) return;
if (shstrtab) { if (shstrtab) {
printf("\n"); printf("\n");
printf("\t.org\t%#x\n", elf->e_shoff); printf("\t.org\t%#x\n", elf->e_shoff);
@ -168,12 +174,11 @@ static void printelfsectionheaders(void) {
printelfsectionheader(i, shstrtab); printelfsectionheader(i, shstrtab);
} }
printf("\n/\t%s\n", "elf->e_shstrndx"); printf("\n/\t%s\n", "elf->e_shstrndx");
printf("\t.org\t%#x\n", printf("\t.org\t%#x\n", shshdr->sh_offset);
GetElfSectionHeaderAddress(elf, st->st_size, elf->e_shstrndx)
->sh_offset);
for (i = 0; i < elf->e_shnum; ++i) { for (i = 0; i < elf->e_shnum; ++i) {
Elf64_Shdr *shdr = GetElfSectionHeaderAddress(elf, st->st_size, i); shdr = GetElfSectionHeaderAddress(elf, st->st_size, i);
const char *str = GetElfString(elf, st->st_size, shstrtab, shdr->sh_name); if (!shdr) break;
str = GetElfString(elf, st->st_size, shstrtab, shdr->sh_name);
show(".asciz", format(b1, "%`'s", str), NULL); show(".asciz", format(b1, "%`'s", str), NULL);
} }
} }
@ -182,13 +187,18 @@ static void printelfsectionheaders(void) {
static void printelfgroups(void) { static void printelfgroups(void) {
for (int i = 0; i < elf->e_shnum; ++i) { for (int i = 0; i < elf->e_shnum; ++i) {
Elf64_Shdr *shdr = GetElfSectionHeaderAddress(elf, st->st_size, i); Elf64_Shdr *shdr = GetElfSectionHeaderAddress(elf, st->st_size, i);
if (!shdr) break;
if (shdr->sh_type == SHT_GROUP) { if (shdr->sh_type == SHT_GROUP) {
const Elf64_Shdr *symhdr = const Elf64_Shdr *symhdr =
GetElfSectionHeaderAddress(elf, st->st_size, shdr->sh_link); GetElfSectionHeaderAddress(elf, st->st_size, shdr->sh_link);
if (!symhdr) break;
const Elf64_Shdr *strhdr = const Elf64_Shdr *strhdr =
GetElfSectionHeaderAddress(elf, st->st_size, symhdr->sh_link); GetElfSectionHeaderAddress(elf, st->st_size, symhdr->sh_link);
if (!strhdr) break;
Elf64_Sym *syms = GetElfSectionAddress(elf, st->st_size, symhdr); Elf64_Sym *syms = GetElfSectionAddress(elf, st->st_size, symhdr);
if (!syms) break;
char *strs = GetElfSectionAddress(elf, st->st_size, strhdr); char *strs = GetElfSectionAddress(elf, st->st_size, strhdr);
if (!strs) break;
printf("\n"); printf("\n");
printf("//\t%s group\n", printf("//\t%s group\n",
GetElfString(elf, st->st_size, strs, syms[shdr->sh_info].st_name)); GetElfString(elf, st->st_size, strs, syms[shdr->sh_info].st_name));
@ -206,9 +216,11 @@ static void printelfgroups(void) {
const Elf64_Shdr *section = const Elf64_Shdr *section =
GetElfSectionHeaderAddress(elf, st->st_size, READ32LE(p)); GetElfSectionHeaderAddress(elf, st->st_size, READ32LE(p));
printf("\t.long\t%#x\t\t\t# %s\n", READ32LE(p), printf("\t.long\t%#x\t\t\t# %s\n", READ32LE(p),
GetElfString(elf, st->st_size, section ? GetElfString(
GetElfSectionNameStringTable(elf, st->st_size), elf, st->st_size,
section->sh_name)); GetElfSectionNameStringTable(elf, st->st_size),
section->sh_name)
: 0);
} }
shdr->sh_offset; shdr->sh_offset;
} }
@ -244,14 +256,15 @@ static void printelfsymbol(Elf64_Sym *sym, char *strtab, char *shstrtab) {
GetElfString(elf, st->st_size, strtab, sym->st_name))); GetElfString(elf, st->st_size, strtab, sym->st_name)));
printelfsymbolinfo(sym); printelfsymbolinfo(sym);
printelfsymbolother(sym); printelfsymbolother(sym);
Elf64_Shdr *shdr =
GetElfSectionHeaderAddress(elf, st->st_size, sym->st_shndx);
show(".short", format(b1, "%d", sym->st_shndx), show(".short", format(b1, "%d", sym->st_shndx),
format(b2, "%s sym->st_shndx", format(b2, "%s sym->st_shndx",
sym->st_shndx < 0xff00 sym->st_shndx < 0xff00
? format(b1, "%`'s", ? format(b1, "%`'s",
GetElfString(elf, st->st_size, shstrtab, shdr ? GetElfString(elf, st->st_size, shstrtab,
GetElfSectionHeaderAddress( shdr->sh_name)
elf, st->st_size, sym->st_shndx) : 0)
->sh_name))
: findnamebyid(kElfSpecialSectionNames, sym->st_shndx))); : findnamebyid(kElfSpecialSectionNames, sym->st_shndx)));
show(".quad", format(b1, "%#x", sym->st_value), "sym->st_value"); show(".quad", format(b1, "%#x", sym->st_value), "sym->st_value");
show(".quad", format(b1, "%#x", sym->st_size), "sym->st_size"); show(".quad", format(b1, "%#x", sym->st_size), "sym->st_size");
@ -260,13 +273,14 @@ static void printelfsymbol(Elf64_Sym *sym, char *strtab, char *shstrtab) {
static void printelfsymboltable(void) { static void printelfsymboltable(void) {
size_t i, symcount = 0; size_t i, symcount = 0;
Elf64_Sym *symtab = GetElfSymbolTable(elf, st->st_size, &symcount); Elf64_Sym *symtab = GetElfSymbolTable(elf, st->st_size, &symcount);
if (!symtab) return;
char *strtab = GetElfStringTable(elf, st->st_size); char *strtab = GetElfStringTable(elf, st->st_size);
char *shstrtab = GetElfSectionNameStringTable(elf, st->st_size); char *shstrtab = GetElfSectionNameStringTable(elf, st->st_size);
if (symtab && strtab) { printf("\n\n");
printf("\n\n"); printf("\t.org\t%#x\n", (intptr_t)symtab - (intptr_t)elf);
printf("\t.org\t%#x\n", (intptr_t)symtab - (intptr_t)elf); for (i = 0; i < symcount; ++i) {
for (i = 0; i < symcount; ++i) { printf(".Lsym%d:\n", i);
printf(".Lsym%d:\n", i); if (strtab && shstrtab) {
printelfsymbol(&symtab[i], strtab, shstrtab); printelfsymbol(&symtab[i], strtab, shstrtab);
} }
} }
@ -275,13 +289,14 @@ static void printelfsymboltable(void) {
static void printelfdynsymboltable(void) { static void printelfdynsymboltable(void) {
size_t i, symcount = 0; size_t i, symcount = 0;
Elf64_Sym *symtab = GetElfDynSymbolTable(elf, st->st_size, &symcount); Elf64_Sym *symtab = GetElfDynSymbolTable(elf, st->st_size, &symcount);
if (!symtab) return;
char *strtab = GetElfDynStringTable(elf, st->st_size); char *strtab = GetElfDynStringTable(elf, st->st_size);
char *shstrtab = GetElfSectionNameStringTable(elf, st->st_size); char *shstrtab = GetElfSectionNameStringTable(elf, st->st_size);
if (symtab && strtab) { printf("\n\n");
printf("\n\n"); printf("\t.org\t%#x\n", (intptr_t)symtab - (intptr_t)elf);
printf("\t.org\t%#x\n", (intptr_t)symtab - (intptr_t)elf); for (i = 0; i < symcount; ++i) {
for (i = 0; i < symcount; ++i) { printf(".Lsym%d:\n", i);
printf(".Lsym%d:\n", i); if (strtab && shstrtab) {
printelfsymbol(&symtab[i], strtab, shstrtab); printelfsymbol(&symtab[i], strtab, shstrtab);
} }
} }
@ -309,8 +324,8 @@ static void printelfrelocations(void) {
size_t i, j, count; size_t i, j, count;
const Elf64_Sym *syms; const Elf64_Sym *syms;
const Elf64_Rela *rela; const Elf64_Rela *rela;
const Elf64_Shdr *shdr, *symtab;
char *strtab, *shstrtab, *symbolname; char *strtab, *shstrtab, *symbolname;
const Elf64_Shdr *shdr, *shdr2, *symtab;
strtab = GetElfStringTable(elf, st->st_size); strtab = GetElfStringTable(elf, st->st_size);
shstrtab = GetElfSectionNameStringTable(elf, st->st_size); shstrtab = GetElfSectionNameStringTable(elf, st->st_size);
for (i = 0; i < elf->e_shnum; ++i) { for (i = 0; i < elf->e_shnum; ++i) {
@ -324,20 +339,25 @@ static void printelfrelocations(void) {
(uintptr_t)elf + shdr->sh_offset + shdr->sh_size)); (uintptr_t)elf + shdr->sh_offset + shdr->sh_size));
++rela, ++j) { ++rela, ++j) {
symtab = GetElfSectionHeaderAddress(elf, st->st_size, shdr->sh_link); symtab = GetElfSectionHeaderAddress(elf, st->st_size, shdr->sh_link);
if (!symtab) continue;
count = symtab->sh_size / symtab->sh_entsize; count = symtab->sh_size / symtab->sh_entsize;
syms = GetElfSectionAddress(elf, st->st_size, symtab); syms = GetElfSectionAddress(elf, st->st_size, symtab);
sym = ELF64_R_SYM(rela->r_info); sym = ELF64_R_SYM(rela->r_info);
if (0 <= sym && sym < count) { if (0 <= sym && sym < count) {
symbolname = if (syms && strtab && shstrtab) {
getelfsymbolname(elf, st->st_size, strtab, shstrtab, syms + sym); symbolname = getelfsymbolname(elf, st->st_size, strtab, shstrtab,
syms + sym);
} else {
symbolname = xasprintf("evil-sym-%d", sym);
}
} else { } else {
symbolname = xasprintf("bad-sym-%d", sym); symbolname = xasprintf("bad-sym-%d", sym);
} }
printf("/\t%s+%#lx → %s%c%#lx\n", printf("/\t%s+%#lx → %s%c%#lx\n",
GetElfString( (shdr2 =
elf, st->st_size, shstrtab, GetElfSectionHeaderAddress(elf, st->st_size, shdr->sh_info))
GetElfSectionHeaderAddress(elf, st->st_size, shdr->sh_info) ? GetElfString(elf, st->st_size, shstrtab, shdr2->sh_name)
->sh_name), : 0,
rela->r_offset, symbolname, rela->r_addend >= 0 ? '+' : '-', rela->r_offset, symbolname, rela->r_addend >= 0 ? '+' : '-',
ABS(rela->r_addend)); ABS(rela->r_addend));
printf("%s_%zu_%zu:\n", ".Lrela", i, j); printf("%s_%zu_%zu:\n", ".Lrela", i, j);