Good evening and welcome to episode 351 of the Private Property Podcast. It's the Wednesday edition of the Private Property Podcast. If you want us for the first time, welcome to an incredible family. We will always tackle all things relating to real estate, help each other on our property journeys, and absolutely, absolutely love supporting each other, sharing tips and tricks with one another. Do make sure that you follow us across our other social media pages and join the rest of the other family members. And if you're watching us on Facebook, you'll see all the love that we always get from the other members of the family. And of course, to our regular viewers, welcome back. You know how we do it every single weekday. You and I have an appointment at 7pm, where we're always in conversation with a property expert who helps us navigate our property journey. Doesn't matter where you are in the property journey, this is your one-stop-shop where we're always tackling some other thing relating to property. And of course, you also know that you can catch other amazing shows on our social media platforms. It is a Wednesday, so it's your class, and it's going to be coming to your screen, so with the first time home of bias show. And every Tuesdays and Thursdays, Umbalinoa brings you the farming podcast. And she's running a great series, the gardening series, that I'm absolutely loving. Yesterday debuted, looks absolutely beautiful. So do make sure to keep up with that one, especially if you're running your own garden. Many of you know I've got green fingers and trying to grow my own veggies and herbs. It's actually currently raining now. That's why I'm even wearing headphones for the first time, experiencing heavy rains and thunder. So I know that the garden is going to be quite happy for that one. So do make sure that you tune into that show to get those tips and tricks to tend to your garden. And every Mondays and Fridays, Chad brings you the home shoppers show where he's always giving us amazing twers of exquisite properties that you can find on www.privateproperty.co.za. And those are the great shows that you can catch every single weekday at 8 p.m. right here across private properties social media pages. And of course it's myself as I'm doing all come out every weekday at 7 p.m. on your screens talking property. And before we get to this evening's conversation that I'm very excited about, it's part two of a conversation that we had during Wheels Week, looking at the importance of having a will. And I'm joined by Erofa Negar before I even introduce him. Remember that we're running that competition on our Facebook page. And this evening, I think it's one of those things we want to give away this money all the time. So hopefully the show will get a sense of who is this evening's winner and if they're going to walk away with the money in the money bag. I think we're back at 500 rands in the money bag, if I remember. Or I think it may have rolled over. My memory is now a bit dodgy. And of course all you have to do to enter that competition at home is to respond to and comment rather to the post that we've put up on our Facebook page as the pinned post. And make sure that you're watching us live on the show in order to claim your prize. I see the money in the money bag is 1000 rands. So that's how much you stand a chance of winning. It's absolutely a great way to end off the quarter, it's month end, having that little bit of extra cash is always a good idea. Well, let's get into it this evening. I am joined by Erofa Negar who's a head of business development, virtual Erofa, good evening. And thank you so much for coming back to part two of our conversation this evening. Ah, Zama, how's it to all the viewers? It's awesome to be back, thanks. You know, I think Adolf, before we even get to part two of the conversation for some of the viewers who missed the first, but definitely urge you to listen to it. We had Adolf in September during Wheels Week and we're really exploring the importance of having a will and looked at what even goes into a will. One of the big things that came out of that conversation was you obviously have to have witnesses that sign the will and the fundamentally big thing that we came up with because I think many of us sometimes struggle with it. And by no fault of our own is that you cannot have the witnesses be the beneficiaries because that is going to create havoc that you do not want. So even if we already know you're drafting, it is a family and everybody's happy witnesses should not be the people who are beneficiaries of that particular will. And I think, you know, Adolf, I am already not going to even have a start at the very top because we already covered so much. So for the people who missed part one, definitely go to part one. We're going to pick it up from where we left off because I already said that there was still so much I wanted us to go through and still cover.  The moment you sort of want to update your will. So sometimes instead of updating it manually and scratching things that could be disputed, rather just destroy that other one and always have only one, you know, copy of your will or one version of your will. Now, when we pick it up from there, because that's actually where we left off last year, in the event, I mean, last two weeks ago. So in the event where you then make them amendments and I think give us a few tips with people who perhaps may not, as I had just said, you know, may not, let's say scratch or rather may not create a new will, but still just want to make amendments there. So what, for people who are going to make, you know, amendments to the new will, what are some of the things that they need to be, make sure that they are still in place with that particular will. Because I think sometimes they think, oh, I did all those other things. I had witnesses, maybe this one, NJ, it's just me and I submitted. So what are still some of the fundamentals when you then make that amendment to the will? Okay, thanks, Alma. So what I understand is then we have a scenario and you must now be right that the person will not retype the whole will. You will make an amendment on the will with a pen. And so the most important thing is first do it as neatly as possible. So be very precise on which words or phrases you are deleting with your pen. Then make 100% sure that you write, that if you, if it must be a massive paragraph that you want to delete, make it clear that you are deleting that paragraph. But usually people want to just fix the date of birth or they just want to fix the name of the car or the name of the property or they just want to delete that property. So make sure you delete just the word or the phrase that's necessary. Then if it's a joint will, make sure you and the test data and the test tricks sign in full with the witnesses. The witnesses must sign in full wherever there's amendments and that's the simplest you can keep it. As soon as, as I said again, as soon as you start to make an amendment on the top of the page and at the bottom of the page and then the third page in the middle, it's becoming a bit messy. So rather than just type the will or do the will from scratch. And you know, out of when we then look at you know a will and some people for instance will typically have a life insurance policy. How do those two then sort of link up?  And we'd have instances where, you know, family members or siblings are fighting for the mother's life insurance policy amount. So how do those two then kind of relate to each other? Okay. So Zama, if you give me an opportunity, I'm going to I'm going to park a bit on this topic because this is the most sensitive topic of them all. And also we are experiencing an aunt industry in the judiciary environment and where the executives need to wind up their state. This is where the biggest challenges comes up and let me explain to you why. So life insurance creates in general liquidity in the estate. And if I say liquidity, I refer to cash being available to the executor or to the family to settle debt so that once that once the property had a bond, for example, the bond can be settled and the property can be transferred. And there's enough fees to settle the property transfer fees, executors fees, possible capital gains tax, etc. So when we speak about life insurance in our industry, at absent, the data is as follows that 52% of all the estates that we wind up does not have sufficient liquidity. So what it means is that if there's not sufficient cash in the estate, it sometimes can be a challenging situation for the executor and it becomes a bitter pill to swallow for the family and the beneficiaries because what happens now is it becomes a difficult conversation because somebody needs to provide that cash. And if nobody can provide the cash, then the sad thing is that the executor needs to make decisions on how we can generate cash. And then it becomes at the point where you need to sell property. So on the life insurance part, I break it down in three legs. So this is what works for me to explain it to people. So you will always need liquidity in this state. So you can quickly do a liquidity calculation at Virtual Advice, at IEFA Virtual Advice, we can do a quick liquidity calculation, which means we can quickly help you determine what is the amount of cash you will need to settle all your liabilities and the transfer fees. Not living expenses, not making sure your beneficiaries are looked after, just liquidity. The next part is that we try, it's important that we take the world's wishes and we link it to a financial needs analysis. And part of that is estate planning. So in layman's terms, it's to explain this to you. A person will write the world and he will say property A and property B must go to my wife. The children must get the cars and I want to bequeath a million bucks to my granddaughter. Now when the world has been read out by the executive, he sees there's a wish by the state and test the tricks to bequeath a million bucks to their granddaughter. But he can't find the million bucks. There's no million rent in the estate. So it's simple, it's easy to write the wish, but to execute on the wish, it's a different story. And for you to make sure that the world can be executed, we do financial needs analysis and estate planning with the world. You must do a world together with estate planning and a financial needs analysis. In fact, I want to actually correct myself to say that rather do a world with estate planning. A financial needs analysis is something different, but when it comes to wills and the execution of will do property estate planning. So estate planning talks about if you have a good estate plan done by a proper and an experienced financial advisor, you will say to that, let's look at your will. Now let's look at the estate plan. If the estate plan in the world can speak to each other and can execute your wishes with on the good path. And what I always suggest to customers and the public is to make sure that your estate plan and your world is together at one place in a fall. So for simple reasons, if the executor then must start working on their estate and he's got their estate plan, you can see that, okay, it was prepared that this life insurance will be bequeathed to this person and this life insurance will go to this estate and this life insurance was planned to settle this debt. So it makes the life of the executor much easier and it doesn't give any headaches to the beneficiaries in the air and the people that must benefit from the estate. So another thing that's important is we recommend that once you do estate plan and the will do a financial needs analysis. So the financial needs analysis is once the estate has been rounded up and the estate planning was executed with the will, then there's people that will need to live from the money that you left them. And especially if you were the main breadwinner and you were the one that brought 80 or 90% of income home, those people, and I said it before, if I have a property and I've got three cars, but I can't pay the petrol and the insurance and I can't take the children to the school and I can't feed them what's to use. I will start to sell off those assets to just live over it. So a financial needs analysis, what it says is you take what you describe what you need, you describe what you have, and in the middle there's a gap and we call it the shortfall. And we determine with the financial needs analysis what is the shortfall. And it determines, for example, if you are 30 years old and you pass away today, how long would you like to provide for your wife and your children? So usually it's another 30 or 40 years. So the older you get, the shorter the gap becomes because you've got, you should have lesser dependence. So the shortfall becomes less, but the younger you are and the more dependence you have, the bigger the shortfall. I don't know if that addresses a bit of the insurance with the will a bit. At all, not only does it address it, but it actually links it even in a way that I hadn't thought through. And I suppose it's also because no children, no dependence, so really don't think about it too much. And you're correct. I think oftentimes we will say, if you've got a property or whatever, let's say it's a car and it might not even be paid up, you're giving XYZ when actually there was still quite a bit of debt in those things that you're also trying to pass over. And I think it actually leads very well then to my next question, which is in the event that there's outstanding debt, for instance, on a home loan. So whether it's only, for example, the primary residence or if you've got investment properties, but when you essentially have a home loan, does the beneficiary of the will also inherit that particular, we'll say, problem? So the house, two million, when you pass away, it's still owing 1.5. So is the beneficiary getting almost inheriting that 1.5 debt? How does it then effectively work out? So Zama again, a great question. And I'm going to be old and use me and my wife as an example and how I've done our estate planning. So with our estate planning, I made it clear to my wife that there will not be cash in the estate, but there will be enough money paid out to her to settle the liabilities. So for example, we have planned it in this way and I'm not saying this is the answer. I'm saying you advise and you can sit. But for us, my need was this that Ulandi will receive money upon my death and that the executor will come to her and say to a listen, you are the beneficiary for property A and assets B and C and D but there's no cash in the estate. Adolf did not leave any money bequeathed to the estate. He did a lot of life insurance policies, but it was all bequeathed to you. So how are we going to do this? And then Ulandi is prepared because I shared the estate planning with her and she will go to the executor. No issue. Give me the details where I must pay the money into to settle the debt so that you can transfer the property over to my name. And then there's no issue. So it doesn't mean your life insurance must be paid to the estate. In fact, that just just for interesting sake is if your beneficiaries, 100% is on the same page that what's happening on your estate planning. It's better to bequeath the money to their beneficiary. And it's simple reasons that if the money goes to a beneficiary and they are well aware that what they need to do with the money, the executor can take a fee on that money. So remember an executor can only take a fee. And maybe some of my absolute colleagues will go, but you know, the executors needs to live. Yeah, they can live. It's fine. But what I'm trying to say is an executor can generate fee from the property needs to transfer. But if he doesn't handle the money, if he doesn't, so if money goes directly from a life insurance policy to a beneficiary, he doesn't handle the money. So he cannot take fees on it. That doesn't make sense. So to come back to the beneficiaries, if your beneficiaries are, and I don't know how many parents does that, you know, and I think it's great that the parents that's around with the children say, listen, it's not a hot topic, but the reality is someday we will pass on. It's not if it's when. And I want you to know that there is the will. There is the estate plan. There is some insurance that's bequeathed to you and you and you. And this is how I want you to deal with the insurance. I can't regulate or dictate from the grave, but know that the executor will come to you guys and say to you, there's no money in the estate and that you will know that that amount of equity you must be used to settle the debt. If not, it's a reality that then it becomes a long process to wait for cash. And it's just it's just pulling out the whole process of winding up the estate and then eventually property must be sold at the unfair value. And that's not what you want. Oh, and it's definitely not something, you know, that people want. No, I'm going to your questions and comments at home.  Right. And I'm here saying the bond insurance covers your outstanding bond debts.  That's the policy I took on both the primary and the investment property. And I mean, I know this bond cover. It's a great bond cover. Not everybody takes the bond cover. It's not a requirement for you to have that particular cover. And so you tend to find that some people think, oh, no, this is just another thing that's been sold to me. And sometimes I don't see the value in it in that moment. Unfortunately. And I think this is these are the conversations that you should be having with your partner or certainly your children, because we know that we see the fights. Right. And more often than not, they're just unnecessary and people, other people end up making quite a lot of money from hard earned money that, you know, your parents put away as much as they could and works towards so that your partner put away. And I even like the insight that I'd also sharing that look, if everybody's on the same page, you already cut out, you know, one one party that gets a piece, that would get a piece of the money in the event where they are disputes. So you also want to be as efficient as possible as a family. I want us to go for a quick break and see who the lucky winner is of this evening's cash prize. We've got a thousand rounds. That's in the money bag before we come up. I see with the love that we're getting Vanessa now, watching Averaensha, Padaqi. It's also watching Tulu Simea, Sandy, Stemit, Polinank, or see Andre Pitot. I see all those comments. No, I'm not saying saying I'm saying I still stand where I said in part one that will is very important no matter what. And it really is a key thing that I think so many of us sometimes take for granted. But I want us to go for a quick break. See who the lucky winner is of that one thousand rounds that is in the money bag. And we're going to come back with more insights on the importance of having a well. And of course, I'm in conversation with Adolf von Nigger. Let's see who the lucky winner this evening is. And the and this evening's winner is TK Kumalo. Well, I hope you're watching wherever you are. TK Kumalo is the lucky winner. I can confirm. I don't know who TK Kumalo is. So it's not an inside thing. And I do hope that if they are watching, they'll be able to claim that prize. So I do hope he's at the very least able to make sure that he comes on to claim that one thousand rounds. I won't congratulate him just yet because we need to make sure that he comes in or that rather he is already in to claim that prize. One of the things I mean, I'm keen to hear because you've even shared it as you're sharing the way that you've planned your own family estate is is there a limit on the number of different life policies that you can get? Or can I get a life policy? Let's say, for example, I make all of them a million round, but with four different service providers as opposed to having one that is four million rounds. Like is there a limit when it comes to life policies that we take in terms of the number of policies? So Zama, again, it's a great question. And sorry, there's a lot of, there's a big storm on the side. So if the signal goes lost, I apologize. But to come back to your question, you can't limit the amount of policies. But when you go to insurer, I think everybody needs to understand the insurer is willing to take the risk for a premium. So the insurer will then determine how much insurance you need to especially keep your living standards. And what is a time when it comes to enriching? So for example, the sad thing is Zama, we get unfortunately, we're in a broken world and we've got fraudsters out there. So when you usually apply for life insurance, they don't look at the amount of policies you have. They look at the amount of cover you have for a certain benefit. So for example, you've got life cover, then you've got disability cover, and then you've got income protection and threat disease. So there's one benefit which we call threat disease that covers cancer and stroke and heart attacks, et cetera, et cetera, and threat diseases. There's no limit, but the standard in the industry is an enormous 4.5 million. But when it comes to income protection, lump sum disability and life cover, the only limit that determines is your current living lifestyle. So when you apply, your insurer should ask you, what is your current gross income and what is your current living expenses, especially when it comes to determining how much cover they think is fair, but they have their calculations. So it does happen sometimes that people will apply, especially when it comes to business assurance. So when example, a property owner wants to cover his commercial property and they apply for insurance and the insurer will ask, but do you have other insurance in place to cover this property upon death or disability? If he says yes, then they will do investigation with other insurers. So there's a body, I think it's called a CISA, and they go and check, all the life insurance is linked to this system, and they go and see what is the type of insurance and the amount that you have. The bottom line is you can have 100 policies, but the value and the total sum assured of all the policies combined, there is a limit and it depending on your income and your needs. So there is always a rule that the insurer will apply. So that means Adolf, I can't decide. Look, I'm going to take up life insurance that's for 60 million rounds when I'm nowhere near that lifestyle at the moment. And even if I say, look, I'll take the premium. So even if the premium is 12,000 rounds a month, I'm like, it's fine, I'll take the premium as long as the payout is going to be 60 million rounds. I think that, I mean, look, I also understand it because I think at some point, you're not trying to, as you were saying, enrich. I think one of the key things with that kind of insurance is that you want to make sure that your death doesn't financially cripple your family or sometimes even has them losing things, having to get out of school or not being able to maintain the kind of lifestyle that they had prior to you passing away. Now Adolf, then what happens in the event where a miner is a beneficiary? How is that impacted when it comes to how the will gets executed? Okay, passionate about this, Zomar, thanks. I actually get response when you ask this question. So the first thing that must come to mind is remember the law of a miner is that it's a person that's under 18 years old. So if you just think about this for a moment and you take it that, let's say we had a child that's 10 years old and we pass away both my wife, me and my wife in a car accident. So this, yeah, I mean, but anyway, I'll get you. When we have a proper estate plan and a will in place, what is critical in that will is that the few, it's who's the guardian of that child. And you usually want to point the guardian that is not, he or she is financially independent. So meaning they don't want to be like Jaws and await an opportunity to, oh, yes, yes, money coming from Adolf and Yolande's estate. So the person must be financially sound. He must go out to work with money and he's there to look for the benefit of your child. So that's the first thing, who will be your guardian? The second thing is on the will is make sure you refer and your wishes that testamentary trust is drafted and that the trust for the child is immediately set up once you pass away. So all that it happens, I want to explain it as a safe event. So it's like a net where all the money for your child is going into this account, but nobody can come and fetch this money without approval from the trustees. And what you usually then do is in your will, you name who that trustees must be. And usually you appoint more than one trustee. So when it comes in our space, what we usually suggest for customers is, let absent trust be one of the trustees and let the family member or two family members be co-trustees because what is nice about this is the trustees will never benefit from that money that is that must go to your minor. They must manage it for the benefit of the minor. They will never benefit from it. So it will be your guardian, it will be your trustees and make sure there's a testamentary trust. The sad thing is, if you don't stipulate this properly in your will, for a minor, money is then paid what we call it to a guardians fund. And the guardians fund will then, it's fine, they will keep the money for the minor, but only until age 18. And that's where the other challenge now comes in. And just think about this, Zama. If you, when you and me were still 18 years old, and let's say at that stage, for whatever reason, we inherited 5 million bucks and the money must be paid out because there was not proper testamentary trust in place, what would you do with 5 million bucks when you're 18 years old? Okay, now, how many friends will you have? Look, I mean, out of our lie, at 18, I actually already had an interesting property out of probably bought a building and wouldn't have done that research. That's you, okay. But I know many of us would have bought a car probably, and all sorts of crazy things and probably hosting all kinds of parties. And I've seen those stories, unfortunately. When at 18, you're suddenly a millionaire at a drop of a hat, and often within a year, two years max, all of it is gone. And you don't even have an asset that's paid off to show for it. And you'd be like, there was a time, there was 3 million in my account that literally went in and you're swiping and swiping everywhere. And it's always just so sad to hear of those stories. So to come back exactly, so I had the scenario where an advisor said that he's sitting with a problem, there's a testamentary trust drafted, but the age was still 21. So when we advise customers, we advise that that age, when you will give the miner the access to that money, you can determine that age, but don't think it will not be for the benefit of the miner. And remember what happens is, when your miner or when your child needs to go to school, needs to study, needs to drive to the college, needs close, it's not that the trustees will not look after the beneficiaries' needs, the miner's needs, but they will manage and determine what is a need and what is a want. And that's where the balance comes in. And the purpose of the trustees then will be to say, it's clearly stipulated that our testamentary trust says that you will only have access to this money at age 25 or 30. In the meantime, we will make sure that your studies are paid for, that you get a living expense, that you get a property to live in, that you get a car to drive and that you have clothes to wear and you've got medical scheme. But we're not going to waste money, we're going to preserve it as much as possible, and that's the benefit of a proper draw of the testamentary trust in your world. And Adolf, when we then talk about that testamentary trust, one of the things financial advisor speaking to and having this conversation with and even other friends who we would talk about wills is this notion of sort of running people's lives from the grave because some wills can be quite hectic and you're still dictating from the grave, are parents, loved ones, whoever drafts this will, can you make one of the provisions, for instance? So you already say that, let's say that you make the full amount at age, let's say 21. Are you able to also, for instance, include that at that age, whether it's 21 or 25, sometimes I've seen where it's 30, that they must already have, for instance, an honest degree and that in the failure to have obtained tertiary degree X, then you can't give it. So it's either it's at 25 on condition that education level X is met. And if it's not met by, let's say, age 28, for instance, then this money goes through charity, for instance. Is that something that can actually be included in the world? I mean, I've heard of very few rare instances and I know some parents already I'm preemptively thinking, we're having open conversations, we're telling their children, there's this money, there's this world, there's this. And we know we're doing it from a preparing the children, they're already going to be in shock, should parents pass away. But unfortunately, out of the flip side of it, we also know that kids can get very easily lazy and complacent, knowing that, well, I mean, I know it's 21, I'm going to get 3 million, why do I need to do anything? And even though from 18 to 21, they're being taken care of, but there isn't that sense of, I'm now taking responsibility, I still want to be a member of society. Are parents able to put provisions of that nature? Okay, so Zama, the answer is yes. I mean, I can put as many and as much conditions as they want to. The sensitivity about this is, I just want to come back to what I spoke about the children. That open conversation with the children, usually you will have with a person that's an adult and that knows how to deal with money. A person that's a minor, you don't have that conversation with him. You have that conversation with your trustees that's on your will and the guardian that's been nominated on your will. They need to know about this. So usually, I mean, if you take the sad examples where we with COVID, the children loses their mom and their dad and it's young parents and the young children, they don't need to know about the detail, but what they need to know is once they get older, they will hear that their parents drafted a great will and a trust for them and they made sure that there's a good guardian and a good trustee setup for them that protected their money so that when they get older and they've got better stewardship and value for money, they will know what to do with it. So to come back is you can put the conditions, but we also had some court cases in the past where the husband, for example, wrote that he wants his wife to receive this amount of living expenses. But the thing is, he drafted the will in 1980 and then he passed away in 2010. So he never amended his will. So then there was a court case to say, but what was the intention of the test date? And then it becomes, and the trustee cannot go over and above what is the rule set up in the testamentary trust. They must adhere to that rule. So all I'm saying is that you must be very careful why you want to put certain conditions, but I must also be honest with you that we had circumstances where the parents come and say, listen, my child cannot work with money. My child is 45 years old and this is happening. And we must then still make sure that there's a trust for this 45-year-old child because they use it on the wrong stuff. So then the children come and say, but why must this money go in the trust? Your parents wanted to make sure that you get benefits from this money as long as possible. So we are just executing what your parents wanted us. So it's about why you put that condition and how stringent you want to be, but you can put the conditions whatever you want, but just be careful that you don't, as you say, your intention must be valid, Zama. The intention is always a question. And we're running out of time again because this really is one of those, I almost think we must do a series when it comes to this because it's a pressure point for us. Children, people have children, sometimes have even their parents. And we tend to shy away when it comes to talking about finances at this granular level and even communicating these things to your children or to your spouse because you think, that's why they were going to now be banking on me passing away or whatever the case is.  Because we hear stories of sometimes even four or five years after somebody has passed away and the state still hasn't been round up. Give us a sense of what makes the process, and just based on this conversation, I know viewers at home already have gotten a sense of what makes it easier, but what makes the process quicker and the quickest one? How long typically is that? And what are some of the challenges that then make it so thrown out that you sometimes still have people who are like seven years after somebody has passed away and the state still hasn't been adequately round up? Okay. So Zama, pre-COVID when everything was in place, your world was in place, there's sufficient liquidity, there's a proper plan draft that everybody knows what's to do and the executive doesn't have to run around, it took six months to settle in a state. Past COVID, when everything is in place, we're speaking about nine months to a year and the reason is because of the amount of estates that must be registered and distributed and resolved with the master of law court. So there's too many work and too little resources. So you can now prepare yourself for, I will be conservative to say yeah. And the sad thing is if these, if the will and the liquidity and the estate planning is not in place and not properly planned, then the time is unlimited. I mean, we still know, I'm sure there's people watching that says it's been five years, it's 10 years. We don't know when their state will be winded up. So my suggestion is we always speak about this. Go and review your will, make sure that you're comfortable with how money must be distributed and if there's sufficient funds. Speak to your trusted advisors or family and let them know where the world is and what must happen. And if you can trust your family and relatives who did do so, but it will make their lives much easier, Zama. If you just plan properly, it's like writing an exam. I spoke to you about my exam that I wrote last week. You know, you can't go into the exam and expect that it will go absolutely smooth but you didn't prepare. And the same is with the will and the winding up of the estate. You can't expect that your family will have a smooth ride resolving estate but you didn't plan properly. So rather do it properly and we can help with that. We would love to help with that. I think if you want to get in touch with the team we have shared their contact details down here below and I think that's a great place to leave it at. You've certainly given me a lot of insight that I also hadn't thought by the time I, if I ever am crazy enough to have children, I at least already have some insights and tips on how to best manage the family estate. You will not be crazy to have children, Zama. It's a privilege to have children. Having children is crazy. All that matter, always just think of tuition fees.  But we're going to leave it there this evening. Thank you so much for joining us and for indulging us for part two of this conversation. It's been a pleasure to have you on the show. Yes, thanks Zama, I appreciate it. And that is Erofa Negar because the head of business development, virtual distribution, and apps, insurance, and financial advisors. Wrapping up the Wednesday edition of the Private Property Podcast with myself is Amandonga Kumalo. Unfortunately, TK Kumalo, Amandonga, you've disappointed me. He was not watching us live and so we're going to have 1,500 rands rolling over to in the money bag for tomorrow's show. I'm unfortunately not going to be with you tomorrow, so I'll be back on your screens on Friday. Until then, of course, at 8 p.m., you can look forward to the first-time homebuyer's show with Esti Klassen. And I'll be back on Friday. Until then, hope you're staying home and staying safe.


So my name is Bean Webster, and this is the Compiling Android with LLVM talk. I'm the project lead on the LLVM Linux project. And we're just going to talk about using LLVM when it comes to Android. So the original idea of this talk came about in January. And I was hoping that I'd have lots of time to be able to get all of Android recompiled with LLVM in time for this talk. Unfortunately, real life got in the way. And I had a lot of other things to do with the actual project itself. And so I went as far as I possibly could in this particular endeavor before Android Builder started. And in fact, I was working on this until actually I almost got on the plane. So what we're going to do is we're going to actually look at what I was able to get done in this time frame and then talk about the kinds of problems that I started to have and the kinds of issues that are there in order to get Android fully compiled with LLVM going forward. The first question I'm always asked when it comes to using Clang on Linux, and specifically for the Linux kernel, is why would you want to bother? We have a perfectly good tool change, ECC. It's all good. Why would you want to use Clang and LLVM? And there's a couple of good reasons for it. The first one is it's a fast-moving target. So not all tool chain projects move quickly. In fact, some other incumbent kinds of tools, they tend to have a slower term for changes to get in. And that's just the nature of the kind of technology and the breadth and so on and so forth. It's just the way things have happened. In the case of LLVM and Clang, it's a relatively new project. There's an awful lot of people working on it. The source code is very easy to follow, much more modern architecture and design. The community around this particular project, very open, very friendly, very helpful. They're always there to answer questions. And the thing that's nice is that in just a couple of years, LLVM and Clang have actually got to the point where they're rivaling what's possible with other traditional tool chains. So there's actually quite a lot of value there. And the great thing is although it's actually not necessarily faster when it comes to the resulting binaries that come out of Clang, very similar in size and in speed. So we're not saying it's faster. It's usually just a tiny bit slower right now. There are a few situations where Clang actually does faster thing, but they're all very, very similar, statistically pretty close to being the same. One of the really nice things, however, though, is that Clang is actually considerably faster than other tools like GCC when it comes to actually compiling. So as we all know, there's the coding, compile, download to your target, testing, debug loop that you do. If you could actually cut down your compile times, that loop starts getting a lot tighter and a lot faster. And that's something that makes your life as a developer considerably easier. The other thing that's really nice about LLVM and Clang in general is it's based around LLVM, which is a toolkit. It's a toolkit for building tools. And it started off as basically a set of libraries and then the other tools were built on top of that. But what that means ultimately is that you can reuse a lot of those same sorts of core technologies in other kinds of tools to build other sorts of things. So traditionally things like compilers were built, linkers, jits and so on. You can also of course build executables with backend co-generators, virtual machines. LLVM after all stands for low level virtual machine. But there's also other things, such as source code analysis tools. In a lot of situations you have static analyzers and so on and so forth. One of the things you have to do to build those tools is you start off by building a parser and a whole grammar and so on and so forth. But that's done in parallel to your other tools like your compiler and so on and so forth. When it comes to the static analyzer that's part of this particular tool, it actually uses the same parser, the same grammar as the compiler itself. And so you can actually only have to make your change once when you change C standards and what have you. Another thing that's really nice about it is you don't just have to do it around code. One of the things I was told about just before I came here actually was in fact, somebody has actually written a Doxygen-like tool that uses LLVM. So what it actually does is it uses the parser that is used for clang. But instead of extracting the source code, what it does is it extracts the comments, associates it with the symbols that are around it and spits out documentation that way. Again, it's no matter reusing the same parser. And so you have a much tighter control of how things are tied back into the code itself. The other one isn't one that I necessarily thought of because of course, I tend to work on one section of the product at a time, but when it comes to a larger company, you're using tool chain across a lot of different kinds of domains, whether it's the actual parts themselves, DSP, GPU, CPU, different parts of the tool chain like the JIT and so on and so forth. It's nice to have a single tool across all those different domains. At that point, basically your experience is good across the different code bases like the DSP that runs the camera, your audio subsystem, your video on your GPU. There's things like CUDA, which is based on LLVM, RenderScript on Android. You guys of course know what that is. I don't have to explain RenderScript, but RenderScript is actually using LLVM at the back end to take the code that is compiled with RenderScript through a JIT at the last minute to be able to run that on the GPU. So all those dynamic animated backgrounds on Android are actually running on the GPU and not the CPU. The CPU can actually go to sleep to a large degree. Also of course is actually whatever the user space is in this case, Android applications. And then of course, like I said before, you can actually do document generation using some of the similar kinds of tools. The reason why this is useful is if you're a company and you want to extend the compiler in a particular way or add extra features that can be used, all of a sudden the extension only has to be written once and it works across all of these different domains. You don't have to actually figure out how to do it on your DSP versus your GPU versus your CPU. Same extension can basically run in all those areas. And this is very important because when it comes to actually developing those, that code that takes time, testing takes time. And then of course there's qualifying it. It's actually sent out the door and this makes all this take a whole lot less effort if it's the same back end tool chain libraries. The next one is of course license and of course there's always the whole GPL versus BSD thing. LVM is actually licensed explicitly under the IUC BSD style license. It means ultimately things like LVM technology can be included directly within your product. So in non-GPL code you can actually include it. Whether it's free open stuff or whether it's proprietary stuff you can actually use the same technology. It means you can extend it in either open or proprietary ways. Of course we would probably all prefer open ways but that's not always an option, certainly in mobile. And the other thing that's really nice about this is because it's used not only in the open and free areas, it's also used in proprietary areas. It means you actually have a much wider development audience. You've got a lot more people adding to it, extending it, making it better. And in fact there's actually quite a few people that their day job, their paid day job is in fact to work on LVM for their particular employer. Whether it be companies like Google, Intel and so on or different silicon vendors, mobile event vendors and then of course you probably all know Clang is used very heavily by companies like Apple so it even goes across industries. And I think it's actually pretty cool that the people who are really wanting to make iOS development better are paying to make a tool chain that works better in the Linux and the Android environment. I think that's a pretty sweet deal. The other thing is that used to be pretty unique to Clang is you had better error messages.  So they were called fix it hints and in Clang you actually get color syntax highlighting so you can see how this stuff works. The reality is though, we used to say that this was unique to Clang. In fact the latest versions of GCC have caught up. They do very, very similar things now. And GCC 4.8, there's actually a comparison on the GCC website comparing the latest version of Clang to the latest version of GCC. In fact GCC is almost entirely caught up and in some cases in certain errors it actually does a better job. But in general one of the nice things is that you can actually see how competition between the different tool chains has actually led to a situation where both tool chains are getting better as they compete with each other. So that's pretty exciting. The next one that's pretty good is that the LLVM toolkit actually has a static analyzer that's built in, it's called Checker.  And those HTML files will ultimately show you all the different paths through your code that may be a problem. And in this particular case you can see the example where if you go through the top there, using opt-arg in this particular example, if you go to a situation where opt-arg is null, you will fall through into the else portion of that if statement. You'll then go through the switch and in this particular case it's set to T, your opt is set to T. And when you get down into the code at the bottom, you end up calling string to lane with opt-arg being null. That's a problem. It's not immediately obvious when you look at your code, but Checker can find this and show how these things work. So relatively simple example, however the nice thing is that Checker, like everything else in LLVM, is expandable. So whereas it ships with code that allows you to debug, for instance, malloc and free kinds of issues, it'll actually figure out where you're not freeing memory or you're leaking memory. It's the kind of thing that you could basically extend and in fact people have extended it to work with K malloc and K free, for instance, to work within the kernel code, for instance. So some pretty exciting things you can do there. Other thing that's pretty nice is companies such as Google have actually taken it to a whole new level. There's a really great talk that was given at one of the conferences a little while ago for LLVM. And in fact, they're actually using LLVM to parse out all their code in their compile farm to actually look for bugs. And so they're using the parser to actually figure out how things are working, looking for common bugs and common errors and situations where APIs change and then they're actually using the backend to actually rewrite their C++ code. So they're compiling code into code such that if it changes, they can send an email back to the developer. Developer can see the new code, figure out whether it's better, whether it actually solves the problem and then it can be checked back in again. So wouldn't it be great if you had a mechanism where you could basically fix common errors without having to do as much work as you would have to do if you did it completely manually. The next thing is client LLVM are you already using a lot of different projects? Of course it's already used in Android as far as render script is concerned. Works on RM MIPS and x86. LLVM is used very heavily in image processing and on GPU code, things like LLVM pipe driver, Clover for OpenCL and so on. And it's also used in a lot of situations for shader optimizers and so on on various GPUs. Other things like the Debian project, Sylvester Lajeroo part of the Debian project is actually regularly rebuilds the whole of the Debian archive with Clang to see how things are working. And in fact, it seems to hover around 10%. But 10% of the packages don't build, they break on build, but the rest of the packages build just fine and work great. So we're actually getting to a point where this stuff works pretty well. The ironic thing is between version 3.1 and 3.2 of LLVM, the number of packages that failed to compile actually went up. And it's kind of interesting because a lot of bugs got fixed in upstream code and so the percentage should have come down. LLVM, they'll start to complain about more and more warnings and errors and as a result, packages that used to work actually started to break again. But the neat thing is that it's still hovering roughly around 10%. So again, LLVM includes a whole tool chain. There's a C C++ Objective C compiler. You've probably heard of Lib C++. It's a alternate C++ library that came out of the same project. It's something that's also being compiled into a lot of different projects. There's a static analyzer I talked about. It's a pretty new project but there's LLDB so it's a debugger, specifically using the same kinds of technologies or placement for the use of GDB. And then there's a number of different linkers that are being worked on. MC Linker is the embedded version. It's the linker that's meant to run on the actual platform itself and LDD.  The reality is, is it right now? Certainly for the development that I do, I still use GDB and I actually still use the GNU Linker because these projects still aren't necessarily at the level that they need to be at for the work that I do, unfortunately. The neat thing, however, though, is that Clang as a C compiler is actually already being shipped commercially in a couple different areas. Obviously, it's being shipped as part of Xcode from Apple but it's also now being shipped as part of the NDK for Android. And in fact, the last drop of Android had that in there and there's been a couple of really good articles about it. But Clang is being used in a lot of different situations to where it produces more optimal code and more optimal situations as being basically used instead of other options. The really cool thing is basically, GCC has actually gotten a lot better over the last couple years in direct competition with Clang. We used to have a whole bunch of different slides that we gave showing how Clang could outperform GCC when it came to developer experience. And the reality is is that GCC does all the same sorts of things now, things like macro expansion, better error reporting, it actually does do fix it hence now as well. And the address sanitizer that was added to Clang, which actually looks for potential addressing problems ahead of time, that was actually added concurrently to GCC. Basically, the developers all worked together to make that work. So we're actually seeing positive change on all of our tools through competition between these two different tool changers, which is really neat. Now most of the time I spend during the day is actually on the LLVM Linux project. Like I said, I'm the project lead there. And the whole point of this particular project is to basically sit between the kernel community and the LLVM community and actually get one code base to work with the other. We want to be able to develop the Linux kernel within LLVM and not just on GCC. So we spend a lot of time figuring out potential problems, issues that prevent that from working and we maintain a series of patches that we try to upstream as best we can to both projects. And the big thing is we try to concentrate all the different people. There was a number of different people and organizations working on this. It's a matter of bringing them all together so we're all getting the work done faster and helping each other out. If you wanna learn more about it, we've got a Wiki webpage. It's got information about our bugs that we found, Roadmap, Project Status, all that sort of stuff. There's documentation, how-to's and all that sort of thing on how to build stuff. However, if you actually wanna use our code itself, we've got a Git repo and bear in mind we don't actually maintain our own versions of the Linux kernel and LLVM. We maintain patches and a automated toolkit that basically allows you to check out our code, type make, it downloads patches and installs LLVM and Clang. It downloads all the tool chains that we need extra beyond that. Linux kernel code and then finally QMU and a bunch of different test tools to make sure that what we've ultimately done works properly. So like I said, we actually maintain a whole bunch of patches. Our patch management is primarily done using Quilt and the reason is because the underlying version control system, although usually Git isn't necessarily always, some of the code bases are actually subversion. And we also do things like I said before, we still have to use some parts of the GCC tool chain for cross situations, for ARM for instance, which is what I spend most of my time on. We actually have a choice of back-end tool chain and when it comes to actually building a target, you just specify which tool chain you want, it downloads, installs and builds it for you. And by default, we use code sorcery but you can also have the option of using the linear or going to cross tool chains or indeed the Android tool chain, which is what I used for the work I did for this talk. You can just specify it at the bottom like that or within your make file itself, just specifying your cross-arm tool chain. The targets that we currently support in this particular platform are things like the versatile express and the Qualcomm MSM chip as well as X86, those are our major development platforms. However, in preparing for these conferences and such, we decided to try and work out things on a number of different platforms, things like the Raspberry Pi, Nexus 7 and the Galaxy S3, which was actually the development phone I was trying to prepare the work for for this talk and we'll talk about that a little bit later. We also maintain a build bot that not only tests all of our code but actually tests all of our patches against all the new check-ins as they come in. So every time LVM, Clang, the Linux kernel community check-in new code, our build bot sits there, adds our patches, reruns all the test cases. The idea is to catch bugs as soon as we possibly can. And for instance, just this past week, one of the things that got my way was the dwarf changes that were just added to the latest LVM backend in order to support X86 massively broke the ARM compile and so we had to basically patch those back out again till they actually fixed that. Those are the kinds of things that we can catch through the R-automated test cases that we run on a regular basis. Now those of you who actually go and look at our build bot you'll actually see we also run LTP tests on a nightly basis, however they're all red right now and they don't work and it's because the SD card driver just broke. Didn't have time to fix it, so a bit embarrassing but it's all working, it's just that our test image can't be loaded as the root file system. So I apologize. That's I think one of the first things I have to work out when I get back to my home office. So indeed if you guys want to actually check out what we're doing and communicate with us, we've got a mailing list, we've got an IRC channel that we hang out on. We've got developers across three or four different continents, all in different time zones. There's usually somebody there to talk to and ask questions about. Now onto the real stuff and that's basically the challenges using Clang and LLVM to build things like the Linux kernel. And again, I concentrate primarily on the Linux kernel. So I'm gonna talk about the Linux kernel and then applying that to the Android kernel. The challenges that we first have is unlike GCC where you actually have to build an entirely different tool chain per cross-compile target, right? ARM, Linux, GiniAVI, GCC. When it comes to Clang, it's a single tool and then you just specify your host triplet, basically what you wanna build for.  Unfortunately what that means is that you don't necessarily know what triplet you need to use in a particular situation. So the first challenge sometimes is figuring out what that happens to be. So Clang is very useful when it comes to cross-compiling but there's a couple of things if you're not familiar with it that makes it a little bit harder. One of the great things about the tool kit for LLVMs it actually includes an integrated assembler or IA. And what that means is that the assembly is extremely fast because it's built right in. You're not actually forking off a different process and sending assembly code back and forth. The problem is though, unfortunately, is that IA and the GNU assembler are slightly different. They take slightly different inline assembly code when it comes to C itself. And as a result, when it comes to at least the Linux kernel, we actually couldn't use IA. We could use it in a number of situations but there's a lot of inline assembly that's used in the kernel that actually doesn't work with IA. So we actually had to turn it off. And actually interestingly, the boot up code of course on X86 is 16-bit. IA only is, it's a 32-bit only assembler. So that kind of causes a lot of problems.  We actually use the GNU assembler for that very reason until that kind of thing can be fixed. And it is a bug upstream in LLVM that people will eventually get to. The other thing of course is that we've still got a dependency on the GNU tool chain and specifically on the assembler and the linker. And until quite recently, it was a bit of a pain to set that up appropriately. Now we actually have an option called GCC tool chain. You just pass in that particular path and it knows where to find those back end parts. The other kinds of things that we had at least when it came to the kernel itself is GCC and Clang have slightly different ideas as to what C standards ultimately get followed. GCC has always gone its own way and had extensions beyond what is in the actual C standard because quite frankly people who use GCC tend to push the limits of what C can actually do. And so there's been some really great extensions in GCC over the years. And in fact, there's the GNU 89 standard that GCC defaults to or usually defaults to. Clang on the other hand actually defaults to a later standard to C99 and specifically the GNU 99 extensions. And as a result, code that's been developed using GCC with GNU 89 sometimes doesn't work entirely properly with GNU 99 because the standard has changed somewhat. The other thing is that GNU 99 is actually very, very close to the C99 standard whereas GNU 89 actually is quite different from the previous C standards. The other thing quite frankly is that a lot of companies that work on the Linux kernel also employ compiler writers and sometimes they sit quite close together. And sometimes one guy says the other wouldn't it be great if compiler guy says no problems, I'll do it. And they toss the code over the divider and it all works. The problem is it never gets documented. So there's a whole bunch of stuff that we found that actually wasn't properly documented that's slowly being fixed. But it means ultimately that you get an option that was added specifically for the Linux kernel but nobody really knows what it does except the people who originally added it. So that's been a bit of an issue as well. And then finally there are a number of GCC flags that are in there again that are specific to GCC that pretty much nobody else supports including Clang as well as built-in functions. So built-in parts to the actual compiler that don't necessarily translate to other compilers. So I'm actually gonna give a talk similar to this at ELC but just to go through the kinds of issues that we had specifically really fast. The first one is that Kbuild doesn't support Clang. It's highly GCC specific. Again there are options that are GCC specific that Clang doesn't support. The other thing is that there are extensions that Clang cannot support and doesn't wanna support. Things like variable length arrays and structs and things like nested functions. Both are actually Ada functionality that leaked into the C compiler. And these are the kinds of things that we can't support. And variable length arrays are supported in the C standard. That as soon as you put them into a struct the C standard actually explicitly forbids them. So as a result Clang doesn't do them. They're actually, to implement, actually takes a lot of code and it actually makes your compiler a lot more complicated and actually slower which is why they don't wanna do it. The other problem we found is the Linux kernel actually depends very heavily on the linker and different parts of how things are linked together. And what we found is that Clang actually has a couple of issues there. It links things a little bit differently. It means we actually get a lot of segment reference issues where things in the code actually call across segments where they're not supposed to. So you get a lot of warnings around that. And the good thing is we actually just tracked down what the problem is. It turns out that the CPP portion of Clang is actually stripping out certain attributes that we rely on. So that's something we actually have to fix. We only just figured that out actually last week. Again, as I said before assembly, inline assembly is actually a little bit incompatible with IA.  It's actually a built-in compiler function that tries to figure out whether a particular pointer is static and from that you can actually do a lot of optimization of your code. Unfortunately Clang, because of the way it's architected, actually can't implement that functionality. And so there's a couple of places where Linux uses this built-in function. We just have to patch around it. We don't actually have a solution for that one yet. So when it comes to actual where we are, as far as the kernel is concerned, what we've actually managed to do is we've added patches. So these are things that aren't necessarily upstream yet, but we're working on it. First thing is we've added cable support for Clang. We've added patches in that actually move us away from the use of explicit register variable names in C back to using inline assembly. So unfortunately those explicit names like referring to the stack pointer directly, not supported in Clang. We have to remove the use of place, okay? Variable length arrays and instructs are used heavily in the crypto system, in net filter and a couple of other areas like the gadget code in USB. It's not something we compile, so it's a matter of recoding that. So we have some patches for that that we're trying to work upstream. Again, there's the segment link, linkage differences, and then there's the fact that extra inline actually has changed meaning between GNU 89 and GNU 99. Again, GCC defaults to the GNU 89 behavior. So anywhere where extra inline is used, it actually has exactly the opposite meaning in the new standard. And so we actually had to mark those explicitly with attributes to tell Clang, use the old meaning of it, not the new meaning. Again, built-in constants. We basically patch out the use of built-in constant, and then finally there's a couple of really crazy uses of the aligned variable that are really, really quite complex and hard to understand. GCC understands that particular use of the aligned variable, and we basically just had to simplify it into two lines and then Clang could do the same thing, but it's just the way it was parsed wasn't working in Clang, whereas GCC could actually understand it. So we're actually at a point now where Clang itself is actually pretty good. Most of our stuff's been upstreamed. There's actually still four patches that are specific to X86, but as far as ARM is concerned, the next version of Clang, Clang 3.3 will very likely work out of the box for the Linux kernel. The only caveat to that, of course, is the stripped attributes that are coming in in CPP. That's, like I said, a brand new problem that we still need to figure that out, so we're not sure how that's gonna work, but we're really hoping we can get that into the next version as well. The most exciting thing about this is that the 64-bit type handling wasn't actually supported by LLVM on ARM until quite recently, and actually the Qualcomm Innovation Center actually just managed to get that code in, so they've been working over the last probably six months to take a really big patch, and it ultimately got cut down into a whole bunch of smaller patches, and ultimately, like I said, it just got accepted upstream, and it's now on by default. So on a 32-bit ARM, we can now do 64-bit type handling. And then, of course, the other thing is that we still can't use the integrated assembler at this particular point in time. When it came to actual compiling Android itself, I had access to a couple of different devices, like I said, the Samsung S3 and so on, and so we decided to use this particular phone with cyanogen mod, just because it made things a whole lot simpler. So this is a phone that actually uses the Qualcomm MSM chip set, something we already had patches for, so it seemed like a good choice. So I managed to get my hands on one of these, and first thing I found, of course, is that it's not a developer phone, so the first thing I had to do was I actually had to root the phone. Of course, when I was doing that, I realized, okay, there's no fast boot. Okay, so now what do I do? Right, so I had to find that Samsung actually uses this thing called Odin mode. It allows you to download flash images only. Okay, well, I can get access to that, fair enough. I can put Clockwork mod recovery on there. That gives me more access to it, but it basically meant that I had to burn everything to flash whenever I wanted to do any testing. Now, there's actually a Linux version. I actually had to flash it using Windows, but actually found out later there's actually a tool called Heimdall. Somebody's reverse engineered the protocol and you can now actually do the same sorts of things from Linux. But once I actually got to the point where I had a custom recovery image, at this point I could actually start making real changes to the Android build that was on here and actually start doing my real development. So I spent a couple of weeks on this. I started first with the D2-ATT kernel from Cyanogen mod 10.1 and it's an older kernel. It's, I think it's 3.0.59 is what I was playing with. So the first thing we did is we ported over the LLVM Linux patches and I got some help from my good friend, Mark Charlebois at Qualcomm to help with that. We used our framework to actually build the LLVM Linux framework. So we actually have a new target called Galaxy S3 that allows you to build it. And then from that, because we did that actually, I should say, we did that because we had to use the newer Clang and the Clang that's built into the Cyanogen mod is still the older version of Clang. It's version 3.1, whereas we're using the latest and greatest SVN version of Clang. So we built it in our framework. We then installed it into the Cyanogen mod build system, build a boot image, install it with Clockwork recovery mod, you know, through either the SD card or through ADB and reboot. And there's nothing that's more frustrating and having a phone in your hand that's basically buzzing every 10 seconds as it reboots over and over and over again. So the first thing we had, of course, is we didn't have fast boot. I can't see the console because it's not up. So what do I do? So the nice thing is, of course, back to Clockwork recovery mode. Of course, the great thing there is you can ADB shell in and the really nice thing is that you have access to proc last K message. I didn't actually know that before, but it means you can actually see what was coming up in D-Message before the last time the kernel was running. So it's a bit of a slow debug but basically it was a matter of build a kernel, build a boot image, install it, reboot, have it fail, reboot back into recovery, ADB shell in, look at the D-Message, figure out what the problem was from the oops that was there, fix the code and repeat. And I did that for quite a while. In fact, I did that until the day before I got on the plane to come here. And the really, really great thing is that we've got a couple of different people on the project. And like probably the rest of you, they're one of those people that say wouldn't it be cool if, and one of our guys in Brazil actually said wouldn't it be cool if it worked on my Nexus 7? So he actually did exactly the same thing. He went out and he grabbed his Nexus 7, it's running on NVIDIA Tegra 3. So, and of course it's a developer platform so you can unlock the boot loader really easily with fast boot. You know, absolutely no problems, completely supported, it's all good. Install clockwork mod recovery at the same point. In fact, this is work he did. I didn't actually do this. He was doing this while I was working on the Galaxy S3. And again, he started with the grouper kernel from Masayana Gen Mod. He took my patches from ARM. He ported them over to the kernel for Android. It took him a couple of hours. It's basically a matter of back porting those patches from 3.8 back to 3.0. I'm sorry, it's not 3.0, I think they used 3.3. Built it in the Linux kernel. Install it in SANA Gen Mod to build the boot image. And he installed it using clockwork recovery.  So we were really happy about that. So the funny thing was is that the backup plan was actually for me to go out and I actually bought this the day before spent my night installing his work. It worked. Next morning, got on the plane and I'm here. So the nice thing is that I can actually now show you that on this particular platform, I can actually show you that if we ADB shell in here, if I cat, whoops, if you cat that file there in the proc file system, one of the nice things is Linux keeps metadata about how it was built. And if you look over to the right there, it says the name of the compiler that was used to build the kernel. In this case, you can see it was Clang version 3.3. Now that's actually not the released version of 3.3 because of course we're not there yet, but you can actually see that we're actually running this with Clang, a Clang can build kernel. And the nice thing is that two of us have been running this on our Nexus 7s for a few days. I've had a couple of weird things happen, but in general it's just worked. And we've been really, really happy about that. So again, it's one of those things where it's really nice to use a completely supported platform that works out of the box. And although we didn't think we actually had support for Tegra 3 with our patches, turns out that it was entirely trivial to get this working on here. When it came to the S3, the problems that we were actually having in this particular case was we were having problems with the init, our D not coming up properly. We were having problems with a couple of different of the drivers that didn't work. And the last one that unfortunately I ran out of time to go any further on, turns out it's the sound driver. The sound driver was basically not coming up, which meant the sound system couldn't come up, which meant that Android rebooted. So very, very frustrating, but there you go. That was the problem we were having. So in parallel, I was actually working on a number of other, oops, should really get rid of that. Okay, so in parallel, I was actually trying to spend as much time as I could on building Android itself with LLVM.  It has a lot of different moving parts and so on and so forth. I tried to basically try and patch LLVM into the build process in probably some pretty naive ways. Okay, I didn't have a whole lot of time and so I was trying to do this as fast as I possibly could. The first thing I tried was just, well, let's see if I just pass in CC variables. See how that works. Right, so pass in CC equals clang, CXX equals clang plus plus, and you know, brunch D2, ATT, so I was working on the S3, and away we go. Right, no, it completely ignored it. It basically went back, used GCC and bit of a failed experiment. But I was kind of hoping that would be the easiest way of doing it. The next thing I did was actually go into the make files themselves and start to replace the usage of how things work. Now, if you've looked through the make files before, you'll see that of course in most cases it's CC equals cross compiler GCC. It's the easiest way of doing it right, so in the case of a native compile, you're just using GCC, in the case of cross, you actually add the triplet to the beginning and away you go. Again, like I said before though, clang's a little bit different. You actually pass in clang and then to target you pass in the triplet without the trailing dash. Right, so that's basically how to take off the trailing dash in a make file. So I put that everywhere for target CC and tried to build. The problem is that again, a lot of these make files have been designed in such a way that the variables don't have spaces in them. And of course there's two spaces in the CC variable now and so all sorts of really bad shell errors popped up and everything else. And again, it was just taking too long to figure out how these things work. So my next approach was actually to write a wrapper script and just stick it in the path ahead of all those other compilers, right? And basically say okay, well I'm gonna have a shell script, it's going to pretend that it's ARM, Linux, Android, GNU, EBI, GCC. And then in the background it's going to figure out what the triplet is based on the file name and then call clang appropriately. Sadly the problem I had in this situation is that the make files are very clever and they actually reset the path and call a lot of things directly by a full path name. And there was only so far I could go with this before I realized it wasn't gonna work very well. So the very, very final thing that I was hoping to have time for but ended up spending a lot of time on the kernel was actually replacing all of the tools, all of the instances of GCC on the file system with my wrapper script such that they were called explicitly. Unfortunately that was something that was taking a lot more time than I had because of the Linux turtle and that's probably how I will probably proceed now in order to get this stuff to work at least initially. Because it's a matter of trying to get the code actually patched to work with LLVM before you can go any further. Overall though, these are the kinds of observations rather I made based on the experience that we've had building a Linux kernel and so on. And the first thing of course is that the build system for Android is relatively GCC centric. That's not bad, it's just that's the way it was built. But that means that a new compiler coming in if it has a different way of being invoked that can cause a lot of problems. The other thing of course is that again you're back to the use of options that don't necessarily scan over to the other compiler. And although I didn't actually see these specific issues I'm pretty sure those are probably also problems there. The other thing of course is again you're back to the whole GNU 89 versus GNU 99 kind of situation. Again, had I actually got a little bit further those were the kinds of problems I was expecting to have to start patching on a regular basis. And of course the final thing is that since you're building the operating system itself the big thing of course is that your C compiler has to be tied into the C library that you want to use. When it comes to building Android of course you need to make sure that it's not using G-Lib C that it's using Bionic instead. So you can't just necessarily apt get install clang for your machine and start going. You have to use a clang that's been built specifically for Android like the one in the NDK. Although the NDK one of course is 3.1 and at least as far as the kernel is concerned you need a much newer version of that. Those are the kinds of things that I was hoping that would basically make up for the fact that I wasn't able to actually get any further than I actually did. And I'd just like to leave you with one last thing and that is basically who wouldn't want an Android with dragon wings. Okay, thank you very much for your time. Thank you.


Good morning, everyone. Thanks to the Hyperledger community for having invited us to share our vision and thoughts about social identity and the future of digital identity. Before start just a few words about us. I'm Emiliano Vernini. I've been working for post-Italian over the last 14 years. Currently, I'm the head of the innovation strategy whose mission and goal is to bring new technology inside our organization and support business innovation. Here with me today, Rosario Zeghiara, hi Rosario, please introduce yourself. Hello. My main interests are computer programming, especially Commodore 64. This is the most important part of my CV. Please, Emiliano. For those who are not familiar with post-Italian, as you can imagine from the name post-Italian is the largest postal and logistic operator in Italy, but is also a bank, is also an insurance, is a mobile virtual operator and with its over 12,000 postal offices spread all over the Italy, is for sure the biggest proximity network in Italy.  We have over one million and a half visitors per day in our postal offices. You can imagine from these huge numbers how big is our company. Probably you're asking why post-Italian and digital identity is well because post-Italian is also the biggest digital identity provider in Italy. Post-Italian issued over 16 million digital identities. Post-Italian solution that is named post-D is AIDA certified and so post-Italian plays a really crucial role in the digitalization process of the Italian country. Before going deeper in our solution and what we have developed so far, just to set a common ground of knowledge, I will go briefly through the evolution of digital identity model during the time. So started from the centralized identity, seal of the identity in which one operator holds all the information related to the digital identity of the user. Through this identity provider, the user can gain such as to online services. This model has several problems. First of all, the user is disintermediated let me say as not the full control over his data. There is a third party that can track all the user digital interaction but also the user experience is really fragmented due to proliferation of the digital identities for the same user. The federated model solves this last problem, this last issue but the user is not still in full control over its data. There is always an identity provider who disintermediates the user from the service provider. And so the evolution is the social identity whose main goal is to bring back the user, the citizen at the center of the digital identity ecosystem and give the user the full possession and control over its digital identity information. And so the user is now able to with social identity is able to gain access to online services without relying to a third party. If we look at what happened in the physical world, we all know that a citizen, a user can ask to some attestation or identity document to a public registry. And then he can collect the identity document, the attestation and store it in his wallet and use whenever he wants, whenever he needs to access a public service. The verifier can, of course, check for the validity of the document just looking at the document. Well said, social identity aims to replicate exactly these flows also in the digital world. And so using the blockchain as a trusted registry for anchoring the digital credential and for verifying the validity of the digital credential so that an older user, a citizen can in every moment independently and again without relying on a third party on a trusted issuer gain access to online services. And the verifier can in every moment check against the blockchain for the validity of the credential provided by the user. Social identity is not a new and exploratory topic. There are a lot of different implementation and projects that are running U-Port, ION, Sovereign, Alastria, but also a project within the boundaries of the European blockchain partnership that is named as if European social identity framework that aims to create a common framework for the development of a European digital identity. So when we first started exploring social identity, we decided to not reinvent the wheel, but to start from one of the implementation, the implementation that best fits our need and our vision. And so we decided to start from the Alastria implementation because Alastria model, Alastria SSI model is in line with the S framework because Alastria is built on top of the European blockchain services infrastructure. And in Italy, post-Italian is part of a project that is named Italian blockchain services infrastructure that is in line and aims to be interoperable with the HEBS infrastructure. And moreover, because Alastria is built on top of Quorum that is an Ethereum implementation. And it is really important for post-Italian because we want to use a general purpose blockchain instead of a dedicated vertical blockchain for development for digital identity application. Now I leave the stage to Rosario who will go deeper in the technical details of our project. And then I will be back at the end of the presentation just to share with you some consideration about the possible business model. Okay, let's start from the mandatory slide with the hyperledger ecosystem. We have very emphasized in this slide in red the components we studied and analyzed in these last few months. And in green what we what actually made into the current version of our solution. Next slide. Let's check how these red components have been analyzed and how we took the decision. Of course, we are talking about the surface of an identity solution. So the mandatory first step was starting studying hyperledger indie. Then we took a glimpse that lasted for at least three, four months studying fabric. The final decision also driven by what Emilia the strategic ideas Emilia not talked about was to go for Bezu because Bezu is of course an Ethereum virtual machine and perfectly matched our technological requirements. Also we dedicated some of our brain power in studying hyperledger artists. But still the final decision was to go for Veramo as the agent framework. Then we have a caliper caliper is something we use to benchmark our infrastructure. Next slide. This is how our solution currently is framed between the other competitors. On the far right you see hyperledger indie. From our point of view it was some sort of full stack solution that not really was suitable for the multi-purpose ecosystem blockchain we were designing. For these reasons we didn't use it. On the left you see Alassia. Emilia said that was the first solution that really had a range of functionalities that matched our functional requirements. For this reason we went into the deep of code of Alassia and started customizing it. Please next slide. Once again post ID will be just one of the systems of the solutions deployed on the hyperledger based infrastructure nodes you see in the lower part of these slides that will be named IBSI EBSI in Italian that is Italian blockchain services infrastructure. It will be just one of the users cases we are going to work on. Let's get into the decision on moving away from Aris. Aris from our point of view is absolutely the most advanced agent framework available on market. Still the funny the nice thing that the useful thing is that it is out of the box able to accommodate the range of different agents deployment model we intend to use so there is a dotnet version that can be used for mobile app. Still the same version can be used for the server and so on. The real problem is that our current stack and our guidelines software development guidelines we adopted internally are mainly based on Node.js TypeScript and hyperledger is even if is available for Node.js in Node.js TypeScript the flavor it doesn't have the same maturity level of the dotnet version and customizing it would not match with our plans. So for these reasons we moved to Veramo that is one of the projects in the U-port effort. Veramo is a clear plugin-based architecture that allowed us to clearly fully plan a customization of such plugins in order to there too on one side get to the smart contractor of our SSI implementation and on the other end be deployed both on the mobile phones and in the government public services web services. Okay let's get to the next slide. This is something that going to Veramo is something we planned for the next iteration of our app. Current iteration has been designed and developed by taking some shortcuts. For instance we used a non-grown agent framework which just allowed us to have a synchronous communication among agents that in the simple words just allowed us to interact by using the wallet app with the issuer, the verifier and so on just by scanning QR code and sending a credential for instance taking them and sending them to a call back this was a real movement that still has been functional to getting to an MVP that we finalized just yesterday evening for the first time. Next slide is depicts what we are planning. We are planning to replace the mid-layers that we call on the left part post-ID library and post-ID wallet API to something named the public post-ID agent that will allow as you can see from the sides of the block in the upper layer on the right part post-ID that is the wallet the issuer the verifier and so on will be developed in the same way just relying on the lower part that is the agent framework customized for each of the different deployment model. This is a quite interesting step we are currently designing it. Next slide we give a glimpse to the current version of the smart contracts which as I said already said were just to take inspiration from Alastria. In the upper part we see the function separated for each of the possible identity taken by each of actors in the ecosystem so we will have an identity for smart contract that test the functionalities for every actor in the system service provider functions for just the service provider, the issuer and so on. Then at the very core of the system there is the identity manager smart contract that also collects the four registries that are the very core of every SSI solution where the credential registry, presentation registry, public registry and the brand new credential schema registry which that is something we designed and implemented because it was not available in Alastria. Each of the registry of course take care of keeping just the smallest part, a bit of information needed for the functions of the system so we just keep the ashes of the credential, the presentation and so this is also to be compliant with the GDPR. And in the lowest part of the the schema you can see the identity proxy each of the actor will have his own copy of the identity proxy at the address of the identity proxy will be part of the DAD schema you can see on the right in yellow. In the next slide there is another small detail on the technological strengthening effort we had with the smart contract that we added from Dom and Zeppelin an upgradability smart contract that allowed us to fix bugs and scale functionalities in future without losing the state of each smart contract. And we also added a rule-based access control to have a fine-graded administrative tasks control on each of the registry of the DDD of the our SSI solution. Finally in the last in the next slide you can see Evianno please start the video. You can see the current version of the post ID app as you may expect it is a big yellow app with the standard with our enterprise logo colors and it is the as I said the MVP1 we are planning MVP2 for next September that the two main additions will be one of course is the agent I talked about hopefully enough in the previous slides and the next big step will be a system to allow user to get back in to recover the credential here she may have lost during the daily using of the system. Okay this is the end of my part please Emiliano. Okay just to share with you some consideration about the model for sure for post-italian which is now an identity provided in Italy it will be a great shift from a custodian from to be a custodian of the customer data to we are now trying to test a different model we are now trying to support our customer the Italian citizens in managing their own data autonomously but for sure we think that not all the customer have enough digital knowledge to go by themselves so we are planning to use a premium model because as you probably know digital identity now is free and will be free forever but as post-italian we think we could offer premium services in order to help our customer managing their data. An example of premium services could be for sure keys recovery in case of wallet loss or key confirmation by an hacker but also we can offer a online repository to back up a store an encrypted version of the credential and also offer ancillary services like transaction document signing trusted communication and so on so we are trying to shift our model we are trying to understand if this model is sustainable or not shifting from a custodian model to a different business model okay now I think it's time for some question if you have I can say there are at least three questions one is from party costas do you do you think there is possibility you would leverage the public ethereum blockchain in the future please I think it is a great question and we are working with diver ledger bezu because it is as you probably know it is an ethereum client that could be used to access also the ethereum public network it depends on the regulation okay I think the regulation will be very important because we need to to define what is our what will be defined by the regulation but we think yes we technically we could also use the we are ready to go okay the other question from Patrick who will be running the meso nodes in the initial project phases will this be public to read write okay we are we are we are using right now the the test net of the ebsi project ebsi as said before during the presentation stands for italian blockchain services infrastructure and is an experimental project that aims to build a public blockchain ecosystem for the public administration right now the the the blockchain is permissioned but we are moving towards a public permissioned model so everyone can read from the blockchain but just uh known organization and so uh just validators can write on the on the blockchain but everyone can submit transaction okay there is another question from pasquale could you tell us the information of the very valuable credential you are storing in the blockchain how do you avoid the privacy issues I guess I can answer this one that we just may keep on blockchain just a careful crafted hash in this way you can check once you have a credential you can check its validity by calculating this hash still you cannot correlate use this hash to correlate the activities of an actor across the blockchain another question from catarina reis is that italian infrastructure aligned or apart of ebsi yeah ebsi is the is the correct name is the right name right now ebsi is aligned with ebsi meaning that we share the same technological infrastructure but we are also looking at the at the technical governance of ebsi in order to stay aligned in the future I don't know probably uh what I what I expect is that the ebsi will be full interoperable with ebsi whatever it uh it means uh rickardo basso seems to duplicate the question about going on mainnet uh we are not using the the ethereum testnet the public ethereum testnet right now we are using uh a private blockchain uh that is the ebsi testnet in the case to switch to the ethereum uh public yeah yeah there's a there's a matter of transaction costs that we need to take into account there's another question more on the technical side dark creation proofs implemented as a zero knowledge proofs uh as in everlair gerindy this is something we have on the timeline for sure we are not putting it for the next mvp we hope to be able to put our dirty ends on this solution based on on bls maybe for mvp yeah mvp 3 i guess i hope actually yeah yeah uh we hope uh within this year before the end of this year we will have an implementation of uh of the revitalization with uh with the support for zero knowledge proof uh okay it seems there are another question uh no no it seems that we tried uh uh is there a reason i should choose you as provider of revival credentials versus a ministry for instance actually accommodate the credentials for army uh for our ministry yeah yeah yeah we we provide the credentials for the public administration right now in italy uh so we are certified let me say certified digital identity provider so there's not a huge difference between us and the uh between the credential provided by poise italiana and the credential provided by a ministry for sure for sure we can offer right now more services compared to the one uh offered by by a ministry but right now in italy uh a public ministry do not offer uh digital credentials uh i'm not really sure when this session should end seems there are no more uh questions okay if you have any other question please connect with us using uh linked in our twitter and you can see the answer okay it's a wrap we have just one minute left thank you everybody for training us and for the uh useful feedbacks bye bye have a nice day enjoy iver ledger global forum


So these are themes that are extremely important to me, so I look forward to working with you all and listening to you all today. I like the idea of technology being on the side of women. What does AI mean for fashion? Innovation and the sharing of information is key, isn't it? Sitting and watching these minds at the top of their game at work, trying to find out how the sustainability goals of the UN are going to be implemented. It's so exciting to see a mind at work and that's what I saw today. It's a way of making sure that there is a structure for allowing knowledge to be passed on to the people who will eventually be leading in this fourth most polluting industry in the world. Everybody deserves to have a way out that takes you somewhere. I think that companies have an enormous role also towards their own well-being. Companies like Pandora who look to the future by participating in the search for solutions to sustainability are actually going to be part of the innovators. Innovators are the people who tend to survive in the long term. Thank you guys. I look forward to talking more tomorrow.


What's up everyone? It's your girl Kenzie here from Leighton sports guards and I'm ripping a personal here for Peter And we've got one twenty one twenty-two Panini origins basketball Hobby box. All right best of luck Peter. Thanks as always for hopping in here. We go Um, I can try Bradley if I have time I will rip it But if not it will go with me tomorrow night. I'm doing Monday night personals here tomorrow I can definitely try But I can't make any promises as I'm only live until 3 30 All right, we've got LeBron base Quentin Grimes rookie a Jeremy Grant base pistons red parallel Ben Simmons and Orange to 75. I don't know soon move Bulls on the orange rookie there Yeah, there won't be personals tonight after group break. So if anything it'll just rip tomorrow with me, Riley We've got Nets rookie patch of Deer and sharp Deer and sharp for the Nets Just put in the order notes as well just in case Bradley that you want me to rip it and Pacers on card rookie auto Chris Duarte. There you go, Peter. Nice rookie auto there for you Alright, thanks again, Peter. Congrats on the hit. So we'll get them right out to you