Welcome to grad school one on one. Good morning, everybody. As a general introduction, I have a presentation that I'll be sharing with you guys. I am the senior fellowships office in Rackham's finance and fellowships team.  So I have a great knowledge of some of the fellowships and things. And you may hear the term fellowship more so when it comes to graduate programs. So we'll be talking about some of those funding sources as I know that it can be a little bit different for students. When it comes to undergraduate versus graduate funding. So let me turn the song for you guys so that you can see this presentation. All right, I think everyone should be good to be able to see that. And if not, just let us know in the chat. So, as you go through graduate school, there are everyone wants to know how do they fund it. It's always the biggest question, of course. Expenses that typically need to be covered of course your tuition and your fees, books, living expenses, which can be your room, your board, moving costs, childcare expenses, if you do have a family, and then also other family obligations.  So most people think about how am I going to actually pay for this. So there are different type of funding, you have external funding sources and we'll talk more about those later. And then there's also the financial need which you apply for through for the FAFSA and it's based on your expected family contribution. And there is a max amount typically per year that you can get as a graduate student. So also must make sure that like your competitive within your own institution and other external funding sources to be able to get certain funding as well too. So, with the external funding, there can be a direct impact on basically your graduate and professional studies. So some things sometimes are going to be based on, you know, your specific field of study. So you want to keep that in mind. As I mentioned earlier is no different from undergraduate in the costs of education and what your expected family contribution is and how your financial need is actually determined once you get to the funding portion of graduate school. So you can keep that in mind. And to grad school, there are some very common funding sources. As you were undergrad, you typically probably had a GSI. Now you have that opportunity to be a GSI on those. This is basically a graduate student instructor. There's also a GSRA, which is a graduate student research assistant. GSSA, which is the graduate student staff assistant. Now, based on these, these are all specific things that you go through your program. Your program is typically where you apply for these funding sources, they'll have opportunities that are available, and you go through them to be able to get these. When they go through a screening process, it's almost like, it's almost like applying for a job. And so you are in competition to with other students that are in your program that are applying for these, these sources of funding. And typically, depending on there's different levels of commitments in terms of how much you're expected to contribute. But that will be specific to what your program is actually looking forward to. So who can actually get funding. Basically, all of you could possibly get funding. I will mention that typically it is a little more difficult for master students to receive funding. I always recommend doing a lot of external searches for those students, different type of funding sources. They can be available depending on what type of student you are in the stage of your graduate program. So if you are incoming student, you can be a returning graduate student there specific funding for that. You can be new to your graduate field and there can be funding for those that are transitioning to a new field. I would like to pay attention to like if you need to be a pre candidate, if you're a PhD student or candidate level student. So there's different search specifications that you can go through to actually be able to find specific funding based on where you are and who you are in your You need qualities as a student so those things in mind if you have you know certain things that there are certain areas that you live in that may offer funding for students that are within their area or thinking about going to to the postgraduate to study within particular areas are also something that's pretty common. So you're thinking about, I don't know going to study and develop things in Malaysia, for instance, then there may be some specific things there that, you know, you may be able to get funding for something from someone who is interested in those type of studies. There's different funding sources that may cover different things so you have funding that may not necessarily cover all of your funding. And when it comes to your tuition stipend health insurance but there are some that are inclusive of covering those expenses. Typically, they're going to be tuition fees stipend grad care. You'll hear health insurance referred to as grad care. So those things are sometimes things that you may be able to get funding for. There's also other little smaller funding sources that you can get. So for instance with them, our department, we do offer conference travel grants for students that are traveling to present at conferences. We also have an emergency fund to for students that are experiencing the emergency funding. And all of this is on our website with the specific ones that I'm talking about now. Students are as a master's student you're allowed to get one emergency funding up to $2,500 during your time as a master's students PhD students because your time is a little bit longer here so you can encounter more emergency situations. You can get up to two emergency fundings as a PhD student, and those are up to $2,500 each as well. So you want to keep those things in mind. Things happen whether it's medical expenses that may come up. There's many unexpected instances that may happen that come up and their specific eligibility requirements and things that we will cover. One big thing that has come up especially with the transition to virtual learning computers and laptops are not included in those emergency funding. I do recommend if you are needing some additional technology resources reaching out to your department seeing if they have any available resources. Sometimes they'll have lenders and things like that. Also there are research expenses where as a master's and a pre candidate you can get a research grant up to $1,500. As you become a candidate in your PhD program is $3,000. So that's something that a lot of our students do utilize to be able to kind of help with the expenses of their research. There are many opportunities within RACM and not even just RACM, but also looking into your department and external funding to be able to help fund some of those opportunities that come available as you go along. So you think about where do you find those sources. Online of course is the biggest place that you can go. There's different private sectors in the government. One of our biggest ones that we work with is the National Science Foundation NSF. We do have quite a few students that come in and they receive the NSF. If you work previously in the workforce or currently, you know, you hold a job, master's students are more common where they are able to get assistance from their employers. If there are any employee assistance things take a look at that and really take advantage of those. Those are usually are really great programs. You can also checking, you know, university, your specific graduate school, your department as I mentioned departments usually are very helpful in finding scholarships or fellowships that are out there. And the reason why is because a lot of times it can be field specific. So they may know different funding sources based on what it is that you're studying. A lot of times to students you want to make sure that like as you're applying and even as you're getting awarded making sure that you understand what's actually available to you. So sometimes there may be funding that only funds one turn or they may do a full year. Sometimes you'll have once where you have to renew yearly and meet eligibility requirements. And I actually make sure too that you're taking a look on is tuition included or fees included are funds paid directly to you are they paid directly to the university. These are all things to kind of consider. And then making sure you meet what the eligibility requirements are. So a lot of times, these fellowships will want you to be registered full time, or meet if there's an external fellowship they want you to meet whatever the requirements are of the university to be able to allow these to these fellowships to pay out to you. And usually what that means is being registered as a full time student. And if you're not then that could revoke what it is that you were awarded so making sure that you're paying that. Sometimes there's stipulations in terms of outside work that you can do or they limit how much you can work. So for instance with some of our fellowships in house, we do have a 10 hour limit weekly that you can do as far as working as if it is a fully funded fellowship we're filled as if we're funding you, we want you to specifically focus on your studies. So there are other requirements that programs want to know how you're doing that they're awarding you so you may have reporting activities to see that how you're moving along and then your advisors may have to sign on off on that to make sure that you are able to continue to get funding. I've already talked about making sure you know you understand kind of some of those stipulations in terms of what is required as you go along from that, the funding sources. One of the things that you do want to keep in mind too as you're being awarded funding whether it is external funding or funding with from the university is how if you're getting me base aid from the office of financial aid or government funding is how that can actually affect you. So if you qualify for need is financial aid is a possibility if you awarded additional funding that your loan amount can be reduced because you they're increasing how much it is you're expected to contribute based on that new funding information. So, for instance, if you get a fellowship your loan for $10,000 what you your loan amount may be reduced by $10,000, but it's very specific to each individual student in your financial situation. So it's always best to reach out to the office of financial aid. They do all of the calculations in terms of what is expected for you to contribute. And then if you get new funding coming in they're able to recalculate that and see how that may adjust it. Sometimes it may not necessarily adjust it depending on what your need is. And so this can come in a form of if you have a loan amount or even a subsidy so one of the one of the most common subsidies that a student may get is a childcare subsidy. So that can also be reduced. So you want to make sure that if you're getting some funding that you contact the office of financial aid so that there isn't any discrepancies there because students can be come what they call over rewarded. And then you may have to pay back money. And sometimes if that money hits your account you think you're good and it's yours but then the office of financial aid comes back and says no. And so you don't want to be in a position where you have to pay back funding worth that you already spent. So I can't stress enough how important that actually is. I've kind of done like a mix of kind of the external funding and internal with finance and fellowships office. Basically what we do in the fellowships office is we house a number of fellowships that we actually handle and then we partner with some external funding sources as well to where we may do something that's called a cost share program. So if it is an external funding let's say I use NSF earlier where students that are awarded NSF get a cost of education of $12,000 a year. So what we do with this cost share program if your tuition or cost of education is more than that and that's just your tuition and your fees is over $12,000 we do what's called a cost share where we will help and pay the difference of what your tuition is that isn't being covered by that $12,000. So that's a little example of what that is. There's not a whole lot of summer research programs that are out there there are some within Rackham but not necessarily within fellowships sometimes we do help with kind of putting funding on for that for those programs but there aren't really specifically summer research programs that we specifically deal with. At this point, just so you know there are basically two types of ways in which you can get Rackham funding so there are ones that you apply for on your own. As I mentioned earlier there's a travel grant there's also the research and emergency. You also have those in which you're nominated by so your program has to actually nominate you for certain funding sources so that one of our big ones are our Rackham Merit Fellowship and Rackham Merit Rackham Masters awards, excuse me.  They go into the system and they will tell you that they need certain information from you you'll get that to them, and they will put it into our system to be able to nominate you by the deadlines which are all on our site. And if so you go and you see that it is a program nominated award that you think you may be eligible for if it is before the deadline. I recommend going to your program and say hey I saw this award. Do you think that based on what the criteria is for the department and for Rackham that I will qualify. And what do I need to be able to apply. You want to make sure that you're in contact with your program usually it's your graduate coordinator, who has this information, because they have their own internal deadlines that are typically before the Rackham deadline so that they can get all the information into the system. So that's your deadline date. If you go to our website, you'll be able to see all of the fellowships grants and scholarships that we are able to offer. This is a list of that here. There are probably about a good two dozen of them different funding sources some that are going to be fully funded some that are specific to needs like I said emergency research travel. They're all listed here and they're open to all that. Well some are open to masters. But mostly are all of them are open to our PhD students but you are with everything is listed on there in terms of what the eligibility is so that you can sure that you're applying for what it is that you're eligible for. You can kind of see those that are open to our masters level students. So that list is much shorter than that of our PhD students so if you matriculate into a PhD program you'll have more funding opportunities so master students are completely left out. I know I've just given quite a bit of information so. Oh no, did anyone have any questions. I have a couple of questions in the chat Chinese and folks keep putting the questions in. So, first question is was, I would love to learn more about NSF funding and how rack them. Zoom did one of those scroll to the bottom is someone put a comment in the box. Let me go back up to it. Let's go more about NSF funding and how rack them has worked with those students that have NSF funding. Where can I learn more. So, through our website, I'll put that in chat. There's tons of funding information on here. Let me go to with SF and specific specifically it is a cost share. So that's where you will you scroll through the list that I'm going to put here in a chat. So I want to go to cost share. This is the site that I referenced, mostly. And one of the things that will do is I will this presentation I know it kind of went through and there's some helpful information. So, most of it is here. I know this is recorded so Paul this is going to be posted so that like students can specifically go back and take a look and see like if you want to pause it to see what some of those awards are that are listed you'll be able to see that right here on this website to. And there's some links in the grad 101 portal and the financial aid to find the finance in grad school section. There's some links that will take you to some of the resources you talked about as well so there's lots of different ways for people to look at funding options here. And the other question. The next question is, are all GSI GSRA and GSS positions posted slash available through specifics programs, or is there a one stop shop for applications and available positions. So go to the U of them employee site, you're able to see all of those positions. But I also would still go and talk to like see what your program and the protocol that they use to because they are going to know what's going to become available before it's even posted so that you would kind of have some of the inside track. I really recommend getting to know your graduate coordinator, your graduate coordinator is like, they have information just about anything when it comes to your funding. So, if you have questions about funding, how can you find the upcoming year. If you are have funding in place and you want to know when you probably should use certain funding for what year, get to know your graduate coordinators. And then add to that, a couple of things number want to put the careers that you miss website in the chat for those who are not familiar with it so that's where a lot of these postings go. I'm going to reemphasize get to know your grad coordinators or anyone who has in your programs who has access to jobs or has sort of plugged in. And I think third just remember to look at them. They're automatically signed up for the weekly Rackham newsletter so check your email inbox for that like open it up. There is a job section and as sometimes positions become open whether they're GSSI GSRA or sometimes we just have 10 positions we need to fill that it's another place you will find those jobs on the you miss career site but sometimes just a quicker more concise way for you to sort of get the answer to that so some good resources on that. Question. Let's see. Question about going to the last slide on master's opportunities should be so maybe we can opportunities for master students funding. We can. You want to do that here or let's answer one more another question and we'll show the slide. After that, so I'm an incoming PhD. This question is I'm an incoming PhD student this fall with a fellowship for funding. I was informed that for the winter semester I will be a GSRA. What is the difference between the fellowship and being a GSRA. You want to take a. It really depends on what. What the fellowship actually is. So I'm not sure what your fellowship is but it, it depends and it can vary. I don't know if you want to put in a chat with that fellowship is and I can speak specifically to it, or if you want to email to. We can talk about it that way. I'm going to put the email address in here. And I would add. This is sort of in addition to that. There are potential tax implications for that. I am not a tax expert, but we do have a filing taxes for graduate students workshop. That covers some of this information from a tax perspective, not from a, you know, from a funding from sort of how and if you need to report it. So I'm going to put that link in the in the chat here in a moment and you all can sign up for that. And or view past if you go into the portal we actually have one of our past tax workshops already recorded it's obviously not up. It's current, but it was taken I believe right before last tax season so you can sort of peruse that and then come to our workshop on September 1. Yeah, and just because typically those are good to attend because we are highly advised not to give any tax advice on that and I'm no tax expert anyhow. But we're highly advised around tax time we'll get a bunch of questions, usually stipends are not tax. So you really want to make sure you attend that so that you know how to go about handling the taxes. So, question was clarify a graduate program coordinators different from an academic advisor in this context. Typically, yes. Yes, they are. Sometimes though, when you get into grad school sometimes they become one in the same. They're going to probably depend on your department how big your department is, and kind of how they have things situated within the department but typically, sometimes they are one in the same. It varies. Question about funding opportunities for international students and what are they and do some of them differ than domestic students. There are some four international students. Some of them are going to be thinking more so PhD students that are candidate like our predoctoral program is more so for international. I typically recommend international students reach out to the International Center to to see what opportunities they have available. They have more information there I want funding for international students. Question, thank you. Let's see. The question about work study here Chinese curious about work study I noticed some positions on careers that you miss or work study. Are there other routes for getting work study positions and I add to that is, is work study something typically a lot of graduate students are eligible for. It depends. It's just, I can't I don't know a number I don't know I can't say typically yes, it is definitely possible for grad students to have work study. And it's because it's such a different so probably more so master students typically PhD students. There is usually a fund are pretty well funded at the University of Michigan so usually PhD students are trying to seek out work study opportunities is usually more so master students that are seeking off those opportunities and so you have the work study. You also have, as Paul mentioned 10 opportunities and those would be the ones in part time opportunities to that I would probably more so explore as a graduate student. Got a question the box about recordings for those that came a little bit late these sessions will be recorded and shown at a later date so if you missed part of this or want to come back and review it. Well, it takes about a couple weeks for it to get sort of posted online but in the grad school 101 portal look for updates we're actually going to create like a video vault of all past workshops from this year, and actually import some of the ones we did from last year as well so you'll have lots of video resources to catch up on as as we go through that. Thank me girls had a question she wanted to ask you can unmute yourself if you want to go ahead and ask your question. Yes, hi good morning. So my name is Brittany and I am an incoming dual degree student with the masters of social work and masters of public policy program. I received an email about a fellowship about and it's going to be a generic question I promise about getting a quarter of funding per for three semesters. I told the public policy coordinator that I only need two semesters of funding and I was wondering if my third semester of funding could be applied to my first or second semester of funding, and they told me no, and I was just curious if you had an answer to that no. I know that so if our funding puts in particular. Usually if there's a particular funding structure, we may have to stick to what that structure is. And so sometimes you can't necessarily deviate from it, and it probably it sounds like that's probably what they're saying to you. It happens sometimes where students made not a whole lot but it does happen where you know students want to move things around, and they're not able to keep one source of funding because they have other funding that cover something. Even in like your situation where it sounds like you don't have coverage for one so I get like in your mind it because even, you know, for me I'm like okay well I don't have it for this I just move it over. But yeah so but sometimes sometimes programs they have it has to be specific for whatever reason whether it's you know the funding isn't yet available or it can only be available for a specific time frame. Right yeah because that third semester of funding I'm like hey I don't need it because I'm completing my degree in two semesters not three so I was like can I take a third semester of funding and allocated to the, and they were like no. And to me that felt like a slap in the face like here we're going to give you this money but then we're just going to take it away from you because you're completing your degree early, you know what I mean. Yeah, and typically in your situation. The way that it is is that so the funding may not be paid to your department until your third term, but you're wanting to move it up but the money isn't there yet for them to actually be able to use and that's, that's more than likely. I can't speak specifically to it but it's almost like it's not there yet so I can't you can't move it up because we don't have it. Got it. Yeah, so much. Yeah, no problem. There was one question about without reading it directly basically how can someone tell the difference are which, which is their specific funding source so fellowship GSRA GR say, you know, etc. They're saying they see nothing in their Wolverine access as of yet is there a way of I guess this is after the fact. Identifying where the funding comes from. Um, I feel like you should know where like what funding source you're going to be getting now programs and I know even with myself they're still like, if you, let's say if you have a rack and fellowship maybe let's say our MF. The funding is still getting put on to your account. So you may start to see that more within the next week or two. If you're unsure about how you're going to get funded. Your graduate coordinator would be the person, but at this point, it should have been communicated if you're going, what source of income it is, but you may not see it on your account just yet. And you may, it just may be another week, week and a half, maybe I know classes are starting soon and you guys are starting to get those tuition bills that are due by the 31st. Most of the time that is going to be on your account by then and you'll be able to see it so I hate to say patients with that, but especially because it gets so close but we literally work with putting on a lot of information for a lot of students and so I think that's kind of where that may be coming from. With that like a knowledge but if you don't know where it's coming from definitely with your graduate coordinator reading through the chat. There was that one question earlier about showing re showing the slide about masters funding opportunities. We do that and if folks you if you have questions please keep putting them in the box while Shinies fires that up. One other thing that I do want to make sure that I mentioned to is that back if you're in the medical school the business school, the school of public health school of social work, those are professional degree schools, and they're not a part of the rack and family. And so what that means for you, if you are in those schools is that the rack funding would not be available to you. That's a good question. Oh, she's can you repeat which schools are not under Rackham. Yeah, school of social work, medical school, business school, and a school of public health. So, one question was about working where on the rack on website can we find recordings of workshops and recordings will be in the canvas portal under grad school 101. If you would like to prove last year's workshops and again coat note that these are last years, which isn't to say they're not relevant but they were done a year ago. I think they're in the my video folder, which is kind of a repository where we kept last year's workshops and those a lot of those will be imported to grad school one on one as well. All right, so one of the questions is asking. One of the PhD funding opportunities was for incoming students only your elaborate on that scholarship in particular. At this point, typically, anything that is for incoming PhD students. That would have been determined by the spring term of this year. So programs is used as a recruitment programs are able to use it as a recruitment tools so they may have given students. So that's one of the questions for that particular fellowship for them to actually come in and kind of draw students to what it is and maybe thinking about might be the RMF the rack of mirror fellowship that you're speaking of. That's something that the programs they do nominate incoming students for. And so if you have received that you have already known at this point is nothing that can be awarded at this point for any incoming students. If you're a dual degree student can you apply for a rack them through your school is that a part of the rack of family yes if you are a dual degree student and one program is a part of rack them under the rack of umbrella, you can apply. So if for those things are going like to travel grant research grant emergency fund. It gets a little more tricky when you get into kind of like those fellowships because sometimes you may have it where you're say you're in this burn Ross, as the example is here in the chat. If you're only enrolled in cross courses then tuition and fees are different so we would not necessarily be able to apply fellowship that applies tuition and fees for that term.  So the question says if I'm getting part tuition fellowship for fall winter fall and winter term can I still apply to get a fellowship for insurance because of certain life events and who do I contact regarding that. If insurance is not included, you would contact shared services, shared services, and they will be able to walk you through and believe is they will walk you through the cover process. Any other questions seeing none we are going to probably close this session for today we are will stick around if you have questions that you want to do off camera. Maureen is going to put a link in the chat for an evaluation please give us your feedback on this session, as we want to know what other topics we can cover and what we can include to make this even more useful to you. Thank you so much for being around the road and if you are still with us, and perhaps your, you have your name in the chat boxes like just your your preferred name if you could stick around and just give us what name you registered with so we can make sure you're counted in the attendance. Other than that, thank you so much and he's thank you for all the great information, and we will see you soon on grad school 101.


This research proposes a novel joint channel connectivity-based feature selection and classification algorithm for functional near-infrared spectroscopy, FNIRS, to detect stress and decision making. The algorithm combines feature selection and classifier modeling into a single process, while also taking into account the correlations between channels corresponding to the brain. This approach is able to identify discriminative features from the data, as well as determine the best channel settings for FNIRS. Furthermore, the correlation of brain regions calculated by feature selection has been confirmed in previous studies, which validates the effectiveness of the proposed method. Ultimately, this work could be beneficial for medical personnel to automatically detect stress in clinical decision-making situations. This article was authored by May-Yan Huang, Xiaoling Zhang, Xiumei Chen, and others.


OK, thanks a lot. Let me start with a bit of motivation for this primitive, namely in a regular encryption setting in the real world, so what we call the real world, maybe. So we usually speak about many parties and we have many ciphertexts.   But what we usually do when we try to construct public key encryption schemes is that we simplify things and we're saying that, OK, we really only have one user or sender or one public key and we have one challenge ciphertext. For instance, this is the case with in CPA security or in CCA security. So in this setting, we have a security experiment in which the adversary gets just one ciphertext. And of course, the adversary then has to derive some information about the information about the plaintext and this ciphertext and he wins or loses if he finds out something about this particular ciphertext. And the justification, why we look at this simplified setting and not that the whole deal with a bunch of public keys and a bunch of ciphertexts is that usually we can say that a hybrid argument works. What this means is that if we have one challenge setting and one user setting, then usually we can argue that if this is the case, then in a larger setting the scheme enjoys the same security property. So even the adversary that gets many ciphertexts won't derive any information, any reasonable information about any encrypted message. So this has several drawbacks. In particular, I want to highlight two drawbacks that this view or that this simplification has. First of all, the connection to the real world is not tight. So if we have a scheme which satisfies this simplified security notion, then in translating this experiment to the real world experiment, we lose a factor in the security reduction. That means our scheme gets less secure if we use it for more users. So it may get less secure. Of course, this is only a defect of the proof technique. This is not a defect of the scheme or not necessarily. And this is what I really want to focus on is the second problem of this simplification is that certain settings where we have encryption schemes with specific properties such as selective opening security, I'm going to be a bit more specific about this in a second, then we simply cannot restrict ourselves to a one challenge setting or one user setting simply because the usual way hybrid arguments work fails in certain settings such as selective openings. So for specific settings, this is problematic. And also there's a factor we lose in the security reduction if we simplify things when we analyze the security of, for instance, encryption schemes. So just to have a brief example of this, the security notion for selective openings which somehow should capture adaptive corruptions of senders in an encryption setting is that the adversary gets a bunch of ciphertexts, a whole vector of ciphertexts in fact. And then this is a simplified notion selects a subset of these ciphertexts. So the adversary tells you a set of indices from one to n, which he wants to corrupt or this corresponds to users he wants to corrupt. And then he gets openings of all the ciphertexts where opening means the adversary does not only get the message that was encrypted, but also the randomness that was used to encrypt. So this corresponds to really an opening of a commitment for all the indices that he selected. And then in the end, he should find out something or the adversary's goal is to find out something, of course, about the unopened ciphertexts. The open ciphertexts, well, he knows all about them already. So in this situation, the adversary gets the public key, all of the ciphertexts and the openings of some of them. And it turns out that hybrid argument in this setting simply fails. We cannot somehow argue that the scheme is secure in the one challenge case. And now we somehow conclude security in this multi-challenge setting.  The reason is that we wouldn't even know how to translate or how to build a one challenge setting for this particular game. Okay, so far, the motivation, why we should look at the multi-challenge, multi-user setting in some sense directly and not deal with simplifications in certain cases, at least. So in this talk, I want to present a technical tool that is specifically designed to treat situations in which you have multiple challenges and multiple users, multiple public keys. And you want to treat this setting, you want to tackle security proofs in this setting directly. And this is called all but many lossy trapdoor functions. And also I want to look at a construction of all but many lossy trapdoor functions, which is very, so technically this is very close to water signatures in fact, but with a twist. So let me start with the definition of a technical tool that is specifically designed for the multi-challenge, multi-user case. So first of all, a recap, what's a lossy trapdoor function in the first place? And from this we will generalize then. So a lossy trapdoor function is first of all, a keyed function, so it's actually a family of functions where you have an input X and you have a key, EK, evaluation key, I call it. And you can evaluate that function on X and you get some output. And the whole point or the interesting property of lossy trapdoor functions is that you can have evaluation keys that lead to invertible functions and you can have evaluation keys that lead to lossy functions. And what this means, I'm gonna tell you in a second. So the properties are, if you operate that function in invertible mode, which means with a key which is drawn from a set of invertible keys, then you get an injective function and in fact you can invert that function using a suitable trapdoor, EK inversion key that was sampled initially together with the evaluation key. And at the same time, you cannot efficiently distinguish evaluation keys which are invertible from lossy keys, EK prime. And the nice property or the specific property that these lossy keys have is that they actually lead to a lossy function which means the image set, F, EK prime, so the function operated in lossy mode is much smaller than the pre-image set, so we really lose some information. So we have efficient constructions of these creatures from LWE, from DDH, from DCR, and I want to highlight one particular construction here from DCR, so this is really a non-construction because it's efficient and it's the basis for what comes next. So the evaluation key in this DCR-based lossy trapdoor function is the public key of a additively homomorphic encryption scheme, so this can be Damgold-Jurick encryption, for example, or Paier encryption. Well, Paier, it has to be Damgold-Jurick, the generalization of Paier encryption, really. And also in the evaluation key, we have ciphertext, which is the encryption of a bit B. This can be either B equals one or zero. And if we have a bit, which is one, then the evaluation, which simply consists of deterministically using the homomorphic properties to derive an encryption of B times X, then this becomes an encryption of X, of course, and we can invert the function simply by using the decryption key. On the other hand, in lossy mode, we have B equals zero, so if we operate that function in lossy mode and we evaluate it, we get an encryption of zero all the time. Of course, we lose some information here, or we actually leak some information through the encryption randomness, or if this is a deterministic thing without any re-randomization, but we can upper bound the amount of information we leak through the encryption randomness. So essentially here in lossy mode, we get an encryption of zero all the time. And this fulfills all the properties here, invertibility, indistinguishability, and lossiness. And indistinguishability simply follows from the fact that it's a secure encryption scheme, so under the DCR assumption. So how do we use this primitive to argue for the security of an encryption scheme? We simply, well, essentially we encrypt a message by evaluating that lossy trapdoor function. So because we leak some information in lossy mode about the pre-image, we have to do some universal hashing or some randomness extraction here to somehow condense the uncertainty that the adversary has, but essentially we can use this function directly to encrypt messages. So the security proof simply consists in switching the lossy trapdoor function to lossy mode and then the adversary gets from a ciphertext, almost no information about the message. So the ciphertext become completely lossy, almost completely lossy. So the thing is, as soon as we have a decryption oracle here, we cannot decrypt or we cannot simulate the decryption oracle when we're in lossy mode. So either all ciphertexts are lossy and contain no information about the message or all ciphertexts are invertible and in the invertible case, we cannot argue that the adversary learns nothing about the message. So if we want to prove CCA security with such a technique, then Packard and Waters, they introduced something called all but one lossy trapdoor functions. And now we're already quite close to the main point of the talk. And all but one lossy trapdoor function simply takes an evaluation key along with a tag T. So they called it branch because they had a tree-based intuition about it, but I want to just call it more generally a tag which additionally selects a function out of a pool of functions selected by the evaluation key. And so we simply evaluate the function f e k comma T on whatever we evaluated here with on some random pre-image and this function becomes lossy if and only if the tag is a specific tag T star, which means the adversary in the security experiment in the CCA security experiment gets a lossy ciphertext but all the other ciphertext that the adversary could produce for decrypt queries have to be non-lossy and we can invert them. So in particular, the lossy tag corresponds to a single challenge ciphertext that the adversary gets. And in particular, this does not work with many challenge ciphertext. So if we want to take this route to achieve in CCA security, we get into trouble when we have many challenges or many users. So to cope with settings such as selective opening security where we have more than one lossy tag and we have more than one challenge ciphertext in particular, there is already a thing that is called all but n lossy trapdoor functions. And essentially it's the same thing as an all but one lossy trapdoor function.  And it's a generalization of the lossy trapdoor function from DCR. So what we have here is we have an evaluation key that contains a dumb god URIC encryption public key along with the coefficients encrypted of a polynomial that has well it has a bunch of zeros t one star up to t n star. And if we evaluate that function and first of all we compute this inner value here which turns out to be an polynomial, the evaluation of the polynomial f of t and then we multiply it by the pre-image. So we end up with an encryption of f of t times x. In particular if t is one of t one star up to t n star then f will have a zero there and we will encrypt a zero value in which case we end up with a lossy tag. So we lose information. The function for t being one of t one star up to t n star loses information. The problem that this construction has is that the space complexity, the description of the evaluation key is linear in the number of challenges. And if you think about this for a second then this is kind of inherent because it's information theoretically and encoding of all these texts t one star up to t n star if you look at the evaluation key if you just find out with an unbounded algorithm on which points this function is lossy and on which points it's not you just have a very complicated way of writing down t one star up to t n star. So if we follow this route to having multi-challenge in CCA security or multi-challenge selective opening security then you can do that but you end up with a large public key essentially. So what they proved is also that you get selective opening CCA security but you have to pay a price and the price is that you have a large public key. Our goal in this talk is lossy chapter functions with many lossy tags. So the intuition or the sketch of a definition is that there are many in fact super polynomial in many lossy tags and also there are many invertible tags and they're computationally indistinguishable and if you want to have some kind of intuition about it and all but one lossy chapter function has exactly one lossy tag. So there's a bunch of functions and one of them is lossy all but n lossy chapter functions there's a whole lot of functions and exactly n of them are lossy and with all but many lossy chapter functions actually lossy functions are all over the place but it's hard to find them. That's the point. So with a special trap door you can of course sample lossy lossy tags here but it's hard to find them without a special trap door. Okay, now I'm gonna be a bit brief about the construction how to derive these creatures and the idea is that we can start with the observation that there is some correspondence to blinded signatures. So this is really not blind signatures but this is blinded or hidden or encrypted signatures. A valid signature corresponds to a lossy tag. Even if you saw many lossy tags already you are unable to produce another one that should be the property you want to achieve. So let's simply encrypt signatures because this already smells like signatures it just doesn't have to have an efficient verification. So we sign some unique value this can be a hash function or something this is really not important but the point is that we have a tag which contains an encryption of a signature and the evaluation of this lossy trap door function somehow magically verifies the signature and should end up with an encryption of zero if and only if the signature is valid. And then we use the trick from before that we simply say that the image is well the encryption of X times whatever we start with. So if the signature is valid we end up with an encryption of zero and we get a lossy function. If the signature is invalid then we end up with an encryption of something presumably not zero and we end up with a function which we can invert by inverting D. So the problem is that how does this magically verifying a signature how does that really work because we only have an additively homomorphic encryption scheme and how do we verify a signature in ZN or ZN star if we only have addition. Now we use two tricks in order to accomplish this. The first trick or the first idea is inspired by Puget and Waters the original lossy trap door function construction and it's to use matrices instead of single values. So what we do is we have the tag contains an encrypted matrix instead of an encrypted value and if we evaluate that function we simply use like matrix vector multiplication. So we take the encrypted matrix take a plain text vector which is the pre-image and we compute an encryption of M times X and this can be done using the additively homomorphic properties of the encryption scheme. So the point of this is that this mapping becomes lossy if and only if the matrix is invertible. Or no, sorry, if and only if the matrix is not invertible if the matrix is invertible then of course we can by decrypting using a decryption key we can decrypt M and we can derive E of X or we can derive X from an encryption of M times X and why did we do this? What's the payoff here? The payoff is that a matrix is lossy if and only if the determinant is invertible or not invertible rather. So, but the determinant is a value which can depend in a cubic way on the encrypted values in particular we get a bunch of multiplications all of a sudden. So the verification or the signature verification here if we want to somehow make a tag which magically evaluates a signature verification then this corresponds to computing the determinant which again can be used to embed some multiplications. So the second idea is once we have that in mind that we can afford a small number of multiplications we can use a variant of water signatures only in a different domain. So what we do is water signatures are CDH-based signature scheme in pairing groups and we want to translate this to Zn. So what we do is we simply replace exponentiation by encryption. So this is again a PAI or a Darmgat-Jurick encryption additively homomorphic and we replace G to the A by an encryption of A and now the pairing essentially becomes a multiplication of exponents or multiplication of ciphertexts or of the plain text values encrypted in ciphertexts. In particular CDH becomes the computational Deffie-Hellman assumption becomes the assumption that you cannot multiply PAI ciphertexts and this is in fact the computational assumption that the construction is based on. It's based on the assumption that PAI is not multiplicatively homomorphic or not fully homomorphic if you want. So if we do this and if we translate things then what we end up with is a scheme where each tag an all but many loss of chapter function scheme where each tag leads to a matrix like this which has a determinant which exactly expresses the verification function of water signatures. So this is a nice thing because if we have evaluations like this then this can be viewed as an implicit water verification, implicit verification for the signature scheme. In particular we have a lossy function if and only if the signature was valid and so we can essentially take the security proof of water signatures transported to a different setting and what we get is an all but many lossy chapter function. Okay, now last slide will be about what we can do with this primitive now that we have such a multi-challenge multi-user primitive. So the first thing is we can derive efficient CCA secure selective opening schemes where in particular neither ciphertext nor public key depend on the number of challenges. So also it's compact but it's well you have to work with Dumbled Eurig encryption so it's not exactly efficient but it's still a small number of group elements. And this is the first scheme with these properties. Then we can also get tight in CCA security so the security, this is a funny thing because the security reduction is actually tight but the scheme itself is not really efficient. So it has a quadratic number in the security parameter of group elements in each ciphertext but it gives a tight in CCA secure encryption scheme. Okay, and it also has applications if we modify these techniques a little then we get key depend message security which also has a setting in which there are inherently many challenge ciphertext and you cannot easily get rid of them or you cannot easily apply a hybrid argument. So again there are similar concepts but we need a few tweaks and this is upcoming, this is not in the paper.  Okay, that was all, thanks. Thank you.


So welcome everyone. This talk today is on S frame, the simple frame stack trace format. My name is Indu Bhagat. I am a member of the Linux tool chains team at Oracle. So today we're going to talk about stack traces. In general, many things about stack traces. What is a stack trace? What are the current methods of generating stack traces? What are the challenges of each of these methods that we have for generating stack traces? What is S frame format then? And what impact can it make? Specifically, I want to steer at some point towards the direction of how is it that S frame can help in the, for the use case of fast and low overhead stack tracing. We'll also see how to generate stack trace information. And hopefully I can also show you how easy it is to stack trace using the S frame stack trace format. We'll also talk about some current and future work that we have planned. And if there is anything that jumps out to you or you would like to contribute to, please we can talk at that time too. So stack trace is just simply a list of function calls that are currently active in the thread, right? And we use stack traces for a variety of use cases. We need it for profiling, tracing, debugging tools and more. And a useful stack trace like so will show you a call chain IPs and some symbols associated with it. Now, this process of symbolization is what makes it human readable and may bring in just not just function or symbol names, but also maybe file names and line number and so on. But the thing I wanted to point out here is that in today's talk, we won't get into the aspects of symbolization. We only talk about call chain IPs and how to generate them using S frame. So what are the methods of generating called stack traces? Well, so the short answer is it depends.  They have their own restrictions on what is the real, what is the overhead that they can sustain. This, the list might be larger than this, but I think this is mainly, this covers the various methods that we have so far for stack tracing. And for the context of the talk today, I think it's useful if we get into the three of these methods, frame pointer method, EH frame, and then application-specific formats. This is just so that I can set up enough context to then talk about S frame format. So the first method is the frame pointer method, right? This is perhaps one of the oldest methods for stack tracing. And in this method, what you do is the ABI reserves a register and the compiler generates additional instructions using which the program will save the top of the stack as you enter the function, well, and also restore as you exit the function. But so for example, in case of X86, the register is RBP, and you will see additional instructions in your program which are the prologue and epilogue using which the program will save and restore these instructions. So there is an overhead with this method which is in terms of these additional instructions and also in terms of the compiler having to keep this register for nothing else but stack walking. So there is a performance overhead to this method and this has been one of the biggest complaints of the frame pointer-based method. On the positive side, however, this method is really, it's beautiful. I mean, it just works and it's so simple and easy to understand. So there are many good things about it, but the cons are mainly that there is a performance impact and the second thing, I don't know if it's so much of a problem in practice, but it seems like it's not, but it is not fully asynchronous. There are a few instructions in these few instructions in your prologue and epilogue. It's not fully asynchronous as in if you try to stack walk back from these instructions, it's not going to be fully precise. Moving on, the second method that is widely also used, in some cases, is the EH frame-based method. Now, EH frame is a dwarf-based method and it's not just a stack trace method, it's an unwind method. By that, what I mean is unwinding is not just, unwinding means stack tracing and also being able to restore the registers at each of these points. So, EH frame is really more than just a stack trace format and this information is present in the binaries as .ehframe and ehframe header sections. The format itself is quite compact, it's versatile, it works across languages, platforms and it works well in practice. There is good library support with it. If you're a user application, you want to use EH frame-based stack walking, you can pull in these libraries and there is good library support. The information is of band, so you don't have to compile your applications with FNOMID frame pointer. But the biggest concern with EH frame-based method has been that the stack tracer itself is slow and it is complex and why so? So, in EH frame-based method, what is encoded in these sections is basically the instructions to recover the stack offsets. So, some of these opcodes are simple, some complex, but you will need to implement a stack machine where you can execute these opcodes and figure out the stack offsets and unwind using that. So, this whole aspect of having to execute opcodes is what makes unwinding slow. At the time of stack tracing, it's not just there are other aspects to dwarf that make it slower, but by and large, this is the biggest complaint with EH frame-based stack tracing methods that these are slow and the unwinded itself is becoming more complex for applications to handle. And this is one of the reasons why it's not the preferred method even in case of kernel stack unwinding. There is, yeah, this Fedora 37 acceptor proposal now gathered a lot of attention from various folks in the community and it's interesting to read what we have so far talked about frame point or an EH frame. There is some discussion there too. So, and then moving on, so there are also solutions out there which are application-specific formats, right? And it's not just one, there is one that we know of which is the kernel or stack trace format. There are others out there, not open source, but you can see that there are applications out there who are fulfilling their needs by using similar methods.  And if you look across these applications, one of the common reasons why they have had to implement their own and come up with their own application-specific format is that they consider that EH frame-based stack tracing was coming out too slow and complex for their use case. And the problem with this solution is that now across applications you have this solution where these unwind formats which are internal to the application, you know, like ad hoc formats, but they're not generated by the tool chain. So if you are an application, you need to now port your application to multiple platforms. So you're now stuck with something that you cannot port. It becomes difficult to maintain, right? So you see now connecting all these methods together. There is bifurcation in the space coming out. And we need to ask why, why is this happening, right? So take a step back and let's look again. Frame pointer method was good. It was low overhead, but there is a performance impact. EH frame-based method was good. It was versatile. We could get rid of the additional, you know, we could get, we did not need to reserve any specific hardware register for stack walking purposes. But the unwinded itself came out to be complex with high resource requirements. And it wasn't the preferred method of stack tracing, especially for profilers and tracing purposes. Then come all these application-specific formats. The good thing about that is these are fast formats. They are designed specifically for the application. Information is off-band, so to speak. And but the problem here is this is not generated by the tool chain, right? There is this effort that is needed to reverse engineer and maintain these tools over time and port these across platforms. So this begs the questions of, so is there a set of requirements which if we fulfill, we can cater to the needs of fast and low overhead stack tracing? So the short answer is yes. And now if we connect everything that we just talked about till now, the requirements are these four. Support for asynchronous stack tracing. Asynchronous would just mean that given any PC you do, you can stack walk. Given any PC you will be able to stack walk. The second being that the stack tracing itself should be low overhead. Stack tracer should not be very complex. And third, it needs to be generated by the tool chain, right? So now I pull an S-frame into the context and S-frame has been designed with these requirements in mind. And we have defined and implemented S-frame stack trace format in Benutils 2.40. The spec is available in the release documentation. S-frame stands for simple frame stack trace format. It encodes the minimal necessary information that you need for stack tracing, which is given any PC, what is the CFA and what does the frame pointer and return address? That's all you need to stack trace. And that is all that is encoded in the simple frame stack trace format. Now, yeah, current version is version one. The format is defined for two ABI's at this time, AMD64 and AAPCS, the AR64 ABI. The format has support for encoding PLT entries as well. And on the AR64 side, there is support to also encode pointer authentication-related constructs. So if the return register is mangled with some signature bits, you have constructs in the format that allow you to encode whether or not the return address is mangled. And if mangled, whether it's key A, key B, and so on. The information appears in a new ELF section called dot S-frame. And the section itself appears in a segment called PTGNU S-frame. All that you need to do to generate S-frame is use an assembler 2.40 and later, well, in future, any later assembler, and pass a minus GS-frame to the assembler. The new linker will do the right thing as an if it sees dot S-frame sections and the input binaries, and it'll combine the S-frame section and generate one in the final linked artifact. Bin utils, read ELF and obj dump. The other binary utilities also have support, so you can specify minus, minus S-frame and get a human readable text output to it. Yes. Oh, okay, yeah, yeah, yeah. Sorry if I said it the other way around. So the question here was the linker already, does the linker already support linking S-frame sections? The answer is yes. The support is in GNU bin utils 2.40 and the linker just does the right thing there. It combines without any additional arguments, yes. Thank you. So now let's start to get a little bit into how is it that the information is laid out in the S-frame section. It's really simple. There is no complexity to it. So first from a high level view, there are only three components to S-frame section, the S-frame header, the S-frame function descriptor entries and the S-frame frame row entries. The S-frame header contains a magic number, a version number and some offsets. These two offsets that you see on the right side, the arrows, they point to the two subsections in the S-frame section. The first subsection of interest is the S-frame function descriptor entries. The second subsection of interest is the S-frame frame row entries. We will get into what these mean, but I think the takeaway from this slide that I would like to have is just one that all of these FDEs, you see FDE is the function descriptor entry. They are all together in a subsection and all the FREs go together in a subsection here. The FDEs are fixed length entries. These are basically some information per function. And if you keep these entries fixed length, that allows you to do binary sort, quick binary search and find your, the relevant FDE per PC. So that's the reason the FDEs are fixed length entries and FREs, then for size optimizations, we kept them variable length. So yeah, only the thing to take away here is information access in S-frame is via offsets and FDEs are clubbed together and FREs are clubbed together. To represent stack trace information for a function, you need one FDE, the function descriptor entry and N number of frame row entries. The number of frame row entries is something that depends on your function, how the function has been laid out. How is it that it uses the stack? So now let's go in further and see what is an FDE? What information does it contain? Again, very simple. It just contains the function start PC. What is the function size and bytes? What kind of code block is it representing? Is it a regular code block or is it a PLT entry? The reason being that the start PCs should be considered differently if it is PLTN. It's more like a pattern thing, masking thing for PLT entries for regular. The unwinded needs to handle it differently. Then there is an offset to FRE. So remember this diagram here. FREs for that function are appearing later in that section at a specific offset. So FDE tells you what is that offset so that you can easily retrieve them. The last thing is the number and type of FREs and we will talk about the type of FREs right now. So FREs is basically the, it's the backbone. It's the backbone of the S frame stack trace section. And all it tells you is that given a PC, what are the stack offsets to recover the CFA, FP and RA? And that's about it. So FRE contains the start IP offsets. So if you know the start of the function, all you have to encode is at what offset into the function does this stack trace information hold valid. So as you can see, the function size is maybe different. So you don't need as many bytes to encode the start IP offset. And this is one space saving optimization that you have that now you can, now basically in S frame format you have three different kind of FRE representations and you can use one over the other depending on what is the size of that function. And the last thing is, yeah, just the number and size of stack frame offsets are encoded right there in towards a trailing part of FRE. So now at this point we have talked about what is, what information is contained in S frame and what does it look like? Now I thought for the audience here it might be better to take rather again higher level ground and ask, so what is it about this format that makes it so effective? We talked about some features but to sort of tie it in, tie it up altogether. Let's see from the perspective of what is it that makes it effective, right? So the first thing in the right direction that I think is generated by the tool chain and that helps a lot in the sense that you can now use this format and this can be easily generated for your favorite applications. The second thing is going in the direction of since this has been designed for those requirements in mind, it is effective and again it's like let's take three key features that we can discuss and then bring home the point that this format is effective for the use case of fast and low overhead stack tracing. So the first thing is that these FDE's are sorted. They're sorted on the start PC of the function. Now most stack trace formats will do that and they must do that because you want to look up information in a quick way. So this allows them to do band research and this is similar, for similar reasoning it's also done in S frame. Since the FDE's are sorted on start PC it helps you to quickly find the stack trace data for the PC and the FDE's that hold the, FDE's hold the offset to where the corresponding start FRES are, yeah. So that's one thing. So it allows fast lookup of information. The second is the FRES, right? The stack offsets are encoded directly into the format. There is no business of executing more op codes to then generate the stack traces and this is also for those of you who know orc this is also something that, this is something that orc also does. The stack offsets are encoded directly. It's just that in S frame format there are some space optimizations done here. So which makes it more compact representation to put the stack offset. But that's the second feature that gives it its effectiveness. The fact being that the stack offsets are directly encoded you do not need to do any computation when you are stack walking. The third is also important. I think compactness is important and there are a number of space saving optimizations that we have done in the representation of the format. So think of it, so there are two knobs that have been used. One is that the functions can be of varied sizes. And the second is that the functions may use stack differently, some functions may use more space in the stack, some may use less of course. So the offsets will either need to be large or small. So depending on the function you can choose what is the size of the stack offset that you need to encode. So taking all three things then, well before we do that. So this is one graph that I have. We need to take it with some grain of salt as in, so first what this graph shows you is the ratio of S frame to the EH frame sections. There are two sections, EH frame, EH frame header. This is for X86 and it's only a limited set. I just, it's not really very representative. These are just some binary utilities. From the GNU Benutils. And this graph shows the ratio of the S frame to EH frame sections. And on X86 it's coming out to somewhere between 80%. Now EH frame is a totally, you know it caters to a different use case. It has more information in it, so it's not really a fair comparison here to say that S frame is 80% of EH frame. These are two different formats. They cater to two different use cases. But I thought it might be good for to satiate your curiosity if you were thinking about how large these sections are. And hopefully this puts it, gives you some perspective to it. So yeah, I think so at this point we have talked about few key reasons why S frame can be effective. And now we'll start getting into, we're switching gears now. So we will now start talking about the usability aspect of S frame. So there is a library called lib S frame. This is the S, sorry. This is the S frame format library is shipped with Benutils 2.40. It has APIs to read and write S frame data. Now it's been written with BFD and LD in mind. So it has APIs to write S frame data. I don't see why a stack tracer may need some APIs to write S frame data. But just to cover it all, there are APIs there to read and write S frame data. There are also some APIs for stack tracing. So if when you're stack tracing, you would like to find out given a PC, what is the FRE? And given an FRE, can you give me the stack offset? So those APIs do exist in this library. Going deeper, the S frame, lib S frame APIs. Again, I would like to assert here again that this is flavored for BFD, LD use case. So, and it is a young library. So I, at this point, I don't think it's fair to make any guarantees for a stable API, but we'll work towards that. The S frame dash API.h is a user interfacing data structure. You'll find some user interfacing data structures there and the API details. At this point, I think it's also valuable. If I, if I, clarify that S frame sections are unaligned on disk, right? So the lib S frame internally will handle, will handle the access to it in a, so that there are no unaligned accesses, but the format itself is unaligned on disk. There are read, write, and find APIs. And if you want to look up easily, there are some, they're all prepended with the same string S frame underscore decode S frame and code. And then for finding, there is S frame find FRI and FRI get offset. So this is some code that maybe can shed some perspective on how easy it is to stack walk. So this shows you how to stack, how to do one stack walk. So given a PC, what you do is you figure out where is it that the S frame was loaded up? You know, you get some offset. And with that offset, you find the FRI. Once you have found the FRI, so this is find FRI, once you have a handle on the FRI, all you need to do is get the CFA, figure out the CFA, then get the RA offset, figure out the RA return address, get the FP offset and get the FP. And that's it. So you're set up for the next iteration. And if you do this iteratively, there you have all the PCs in your, as you get the return addresses, that's your call chain IP. So it is simple and easy to use. We have tested for both AR64 and X8664 at this time. So for future work, there is some work lined up and on the assembler side, there is, so the GNU assembler, at this, the GNU assembler, the way it will generate S frame data is it will use the CFI directives generated by the compiler and it will, if you specify the minus GS frame flag to the assembler, it will generate the S frame section. Now there is one dot CFI directive that is being skipped at this time, which is the CFI escape. The compiler generally generates it and along with it, it specify here is an expression when you are generating, it's used in EH frame. So here's an expression to figure out what the stack offsets will be. Now the S frame machinery at this time hasn't been coded up to work on the CFI escapes, but I will add that, that's one of the things to do. But this means that it is not fully asynchronous because of this, but that being said, the number of times compiler generate CFI escape is really limited. So to be fair, I would say it's not fully asynchronous but it should be really, really close. Assembler side, we should also add some more regression tests. There's ongoing work on that. I think and by and large, what we plan to do in the next few months and for much of this year is to take on more feedback from the community on how and where they see use cases of S frame format. If you have some user applications that you would like to use S frame format for, please let us know if there can be any collaborations there. For the Linux kernel, there's another, yeah, we thought about the Linux kernel and we have started some discussions on how it can be used in the kernel as well. The discussions are ongoing. We did some POC, there are issues with that POC but what has come out is that there seems to be a general consensus that it will be a good thing to try in the kernel for user space. It looks viable so far and we would move ahead in this direction and the general idea is to do it generically so that it can be used by many of the components in the kernel like Perf or Ftrace and so on, Dtrace maybe and BPF hopefully. I think that's, we're nearing towards the end of the presentation, yeah, so that was quick. So we talked today about stack tracing, what are the methods of stack tracing and what are the challenges with each of these methods. We talked about the impact of S frame format, what it is and so on. If you have questions now, later get in touch with us at the binutils mailing list and yeah, that's all I have. It went by fast. So what applications are actually using S frame format today? Today, well, we have started looking into the user space. You're doing user space stack walking in the kernel so that will be one application of it but other than that, actively nothing yet but we would like more tracers and more profilers to make use of it. So the use case is really fast, low overhead and in theory, it'll be beneficial to all of the stack tracers, all the profilers and tracers out there. So are you working on converting some user space applications to use it now or are just getting the word out so other applications will start using it? So we started working on the user space for the kernel but the intent is also to go ahead and find out more of these applications where S frame can be directly used, yes. At this time, short answer as we started looking in the kernel but the others are something to think about for us, yes. So I don't know a lot about stack tracing but I do use tools that obviously benefit from it. I do a lot of multi-threaded parallel programming and I'm curious whether S frame or other approaches are better or worse at doing stack traces across threads like not just within, this is what this thread did that it came out of this frame in this other thread or things like that. I think it's orthogonal to which of these formats you use even if it is multi-threaded, yeah, it should just work depending on how you handle the stack across processes or threads, you just have to make sure that there is no collision there but format-wise this should just work, yeah. Okay, and I also had one just clarifying question, use the term asynchronous a few times in your talk and early in the talk you talked about it being a problem with the first approach, I think. It was never clear to me what asynchronous meant in this context, could you clarify that? Yes, so asynchronous means that given any PC you're able to stack walk precisely, right? So this is generally a problem with stack traces as in even if they're imprecise they are considered sometimes they're good enough for an application sometimes not but when I'm talking about asynchronous I rather mean that given any PC I want to be able to generate a stack trace precisely. So in case of frame pointer, so when you enter the, in case of frame pointer what the compiler has done for you is added few instructions in the prologue and a instruction in the epilogue in case of x86, right? So the first instruction I believe is what it does is it saves, it saves the RBP on stack. So you'll have a push to the stack and then, or is it the other way around? But either way, so the RBP has not been saved yet. Yeah, so you should first save and then update the RBP. So when you are in those instructions the RBP is not yet correct, right?  So that's what I meant by asynchronous. So frame pointer based approach is not asynchronous because if ever it happens that you are, because these are asynchronous, well asynchronous now being the request to stack walk, right? This may come in at any point and if your application is at that PC then you may have, you will have imprecise stack trace. And does that answer? Yes. Thank you very much. Okay, thanks.  So the S frame I understand it's kind of like a tracing format but is there a similar tracing format type prior to this? Or was it that, I'm just not familiar with the current situation about tracing. Was it like every tracing application uses its own format and you want to unify it or? So tracing applications. Well, I believe if I look back now and you know gather my thoughts most tracing for most of the trace. So the two components to your question are there other formats apart from stack trace? The short answer is yes. Laundry, if you look at EH frame it can be used for stack tracing. Although it's an unwind format. Unwinding means that as you're stack walking you are also restoring the register state, right? But you can use EH frame for just plain vanilla stack walking. So it is also a format for stack walking. Now there are also application specific formats like orc exists which solves a problem for kernel space stack walking, right? And now S frame. So yes, there are and there are more formats which I have not talked about. There are more formats than S frame that try to solve the stack walking problem but S frame is the only one at this time that seems to be doing it in more or less while more or less fulfilling the requirements, right? So we talked about those requirements of fast. What are the requirements to do fast low overhead stack tracing? So I think that's the first part of your question and the second was, could you repeat? Oh, my second question is probably, is it like for all those different types of, are they like for each of those formats, is it being used by multiple tracing tools already? Or it's just like each of its, like a tracing tool use each of its own format and you want to have a new format to unify that. It's mostly each tracing tool is free to use their own format but I think in practice, many of them are still using frame pointer or maybe even EH frame. I'm not sure. There are just a number of tracing tools out there because if you're pulling in, yeah, Lib and Wine and LibDW, you're using EH frame in those cases. And it really depends on the tracer. I don't know if tracers do it out there that they can detect that, you know, I would rather be these applications are using EH frame. So you specify while using the tracer that just use EH frame because just use frame pointer because I know the application has been compiled with frame pointer enabled. I saw you mentioned the ice frame is designed for x66 and I guess you also mentioned the power of the arm, right? The architecture, if I may be wrong, you have, if I recall correctly risk five, the function API is a little different from x86. Have you considered if you apply this to risk file, we will have the same solution or the solution will be a little different? Risk five, I'm not really sure of the API but arm 64 is different from this arm 64, the API. Well, arm 64 also has a link register. So, and this is really x86 related, you know, the picture here is for x86 but arm 64 has a different ABI, yes. It has both frame pointer and link register, right? So every call instruction will make, when you in arm 64 ABI, the call instruction will save the return register and the link register. But even then the problem remains that as you are going, as you see these instructions you don't know whether to use the LR or whether to use the FP. So there is still some reliance on an additional information somewhere. It could be EH frame, it could be S frame. You still need to rely on poor PC. So is it the LR that I need or is it the FP that I need? Right, that's the arm 64 ABI. For risk five, I'm sorry, I don't know too much about that ABI at this time. Recall is a little different than x86. But I guess maybe the basic idea is similar, you need the PC first and the frame pointer. So so long as the return register, so long as the return address is at a defined location, either it's stack or it's a fixed PC, right? So in arm 64, it's a fixed PC. It is LR. If it is not LR, it's stashed away on stack. In x86, the return register is always on stack, right? So it's a defined location. For these kind of ABIs, you can use S frame. But if there is an ABI out there where the return register can be anything, anything from any of these registers, then S frame format cannot be used as is. Because in S frame format, you don't encode the register number to say that this is the register that will be used for return address. So for those other ABIs, you will need format extensions. At this time, it works for MD64, AR64, and it can also be made to work for other ABIs where the return address is more or less yeah, in a defined location and a fixed register. It may still need format. It may still need some extensions as in we'll need to take a look at the ABI and just make sure everything still works. But I don't expect major revamp for those sort of ABIs for the other ABIs where the return register can be anywhere. I think there will be problems with this format because then it just bloats up. Now you have to all of a sudden be able to restore any register, right? So right now I have three offsets, CFA, FP, and RA. Now if the return register can be any register, then it just really bloats up the format. And I don't know if we really want to get there. Yeah, with this format. I have a question myself. Orc is one of those application-specific formats, right? And could you clarify what is the relationship between S-Frame and Orc? And in particular, why the kernel will need something like S-Frame to unwind the user land stacks and why you could not use its own application-specific format for that. So Orc is application-specific, yes, and it has been designed for kernel stack traces. Now kernel has this, kernel has not just C code, but also inline assembly and handwritten assembly. So, and there are some constructs in there which are I would say non-standard stack usage, but Orc still has representation for all of that. So it can represent everything that the kernel is currently doing. And for user space, can you use it? I think there'll be issues as far as I remember. There is a struct where the function start address can only be 16 bits or so. So it will need changes for it to be used out of the box for user space. You could do versioning of the format and move to that, but I haven't looked very closely. This is one of the things that I remember from having looked at it last time. Yeah, I mean, in theory, it is, Orc is doing similar things. The stack offsets are directly encoded. It wants to do stack, it wants to do fast stack tracing. So there are two sections, I believe they also do some sorting of these IPs. So you can look information clearly. So it's similar principles, but it will need changes for you to use it in user space. Okay, so basically S-Frame is not to replace Orc in the kernel, but to complement it to unwind user landstacks. For user landstacks, yes. Yeah. Well, thank you. Thank you.